Fenix/aclocal.m40000644000000000000000000010772510607526662012513 0ustar rootroot# generated automatically by aclocal 1.7.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file 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. # Add --enable-maintainer-mode option to configure. # From Jim Meyering # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 5 AC_PREREQ(2.52) # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]) fi])]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... AC_PREREQ([2.54]) # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [_am_stamp_count=`expr ${_am_stamp_count-0} + 1` echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.7.1])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # -*- Autoconf -*- # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_AUX_DIR_EXPAND # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. # Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50]) AC_DEFUN([AM_AUX_DIR_EXPAND], [ # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # AM_PROG_INSTALL_STRIP # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # serial 4 -*- Autoconf -*- # Copyright 1999, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_$1_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [rm -f .deps 2>/dev/null mkdir .deps 2>/dev/null if test -d .deps; then DEPDIR=.deps else # MS-DOS does not allow filenames that begin with a dot. DEPDIR=_deps fi rmdir .deps 2>/dev/null AC_SUBST([DEPDIR]) ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST(am__include) AC_SUBST(am__quote) AC_MSG_RESULT($_am_result) rm -f confinc confmf ]) # Configure paths for SDL # Sam Lantinga 9/21/99 # stolen from Manish Singh # stolen back from Frank Belew # stolen from Manish Singh # Shamelessly stolen from Owen Taylor dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS dnl AC_DEFUN([AM_PATH_SDL], [dnl dnl Get the cflags and libraries from the sdl-config script dnl AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], sdl_prefix="$withval", sdl_prefix="") AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], sdl_exec_prefix="$withval", sdl_exec_prefix="") AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], , enable_sdltest=yes) if test x$sdl_exec_prefix != x ; then sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config fi fi if test x$sdl_prefix != x ; then sdl_args="$sdl_args --prefix=$sdl_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_prefix/bin/sdl-config fi fi if test "x$prefix" != xNONE; then PATH="$prefix/bin:$prefix/usr/bin:$PATH" fi AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) min_sdl_version=ifelse([$1], ,0.11.0,$1) AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) no_sdl="" if test "$SDL_CONFIG" = "no" ; then no_sdl=yes else SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_sdltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_CXXFLAGS="$CXXFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" dnl dnl Now check if the installed SDL is sufficiently new. (Also sanity dnl checks the results of sdl-config to some extent dnl rm -f conf.sdltest AC_TRY_RUN([ #include #include #include #include "SDL.h" char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (int argc, char *argv[]) { int major, minor, micro; char *tmp_version; /* This hangs on some systems (?) system ("touch conf.sdltest"); */ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_sdl_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_sdl_version"); exit(1); } if (($sdl_major_version > major) || (($sdl_major_version == major) && ($sdl_minor_version > minor)) || (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) { return 0; } else { printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); printf("*** to point to the correct copy of sdl-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_sdl" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$SDL_CONFIG" = "no" ; then echo "*** The sdl-config script installed by SDL could not be found" echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the SDL_CONFIG environment variable to the" echo "*** full path to sdl-config." else if test -f conf.sdltest ; then : else echo "*** Could not run SDL test program, checking why..." CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" AC_TRY_LINK([ #include #include "SDL.h" int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means SDL was incorrectly installed" echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi SDL_CFLAGS="" SDL_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(SDL_CFLAGS) AC_SUBST(SDL_LIBS) rm -f conf.sdltest ]) Fenix/AUTHORS0000644000000000000000000000000010607526656011700 0ustar rootrootFenix/bin/0000755000000000000000000000000010601620470011371 5ustar rootrootFenix/bin/fbm.prg0000644000000000000000000001023410572216250012653 0ustar rootroot// FBM utility // ---------------------------------- // // (c) 2004 Jos Luis Cebrin // // Conversion utility for FBM files. Use: // // FBM file.fbm file.png ; Conversion from FBM to PNG // FBM file.png file.fbm ; Conversion to FBM // FBM file.fbm ; Show information about FBM // // Also, the following commands can be append: // // CENTER:x,y ; Set the graphic center // n:x,y ; Set the control point n import "Image"; global string destination; string source; string commands[99]; int command_count; end // --------------------------------------------------------------------- function Syntax() begin say ("Use: FBM source [destination]"); end // --------------------------------------------------------------------- process Main() private int i, pos; string command, parameters; begin say ("FBM Utility - Copyright (c) 2004 Fenix Team"); say ("FBM comes with ABSOLUTELY NO WARRANTY; see COPYING for details"); say (""); for (i = 1 ; i <= argc ; i++) if (regex(":", argv[i]) != -1) commands[command_count++] = argv[i]; if (command_count == 100) say ("Too many commands!"); end elseif (source == "") source = argv[i]; elseif (destination == "") destination = argv[i]; else Syntax(); exit(); end end // Nothing to do? if (source == "") Syntax(); exit(); end // ----------------------------------------------------------------- // Load the file from disk // ----------------------------------------------------------------- // Load the original file if (regex("\.fbm$", source) != -1) graph = load_fbm(source); elseif (regex("\.map$", source) != -1) graph = load_map(source); elseif (regex("\.png$", source) != -1) graph = load_png(source); if (graph < 0) say ("Error al cargar " + source); exit(0); end if (destination == "") destination = regex_replace("\.png$", ".fbm", source); end else // Nothing to load graph = load_image(source); if (destination == "") destination = regex_replace("\.*$", ".fbm", source); end end // ----------------------------------------------------------------- // Execute command line options // ----------------------------------------------------------------- for (i = 0 ; i < command_count ; i++) pos = regex(":", commands[i]); command = substr(commands[i], 0, pos); parameters = substr(commands[i], pos+1); pos = regex(",", parameters); if (pos != -1) x = (int)substr(parameters, 0, pos); y = (int)substr(parameters, pos+1); end if (command == "center") set_center(0, graph, x, y); elseif (command == "name") map_set_name(0, graph, parameters); elseif ((int)command > 0) set_point (0, graph, (int)command, x, y); else say ("Command " + command + " unknown"); exit(0); end end // ----------------------------------------------------------------- // Save the file to disk // ----------------------------------------------------------------- if (destination == "" or command_count > 0) // Show information about the file say (ucase(source)); say (""); say ("Name : " + map_name(0, graph)); say ("Size : " + graphic_info(0, graph, G_WIDTH) + " x " + graphic_info(0, graph, G_HEIGHT)); say ("Depth : " + graphic_info(0, graph, G_DEPTH) + " bpp"); say ("Center : " + graphic_info(0, graph, G_CENTER_X) + ", " + graphic_info(0, graph, G_CENTER_Y)); for (i = 1 ; i < 1000 ; i++) if (get_point(0, graph, i, &x, &y)) say ("Point " + lpad(i, 3)+ " : " + x + ", " + y); end end if (command_count > 0 && destination == "") save_fbm (0, graph, source); say (""); say (source + " (Saved)"); elseif (destination != "") say (""); end end if (destination != "") // Convert the file to another format if (regex("\.png$", destination) != -1) save_png(0, graph, destination); elseif (regex("\.fbm$", destination) != -1) save_fbm(0, graph, destination); else say (destination + ": unknown extension"); exit(); end say (source + " -> " + destination + " (Saved)"); end end Fenix/bin/test.prg0000644000000000000000000003762610577305334013113 0ustar rootroot// -------------------------------------------------------------------------- // Fenix Tests 2000 Jos Luis Cebrin // -------------------------------------------------------------------------- GLOBAL option ; PROCESS Menu() PRIVATE i, c, map ; BEGIN load_fpg ("test.fpg") ; set_fps (30, 4) ; write (0, 160, 4, 1, "Fenix tests") ; write (0, 160, 14, 1, "Select your option") ; write (0, 60, 50, 0, "1. Basic sprite drawing") ; write (0, 60, 60, 0, "2. Blending operations") ; write (0, 60, 70, 0, "3. Primitive drawing") ; write (0, 60, 80, 0, "4. Scroll interactive test") ; write (0, 60, 90, 0, "5. Mode 7 interactive test") ; write (0, 60, 100, 0, "6. Path-finding interactive test") ; write (0, 60, 110, 0, "7. Sound test") ; write (0, 60, 150, 0, "0. Exit") ; map = new_map (320, 200, 8) ; map_clear (0, map, 0) ; option = 0 ; REPEAT IF key(_1): option = 1; END IF key(_2): option = 2; END IF key(_3): option = 3; END IF key(_4): option = 4; END IF key(_5): option = 5; END IF key(_6): option = 6; END IF key(_7): option = 7; END IF key(_0): BREAK; END c = rgb (rand(32,128), rand(32,64), rand(32,64)) ; x = timer/5%100 ; IF (x > 50) x = 100-x; END xput (0, map, 160, 100, timer*-50, 200+x, 4, 0) ; FROM i = 0 TO 100: map_put_pixel (0, map, rand(0,320), rand(0, 200), c) ; map_put_pixel (0, map, rand(0,320), rand(0, 200), 1) ; END FRAME ; UNTIL option != 0; unload_map(0, map) ; END PROCESS Header(string title) BEGIN delete_text (0) ; write (0, 160, 4, 1, title) ; write (0, 155, 15, 2, "FPS:") ; write_int (0, 165, 15, 0, &fps) ; write (0, 155, 25, 2, "Speed %:") ; write_int (0, 165, 25, 0, &speed_gauge) ; write (0, 160, 185, 1, "Press ESC to continue") ; END // ---------------------------------------------------------------------- // Simple sprite drawing // ---------------------------------------------------------------------- PROCESS FallingObjects() BEGIN set_mode (320, 200, 16); put_screen (0, 1); Header ("400 sprites") ; FROM x = 0 TO 400: FallingObject(100, 100, 0, 0); END WHILE !key(_ESC): FRAME; END; signal (TYPE FallingObject, S_KILL) ; WHILE key(_ESC): FRAME; END; Header ("100 rotating sprites") ; FROM x = 0 TO 100: FallingObject(101, 100, 0, rand(500,1000)); END WHILE !key(_ESC): FRAME; END signal (TYPE FallingObject, S_KILL) ; WHILE key(_ESC): FRAME; END; Header ("100 sprites with transparency") ; FROM x = 0 TO 100: FallingObject(100, 100, 4, 0); END WHILE !key(_ESC): FRAME; END signal (TYPE FallingObject, S_KILL) ; WHILE key(_ESC): FRAME; END; Header ("100 scaled up sprites") ; FROM x = 0 TO 100: FallingObject(100, 150, 0, 0); END WHILE !key(_ESC): FRAME; END END PROCESS FallingObject(graph, size, flags, angleinc) PRIVATE xspeed, yspeed, inispeed ; BEGIN z = rand (-5, 125) ; x = rand (15, 305) ; y = - rand (20, 100) ; xspeed = rand (-10, 10) ; yspeed = rand (-4, 0) ; inispeed = rand (10, 15) ; angle = rand (0, 50 * angleinc) ; LOOP alpha = timer; x += xspeed ; IF (x > 305 || x < 15) xspeed = -xspeed; END y += yspeed++ ; IF (yspeed < -14) yspeed = -14; END IF (y > 180) yspeed = -inispeed ; IF (inispeed > 1) inispeed--; ELSE inispeed = 15; END END IF (out_region(ID, 0)) y = -rand(20, 100) ; inispeed = 15 ; END angle += angleinc ; FRAME ; END END // ---------------------------------------------------------------------- // Blendop tests // ---------------------------------------------------------------------- PROCESS BlendedObject (x, y, string text, string text2, int flags, blendop) BEGIN write (0, x, y+32, 4, text) ; write (0, x, y+40, 4, text2) ; angle = 1000 ; size = 150 ; graph = 101 ; LOOP angle += 2000 ; FRAME ; END END PROCESS BlendedObjects() BEGIN graph_mode = mode_16bits ; set_mode (m320x200) ; put_screen (0, 1) ; Header ("Blit flags") ; BlendedObject (60, 65, "Normal", "", 0, 0) ; BlendedObject (160, 65, "H-Mirror", "", 1, 0) ; BlendedObject (260, 65, "V-Mirror", "", 2, 0) ; BlendedObject (60, 135, "Normal", "Transparency", 4, 0) ; BlendedObject (160, 135, "H-Mirror", "Transparency", 5, 0) ; BlendedObject (260, 135, "No key", "", 128, 0) ; WHILE !scan_code: FRAME; END scan_code = 0 ; signal (TYPE BlendedObject, S_KILL) ; Header ("Blending operations") ; blendop = blendop_new() ; blendop_translucency (blendop, 0.70) ; BlendedObject (60, 65, "Transparency", "(70%)", 0, blendop) ; blendop = blendop_new() ; blendop_grayscale (blendop, 1) ; BlendedObject (160, 65, "Grayscale", "(Luminance)", 0, blendop) ; blendop = blendop_new() ; blendop_intensity (blendop, 2.00) ; BlendedObject (260, 65, "Lighting", "(50%)", 0, blendop) ; blendop = blendop_new() ; blendop_tint (blendop, 0.50, 255, 0, 0) ; BlendedObject (60, 135, "Red tint", "(50%)", 0, blendop) ; blendop = blendop_new() ; blendop_intensity (blendop, 0.75) ; BlendedObject (160, 135, "Darkening", "(25%)", 0, blendop) ; blendop = blendop_new() ; blendop_grayscale (blendop, 1) ; blendop_intensity (blendop, 3.0) ; blendop_swap (blendop); BlendedObject (260, 135, "Inverted", "(Grayscale)", 0, blendop) ; WHILE !scan_code: FRAME; END fade_off() ; graph_mode = 0 ; set_mode (m320x200) ; END // ---------------------------------------------------------------------- // Primitive drawing // ---------------------------------------------------------------------- PROCESS PrimitiveTests() PRIVATE map, color, i ; word POINTER ptr ; BEGIN load_fpg ("test.fpg") ; Header ("Primitive drawing") ; graph = new_map (400, 400, 8) ; set_center (0, graph, 200, 200) ; drawing_map (0, graph) ; x = 160 ; y = 100 ; flags = 4 ; REPEAT drawing_color (rgb (rand(0,255), rand(0,255), rand(0,255))) ; draw_fcircle (rand(0,399), rand(0,399), rand(0,25)) ; draw_rect (rand(0,399), rand(0,399), rand(0,399), rand(0,399)) ; draw_line (rand(0,399), rand(0,399), rand(0,399), rand(0,399)) ; draw_circle (rand(0,399), rand(0,399), rand(0,100)) ; FRAME ; angle += 1000 ; UNTIL scan_code; unload_map (0, graph) ; END // ---------------------------------------------------------------------- // Scrolling // ---------------------------------------------------------------------- PROCESS ScrollTest() BEGIN define_region (1, 0, 0, 160, 100) ; define_region (2, 0, 100, 160, 100) ; define_region (3, 160, 0, 160, 100) ; define_region (4, 160, 100, 160, 100) ; start_scroll(0, 0, 200, 1, 1, 15); start_scroll(1, 0, 200, 1, 2, 15); start_scroll(2, 0, 200, 1, 3, 15); start_scroll(3, 0, 200, 1, 4, 15); scroll[0].camera = ScrollSphere (160, 100, 100) ; scroll[1].camera = ScrollTriangle (scroll[0].camera, 0) ; scroll[2].camera = ScrollTriangle (scroll[0].camera, 120000) ; scroll[3].camera = ScrollTriangle (scroll[0].camera, 240000) ; scroll[0].ratio = 400 ; scroll[1].ratio = 800 ; scroll[2].ratio = 50 ; scroll[3].ratio = 2000 ; scroll[0].speed = 3 ; scroll[0].flags1 = 4 ; scroll[1].flags1 = 4 ; scroll[2].flags1 = 4 ; scroll[3].flags1 = 4 ; scroll[0].flags2 = 129 ; scroll[1].flags2 = 129 ; scroll[2].flags2 = 129 ; scroll[3].flags2 = 129 ; Header ("Scroll test") ; REPEAT: FRAME; UNTIL key(_esc); fade_off() ; stop_scroll(0) ; stop_scroll(1) ; stop_scroll(2) ; stop_scroll(3) ; END PROCESS ScrollSphere (x, y, graph) BEGIN priority = 100 ; ctype = c_scroll; LOOP IF (key(_right)) x += 4 ; END IF (key(_left)) x -= 4 ; END IF (key(_down)) y += 4 ; END IF (key(_up)) y -= 4 ; END IF (key(_space)) x = y = 0 ; END FRAME; END END PROCESS ScrollTriangle (follow, angle) BEGIN priority = 101 ; graph = 102 ; ctype = c_scroll ; LOOP x = follow.x + get_distx (angle, 40) ; y = follow.y + get_disty (angle, 40) ; angle += 185000 ; FRAME ; angle -= 180000 ; END END // ---------------------------------------------------------------------- // Mode 7 // ---------------------------------------------------------------------- PROCESS Mode7Test() PRIVATE a, b ; BEGIN put_screen (0, 1) ; Header ("Mode 7 - Press cursor keys, Q, W, A, Z") ; start_mode7 (0, 0, 1, 0, 0, 64) ; start_mode7 (1, 0, 0, 200, 0, 64) ; m7[0].distance = 0 ; m7[0].camera = id ; m7[0].height = 90 ; m7[1].distance = 0 ; m7[1].camera = id ; m7[1].height = 80 ; m7[1].flags = 4 ; resolution = 100 ; FROM a = 0 TO 64 Step 16: FROM b = 0 TO 64 Step 16: Mode7Object (a, b, 100) ; END END FRAME; LOOP m7[0].z = m7[0].height ; m7[1].z = m7[1].height ; IF (m7.height < 0) m7[0].z = -m7[0].height ; m7[1].z = -m7[1].height ; END IF (key(_up)) advance(200) ; END IF (key(_down)) advance(-200) ; END IF (key(_left)) angle += 2000 ; END IF (key(_right)) angle -= 2000 ;END IF (key(_a)) m7.height+=2 ; m7[1].height+=2 ; END IF (key(_z)) m7.height-=2 ; m7[1].height-=2 ; END IF (key(_q)) xadvance(angle+90000, 200) ; END IF (key(_w)) xadvance(angle-90000, 200) ; END scan_code = 0 ; FRAME ; IF key(_esc): BREAK; END END fade_off() ; stop_mode7(0) ; stop_mode7(1) ; END PROCESS Mode7Object (x, y, graph) PRIVATE speed = -1 ; BEGIN ctype = c_m7 ; cnumber = 1 ; height = rand (0, 16) ; resolution = 4 ; x *= 4 ; y *= 4 ; LOOP IF height > 0 && speed > -8: speed-- ; END height += speed ; IF (height < 0) height = 0 ; speed = rand(5, 15) ; END FRAME; END END // ---------------------------------------------------------------------- // Path-finding // ---------------------------------------------------------------------- CONST width = 64 ; height = 32 ; GLOBAL int graphic ; int title ; int wall_color ; int start_color ; int end_color ; int color_ruta ; int last_x, last_y ; int start_x, start_y ; int end_x, end_y ; PROCESS ClearRoute () PRIVATE byte POINTER ptr ; int pitch ; BEGIN ptr = map_buffer (0, graphic) ; pitch = graphic_info(0, graphic, G_PITCH) ; FROM y = 0 TO HEIGHT: ptr = map_buffer(0,graphic) ; ptr += pitch * y ; FROM x = 0 TO WIDTH: IF [ptr] == color_ruta: [ptr] = 0; END ptr++ ; END END END PROCESS Reset() BEGIN drawing_color (0) ; draw_box (0, 0, WIDTH, HEIGHT) ; drawing_color (wall_color) ; draw_rect (0, 0, WIDTH, HEIGHT) ; start_x = WIDTH/4 ; end_x = WIDTH*3/4 ; start_y = HEIGHT/2 ; end_y = HEIGHT/2 ; map_put_pixel (0, graphic, start_x, start_y, start_color) ; map_put_pixel (0, graphic, end_x, end_y, end_color) ; END PROCESS PathFinding() BEGIN mouse.graph = 200 ; graphic = new_map (WIDTH, HEIGHT, 8) ; wall_color = rgb (196, 196, 196) ; start_color = rgb (255, 0, 0) ; end_color = rgb (0, 0, 255) ; color_ruta = rgb (128, 64, 128) ; drawing_map (0, graphic) ; Reset() ; title = write (0, 160, 4, 1, "Path finding") ; write (0, 160, 180, 1, "Draw walls with the mouse") ; write (0, 160, 190, 1, "(S) start (E) end (R) reset (SPACE) go") ; last_x = mouse.x / 4 ; last_y = mouse.y / 4 ; WHILE !key(_esc): clear_screen() ; xput (0, graphic, 160, 100, 0, 400, 0, 0) ; x = mouse.x / 4 - (40-WIDTH/2); y = mouse.y / 4 - (25-HEIGHT/2); IF mouse.left: drawing_color (wall_color) ; draw_line (x, y, last_x, last_y) ; map_put_pixel (0, graphic, x, y, wall_color) ; END IF mouse.right: drawing_color (0) ; draw_line (x, y, last_x, last_y) ; map_put_pixel (0, graphic, x, y, 0) ; END IF key(_s): ClearRoute() ; map_put_pixel (0, graphic, start_x, start_y, 0) ; start_x = x ; start_y = y ; map_put_pixel (0, graphic, x, y, start_color) ; END IF key(_r): Reset() ; END IF key(_e): ClearRoute() ; map_put_pixel (0, graphic, end_x, end_y, 0) ; end_x = x ; end_y = y ; map_put_pixel (0, graphic, x, y, end_color) ; END IF key(_space): FRAME ; ClearRoute() ; IF !path_find(0, graphic, start_x, start_y, end_x, end_y, PF_NODIAG): delete_text(title) ; title = write (0, 160, 6, 1, "The path is blocked") ; ELSE: FRAME ; clear_screen() ; delete_text(title) ; title = write (0, 160, 6, 1, "Path found in " + (speed_gauge*60/100) + " ms") ; set_fps (60, 0) ; WHILE path_getxy(&x, &y): map_put_pixel (0, graphic, x, y, color_ruta) ; xput (0, graphic, 160, 100, 0, 400, 128, 0) ; FRAME ; END set_fps (60, 0) ; map_put_pixel (0, graphic, start_x, start_y, start_color) ; map_put_pixel (0, graphic, end_x, end_y, end_color) ; END WHILE key(_space): FRAME; END END IF key(_esc): BREAK; END last_x = x ; last_y = y ; FRAME ; END unload_map (0, graphic) ; fade_off() ; END // ------------------------------------------------------------------------ // Sound test // ------------------------------------------------------------------------ PROCESS SoundTest() PRIVATE int pat, pos, vol, time, md ; BEGIN header ("Sound test") ; md = load_song("game.s3m") ; play_song (md,-1) ; vol = 128 ; WHILE is_playing_song() AND scan_code != _esc: FRAME ; END WHILE is_playing_song() AND vol > 0: FRAME ; set_song_volume ( vol -= 2) ; END stop_song() ; unload_song(md) ; END // ---------------------------------------------------------------------- PRIVATE proc ; BEGIN FULL_SCREEN = FALSE ; LOOP proc = Menu() ; WHILE exists(proc): FRAME; END fade_off() ; put_screen(0, 1) ; delete_text(0) ; fade_on() ; IF option == 0: BREAK; END SWITCH (option) CASE 1: proc = FallingObjects(); END CASE 2: proc = BlendedObjects(); END CASE 3: proc = PrimitiveTests(); END CASE 4: proc = ScrollTest(); END CASE 5: proc = Mode7Test(); END CASE 6: proc = PathFinding(); END CASE 7: proc = SoundTest(); END END WHILE exists(proc): FRAME; END fade_off() ; let_me_alone() ; clear_screen() ; delete_text(0) ; fade_on() ; END END Fenix/bin/CVS/0000755000000000000000000000000010601620470012024 5ustar rootrootFenix/bin/CVS/Repository0000644000000000000000000000001210601620422014114 0ustar rootrootFenix/bin Fenix/bin/CVS/Root0000644000000000000000000000007410601620422012670 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/bin/CVS/Entries0000644000000000000000000000054710601620470013366 0ustar rootroot/COPYING/1.2/Sat Mar 3 06:58:49 2007//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d%61uˌ͐B=-]GF̨H|#;Qz3xdd0x]ܳ6'6BTIU(Wm26\ OvQsI;4;xHxox˃K)k,IC!1Krh7|4 ҈jBͧ5-vT })G'7v-s"^7CL8HXya80-EVC6ɘ~ڡ$89laY;ɷxEk:մu"xVbO+Җ%QO.*Z N}3z^sDD_~KbCe=uYnP9BI5!EeXl9sy a1uLY}aДei[ΔKHD/SӼ}'qڤle0$#}v36k>2{W!Mu6E+ήrݕq+dN"1|quȠIsTSdVA]sgE`M~iD ӏ}r`ZH]>h< ¦)j_8.nڭD *b!%Fm֯{i܇p[N%JVPfs$Yn{իWnR%!IhDCG"k#mS:"0w韤2a~U3&YƯ0(FkQkC6U۾b߹Jj^+O]yAp2*v9d(ߕ(󀩔y?e_oxkv.4Z9gq^5_ S' 'u1x5?σwۇ{+/_?=yp89OO~˯Uó #$?wo?@_}bW/_4|//ӿ|w_=/7O˷bqͧ'~}ymOƋ z/_gtB /^ӳx?{?˯Ӹ5u-_?<]?g㛧/<哿h2~??{POWGy5d Fenix/bin/COPYING0000644000000000000000000004436010572216250012437 0ustar rootroot GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. Fenix/bin/leeme.html0000644000000000000000000001522610572216250013360 0ustar rootroot

LEEME

Qu es Fenix?

Fenix es un lenguaje de programacin interpretado tipo script diseado para crear y ejecutar juegos 2D. Incluye una extensa librera grfica y de sonido y un motor 2D que convierte la programacin de juegos en una tarea fcil. Sus caractersticas principales son:

  • Dibujo rpido de sprites con rotado, escalado, animacin y transparencia
  • Deteccin de colisiones a nivel de pixel
  • Soporta el formato grfico PNG
  • Rutinas de scroll tipo "parallax"
  • Mltiples regiones en pantalla con o sin scroll
  • Librera de sonido basada en MikMod
  • Entrada por teclado, ratn y joystick
  • Modos de 256 y 65536 colores
  • Compatible con Linux y Windows/DirectX

El lenguaje en s est orientado a juegos. Un proceso (o funcin) puede crearse como un objeto grfico en pantalla. Slo con cambiar ciertas variables locales predefinidas y usando la sentencia FRAME, el proceso quedar residente ejecutndose en multitarea cooperativa, animndose y movindose en pantalla simplemente con cambiar las variables locales y ejecutando la sentencia FRAME en un bucle. Se proporcionan funciones para detener, matar, alterar o buscar procesos en ejecucin, y puedes ejecutar un mismo proceso mltiples veces para obtener en pantalla varios objetos con el mismo comportamiento. Habr una introduccin ms completa en el futuro Manual de Introduccin y tutoriales.

Incluso programadores experimentados encontrarn en Fenix una herramienta til. El lenguaje en s soporta muchas de las caractersticas comunmente encontradas en los lenguajes procedurales, tales como mltiples tipos de dato (INT, WORD, BYTE, STRING, FLOAT), punteros, tablas multidimensionales, estructuras, y las sentencias habituales de control de flujo.

Fenix se distribuye bajo los trminos de la GNU General Public License, con lo que las fuentes estn disponibles y eres libre de extenderlas o hacer tu propia versin.

Es Fenix un compilador de DIV?

DIV Games Studio es un entorno comercial de desarrollo de juegos que incorpora entorno, depurador, profiler, editor grfico e instalador. Fenix slo proporciona un compilador y un intrprete. Sin embargo, las grandes similitudes entre el lenguaje de DIV y Fenix a menudo sugieren la pregunta.

Mientras Fenix est inspirado por DIV, no son compatibles. El lenguaje de DIV toma prestadas varias caractersticas de C, Pascal y otros lenguajes comunes, de la misma forma que Fenix toma prestadas caractersticas de DIV. Varios juegos antiguos de DIV funcionan en Fenix con pocos cambios, intencionadamente: Fenix soporta programas escritos con una sintaxis similar al DIV en lugar de la propia. Sin embargo muchas funciones de librera de DIV no estn presentes en Fenix o lo estn en forma diferente. Notablemente las funciones de Modo 7, las de cadena, y las de Modo 8 (inexistentes en Fenix).

Escribir un documento comparando las equivalencias entre DIV y Fenix cuando se aproxime la versin 1.0.

Cul es el estado de desarrollo?

Actualmente, Fenix no est acabado. Hay bugs por encontrar, algunas caractersticas no acaban de funcionar, y hay desarrollo por hacer en reas como control de errores y optimizacin. Cosas como documentacin, chequeo y escribir programas por ejemplo necesitan bastante trabajo. La ltima versin es la 0.7 *beta*.

Sin embargo, Fenix ha avanzado desde su concepcin inicial, y creo que ya es bastante utilizable, aunque no tan estable como lo ser en el futuro. No hay caractersticas nuevas por aadir antes de la versin 1.0, y Fenix est ahora en fase de depurado.

Mira la pgina de bugs conocidos para obtener una lista actualizada de los bugs ms importantes.

Dnde puedo obtenerlo?

La pgina web de Fenix ha cambiado de localizacin varias veces. Hay un redirector en http://pagina.de/fenixc Adems, Fenix est hospedado por SourceForge. La pgina puede actualmente encontrarse en: http://fenix.sourceforge.net/

Quin lo ha escrito?

En realidad Fenix ha sido programado inicialmente por una sla persona. Puedes escribirme a jlceb@cir.es. Un nmero de personas est contribuyendo en reas como documentacin, pruebas, y programas auxiliares. Eventualmente habr una lista actualizada en el fichero CREDITS, a acompaar a la distribucin.

Cmo se usa?

En el paquete includo tienes un programa de ejemplo, de nombre test.prg. Simplemente ejecuta:

FXC TEST.PRG
FXI TEST.DCB

Estas dos sentencias deberan compilar el programa y ejecutarlo seguidamente. Si todo funciona correctamente, examina el manual de referencia en el fichero fenix-ref.pdf. Este manual contiene informacin sobre cmo utilizar las utilidades includas, as como el compilador y el intrprete. Tambin documenta el lenguaje y la librera. En este sentido, su propsito es nicamente servir de referencia y no de introduccin o tutorial. Es la referencia ms actualizada (y en muchos casos la nica) disponible. sala como fuente principal de informacin.

Habr un Manual de Introduccin en el futuro. Su escritura an no ha sido comenzada, y no vendra mal una ayuda en este tema.

Hay algn juego hecho con l?

Hay algunos juegos simples escritos con el propsito de ilustrar y probar el lenguaje. Puedes bajrtelos, con cdigo fuente completo y comentado, en la web de Fenix.

Soy un programador. Cmo puedo ayudar?

En primer lugar, ten en cuenta que el cdigo de Fenix es complejo, mal escrito, indocumentado, y est en C.

Si an quieres unirte al desarrollo, bjate las fuentes. Puedes hacerlo va CVS (sencillo en Linux, pesadillesco en Windows). Ve a http://www.sourceforge.net y lee las guas de CVS. Puedes obtener un paquete actualizado diariamente de todo el rbol CVS en http://cvs.sourceforge.net/cvstarballs/fenix-cvsroot.tar.gz.

Licencia

Este programa slo puede distribuirse segn los trminos de la GNU General Public License, en su versin 2.0 o en cualquier versin posterior, a tu eleccin.

Debes haber recibido una copia de dicha licencia junto con este programa. Si no es as, ponte en contacto conmigo en jlceb@cir.es lo ms urgentemente posible. Fenix/bin/game.s3m0000644000000000000000000213603110304031146012730 0ustar rootrootCreature of the Woods(9(2SCRM0}       !"#$%&'!&+05:?DINSX]bglqv{  %*/4R1S{>27z =|A{/jY ` $#'+%+!,&)'&)%)'m]J+HIGHCRAH.SMP Rp@ Creature of the Woods SCRSBELL1-2.PCM@ by Mystical/Purple SCRSPIZZI1_2.PCMq0@ Final version. SCRSBANDONE.SND d@ -------------------------SCRSSTRNG1-2.PCM[&$@ SCRSCH2_1.PCMCM.3I'I@ This tune came 2nd at SCRSFL_COL1.PCM7@G Summer Encounter '96. SCRSVIBRA1.SNDFa@ SCRSFL_COL3.PCMNq@-------------------------SCRSFL_COL2.PCMVN,N@ SCRSHARP1.SNDZ1@ Apart from sample 1 and SCRS@ 29, all samples are doneSCRS@ by me. They were taken SCRS@ from the following SCRS@ sources: SCRS@ SCRS@ * My trusty Roland JV-30SCRS@ * An Ensoniq TS-12 SCRS@ * A sample CD, supplied SCRSVIOLI1-2.PCM^__@ by Gatekeeper/Xtacy SCRS@ SCRS@ -------------------------SCRSCLARINET.SNDdU@ SCRSORC.SND.SND^iFr@ To contact me, E-mail: SCRSSNARE2.SNDpV @ SCRSEF_CRST1.PCMYqr@ mystical@inet.uni-c.dk SCRS@ SCRSPIZZI1_3.PCMx+@ -------------------------SCRSINSTR14DP>{VJ6'VJ28; SCRSDR_CRAS.PCMQV@ This release is nearly SCRSTIMPANI2.PCMJyg@ identical to the party SCRS@ version - except that SCRS@ I've retuned some of theSCRS@ instruments in this SCRS@ release. I tried tuning SCRS@ them at SE, but that SCRS@ didn't go very well :-/ SCRS@ SCRS@ This is hopefully betterSCRS@ SCRS@ -------------------------SCRS@ SCRS@ Ugh to Gatekeeper, Dune,SCRS@ Zodiak, Necros, Man SCRS@ Child. SCRS@ SCRS@ And a brief message to SCRS@ Jazz/PM: SCRS@ The "disk trick" was SCRS@ such a cheesy and stupidSCRS@ thing to do. The music SCRS@ compo is about music, SCRS@ not about promoting yourSCRS@ work to the extreme. SCRS@ But congrats anway:) SCRS@ SCRS@ -------------------------SCRSJ*0Hf:0J0+:7Jh:gE0lE hEfJ0J0,JJhJgQ0lEhQ*0f:0J0Jh:gP0lE hPfV0J0,PJhVgU0lEhUJ*0f:0J0Jh:gE0hEfQ0J0,UJhQgS0lShSI)0G#f90I0+96Ih9gQ0hQfS0P0,SPhSgU0Q0lQQhU+J!J"j#Z*0Hf:0J0Z0+:,Z78'/SM8Nh:M7NM6N"S #C gE0M5NM4NhEM3NM2NaS "[ #K fJ0J0,JM1NM0NhJM/NM.Na[ "Z #J gQ0lEM-NM,NbX cH hQM+NbZ cJ M*NaZ "[ #K *0f:0J0Z0M*NM)NaX h:M(NaZ M'Na[ gP0M&NM%NhPM$NM#N"X #H fV0J0,PM"NM!NhVM NMNaX gU0lEMNMNhUMN MN J"W #G *0f:0J0Z0MN MN h:MN MN aW "X #H gE0MN MN hEMN MN aX "Z #J fQ0J0,UMN MN hQMNMNaZ gS0lSMNMNbU cE hSMNV F M NIW G )0G#f90I0Y0+96NNaU h9NV NW gQ0NNhQNN"S #C fS0P0,SNNhSNNaS gU0Q0lQNji NhUjiNji J*0Hf:0J0Z0+:,Z78'SM8Nh:M7NM6N"S #C gE0M5NM4NhEM3NM2NaS "[ #K fJ0J0,JM1NM0NhJM/NM.Na[ "Z #J gQ0lEM-NM,NbX cH hQM+NbZ cJ M*NaZ "[ #K *0f:0J0Z0M*Noq M)NO aX h:M(NO aZ M'NOa[ gP0M&NOM%NOhPM$NOM#NO"X #H fV0J0,PM"NopM!NOhVM NOMNOaX gU0lEMNOMNOhUMN OMN OJ"W #G *0f:0J0Z0MN /eMN h:MN MN aW "X #H gE0MN MN hEMN MN aX "Z #J fQ0J0,UMN MN hQMNMNaZ "[ #K gS0lSMNMNhSMNM NIa[ "` #P )0G#f90I0Y0+96N/c"a #Q Nh9NNa` "[ #K gQ0Naa N"Z #J hQN"[ #K Na[ "Z #J fS0P0,SN/eNfaZ hSNia[ NjaZ "S #C gU0Q0ji lQNpjiNjhUji NieJ*0Hf:0J0+:7Jh:gE0lE hEfJ0J0,JJhJgQ0lEhQ*0f:0J0Jh:gP0lE hPfV0J0,PJhVgU0lEhUJ*0f:0J0Jh:gE0hEfQ0J0,UJhQgS0lShSI)0G#f90I0+96Ih9gQ0hQE0&5gU0P0,PPhSI0gU0Q0,QnY QnYhUnY nY0xI!I#Y)0Gf90I0Y0+9,Y68&/SM8Nh9M7NM6N"R #B gD0M5NM4NhDM3NM2NaR "Z #J fI0I0,IM1NM0NhIM/NM.NaZ "Y #I gP0lDM-NM,NbW cG hPM+NbY cI M*NaY "Z #J )0f90I0Y0M*NM)NaW h9M(NaY M'NaZ gK0M&NM%NhKM$NM#N"W #G fU0I0,KM"NM!NhUM NMNaW gT0lDMNMNhTMN MN I"b #R )0f90I0Y0MN MN h9MN MN aV "b gD0MN MN hDMN MN aW "b fP0I0,TMN MN hPMNMNaY gR0lRMNMNaT hRMNU M NHV "b (0F#f80H0X0+85Not Nu h8Nt NugP0NotNuhPNtNuaR (0fR0K0,RNtNuhRNtNu#YgT0P0jh lPNtjhNuhTjh Ntu Yai "g DEf90IJKL-YNOh9aY gD0hDfI0,IhIgP0lDhPf90h9"b gK0g hK[i fU0,KhUb[ p gT0lDhT`b j f90h9` gD0hDfP0,ThPYg gR0lRhRdaY "r f80h8ead s gP0hPhe v fR0,RhReh s gT0lPhT Yai "g CDEf90IJKL-YNOh9aY gD0hDfI0,IhIgP0lDhPf90h9"b gK0+R c hKS [g eYfUW ,K"f hUV b[ e dX gT0U lD"d hTT U` c `%Uf50)TS h9U gE0hDfP0,ThPYg gR0lRhRje je daY "r #[%Xf80)Tje V h8ead s gP0je br hPbs he v %XfR0*e,ReXhReXeh s gT0jelPeXeXhTu Wag "e #W'0Ef70W0jekU @,W-TNOK>h7K<K:aW gB0jeK8jeK6hBje K4K2fG0jeK0,GK.hGK,K*gJ0je K(lBK&hJK$K"'0f70W0jeK jeKh7je KK"` gI0jeKKe hIKKYg fS0je K,IKhSjeK K `Y j gR0jeKlBKhRKKZ` h #b'0f70W0jeKh7Z gB0jejehBje fJ0je,RhJWe gP0je lPhP baW "p #b&0f60V0jejeh6je cab q gJ0jehJfc t fP0je ,PhPjecf q gR0jelJif hRifif 4) # , Wag "e #W'0Ef70W0jekU @,WmTng OK>h7K<K:aW gB0jeK8jeK6hBje K4K2fG0jeK0,GK.hGK,K*gJ0je K(lBK&hJK$K"'0f70W0jeK jeKb` h7je KK"p gI0jeKKj hIKKYh fS0je K,IKhSjeK K `Y g gR0jeKlBKhRKKZ` "g '0%bf70W0jeK-gh h h7ih Z gB0jejngjehBje gifJ0je,RijhJjgWe gP0je lPpihPij baW "p &0%bf60V0jejpjeh6je picab q gJ0jerjhJjpfc t #UfP0je ,PprhPjerjcf q gR0if jelJspifhRif vr] Wag@"T#'dW@eb@&G''(7W0je6D T .W/GA@D@E@K M A?D?E?KMA>D>E>KMA=D=E=je KlEMAD E KMA B@D E KM Gag@"T#'dW@eb@&G''(7W0je6D T .W/GA@D@E@K M A?D?E?KMA>D>E>KMA=D=E=jeKlEMAD E jeKMA B@D E KMl Gag@"T#'dW@eb@&G''(7W0je6D T .W/GA@D@E@K M A?D?E?KMA>D>E>KMA=D=E=jeKlEMAD E KMA B@D E KM Gag@"T#'dW@eb@&G''(7W0je6D T .W/GA@D@E@K M A?D?E?KMA>D>E>KMA=D=E=jeKlEMAD E je KMA B@D E KM G"e#W$:%' &WG(4iG je6,W-7nG"oG@O>iJ O<O:iQ jekG nGO8jeO6iR je kJ O4O2"e#WiQ jekQ nGO0O.iJ kR O,O*iI je kQ nG"O(O&"e#WiJ kJ O$hZO" GpbiG jekI O jeOiJ je kJ OOiQ jekG OOiR kJ OO R"h#ZiQ je kQ nG"OOiJ jekR O O iI jekQ nE"OOiJ kJ OO Q"k#a%' &WiG jekI nG"OiJ kJ iQ jekG nGjeiR je kJ k iQ jekQ nGiJ kR iI je kQ nG"iJ kJ aiG jekI jebiJ je kJ aiQ jekG biR kJ Ba"`#RiQ je kQ nG"biJ jekR aiI jekQ nE"biJ kJ &&'$*(I GaW@"e#W$:%' &WG(4iG je-7nG"A>AH>KMCD=H=jeKlEMCDD(H(KMC@D'H'KM q!q "VFY&%0&C'Chg&c0jeF TY .cJCD%H%K M CD$H$KMCD$H$KMC"D#H#jeKMnCC%D"H"jeKMC'D!H!je KMC*D H KM p!p UC-D fRg3H jeKM.GC/DHKMC2DHKMC5DHKMC7Db0je KTM.bC:DKMC=DKMC@DKM k!k "TPS%3&I'Chije@ V IDHjeK M DHje KMDHKMDHiR jeKMDHKMDHKMDHKM g!g "PDeT&V'BHiR je KTM.bDHKMDHjeKMDHKMDHRjeKM.BDHKMD H KMD H KM&# p!p "UcIdV@%6&F'&hj@)Sje; mS .T/bCD@H@K M CD?H?KMCD>H>KMCD=H=jeKlDMCDD(H(KMC@D'H'KM e!e "JJG&%7&G''hg&)Sje4 T D CD%H%K M N CD$H$KMNCD$H#KMNCD#H"jeKlBMNCD"H jeKMNCD!Hje KMNCD HKMNCD fWg7HjeKMNCDHKMNCDHKMNCDHKMNCDHje KlJMNCDHKMNCDHKMNCDHKMNCD&G''HjeKMNCDHjeKMNCDHje KMNCDHKMNCDHjeKlBMNCDH KMNCDH KMNCDH KMNCD&W'7H je KMNCDHKMNCDHjeKMNCDHKMNCDHjeKlIMNC DHKMNC D HK M N C D HK M N  WaJb*$7%7&G''(W5 LMN/WABABABABlBmBABABABA B dGfWg7A B A B A B A B lJmJABABABAB$7&G''ABABABABlBmBABABABAB$G&W'7ABABABABlImIABABA B A!B!$7%W&G''S@ kTD0A"B"N0A#B#N/A$B$N.A%B%lBmBN-A&B&N-A'B'N,A(B(N+A)B)dGfWg7N*A*B*N*A+B+N)A,B,N(A-B-lJmJN'A.B.N&A/B/N&A0B0N%A1B1$7&G''N$A2B2N#A3B3N#A4B4N"A4B4lBmBN!A5B5N A6B6NA7B7NA8B8$G&W'7NA9B9NA:B:NA;B;NAB>eWNA@B@eW NB= WaJb*cZ $7%7&G''(W5 KLM/WABCABCABCABClBmBABCABCABCA B C dGfWg7A B C A B C A B C A B C lJmJABCABCABCABC$7&G''ABCABCABCABClBmBABCABCABCABC$G&W'7ABCABCABCABClImIABCABCA B C A!B!C!$7%W&G''hWS@ ke D0A"B"C"N0A#B#C#N/A$B$C$N.A%B%C%elBmBN-A&B&C&e N-A'B'C'eN,A(B(C(N+A)B)C)dGfWg7hW ke N*A*B*C*N*A+B+C+N)A,B,C,N(A-B-C-ke lJmJN'A.B.C.N&A/B/C/N&A0B0C0N% WA1B1C1$7&G''hW0N$A2B2C2N#A3B3C3N#A4B4C4N"A4B4C4ke lBmBN!A5B5C5N A6B6C6e NA7B7C7eNA8B8C8$I%WfYg9hW8e D0A9B9C9eN0A:B:C:jW e N/A;B;C;jWeN.AB>C>jW0+eN,A@B@C@N+ aaTb4*0$A%T&Q'1(QS*Qke6LM:0oa5ABC0N0ABC/N/ABC.N.ABC-kelHmHN-ABC-ke N-ABC,ke0N,ABC+N+A B C*dQfagA; keN*oa5A B C*N*A B C)N)A B C(N(A B C'ke lTmTN'ABC&N&ABC&N&ABC%N%ABC$$A&Q'1keN$oa5ABC#keN#ABC#ke N#ABC"N"ABC!kelHmHN!ABC N ABCNABCNABC$Q&a'Ake Noa ABCNABCkeNABCNABCkelSmSNABCNABCNA B CNE0A!B!50$AeT&Q'1(QSF ke6:0oa5@0A"B"C0N0@/A#B#C/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bXOSR]ywaBGJ[kpnx}ze^_ccjnp{ttz~|t`_]ejxvokXQKKZ_iuvifhjt{vsqh[aausfgnt|{~pnnqv~yttyvjgciefl{{|}|nacirz}sywc`\jq}wx~prhnzox~nhlrwo`U^hq{tvwx{qsv}~t}spigxriba``ihiipw{umWRTbo{y}|s}yleNWUT_e}oj[Xbjy}rt~|rhel~ty|v}~wvqosz}}{y{vu`goiyx|u{zyscPJTcmxmp_\ejtprtz}{wsnechu~yyynmjj_ctnre`ipwsmdjpz|tztlx}ĩoinpswxy~xzomfcUKbairo~qhhglpknlpx}}gVSQT[^`murtujfpty~~~rpalu|xhvww}xh\beo~ztiaWPZeqyzw{v}~z}~ut|~|~z{y{~zrgoszytmfgY]lspc^Zcowzuopkvtyr|}ojpyrmihgfowxnfir}rrgpvprp|xnpoa_bZbr{kg`a]]hhpmsxz}wxomwhhjyr{}|pqkm{usxqnvx~wrkmpn{z{z~lgeozzzxqlbpgcguxtz~~{}ri[Y\_dkwuqouswvxonhYdojwwgZIIE]ceu{}sfje_iu~sfgmhs~|qlilru~{|}ypj[YQ[aYbdqz}rjijnp||ommou}||}~vn]Z_qwptonlgkry{z|rqkkn\^[dt}tqwy||}zyxx~}qmkrmkxx|~wgdfz{}tpfeffyv}yuvzzvrsnllllfzuhO?>L\lwwsywzzsrenosmowovpns|}xrppoqx|wiopz{z{~wrz}sqmglr|~srvwqnqvttrkignssw{voned^dvx}{uuux~{}}}mwjge_mtys~wpikjknrnhkdc^_sz~tqddnz~ytvsrwzzhl`VWRbw{xrghhfenouzt{z{xtxykb[W`\ftsk`VRNRW[hrueaaltwxwe\PWit~~~~{}qrnmnp|xxtrptpww{}{~yuq{}}{}ibRT_dks}{x|~utffjhpp}yywv~~mb[V[^ku}|yl`mfb`ao|vww}}svrmsnk^\^itnuys_UKS^w~xqsqsr{umg`ep~vsn_gdaYUTUe`kz}zrfebdgq}~}{wq}ttz||tphgis{efllsvz}|wuokkjrpw|y|z}|ot}{{|kmifnqwnc_VZ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4117?HOTY_emx}upppruvvuvvwz{{xvw{{vqlf`[WPHB=869AHOU[ckqw~}uqoprrqrtutrssrrrrt{~|{wsqpmg_YRJDCGKOQU\dimpwzutsqnnprspkhhjkihjov~}}|wqjc[UTUUTTX^fmpqu~|xuqlhghjlkgeggedfimtywqjfda]ZYY[aglou|~{wsle`acdddcaacdgmty|wqlifaYSQRW]dimrx~|unf`^`a`^]]_afmrvxwvtux}}wtpic\UQSY_dimrv|}sha^]^^\[[[^dmrttrpmmpux~{uolg_XSQV^dfjpv~~xph_Z[_`]\\_djoswxwwsoopt{}uojfa\XVZ`ehmu~{vqkd^\\_`^^aflqtw{~}yyy{}tke_YTSRUY\`fo{}unhb_]YWXYYZ^dkqvz~wne]VRPOPSVY_hr||tle_\ZXWUUW[`gntwxwvy}zodZTRRRQRU[dlt}{qha]][YYZ[]agnrtusstwy{~xj^VSUUVWY]dkqv{~~|ywvvwwwzxnfa_^___`cgikmoqqqrswz|~sia\Z[]`cglqtvy||zwurqrstxvoidabdedfjmnpqrrsuwwy|~tkc][[^`cgkorsvxvuttsrsvy{~wpliggiknprtvxzzyz}zoga^ZY[_bcehkorrrrsssrtw|zurokilnnnoooqstuwxz}vmfb\WWZ[\^``acghhhjnsttw}ztqpnllllljjkhddiptvxzwnfb`^\[\^_`bgifa`eiloqtz}zvplhedccfhe_Z\`cfloqv}{tqmjihedefjprokhgghilnqv}|vrqnjhgilqpligggiknpsw{}xsmkkhddehnrqlifddeffhjnrx~~ywspoqsvvuroljlmllnptx}}vokigeeehjlmmjhedffedehlqu}}{|~~}zwuvutsuuvvy~~xrmkhec`\[]acfhiihghijjloruw|yvwy{||zvtrstsqruwvuy~voifdcb_ZWWZ_dhihiiloonorvz}wqommnonljjlnmklmooqtx~uomljgb_^`behhhgilpqooprvx{ztnlmnnomkklmnnkjiimpqu}zvrpmkknooommmmnookhfhiikou}~zuqnnnoppoopsvvvtsssstx}ytokjknnopqpprtvwwusrnjjlnps{~ztnjkoqsvz|}}wskc``dghkostsuy{|{{ywusrqqsvx}}zvpiefhlpu{ztng_UOMNQV\bfilpv{|}~wqjd``bglptw{{tmf^VPMLNSY]adgkpux{xqjedefiloqtx|~}tmf`\ZYZ^cgkmnpsx|ztpmlmnqtwxwx{~~~~xrmiecbdglquvvvy|~}{{{}{wsqooruz~}~|vpkfcbdgkorstvx{~}}}zwvwy|zurppqpswz{~~vnga_^^_befgjmquy{{{yyxvttuvzzxwvtsstuvy}{rlhc`^\\[[[_dhlprttqoonoooqv|~{yxwvw{~|zyyxxzztokiea^\\_bdgklmmmkkjjiikow{yxz||zxvtsv|yuqmjgb``acfkorssqnkkjhfhnsx~~zz||yy{~|vrnkifcabehlptx{|{xvtqonoqtx|~}{yxz}ysokgda__aceinsw{~}ywvuuvx|~zwttvxz}~zvrmheccdehknqsuwz{ywvtrqrux|{xxz|~~}}~}zxvrnllmnqsvvvwxyxvusqoooquy}}{zy||yxxxxxwvwxz|~~|{zxvsomnruz~~}||}~~}~|zyvtsuxyyxxxz|~~yutstw{}|zyyxxvvy}~{ywusrsuvutuvwxz{}}{zz|~|zxwwvwxz{|||}~}zxwvwwwvusssttvxzz{|~}{z|~}|zyy|}~~}}}}~~~~|}~~~}|{yxwvvwxxwxz{|{{{{|{zz|}}}}}|{|~~}|||{{{{{yxy{}~~~}|zyz{|||}|||{zyxxy|}~~||||}~~~~|{yyyz{zyyzzz{|}}|{{|}}}~~}|{{{zyxy{}~}|{{zyz{}|yvutsttsrqqsuwwwxyyz{|}~~~~~}{zyxxy{{{{{}~|yvrpooomkijlnpqrtvvvwy{~~~|yvsqonlkkkmprstuwxxyyz{|~~}||}}}{xvtrpnmnnnoqux{}~~~~~~|zz{||zxvtqomlkklmquy}}{zxwvvwy{}~|yvsqnljijknqtx|}{ywvwxz{}}{wtqnllmmnpsvyzzz{|||{{{|}}{||{|}~}zwusqpppqrsuwyz{{{{zyxwwxy|~~~~~}{yvtsqoooqtvy{}~|zz{|~}|{{|}~~}{ywusqonnnopsvz}~|zxv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|z{|urpqtxxtnmqy{rmmnpppsrqu~xrrsstx|}~~yz|roonpuwrkhnw~}rkklmnmqror|xoorqqu{}}~zx~qmnkmrvskfis|thhjimjoqnoxznlqoory|~~~}x|rklhjmstkddnz~xidhfkikonls~~oinnmovz|~zxxkkjgjouogchu|odgfjkjnqmpxvhknmnrxz~~~y{nikghlstkddoz~vgeghmjlroor|khmmnovy{~|wuikhgiovpgciv}}}megglljprpnyrgknnnrxy}~w{|lijggktsleep{|shfgjmllsrnrzihlnnouxz{vrhjhfhovpgdjw||{lfgjmnkrtpnyogjnnnrvx}u|ykijffktulefq{{~rieikoloutmsuhglonotwzyv}qiihegpvphekwz|ymehknomswony{mfionoquw}~u|wkhjeeluulfgqyz|shellpmpxsms}~shfmooosvzxx{phigdiqwqifkvzzymejlooovxnow~xmejoonptx}}w{~vkgidfmuumghqxy}shhmnqpryrnr{zshfnoonrvzyw~zqgifdiqwrjgltyzzmglmpqpxvonvzwmejoomotx}}wz~|viggcgmuvnhhoxx}sijnorquxrnpxxsggmonmqvzzv{}zoggeeiqxrkhjtwzzmimoqssxupmsxwlfjoolnuw~uw{{uiffdgmvwoihnvx{rkjootsvvslntxqghnomlrv{ysx|ynffeejrxslhirwy~yojnosuuvvokowvkfkpnkntx~ssz{tiefehnwwpifnuxztmlpqvvtxrjjsxqhhnolkrv|wpv{xoefffksytmfhqww~zqkoptxtvwmgmwulfkoljoty|pqyzthdgehowxqhelvvzvnnqsxvtxpggsvrhhnmklrw}tmu{xmdffflszulegrvw|rmpswyrwtjdmuumgknkknuzzmpyysfdhfioxypfdluu{wpnsuzttwodgrvrhhllklrx~qluzwlcggglt{vjdgquw~tnruzwsvsfcluvmgjlkkov{vkoxyqfehfjpyznfclsv|yqouxyttukbfqwrhgklklsy}{nktyukeghhmv|sibgotyuotxyvttodbkvvmfilkkpxzsjnxxpgfigjqzxmddjswzqrwxxurrhaerwrhfjlkmuy|xmjsxtlehhhnv{rhcfov|uqvywxrrlcalvvmehlklqxz~~qjnwvqhfjhlrzvldcity{ttzvytpngaerxsgejllnux{vmjswtmfiiiovxqgcdpxwsxwxwpnjcalvvmdgllmrwy}|qimuvrhgjimswvkdaju}|vwxwyrmlg`frxrfdjlmotxzvljqvumfijkpuxpgaeq{yvxwyumkjbblwvkchlmnqwx~{qiltvrhgkjnqwtkcakx~~xwwxwoilfafsxpeejmnotw{ulhpvumgjkloswpf`fs}{wvxwrikjbbmwujchmnoqvx~zphktwrihlknpvtkbbm{zuxwulikfagsvoeeknoosv{tkgpwunhkllmsvpeagv~~vwxuphkiccmvsjdhnonquy}zogkuwsjimlloutjbcp|yuxurjijfbgruofelonnrw{~tjgqwvohlmkmqvoebjx~~uxvsmhjiccmtrjdioonouy}yogkuxsjjnkknuticfr|xvwsoihjgbgqtoeempnmrwz}tjgqxvoimmilqvnfdmx~}vwtplgijddltrjdjpnmovx~yofjuxtljnjjmtsjegr|xvvqmigkhbfotpffmomlrw{~}tigpxwpjmlikquogfmw~}vurmlgikecjrskejonloux~ynfkuxumkniimtrkgjr|yutnmigkhceotpggnomlsv|}}sigpxwqkmkhjqtoihmw}vtpllgjkebirskfkomlouy}xmgkvyunllihmrrlikr}ysqlmihlhbdntphhmnlmrw}}|rjhqxxrkljgkpspkjnx}urnlkgjkeairslgknmlou{}wnhlvywnkkhhmrsnkks~yrolmihlhadntqihmnlmrx~}{rkhqyyslkjgkotqmjny}somlkgjkdahssmgjnlmov|~|vnhlvzwojkgilrtplkt~wpmllihlhacntqihmmmmsy|zrkhqzzskjigjnutnkoz|qmllkhjkd`hstmgjmmmow}}{wohlw{wnijhhksvrlltummkliilg`courjglmmmt{{zskirzztjjigiovuokozzollklhkkc`isungjmmmpx}zwoimw|xmijhgktxsmluskmkljilg_cousjgknmnu}zzslis{{siiighpxwpkp{xmllllikjb`isvogimnmqz|zxoinx|xlhigfluztmmvqklkmjikf`dovtigknmov~z{tljs|{qhhifiqzxplq{~vlkkllijibaitwnfhnmns|{{xpjny}wlgjggmw{tmnv~~|okllmjije`dpwsiflnmpx~z{tmkt|zqgihejs|ypnr{~~skkllliihb`iuwnfinnou}{{xpkoy|ukgifgoy|toov}}ynjllmkhie`dqxriflnorz~{{umku|ypgigflv}xqnqy|~rkklmmhhhbakvvmeinoqv|~||yqkpz{ujghfiq{|uoou{}wnillmjgif`erwrhgloptz}{{unmu{xoggggnw}yroqw|~rjkmmmgghcbluumfinpsw{}}|yqmqyztjfggks{|vposz~wmjmmnififafrwqhglpruy|{|vomuzwogfhipw}zsoov}~|qjkmmlfghdcluulfiortvz~}|zrmpwysjehint{}wpnq{~wmjmmmhfigcgqvqigmrtuw|||wpnsyvofgilqx~{snmv}|qklmmjfhiedlutmfjqttuz~}|zsnowxsieilot|~wplq{~vmkmmkgfigdgquqigotutw}~|}wpmrxvnehlnrx{slmw}|qklmljfhjfdkttmglsutu{}}{tmnuxsiflnpu}~wnjr{vnkmlkhgjhdgpuriiqutsx}~}~xplqwvmfjoory|qjnw~{qlllkjgikfdksumhmuuru{~~~|tlmuwrihnopv}vlkr{vnklkjhgkidfovrjksussy~}}~yokpwumhmposz{oknw|rllkjjgilfditunjoutrv|}~}skluwqjkppqw~~tllr}wnkkjkhhljdepvrlmsurty~|~xniqwtnkoppt{yokny|rlkjjjgklfcjtuolqtssw}}}}|rjltvrmmqprw~|smltwnjjjkiilicepvtnnsssuz}~{vmipuupmoqqu{}wpkoz}rkijkjiklebktvqnpsstw|||}{qjlsvtonqqsw|zsmluwnijjkjjlhbfpvupnqstuy{~~{}uljouvsnoqquz|wplq|}rjijkkjkkecktxsnostuwz|{}~ypjkswvqnqrswzztmnwwmhjjlkjlhcfpxwpmqtuux{~}{~|uminvxuoprrux{xpmr}|qiijkljjjedkvyunntuuvy}{}}xpijsyxqorrsuy{tnpxvlhjkmkikhdfqyxplquuuw{~|{}{tlhoxzuoqsstw{xqos}|piiklmjjjeckw{umotutty|{~|xphju{yrossrty{tppxukhjlmkijhdfs{yolrvusw{}}|}ztlhpy|voqsrrv{xrpt}{oiikmmiijedmx|tlouvsty||~~{xphkv}zrpssqsyzuqqxtkhklnkhjhcgt|yomrvtrw{}}||ztkhq{}vprsqqv{ysqtzoiilmmiijeeny|slouurty|~|~}{wohlx}zrpsrpsy{wqrytkhkmmjhjhdiu}xnmsvsrwz~~}|{zskir|}vqrspqw{ztquyoijmmlhijffo{{rmputqty|}|}zwoimy~zsqsqosz|xsrztlilnmjhkiejv|wonsursvz~~~}{zskjt}}wqrroqv||urvzoijmmlhikggpz{snpusrtx}}}}zwojoz~{tqsposz}yss{tlimmmjhkifkv|wpnstrsv{~~~}{ysllu}}xrrqnqw}|vswzpjkmmlhjkhhqzztnqtsrty~}}|zvokqz~|uqroot{~ztt|tljmmmjikjhlvzxporsssv|}~{ysmnv}~yrqpoqw~}wsxzpklmmkijkijqyztopssrty~~~|yvpmrz}uqpopt|{uu~tmkmmljikkimuzxqoqssrv}}~zxtoov}yrpooqx~wtyzpklmlkijlkkpx{uoorsrtz~~~~|yvrorz}upoopu}{vvunkmlljilmkmtzyrnpssrw}~~~~yxuqpv~yqoooryxv{zqlllllijmlkox{uonrsru{~~~~~{xwtpr{}uooopv~|wxvnkllljimnklt{yrmpsrsx~~}~~yyvrpvypnposzyw{{rlllllikomjox{vnmrsru|}}~{yyuqr{}tmooqw~}xy~voklklkjnokkt{zqlpsrty}}}~yzxspwyonppt{{y{{rlkklljmpmjoy|vmmrssv}~|}zz{wqs|}rmoprx~zy~wojklmkkppjkt|zplpssuz}|}~y|ztqwwnnpqu||yz|sljkllknqmioy}tlnrstw~~||{{|wqs|{qnoqty{x~wnjklmlmqpiku}yolpstv{||~~{}{tqx~vooqsv}~yz}rkjllmmpqlipz|smnrtux}{}|}}wrt}zqnpruy{x}wmiklmmnqoilv|wolotuw}{|~}{try}uoortw}~xz}qjjlmnnppkjqzzsmmruvz|{}~~xru|~yrnqtvzzx|wmiklnooqnjmuzwolpuvx~~{|~{usx}|vopsux~~xy~|qjjlnpppolkqxytlmsvw{||~~~xsuz}zrosuv{zw{vmjkmppoonkmuywolqvwz}|}}|vsw||vpquvy}xw{{pkjmoqpoomkpwyslntxy}||~}}~ytty|zsqtuw}zvx|umjlorqnoolmsywomrwy{}|}|}vru{|vqsuvz}wuy~{pjknqronpmkowysmouy{~}|~|}zsrx}ztruvxytu|umjmpspnoollrywpnsx{}~}}~|}vqt{|xstvx|}urx~zqklorrnopnjnwytnpvz|}}||zrqx}{vsuwzwqt{umkorsonppkjrywqotz|~~}~~{}uot{}yttwy~{rpw}{qkmqsqnoqminvytoqx|}~}}||yppx}}wtvy|uoszunlprronqpjjryxrpu{}}~}~~z~}tot|~zuux{~yppw~zqmorrpnpqlinvyupsz}}}~~~{{wpqy~wtwz}}rns{vonqrqooqoijryysqw}~|~~}z{rot}{uvz|}vopw~{rnprqpoppkinvzvqt{~|}~~~z{voqzxuy||zqns{vpoqqqppqmijrzytsx}}|~|zzrou~|vw||}~tnow~{sopqpqppokinw{wsv|}{}~~~z|}upq{yw{||ypns|wqpqpqqpomijs{{utz}||~~|zyrpw}wy|{}|snpx~|uqppqrponkinx|xtw|||}~~}{~|vps|yx|{|~wpnt|xspoprqoomijt||vuz|||}~~~~~||~yrpw}xz|{}{snpx}vpopqronnkhoy}yux||||}}~~}{{vpt}{y|{|}}wpnt|zsooqsqnnmiku}|wvz||{{|}~~~|}}ysqy~z{{{|~~zsnpx~~vpnprronokipz~zvx{|{z{|}~}}~|vqu~|z{{{|}}vpnt|{snoqspmomilv}}xwy||zy{}~}}~}}ysrz{z{{{|}zrnpx~vonqsrnnnjjq{|ww{|zxy|~~~}~~~~|vrv~}z{{zz||vpot|~{rnprsomomjmw~yvx|{xxz}~~}}~~}ytsz{z{zyz}zsnqx}~vooqsqmnnkkr|}ww{|ywx{~~}~|~~|wsv~z{zyx{|vpot{}{qnqrrnmnmjnwzuy|zvwz}~}~~|}~}zutz{z{ywy|zsoqx|~uoorrpmnnlkr}}vv{{wux{~}}~}|~|xtw~y{zww{|vpotz}zqnqrqnmnmknxyuy{xuvy|~|}~|}~}{vuz{zzwux|ztopv{}uoorrpmmnllr}~vvzzvtxz}||~}|~}yuw~yzxuvz|wqosy|zqoqrpnmnnlnyyuxzwtvy|~}|}}|~~~|wu{zyyvtx|ztopv{}uoprpommomlt~}vvyxttwz}~||}}}~~zuw~yywsuz|wqnry|yroqqpomoompzyuxyusuy{}||}}}}xv|zyxtsw|ztoou{}~uppqppmmpnnu}uvxvsswz|~}{|}}~{vx}yxuruz|wqnqx|yrpqppnmopnq{xuwwtruxz}|{|}}~xv}zxursw|{tnnu{~~uqppppmnqoov|vuvtrswy{|{{|}|wy}xvsruz|xpmqx|zsppopnmpqor|xtuusruxz}~{{|}ywzvtrsw|{tnnt{~~vqoopomorppw|uttsrsvx{|{{}|w{}vtrru{}wplqx}zsooppnnqqps}xsssrruwz}}{z|zxxtrqrx|zsmmu{~vpnoponprqqx|trrsrsvx||z{~}y||trqqu{|wolqy}{snoppoorsqu|xqqsrrtwz~}zz|{zvrqqsx}zrlmu|vonoppoqsrrx|rorsrrux|{y{~z}zrqqru{|vnlqy~{rmoopppstsu{voprrqswz~}zz~|{~tpqqsx}zqlmu}vnnoppprutswzpnqrqqux|{z}|}wpqqru{|unlqzzpmnoqqqtvtt{~smorqpsw{|z{~{{rpqqtx|xqlnv}tnnopqqsvurvxnnqrpquy}~z{||uppqrv{{tnlr{ypmnprrrvwss{|qlorqpsw{|z}~zyqpqrtx{wplnw}~tnmorsruxuqw~ummqqpquy}}{}{|}toqqrvzztnls{~xpmnqsstxwrs{yploqposx{~||~{xppqrtwzwqlow}~}snnpsttvxtqw}|tmmppoqvz~~~|{||soqrsuyytnms{}xpmorttuxvrsz|wolnpopsx|~}~}z~~wpprrsvywqmpw|~}tmnqtuuxxsrv{zsllppoqvz~~~~{{{spqrrtxytonsz}xpnpsuvwxursxzvoknppptx|~}y|~}wqqrrrvywqnpw|~}snoruwwxwsqtyyrllopprw{}~zy|~zsprrqsxytonsy}xpnrtwwwwuqquyvnkmopquy}~}}xy}}wqqrqquywrnpv{~}sopsvxwwvsprwxrlknpprw{}~yw{}zspqqpsxyupnry}wposuxxvwupotxvnjlppquz~~}|uw||wqqqpquyxsnov{~|tpquxywvwrnpvxrkjoqqsx||wtz}zspqppsxzvpnry}xqptwyxuwuomsxumimpqquz~}}zsv|}wqqqoquzysnou{~|tqrvyyuvvqlovxqjjoqqsx|}~tsy}zspqopsx{vomry}xrquxzwuwtmkrxumimqqrv{~}wrv|}wqppoqv{yrmnu|}uqswzxuvvojnvwpikoqqty}~{rsz}{tppoosy{volqy}ysrvyyvuvrkkrwtlimqqrw{~~uqv|}wqoooqv{yrlnv|~vruxzxuvtminvwpikpqrty|~yrsz~{toooptz{vnlry~zttwyyvuupjkrwsljnqrsw{}~}tqv|}wpoooqw|yqlnv|~wtvyywuurkinuvojkprruy|}xqsz~{snooptz{unlrz{uuxyxvusnikrvsljnrrswz|~|tqv}}wonoorw|yplov}xuwyxwuspkinuuojlprsuy{}wqsz~{rnoopuz{tnmrz{vvxxxvtqmijrvsljorstwz{~{sqw}}vonoorx{xpmow~yvxxxwtrojhntuojlqssuxz|~vqs{~zrmooquzztnmr||wwxxxvrpmhjqurlkorstwy{}zsqw}}vnnopsx{wploxzwwwxwspnjhmtupkmqssuxy|~}vqs{~zqmooqvzztnms}}xwwxxupolhjpusmkosttvxz}~ysqw}}unnopsxzwploy{wwwxvqonjhmsupkmrtttwy|~|vqt{~ypmopruzytnmt~~ywwxxsonlhipusmkpstsuwz}~~ysqw}|tnnoqswzwpmpz|wvwxuonnjhlsupkmrtstvy{}|vqt{}xpmopruyytnnvyvwxvqmnlhipvtmkpttsuwz|~~ysrw|{tnnpqswzwqmqz}wvwwsnmmjgksvqlmrtssux{}~|wqsz|xpmoqrtxytnnu~yuwwuomnlghovtnlptsrswy|~~ztqv{ztnnpqrvywqnr{}vvwvqmmmifksvqlnstrruxz}~|wrsy{xqnpqqtxytopw~xuvvsnlmkggpvtnlptrqsvx|}ztqv{ztnoqqruywros{|vvvtpmmmhfktvqmnssqquwz~~|wrsx{xqnpqqsxyupqw~xuvtqnlmkfhpvuomqsrpsvx|~~ztquzztooqpquyxrpt{{vutqolllhfltwrmorrpqtwz~|wrrw{xqoqqpsxyuqrw}xutrpmlmjfhpwuomqrqpsux~~~ztptzzuopqpqvzxtrty{vtrpollkgfluwrnoqqpqtw|~}wqqw{xropppsxzwsrv}xtrpomllifhqwupnpqppruz~zsptzzupppoqvzyursy{urponllkgfmuxsnnppppsx~}wppw{xropopsy{xtqu}wrpoomkkigiqwvpmoppoqv{~zsotz{vpoooqv{{vqrz{spoonkkkhgmuxtnmopopty}vopw{ysooopsy}yspu~vpoooljkjgiqxwplnpporw}~yrosz{vpoooqw}|vprzyqnnonjjkhgmvytllopnpu{|uopw|zrnoopt{~zrpv~~snnnnkikjgjrywokmponsy~xqnt{|vonoorx~}ups{wnmnomijkihnwyslkoonpw}{topx}zrnoopu}yqqw~|qmmnnkilkhjsyvnjmonou{}wqnu||vonoosz|tps{ummnnljklihowyqkknonry~~ztoqy}yqmooqw~~wqqw}yolmnmjjlkhktyumjmnnqw|~|wqou||unnopt{{tqt{~smmmmljkliiowxqjknoptz~}ztory}ypnopsx~}wrrw|wolmmlkjlkiltxtlilnosx|}{wqpv|{tnnpqv|~{tqty~|rmlmlljlmjjpwwpjjmoqv{~|ytory|xpnoqty}}xsrv|volmllkkmlilswsliloqtx|}{wqpv|ztnnpsw{}{ursx~{rlllllklmkjpvvoijmqsv{~~|ytpsy{wqnpruy|}xsqu|vnlllmkkmljlswslhlpsuy}|{wrqv{ztnortwz}{vqry~{qlkkmlklmkjouuoiinstw{}|ytqsy{xqnqtux|}yspu|unkklmlkmmjlrvskhlrtuy}|{wrqvzztopsuvz}|vpqy~zqljkmmkmnljntuohjptuw{}|zuqrx{xqortuw|~yrou|umjklmllnmjkqurjhnsuuy~|{xsquzztoqtuuz~|uoqy~zqkjlmmkmnlimtunhkruuw|}|zvqrx{wqptutw}~yqou|umikmnllonijqurjiotuvz~||ysptzztprutuz|torx~zpjjlmmlnokhmttmhmsuux}}|{vpqx{wrqtttw}~xpot|~ulikmnmmomiiquqjjquuvz~}|yrotzzuqsusu{{soqxyojjlnnlnojhmttmjntuux}}}{upqx{xsrtstx~~wpot|~tljlmnmmomhiptqklquuw{~}}yrotzzvrttsu{{soqyyojkmnnmonjglssnkotuvy|~~}{uoqx{ytststx~}vpou}~sljlmomnolgiptqlmruvw{}~}}xqouz{vstssv|~zsoqyxojkmnnmoniglssolptvvy|}~~{uoqx{yusssty~|vpou~}sljlnonnnkghptrmnsuvwz|~~}xqot{|wtsssv|~ysorzwojkmoonnmhflrtpnptvwy{|~{toqx|{vsssuy}|vpov|rlkmnonnnjfhotsoosvwwy{~~}wpou{}ytrstw{}ysor{woklnoonnlhflrtqoquwwxz|~zsoqx}|vrrsuy|{vppw|rlkmopommjfhottposvwwxz~~}wpou|~ysrstwz|yros|woklnppmmkgfksvsoquwwwy|}zsoqy~}uqstux{|vppx{rmkmopnmlifgovvposwwvw{~~|vqou}yrrsuwy|yrpt}woklnppmlkgektwsoqvwvvy|}ysorz}uqstuw{|upqy|smknppnlliegpwwqotwvuw{~}{vqow~xrrtuuy|yspu~wokmopolkkgeluytorvwuuy||ytor{}tqsutv{|vqry|tmlnppmkkiegqyxqptwvtw{~}{wqpwxrsttty|ytqu~xplmopokkkfelvztprvvtuy}~~|ztpt}|trttsv{{wrsz}tnloppljkiehszxqpuvttw{~|{wqqy~xrststy|zurvypmnppnjkjffnxzuprvusuy~~~|ztqu}{trtssv{|xst|}tnmopokjkhejtzxrqtustw|}|{wrsz~xstsrtx|{vsxyqmnoomjjifgpyzuqrutsuz}}|yurv}{ussrsv{}ytu}}uomoonkjjhglu{ysqststx}}|{xttz~~xssrrtx}|wuyyqnoonljjigiqy{vqrsssv|}}|zvtw|{vsrrsv|}yuw~~uonnnmkijiimv{ysprssty~}||yuty~~ysrrrty~}xv{zrnnnmliijikqy{vqprttw}}}|{xtv{|vqrrrv}{wx~~vpmmmmjijkjnv|zsoqstvz~~}}zvtx~yrqrqtz~yx{zsnmmmkiilklrz|voortux~~}}}ytu|}uprqsw}|xy}vplllliilmknv|zqnqttw|}~|vsxyqqqru{{xz{smllmkhknllrz|unostvy~~~~ysu||tpqqsx}yx}wokllliimnlnw}ypmqtvx|~|urywqqqrv||xy{rlklljimomls{|tmosuwzyru}{spqrtyyw}vnjklkikoolox|womquwy}|tsy~vqqqsw}|wy{qkkkkjknpmmt{zrmotwx{wrv}zspqsuzyw}umjkkkkmpolpx{vonrvxy~{tsz}vqqrtx~{wyzpjjkkllopmmtzyrmpuxy|~wsv}~zsprsv|xw|tljkklmnpompwzvonswxzzutz~}vpqsuyzwy~yojjjlmnppnnsyxrmqvxy|}wtw|}zrpstw}~xw{~~slijkmnopompvyvootxy{~~zuty}|vprtvzzwx|~xojijmoopqnnsxxrnrwyz~~~~}wtv{}yrqtux~}xvy}~}slijloooqpmouyvopuyy|~~~{utx}|vqruw{zvvz}wniiknpopqnmrwxrosxy{}~~}xtv{}ysrtvy}wuw|~|rkijmppoqpmotyvpqvyz}}}~{vtx}|vqsvx}zuuy}wniilppoqqomqwxspsxz|~}~}}xtu{}ysruwz}wsv{~|rkhkoqpprpmntyvqqvz{~}}~{vsw}|vrtwy}ytsy}vnhjmqqoqrnlpwxtqty{}~}~}~yst{}ytsvx{}uqu{~{rjilpqpprplmtywrrw{|}}~~|urx}|wsuwz~xrrx}~vmhkoqqprrnkpxyuquy|~}}}~xrt{}zutwy||tpu{~{qjinqqpprpkmuyxssw{~}~~~|trx}|wtvx{}wpqx}~vmilprqprqljqxzuruz}}}}~wqt{}zuuxz|{rot{}~{qjkoqrpqrojmuzytsx}~~}~~~{srw}}xtwz{}uoqx|}umjmqrqprqkjqx{vsv{~~}}~~wqtz~{vuy{|~ypot{}~zpklpqrqqrmjmu{ytty~~~}~~~zsrw}}yux{{|}tnqx|}umkoqrrqrpkjqy|wsv|~}~~}vqt{~|wwz{{~xpotz|~yplmpqrqqqmjmv|zttz~~~}~ysrw~~yvy{{||rnqw{|~unmoqrrqqokjqz|wtx}~~}~~|vqt|}xx{z{~vootz{~yqmnprsrqpmjmw}zuu|~~~~~ysqxzwz{z|zqnqw{}~uonpqssqpnkks{}xuy~~~~|uqt|}yy{z{~}uonsy{zsooqrsqpomjnx~{vw|~~~~~ysry|yzzz|xqnpvz}~vqoprssponklt|}xvz}~}}~~~{uqu}zyzy{}{tnnsx|{tpoqstqnomkoy~|wx|~}}}}}yrry}yzyz|}}xqmpvz}xroprtronnkmu}~ywz}~|||}~{uqv~{yyyz|}ztnmrx||vpoqssomomlpz}xy|~}{{|}xss{~zyyyz{|wqmou{~zsoqstqmnnlnu}{xz}}{y{}~{urw|yyyyy{ztnmry|~wqprtrnnonmqz~zx|}|yy|}ytt|yxyxxz{wqlnv{~{spqsspmoonov~}xz}|yxz}~~{vsx|xyyww{ztnlry}wqpssqnnoonr{zx{}zwy|~}yuu}xyywvy{wpknv||tprsqomopopw}xy|zwwz}~~|wty{xywuvzzsmlrz}wrqrrpnnqpos|zx{{wvx|~~}zvv~~xxwttx{wokow||tqrrponpqppx}xy{xuvz~~}~|xuzzxwusvzyrllsz~xrqqppnorqot}ywyxvux|}~~~{ww}xwurtxzvnkow||uqqpponqrpqy|wxxvuvz~~}}yw|zwvrrvzxqlmsz~xrppppopsrpuywwvuux|}~|xy}xusqsxzuolpw}}uqoopoorsqr{|wvvutw{~~~~zx}zusqruywqmmt{yroopppqtrqvxuuutuy}~}~}yz}vsqqswyuolpx~}upnoppqstrt||usuutw{~~}{y~xsrqruxwrmmt|yqnopqqrtsrxwrsutuy}}~z{|tqqqswxuompx~}tnnoqrrttsu|zsrtttw{~~~}z}vqqqrtxwrmnu|xpmoprrsuttxuqsttvy|~~|{zrpqqrvxuomqy}smnprsrtutv|yqqtuuw{}~~{}~tpppqswwrnnu}womoqsstvvux}tpsuuvz|}~}{zutuuvxzyusv{~}wuuwxyxyzzz}{wxyzz{}}~~~}~~|{{{{|}}|{{|~~}{{{|||}}}}}~|{|}}}}~~~~~~~~||||}}~}}|}~~~}}}}}~~~~~~~~}}~~~~~~~~~~~~~~~~~~~}}}|||||||||||}}}~~~~~~~~~~~~~~~~~~~~~~~}}}||||||||}}}}}}}}}}}}}}}}}}}|||}}}||||||||||}}}}~~~~~~~~~}}}}}}}|||||||||}~~~}}}||}}}}}}}|||{{{zzzzzzzzzzzzzzyyyxyyzz{{{{||||||||||}}~~~~~~~}}}}}}}}}}}}}~~}||{{{{||||||||||||}}~~~}}}|||||{{zyxwwvvvwwxxyyyyyyyyyyyyzz{||}}~~~~~~}}}~~~}}|{{{{|||}~~~~~~}|||}}}}}}||||}}}}}}~~~}}}~~|zyyyyyzzzzzz{|}}}|{zyyxxwwwwwvvvvuuuutuuuvwyz|~~}|||}}}~~~~}}}||{zyxxyz|~~~~~~~~~~}}}}}||{{|}~~}}||||{{{|}~}}|}}~~~~~}}|{zxwvvwxyyyxwvvvvwyz{|}}~}|{{{|}~~}}|||||||||||{zyxwvutssstvxyyyyxxyyyzzzyyxxwxyz{||||}}~}|zyvtrpponmllkjihhhhhijloqrsstuwy|}~~~~}zxvtstuwxyxwusqpnmnoqtvxzzzzz|~~|{zyzzz{}~}~~}|{zzzywvuuvvwxxyyz{|}~~~}{ywuttttttttssrrrrrqooopsvy|~~}{yxvsqomjgdbcceghiijkmpsuwxyz{{|~}|{zxwwxyzyxwutsssssrqpoomliggilprrpnkijlnqrsrqpprtvxyz{{{|{{zz{}~|zxuttvwxz{~}zwurpooppoonlkklnpqqrqppooonmllmnorsuvvwx{}zwvvvutspnljjmoppnkifddgkptx{}}zxvutsrqnkjkloqsuvvwxyz{{zxvtrolihgghijklnqsuvwwwwy{~~}|{{{z{}~}zwtrqrsvz~}|{zywuspmlmnpqpomjgda`__`bdeeeffhiklnoqsuwz{|~~ytqnmkjihikmnnnmlkjihgilquxz{|~~~}{yxwvwwwusrpnlhc_\[ZZ\]__^[WSPNNNPQSTVXZ]_``abdefgghjlnonpqstwz~|zvtqonnnljiiikmnppomjfdbaaacegiijklmnnoprsuvwxyyxxxy{|xspmllkjiigfedcbabcejnty~~}}}}}}}~}}|{xwvvwyzzywtqonoqsvwxwtqlhb^YWXZ]aejmprrrstvxzzzxwvuvvwxyyxwvvwyz{zyxwwwwwyz}~|yxwxz{|}~~{uojgfgiknopppprsuwxyxvsqppqtx||zwusrrqqpoonljheb^[ZXVUTSRQQRSSSSTVY^chlpsuy}{uqmlkllmnnmkiea_^^]^`bdefda\XTRSUWZ\_adgjnqv{~{zyz{{{{|}}~}}~|~|xurqqrrqpoopomid`\ZZ\`dhkllkjihhiklmpqrqpqrtvwxxwxxyyz{|~zwutstvxxtpjc_[XWXY[]^_`adffgfghikmptwz}~~~zxy|zvplhdb`^\ZXWVUUVWXYZ\]^_`acgknpsuwxxxxxxxuspljiijmpqrstvy{||zxvvwz~~}yuplhfdccccb`____^^]]_bglprsrpnllnoqstvvwxz{|~~|{xurnkgdca``_^]]\ZZZXVTRQQSW]cgjlnoruwy{}~~zuojiknswz{xupjeb`_][YWTQNLIGFGJMQUY]bfjnqtx|}ywvxz||||||}~|}~~{zz{||{xvsqpnmkgca``bdhknoonlifdefilpqrqomkkklosx}~{wtqpnkgdbbcdefhiihfdba_`behkmoopomlllnoqtwz}~~{ywvvwvvtqmhc_\[\\\ZWTQOPPQRTVZ]^`bcdfjotx}~|{|}~~|yxwvwy{}}{yxvusrpoonljhfdb`_^]\[\^adgjjkklnpswyzzyxvtsstvxz~|ywvuvvvuspmkjlnprssrpnnnoooppoonnnnnnnnopqqqstuuuvwy{}|yvqlheb_]ZWUUUVVWWWWUSQNLKKKMOPQRUX\^_acdgjmprtvwz|}yvuttuwz}~}|yvrpoopqrsssqokhgfeeefffeefhlpsvwwvtrqpppqrsuvwwwwxyz|{wspnmmmmmmoprtuvxz{{zzzzzzzzyxvrnjhffghjklmnprtvxz{}~yurponljgc`^^^`aba_]ZWUUUUUVWXYYXXXXY[]_`begjlnprtvy{}~~|{{|~}{yxwvttuvwy||wrmjijkmoonmlkjihiihgfdbaadgjnqrrqomjijlnorvy|}}||||~~|yvsrqqonnnopqrqqonnoqtvxyyxwvspmjihfeeedcdfiknprtuwy{||~~|zywutqolkklnoolieb^[ZYYZ[\^^_^\[ZYYZ[\]_acgjloqtwz}{{zyxxy{}}zyz{~~}~~|ywussuwxyxwtqnkiiiihedccegikmmlkihgggghhjknqstuvvwwxy|~~|ywtrqrtwz}~~}zxvwz}~zuplighhhgfedehkoqrstuwyz{|}~}}|{z{{}}zxvuttuvwvuutsqoljhfedcbaa`_]\ZZ[]^_``acfilnoqsvy|~~}{yvtqpnmkijklllnoppqsttuuvy|}|{|}}{xusstuvxyzzzzzzxuqlhdbaaacehknpqqrrqqqrstuuwxz{}}yvtsrstttrqonmmnoqsuvvvutrppqsuvvvtsqnljhhhhghijmnoponmmnpsuuvuuvxxxvuvwy|~{xvuuvxy{||{xurqqrtuuspmigfeeeffffffghhjlortwz~}|{zxurpooooopppoooqtvwxy{}}|{{zyxwvtstuuuuuuuvwwwvtqmifcbcdgjmopqqrrstvxz{||}~}xspnmlkkkkkjiiiijlortvwxwxxxyyyzzyzzyxwuspomlkjjlmoprrsstuwyzyxvtsrqqrtwz}}{ywuttttttsrolkklllmnnnnomkhggilnquy}}zyz|}~}{yvtrqqqqpnmkklllllmmnpruy|~|{z{{|~~}|zywvuvxyz{zwspmlmorvxzz{{||}}}~}yuqnlkkigecbbbbaa``abcdfhijlnqtwy{||{zxusqponmllkjijloruwy{|}}}|zxvtstuwy{|~~}{zxwvwxzzywurponpqsttuuttsstsrqqrtw|~{ywtqommnonmkigeegjmqtwz|~{zyz{|~~|||}~~|ywutsttvwy|}~~}}}~}}~~|zxvspomjhedeedddddeefhjloruvwwy{|}~~~|{zyxwusrqonmnoqtuvwwxwwusqoooqrtwy|~}{ywutssrrsuvutttsrrqpmkkmrw{~~~}|zxwutrqpomkigeeefilnqsux{}{zyxwuttuvx{~}zwuuttsqnlkjigeb`^^^^][ZXVUTVXZ]`cfhkmoqsuwxz{}~~~~~}|{xvvvwxz|}~}|{yxvtrpppqrrrrrsvxyzzz{}}}}}~~|{yxvutw{~}{xsokiijihd`\YXY\_ceghhjmrw||ywwwvutssvy|~~~}{yvttttsqolihijjihfc`__``^\XUSSUX\_begijlmoprtvxz{|}}}}||}}|}}~}xtqomnnooonnnopqrrrtvy}~{zz|~}||||zxvtsrpnjgedceec`[WTRSUX[]_acehlrx~}{{|{zyxxy|~~}|}~~|{zxvtrpmigeeeedcb`__`_]ZVSPOOONMKIHGHJLPSW\aeghjmptx|}}}}~zvrpnmkigeccccccegjosvy|~~{ywwutqponljfb^[YXUSOMKJIIIIJLNRV[_chmtz~}|{{{|~}zyy{||{yxwxwvtqnljifdb`][[ZYWTQOOOPPOLJIJKNPRSTVX\`behlosvy|~|yvtrqoliecdehkmoqsuwy{||}~zuqmkjklljga\WTSRRPNLLMOQRQPOOQSWZ^ciouz~|yxy{|}{xvtsrqpoljgc`\YWUTTTSPNLKJIHFDCDFJOTXYYYY\_adgkpvz~|ywwvtqnlkjklmoqrtuwyz|{{zz{|{vsrpomje_[WUUSROMJHIKORSTSQQQSW[`fmrw{~}{ywurolga\XVUUUUVUSQNMKJHFFGKPUZ^abbabcfimquy}~|zyz{{zxutrqqqpoonnnmnopqsvxz{|{zwvuuwz}~~}{ywvwxy{}{wspmlkigda^[YVTSQOOPSW\`bbbaacglrw|}{yvsqonlhd`[VRONMNOOOMKIHHGGHJMQV[^abbdehlqvz~}|zxvtrqpppprsttsrrrtvxz|||{yxxy{~~}{zz||zyxxyz{{{}}xsplifdcb_\YUQMKKMPUZ^abbaabdhmruy{{|~~}}~~{ywvvusokgb]YVVUUTSSRQPPOOPQSW\`dghiiijlpuy~}{xuqmkjijjkllmnopstuvwwvvvvwy|~}{ywvutuuvxz{|}}{zxwvvwxy{|~~zvspnljihgea^ZXVTUW[`ehkkihhikorvy{~~|{{z{{|~~}{zz{||}|{zwuromkifdbbbba_][YWVVVVWX[^begijkjkmorux|~zvqlheccbccdfiknqstttrqrstwz}}zvrqqqsuwz}|{{|}}~~}{zxvuuvvsojgdb```bdgjmoonmmlmmoqtvy|~~|yxxxyz{|~~}|{{||{{xusrqpooonllllmmkheb`_`abcdefhkmoppqrsuvwy{}~xsoljhfdbbcdfgikmmmmllmmnopqqqpommnopppqsvy|~}|zzz|{xvuuuuvuuttttuuutromjiijklmmmnnmnprsuwxy{~~}{yxwvvwz|~}|zxwvuvwy|~}{zxvutuwxyyxvsqppqqpponlkjiihhikmoqqqqrrrrstvwx{|~{vqmjigeca`_`beggfdbbcdgjlnnmlllmnoppqrsvy}}}|||~}zwtrqqruwxz{|}}~~~~~}||}~~|zxwvvwxxyzz{{|}~}zwuuvxz{}~~~}|zyyz}}{ywsqpqtx{}}{wuttvxxxutstvwwvutuvxxyzyxvvutuuuvy{}~}~~|yupligeca_^]\YVSPOOPSVY]aceffghiknqrtvwxy{~}~~}~~~}|{|}~|zywtqnljijmquz{{zz{|~}zxwwwxyyyxvtrponoprtvwxxxy{~~|{|~~|{zyxxxyz{}}}{yyyzzz{{|}~~}|zxxyz|~zwvuuuurnid_[Z[]^^[VQMLMPTX[^```abcehkmoqrtvwy{}~||||{zxwvuvwvuspmjhfdbabdglpuxyxy|~~~}{zzxwutttrrrstvwxyyyzz{{|}~}zxxxz|~~~}zxusrrrrstvxyz{|~~}~~zurnkhfeca^ZUQNMMPRSRQPOPSVZ^``a`_^^`beimpsuvwy|~~{xurponnnmkheb`^]^_adhlpruvwwvvw{}|{||~~~}|zzzz{{{zyxwtrpnmmmlkjiiikmquxz{{}}||{zzzywuromllmoruxz|~zurnkgc_[WSQONMMMMMOPRUX[\]]\[ZZZ[\]_begjlnqtuvvvvxz{}~~zvtqppqrqolhda][YZ\`cfhjnqrsssuy}~{ywvvxz{{zywwy||xusrsssssqnjgedegjnruvwxz|~|{zxvrpnmkjijmptx}|wurnje`ZURPNNNNLJIJMSX]_`_]\[ZZ[\^_`bcdfhjmopqpooqsux{}~|zxxxxxxwvtqmjfc`^]]_acfhjkllmpu{~}{xuqmkkloqssssssuvxwxwvtqonmmnoooomkiikoswy{~~}|zxuronmmkjijknquz}yvsojf`\XVUUSQONNOPSWZ]_a`][XWWWY[]_``_^_acfhiiijkmorsuvxz{|~}||~~~}zvqmheb`_``bcegiknoqsv{|ywtqomlkkmnnnmmmnpsvxyywtqnmmmmnoqrqpopruy{}~~|zxuspnlkjijloqswz}}wrlgc_][ZXVSQPOQTX]bfhhfb^ZYWXY[\\\[[[\^`bcccdfilnpqppppqrsuxy{|}}~~|zvrmjgfdddfgikmpsvx{{yvtsqpmkhgeca_^]]^_bfknqrrqomkhgghjmoprtvy|~}zxvusqonnopqrtvxz}|zwtqmifda^[YWWWWY\_bdffec`]YWUTSSUXZ[\_acddeeefghjklnopqqpqsuwxxxxy{~|yuroligecbcdfhkmoruvx{~~{ywurnjgedca_\ZXXY\afknqstsrpnlkjjlmoqsw{~~}|zxusrrrrsuvwxy|~}|}|xusqponkheb`___abdeeeedca`^\ZYYXVUUWZ]_``_`acdefffghjkklmqtwyzyxwwy|~}|yxxxyzzxupkhghhhhhhhjlptxz{|}~{zxvsoljgeb_[XUUWZ_cfhhijkmnnnnopqqqooquy~~}}~~{xspoprsuwyz|||~~|zyyz{|~~}|zywtojfb``bdfgecb``abccdca_[WTRRTVY[\]]]_acccegikmopsv{~~|{yxwvuuvxxwvtroljjjkjjjklmosvxz|~~}{wsnkigeb`]ZYZ\`ehiijjklnqtvxyxwvtrqrtx}~}}~}{zzyyy{|~|zyyxwwvutstuwz~}zvqmkjijknpppnkihhjmppojc\VRPPQSUVXYZ\^_`bceghjlorvy{||{zxxwuutsqonnpruvuspljihhihgghknrvx{|}~~|{|}{zxvtqnkhfc`^]^_aegikmnnnopruy|}zxxyz|}|{z{|}~{wvvwy{|}|zyxwwxz}zurqsuwxvsoljiijloqssqmic]XTRQQQRSUX\^`abcdegjlnpsuvwxzzywusqonlmnpsvyzywtpljihhhgghiknsx|~{ywwy{}~{xusrpmjhecbdgjmopppqsuwxz|~}zxwutrqppqrtvwwwusqppprtvz~~}yuqooprstttsqokgda_]\[ZZZ[\\]^`abaaabcdeeefgikllmlkjhggimrw{||yuromllmnoprtwz|}yusqpnmlllmnoppruz~|zwutsqqnlihiknruvwwvvwxz{}~|ywtrrrssrponnnopppppqrtvy|~|yvtsstvwxxvspmkjhfeddcba_]\[\\]_`aaa`_^]^_bgkmmljhghilosuutrpnlklnprtvwz|~}yuqmjgfeeeeeefgimqvy|}|{ywtrponnpsvxz|~~}}||~~~~~~~|xvsrpnlkklnopqpoonnnopqrtvz~~}{yxyzzyxutssrrqqqpomie`[XWY\_bcdb`\ZZ[^behkkigeeefiklnnnnnnpruwxxxxxxz}~{zxurmid_[WVWY\`eimortwz||zxurrsux{~~}~}zwtsrstvvvuvwy{||}}}ytolihiknpqomlllkigedfinty~~}{yxvuttstuuuusoib\YY\bgknnmkhfddfhjlmmmljiihhijlmoppppqqqqqqqrqrsvy|~}zxxz}|wsnjfa[VRQSV[_dgjmorvy|}|zwutvx{~{ywvusqnjgfedefghjlnpsuxz{|}{uqnmnnmlkklmnmjgdcbcehmrv{~~}zxusssuwyyxtokfdegknrtvwvuttttuuutromkjihhhijlllkjihijjijkkklmmnpqrssstvy||xsmgb]YWUTTUX\afknrvy}|xvuw{}|zxvsplhda^\ZZYYYY[^adhlosvyz|}}xtqonnoopppommljigdbbdhntz|yxx|{xxz~{vqoqsvxzzyvspooqsvz}|zwtqnljhghhhggffedcbbcbcdeeddcbaacfjnqsuwwxz}zupjda^\[YXY\`ejotw|}{||zxxxxwvtroljhfda^[YWUTSSSRRSVY]cgknqsvz~|yvvuuutrpnkjhfb``adimpuy}~yvtux|~|zwvvwy}~zvrpopqrstutuvxz~~zvrnjfdbaa```abaa`_^`abbcbba_]^`cfknruwwvvx|}zvqke_[XVVXZ]afjotx|~|||~}|zvspnnmmlkigda^\YWSQNMLJHHIJLORTWZ\_adglqvz}~{ywwxxvqlfb``adgilosw{~}yurrux}|zwvutuwx|zvrpprtwxyyxxy{~|ywtplgecba`_^\ZZZ[\^`a`_^\[ZYZ]_beilnopruz~xqke_YTRSWZ]aejosx|~~}}~}|yuqmjhfeefgiigea\VRNKIHHHIKORVY\^_``abdgkptw{~{vpkgddegiklnquwz{||}|zwsolkmortuuuuuuvx{}~}yvuuwy{|{zyxxx{~~}|{zyxuroligecb`^]^`bddca_]\[ZZZ[\]`bdfghimsz~xog`[WVWXZ\^`bfilpsvxz||}}{wspljhgffgggfda^[XVRNIEBACGLQTXYZZ[[[\_bfkpuz}}wrnkjjklmmnoprtuvwwusponoppppnmmnnprtvxz{|~}}}~~|zyxxyz{~{wtrrrrqpnljihfcaaaacdefedcbba```__^^^_abdegjov|~xqjc^ZWUUVXZ\]]^adhknprux|~{wuromkjjjhgeca^[YVSPMKIIIKNPRTWY[\]_aejouz}zxwwwvutsrqpponlkjiklllkjiiiijkmnooooqsvy}~}}}~}{yyyz{|||{zyyz{{xtpkhffghjklkjhfffhjklljgedefgiiigecceeeefghkoty~zrjd`]\\[[[[\^acdeefhikosx}~{xurpmkhfc_\YWVTSPLIGEDCDFIMQUZ^chlpswz~|zywvtrponmmmllkkklnonnmljiiklpty}~|{|~~}zvsqppqqppqrrssqnkhda___`abcdfilnoomjhgffhjloqrrqpnmnopqrrqpqty}~ukc_]_aceggfeddddeefhknquz}}yuqmid_[XUTRQNKIGECCCFIMRW]ciosuwxz}}xspmkiiiiiihhhiijjjjiiiknrvy}}|{{|}~|ywusponnpqqqqponnoooponljhec`]\]]^`dinqrpmiggjmpssrqqrtvxxwwwutsrtw|zpga_^aeiklmmnopqqponnpsw|~{xsoje_YTPNMNOONMKIGGHKMRX^ekquwxyy{}{wsqpponmkihggghhhijklnqsvxz}~~{xuqomnnnmkjjkmnooooonmkjjkllllkifb]XSPORV]dikkigffhlorsssttvy{~}||}~woga]\^aehknpsuwxyzzyyz|~~~}zwqlgc^ZWVVVVTTTTUUUUSRSW\ciosvwxxxyz|~~~~~~~{{{{yuqligghhggghjlmnopqrtvwyz|||{wsolifeeeffghijlnoqqqomkklnpqrqolhea]ZXWY\aeikjihiknqstrpnmnptx|~|zwspmigdccccbcdhmsx}~}|{{{{{zywvsqnje`\XXY[]^___^^]]]]_`behkmoqsuwy{|}}}}|}}~~}zvsqrtwwvusrrsuvvvussrrsuwxxvrmifdcbaabehkoqstuuutqonnpqrssrpmifdccdefggffffgjmpqpomjhggjntwxy{}~ytplhedccddcba``acejotx{~~}|{yvtsstuutsqnkheb``acddccdeghhiijjjklnpqsstuwz|}~~}{ywwxz|~|z{}~}zwttuxz{zvrolkmptx{{yvsrrsttsqpopruxxwsnifddefghikmqtwyyzywurppqsuvvusrqpooprtuusrpmkihhhhhhgfeefhjlnprtvx||xtpjd`]]_beghggfeefhloswz~}yurpnlkjjjlnooomjfda`^^^`bdeefhjmoqsuvvvvwwwxxyyzz{}}}||{{{{zyz|~{{|}~|{yxwutrqomkjjkmprsqokhgilrw|{yxxxxwuuuuuuusplheccefiklnoooqtwxywurpnnprvxywsonnquy}~~|yuqmkihgfc`][\^aehjlmlkknsz{vohb]ZZZ\^bdgikmnoopqsvy}}zuojhffffhiiigedcccca^[XWY\`dhknprtuxz|}~~~|{zyxwwwwwx|~zxvutstvxxwuromjfcbaacefhiklkifdbachmqvy|}~~}|zyzzzyxvspmlkjjklmnqsuwxwwwvwwvtrqpqrtuuuuutuvxyyyyxwurnkheb_]]^_``acefhijlptz{tkd_]\^`aabdgkosvxyzyyz|~~|yvspligedcbbcdddccba`_^]\\[\]`cgjnrvz|~~~~{ywvvwy{~ytrpppppnmllmoponjgedeegjlmmlihggggfefiouy~~{xwuuttsrqpoooqtvwwwvtqpnnoopppponnnopsuwvtqnlkkklkihfdbbcefgghhhggikosx~{vqlgb_^__`bcegiknrvxz{|}~}zxutsrqomkigdccbba``````___`____`cehjkmosw|}{zyxwwy{|wsqomieb`__`bdfghiihghjkmnnoprrpnljiilpuz}zxwxyyyxxwvusqppponmkihggghijkjhfcaacfilnnlifdcba`abcfhknpponnnmllmmorv{}yvrpnljjjjjkkkklmoqstvz}{xwvusqoonmljjihggecb`___``^]\]^`cegijklmnqu{}{zyy|zvtromifdb`_][ZZYZ\_bfilmmmmmopqqpopqsuy}~}}~~|yvsqpoonlhc^\[\`dfgea]ZVUVZ`ehihfb````_^^`ciouy{|}~}{xusrstv{}wqnmnpprstsrpnkihhjlptx{}~{xustvxwurpnmmmmmlkjhgfedcccba`^]]]_cglprrrrrty|ywxxvtqomkiheb_\Z[^bfiklnnnnnnooooqtw|~|{ywtplga\XUSTVY[\ZWSPMNPUY]^_``aabbbaaachnty}}zy{~}yvutstuvxyxwvtrpnnmoqtwy{|}||||{yxwwwwxz|}}yvssvy}~}yurppqqqqppqrsssqpmjgedddcdfimqtuutrrtx}~|zxvtqomllmnnmifca`acfkortuutsqpoppqrtw|}{yvrmid_ZUSQPQRRRPMJGFGILNPQRSTX\`cfghijklnrv|~}}}{zxvtttvxz{zyxwvutttvxz{{{ywusqonmljjknoqrssrppprtx{|}}|{yxwvvvvtsstvwy{zwsokhffgjkmoppooopqrrtx|}zxwxyyxvspooqrsttutrqqqsw{{xuttuwxyz{~|zxvutpke_[WUTTTROMKIHHHHHHFEEFIMQUZ_dhloqstuwz}{yyyz{||{ywuttvwxxvtqpprux{}~}zwuronljihgggikmmmlkjiikou{~~|{{|{vrqpponnnnoppppponnnpsw{|xtrpqruxzzxvtsrrsuwwurpprx|zwvwvuqmheca_\ZWSOMKLMNOONNMKJIIJLQW_ejnpqsuxz|~~~}zxxxxxyz{{{|||{xtplklpty|}|yvttssrpnmllllmnonmkigffghkpvz~~}}|zyxvsqpomlkjjlnqtuvvwy|}{ywusrrrtttttsstuwxz{}~{z||zvsqqsvz}|yvutttsssrqnkgc^YVUUVVUSQOMMNPQQQQSUX[_cgmruwyzz{}~|yussuwy|{vqjfcdhlprtuvwxyyyz{||||{xurpnljhgghhknruxz}}yvsoligeegjmortvxxyy{|}yvtsrolheccehlptwyyyxwwyz~}{ywuspoooprssrrrrstvy|{yvtstux|}zvspmjhfc`\XURQQQQQQRTUWXZ[\]_beiotx{~}xtrsvy|}}|||{{{}~ysnkjkmoonlkjkmpsvy|}vokjijjklmnprtuvvvutuw{|vqmjiiklmnpsvz|~{wtrqpqppnje`]\^bgmrvwxyz}~}|zwtrqqqrqomjgfgilosvwvussvy}zvrpooppnjc\WTQPPPQRQRSVY\_bcegjmqvz~~xrnmoqtvwwwxz}{xvtsrqqsttspmlmopqsux}ysqqruwxxwwxy{{zxusrsw|{vspnlkjkmpsvy{|}}~~xsnljhhijkljgc^[YY\_cfhijlqv}|zywxxxuqmjgfgjmopqrqppqsw|ysnllllljfb]XSPNNOPRTWY\_bdgiloruxz|~||}}|{yvronoprtuuttuwy{|{zxtqonmnnooomkjiiknpqstuwy|~}yvuvxz{||{{{||||zyy{}}zwtpoooprstvxz}{vqnljigecbaa`^\[[[]`cgikmorv{~~~|zwsomlmnopqqomkkkkknrvyzyvqnkjjjigd`]YVTRRTVY[]^`adgknrux{}~|{yxwwvuspmlmnqux|}~~~}{xuronnnoprttqoljiijkmnoqsuwxyzzzzxvvuuvx{{wsqonoqsssssstuxz}~xromlkiea]ZXVTSQPOQTY^bfjosw{|yvuttttttsrokhebaadgjmnnmnnmkigdcb_\YWVWZ_djnonnnnorw{~~}}}|zwtsrrrqomlllnquy|}~~}|{xtojeaacgkoqqpmjihhhjklorvyzzxvuutsssrsuy}|wqmmqw|}zxwx{~}xuqnjgc`]XTQONLKKMPUZ_cgjnrx~|zwutuutrpmid`^\[ZZZ]`eikmmmmlkjigebabdfimqtvwwvuvw{}|zywusrpponmmmnquxz|}}{{zz{zvroligghikmnoqqpomllklnqtwz|}}~|xvvy~|yxwy}}{{{|~|yvqlgaZUPLIFDDEILORVY\`cglqvz|yvtrpmjfca_[WRMIHLRYagkmmmlkkkjjigfgjnty}}{z{}zwtpmkjjmqrrrqqrsttsrqpprtuvutrqnkihgghhhggghklnpqqrstvz~~ytolkkmquz}|{yxwtqmic^XSOLHDBABFKPTUVX[^begjnrw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^aejnqsux{~Ǿyoe\TMGDCDEFEB>;99:>@ACDGKOSVY[^bglptvz}~yvspmjfaZTMHDA>;8778:>BFJLMOPQSTW[^bhnswz|}|uld_]]_acccbcegilnpqrtwyz||wtrqrtuuutsrpooopsvxwvtrpnmlid_ZVSSUXYYZ\]`begiiijlnrvy}þ}wpib]YUQNJGDCBA@@?>==>ACEHJNTZ`fkptx{}wspmkheb]YUSQNJD>9779==;?BDGJNRX]djpv{~xsnjea^ZWTSSSTTRNKIJLOPOLGB=;;>BGMSX\_bfkptwz{{{|~{xwvwy|~{xvtsqqrssrqonorv||wusrponmlkjhhilptvwwvvuutqnjgeefiklkga]YWWWXYYZ[]`dhnty|}}~zuqmjgfeca`_][YUQMJHGGGHJLNQUY^dintx{~}xrlhdba`^\YVSQOLJIIJNRUWVTPLGDCEHMQVY[^aeinrvwwxy}}zxxyz|~~{xusrponnpsvy}{wusqnljihhhiijkklmoqtvwwtpjeb_^afknpomjgda_]\\\\[\^adhkoruwy{~{wsokgdcccba`^\ZXURPNNNPSW[^beimpsvz}{vpje_[XWWVUROKFC@?ADHKMNMMLLLLNPQSUX[_bfkostuvwz}~|ywvwy||ywutrqpppooppqsssrqqrtvwvtqmieb`__acgikkjhgfeddca`^^^`bfjnrvy|ztnheba`_^^__``^\ZYWVWY[_cglqux{|~~zwsojea]ZWTQNKHEB@?>>=>?ABDFHKOSX[_aceghjloqtx{~{ywwxz|~~~{xutssssssstuvwwwxxyzyxvspnlkjiihfc`^]\\\]_abcccbbbba`_`cfjov|~zuromjgda^]]_`abcba_^]]]`dhmrvz|~~zvsolifb]VPJDA?@ABCA=976679<;;=?CHMSX]aehkmnoqtx|~~|zzz|~~~{yxxxxxxxxxwwwx{~~xsqooonnmkgb]ZWTRPNMNPSUWXY[]^`bfjoqsux|~zxwwxxyxwurnjeb`_`bfiknnnmmmnqty}yuokigec`\XSNJGGGGFFEFGGGFDBA@ACGKPTY\_chmquy{}~~}yvvy~}||~|ywwy|{xuuusplhd`^\ZXTPJEBABEHKMOQTY^chlqtw{~{vsrstvwwwvvusplhcabdgjnprssrsux}|yvrmifdcba_[WSQOOOOONKIHGGHIHHHHIJLORVY]aekpvz~}{|~}}~|xuuvz~}{zzz|~yurpmkgc^YTQPOMJGB?<;:;=@CGKOU[`fkpuy|~{zzz{|||{{||{wrlihilorsttttuwz~|yvsqomkgdb`^\ZWTRQQQRRRQPOOPOMKJJJLOPQSUWZ_elrwz}~~}||zxuronnptx|}{wrnjgda^[XVSQNKGD@><<<==>@BEJPV[`eimrvz{xtsstvvvtsqpqsuy|yvutsqomkhfca_\ZXVUUUUUWX[]]\ZVTSSTVXYZZ[]`dinswz|~~}|yuqmkiknrvy}}zxtojfb^ZWTRQPNMJGC@=<=>?@ABDGKOTY_djosw|~}||||}|{zxxwy{~{xvuttromkigeedba_^\[YWVVWXZ]___][YYZ\]^^_`abdgkotxz|~~}~~|yvrnjgfgjmprttvy||wrmg`ZTOMKJJJKJIHFEDCCDEFHJNQUY\`cfjnrx~~zyy{~~~~~}}|{{zywusqponljhggiihfda_\ZYWWY[^`abbaabbcbccccdfhlptwz{}~zupkiijmopqqqrtvz|xrkc[TMIFFFGJKMMMLKIHHHIIKMPTX]afimrv{}}~|{zyyywtqnljiijlmnnnmmljfb]XTQQQSTWY\^`abbbaaabdgjnsw{~~}||||}|wrommnpqrrrqqqsvy{|}}wog_XSPOOPQQPOMLLMMLKIHGHJOU[bhmqtwy}~}{zyyxwvvurnkgdddeghhhhghijjhe`[VRQPPRTWY\_bdfhjkkklnrv{}||}~yusrrtuvvwxxxyxxwwwwwxz{{|}~~xpic_\ZYXVTRPONNOOONLJIIKOTZahouy}|xusrqpppnljgeb`___````_^_]\YVSPOOOQSVY\`ejosuvutttvx|~}}}{ywvtsrrtvxyzzyxxxwutrqqsvy|}{yvtqmiea]ZWUTTTUVVWVUTTTVX[_cglqvz~~~}}}|}~}|||{|}}{wtpmjgfeccba`^][[ZZZZXWUTSTUVXY[\_bdfhiknrvy{}}{zyz{}}yvtqonmlmnqsvxyywuroljjlnquy}~zwtrpnmkjhedb```abcbbaaabbcfilnqrsux|}zxwvvusqppruz~~zxvuuuvwyxwurpnkhd`\XUTUX\`ba`^\ZXVUTTUVWZ]bgloqstuwy{}~}{zyyz|~~{xuromllmprstuvvtrpnlkklmosw}{wspoprtvwuspnmlkkkkkjjjjlnqsttsrqrtw{|xsolkjihhgffgimqvy{}}|}~|vrpooprrrpnmjheb]WRNKKNRW]acddcba_]\[Z[]bgmrwz||{{|}||}}{xwvvwy|~~{yusrrqqonmmmnnoprtvvwwvvwx{}||ztpnnpsvxzzyxxxxxyyyxwvutttvwyzzyxxxwvuuuvy|~|{yxwuspmjfca_^_`bdhkmprtwz|~~zvronmllkkjjjhfc_[XUSQRTX\adghgfdcaa``_`bfkpsuwwwxz}}{{|~|{z{|~}zxuttvx{~~{yxvutsrqqqrstuxz{|||}~}|{|~~|zyyyzzzzyyz|~|{z{{|{ywwwxyzz{zwtpnnprtvuutssrrpnjgdbbaa`__`acfimruxz}~|zywtqomkjiijjjjjheb_\[ZZ[]`chkmmljhgghijkmnprtvxyz|~~}|{ywvuvy{}~~|zxwwy{~}}}}|{yyz|~~~~}{zyz{{}~~~}}~~~~~~~}~~}}||zxvutrpnkjiiihhhggghhggfedcddefgiklnprux{~~}}}~~}{xuqnlkklmnnmkjjkkkkjigedccdegiklllkjklnprtwyz{{{}}zxvtsrqonnoqux{||zyxx{~}||~~}|~}zwvvwwxy}|zxxxyzywuspmiea]ZWVVWXZ[\[[]_abccdddehknruwxyz|~{xwvvvwvtroljjjkmnnpqqqrrqoljhfdcbbbdhknqsuuvvvuvxz}{wtqnlkkkllmoqux|}}{ywx{~|{zz|~|{{}}{zz{{{{}~}}|zwusrqqqqqsvz~}yvutuuwxxwtojd^YUSQPPQQRSTUVX\`cdcb``chnty}~|ywtrpnnnopqqpqppqsuvwvtqonljigecbbejnrtuvvvx{~{vspmkigfedfhkoruxxwusqqsw}~{zz|}{zz|~~}|{{{{zxvuuwxxwvttux{{wtrstuwxwtoiaZSOLKJKLKJJKMPTXZ[\\\]_dipw}~}zvrolkkmnprrqppqstuvvusrrstspnkjlnrvz}~~|{z{|}|zwsnjfecbbccdefhknqrrrqpoprw{}}~}zxy{}}|yvspopqstuvvusstvvvwy{~|ywuttsrokf`ZTNKIIIIHFFGJNSX\]]\[\^aejpv~{wsqoooopponnnnoprstuwxyyxwvutsuy}|xvutuwwupkea][[\]]]]\[[_cilnnljihimqu{~}|{{zwspmjhgffhjlortuvvvvy}}zxvtrple^WRMJGGGHHIIHHILPUY]_`abbdfkoty~}}}{zyxwusqomlkkkklkkkmptx{}}{zyyz}~zwuutsplga[VROOOPQRQPPPSVZ^`bccddfhkotz}{xtplhea^\[[]_bgknoppqruy}}yupic^ZUQMKKLNOOONNNOQUY]adghihhhjlpuz~~}~}||}|zwutsqponmllmpsuxyz|~~zunhb\WSOKIGGFGHHHHJKMOPQRTVZ^bgkorvz~{ywusokhedb`_^]^`bcegjnsx{~xrmhb\VQNMNRUVUSRQQSUX[^acefgggghknrvy|~~~|{{{{{{}}{xvuttuuvvurqooorv{|skbZTOKIFEEEFGGHHHIJJJIHILQW]chlquy||zz{{{zywusqpomkhfedccdddb]YWX[aiotx{}~}vohb]ZXYY[]^^^^^]]\\\]_`cegijkkmoqsstuvy}}{zyy|}ywvutttuvwz{{{zxurpqty~|xsojd_YTPMLLMMMLLLLLLLLKJIIJLQV]djotx|~{yyyyxwvutrpnjfb^[Z[^adffeb_^_adhlptw{}ztojfeddeeeedb`___`aa`_]]_bfimqsvwxxwutssux|||~~|zywvuspmlklpuz~}zxy|~ytpmjheba`^]\YWVUVVVVTSQONMNNOOORUZ_ejpuz~}zyzzzxvtqnligeca]YVTUX\`cdccccejptx{}~}yvttsrqponnmmljihgfffedddfhkmoqtvyzzzyxvuttuvxz|~~|zxvtrqpomkjjlnqtvwy{~{urnkheb`_`bdefhigeb_\YWVTSSSRRRTVZ]`bcfhkotx|~}{ywtqnljigec`^\ZYXXYZ\]^`bfjnrvz~~~~}zwtqpooqsuutqponopqqpomlklnoqrsssrqqrsssttuuuvvvvvvvvwxz{||{{|~|xutssstsrqpppppppqqrtwz~{xuroligedddgjmppolieca_^\ZWVTSSUWY\_bdefghjlptx}~}{xuqnjgecb`___^]\\\]_`abcehkosvz}~{yxwwxyyyyyz{|}}zvspnnprttttuwz{||zxusrssssstuuutsrpnlkihggiloqtwyyxvtqpopruy{}~{vronnnopqrrssrrrsuvwxz|}~~{yxwvvvutsrqqppppomkiijkkjhd`]ZYYYYXXYZZ\^`bdgilnpqsw|~|zyxxwtpjeb`__`acefghhhffhknruwyyxy{}|xutttuvwwvvvvy{}~~~}{zyyzzzyyyy{}}zwtqpppoonmmmmkifb_\\^aeimquxxwurolkmpty}}|{{zywtqoooqstttuvwxyxyyyy{~|ywvuttttuwxzzywspnmllmmkjiiihgeb]YWWXZ[\]`dinruutqpqty~~|zxwuroljhhijjjihhhghijlnptwz{{zyyz}~{ywvvvwy{|||||||{zxvvwy||xtrpmjgedefghgc_ZVRRTY_dimqtwxwuromklmosw||zyyyxwwvtstwyzzyxvuuvwyz|~~{yvspppruwxwvusrrpomkiiikmmkhea^][ZYZ\_dinswxwutrqruz{xvtssrpppqqqponnmmmnoqrtvwvussttuvwwxy{}}|}~{z|}zvsqniea^[ZZ[]^^[WSOMMNRW]cinruvwvurnkiimrz|ywutuuvwy{~~|zxvvy|{vqmkklnqstvwxwuspnmmmmmlkjiihhfdb`__`cgknqqponmmpsx|~zvtuvvvvvvuvutrpnlklnprtsqomllllllmoqsvx{~~}{yxvusqokfa]YUSRRSSRRPOOOQTW[^adgkortvvspmlnrw|~~~~~|yxxy|~|{|~{wspmkkklnqsuwwwusqpoooonnnnopqqoliea__acfhjjjklortwy}}zwvwxzz{{zxvrnjgeeghiiigfecbaaabcegkosx}~{xuqnllkkigb\UNIGGHHHHHHIKMPSTVY\_bfhknqtuvuttvwxxxxz}~zwuttuuuuvy|~|}{wspnljiijlosvxxwvuvwxyyxvspnmnooomkgdcb`^^\[[]`cgkorv{~}||{{{zywtoic^\[[\_aba`^]\ZXWVVX\bhpw~~}|zuplhedcb_\XSOLIGEB@?@CEHKNPQSVZ]adhkoqsssrqqqrstuvxz{|}}|{yvspnmllnqtw{~{z|}wtqonmmlklmoqstttttuwy|}}|yuqnlkihgeca`_]ZWSQRUX\`cglry~|zwsnha[WTTVWXXWUSSSTTTTUX]bipw}}{{|}~{xtplhd`[WTQONNMKHEBABCEGIKLMORVZ_cfikllllkkklnprsvx{}~~|yvtrqqrrssrrtvy||{|}~{yvuuvwvuuuvwwwvuvwy|~{xurnkhda`^][ZXVTQQRUY^bfjnsx~zuqke`]ZXVUSPNMLNQTWZ]_chmrx~}ywxz}~{wrnkhda^[XUSQNLIEBABDFHJJJLNQTWZ]adghhhhijklnqtwz~zvuvy|}|ywuuvy|~}{{|}~~~~{yxxyz{|}}}{ywtpmid`\ZZZZZXUSQRU[`fjoruwyz~zvuwz~}yupmkjjifb]XTRRUX[]_`cgkptw{~|ywwxy{||{zxuspmic]XTSSTSRPMKIIIIKLLKKLMQUY^cgijjiijlopqsuwz~~}||}}}|yvssv|{xwwy|}}~|zxwvuuttuuuroje`\YXWWXZ[\]^acgloqrqppqtw|{wuuvwxxwusrqpqqqolieb_]]^`cgilosy}{xvvwxyyyxwwwvtqmhc^ZXWWWUSRPOOQSUUTSRSUX\`cfgijklmmmljjmrw}|xusqqqrsuwxzz{zz{{||{ywutrrrsvy|~{yxwxwwvutrqolifb_\[ZZZ[]_beimopolhedehmsy~}zvsqqqsuxxwutsrpomjheccdgjouz{yyzz|}~}|{xvutttsstuuuvuusqmhda^\YWVUWZ^bfgfda^\\]^aehknpsuvvusqoqty|{zz|}~~}|{zxvurpmkklorvyzzywurqppomljjkmqv{~{yz{||{{zzxuromljigda^\ZXWWZ]chkmkieb_^_adinsx{{wttvy|}yvspnlkjjkmrw}{vsrstvwvuspnnnoooopqqqppnnnoonljgc_\ZZ\`eilmnmkjiiijkmnprttvxz|}}}}}}zxvuuuuuvvwvutsqomlmopsuwvusrqoligda^]_afkquz{wusqponmie`ZUSSTVY[\]]]]]]^_beilopqtw{|yuqmllosy~|yvtrqqqpmjfdb```abcegiloonmkiiloqstrokihikmopponnoprsvx{||zyxy|~}|zxuronnnoponlkklnprtuutssqonnmkgc`][\^adhknrux{|}~~~xrmjiknomic]YVVVWXYYXUSSUX\binpqpopruz~~{yxy~}ywvutrrqqqpnkhd`^]\[[[\]_bejmmljhhilpuy||{zyxxxyyxwussrsvz~zvtttsrpopqrrqomigeegjnqtutrnjfeddddb_]]^bgmrwyyyyz|}~{vrnkjiijhfdb`^^_aaa_\YUSTW[ahmruvxyz{||||}~|zyz}|yusqonmmmmlkgda^\[[[\\\\_bfhkllkklnruxz{zzz{~{wutuy~|wrnkjknruwvrnjgeefhijkklmmjgd`^\[[[[[\^agnv}~|ywuromlkjjigfda__`behiigec`__behknqtwxzzzyxxwx{}||}zyxvsokihhijhfb^[Z\_bccb`^\]afjnrtvxyz|}}}}||}~~~~ztokjjkllkjgeefhjkjgc_\ZZZZZZZZYZZ[]_aeinuz~~}}}~~~|yurpnkjjjkmoqqpnkhfefghjlmmnoqqrrqonnpswz{zyxxxy{}~|zyyyxwtsqppolhc^[YZ\_acdcba`__`achmrwz|~~}}}}~~~}||}|xurpomjeb^]]_cgjkkhea]ZVSPNNQSWZ]`bdfhknswz|~zurqqstuutsrrpomjiiknqsttrpoopqsssssrrsuxz||}}}}~~~}{ywwx{~}|||{{{{{{|~}yrkc^[[\^`bceeeeddegijmoqsux{~}}}~~{xwvusrrstvvuqkd^YXZ]addb_\ZXVUUTSRQRSTX\`ejotx{~}wrlhedgikmnonnmnnnnnoppqruwz{{{zzz{||}~~~~~~{yxyz}}{zzzzxwuuuwy{}}|{zzz|}zvqlgc`_`begikllllmmmmnopruz}{yyyxuspmllmnoonlhd_\ZXYZ[ZYWURONOQSTUVW[_cgjmorv{yslfcbbcehikllmmmmlllmmosx}~~~}|}~~||}~yurrrrpmjhilpuy||yvrnkhffhkorssrnkgffhknsx}}zvtsrqpppqqrrrqolhc_[YVUUUVUSQNLKJJJKNPTX]cinprstuw{~}~{upkfb`adhkmnnnmnoooprtx}~}||}}zxwy{~~yurpnlhfefilptx|yrkhimruxxvsokiggimrx}zvtsrrrssrqqppppolhc_\YVTTTUTSQOMKJIHGHLRZclruvuttux||zzzz|~~|xsmheehlpsuutttuwy{~{xvutttuvxz|}~~zxxyz|~}zxy}}zvplihijlnquy}~wpljlosuwxwtronnquz~|xusrrsttttrrrqomkhfdb^[YWVUTSSSRQPNMLMOSZaiouxz{{zyy{|zz|}~~~}|yvqmjjjmpuy|{wtqonooppqstvwyz|~~|{{z{|}~||}~xrnnpswz}~zslhffhlptx{}~}{z{}|zwvuuuvvvutqnlifda``bdeeda^ZXVWYZ[[ZXWY[^cgkoruwyzzyyxy|||~}xvvy{|{xtqnlmoruy~}xsommmmmlljjjloruy|}||{{zzzzyyy{~~|}}}~{wvvxz}~{uojebacglsz~~zvspmllmnnnmlljigeb_\ZZ]afjlmkhdb`aaaa`_^^`cglqtwz{|{yvuuwz|zvuwyzzyyyxwusrrv||yurponooonmmmlllnptwz||{ywtrpprtx|~}|~}|{{|~}yvtrpnljhfglry}zuqlgc``aeghhgedcb`^[ZZ]aflpstsqnkhgfffffhknswz}~}{ywvwz}~~}|{}|zxwvvwxwvvuuux}{vspooqsuvvusqnnoruwyz{||{zwusrqqsw{~}{zyz|zwvx||yvsqommmoqtvx{}|ywusokfa][Z\`cfgfca`____acegjklmnopppnkjihikmquy|~|{yxx{~~|}~~~~~}}}|{ywuuvy{}}zwtqnlklmquy{zwsnllpuz}}|yvvx{|{xsnkjknrw{|{xurppruxy{|~~|{|~}}}~}{wtqppppooqsv{~}|{{|}zxwvutoic^\\_beggd`][[]_adfffecccdglqtusqnlmoruy|~}~|{{}~~}||}|{yxxxwwwxz}~}{xurnkhffimsw{|zxtrrtw{~~|zyz{}~}zuokihjmqssrqopruy|~|{ywtqnlkjjjknqvy|~}zvtttwz~|{zyxvroljihgfdc`]\[]`dgjjhfb_\[\^cipuxywsqpqruy~~}||{yxxxxxxxxyxxxxwvvvvwxxyyxwwxyzzwsnjfddehloruvvuuvxz||zyyyz{||||{yvspnmnqrrpppqsw}~~~}|}~|zyyzzzzxuroljhghjlnpqrsuwyz{zxvuuw{~|zxusrqpomib\VRSVZ^adffec`\YWWX\ahouy{{yvuvx|~}~~~|wsommnqrtuutssttttttspnmlmnoqrrrpoljhhgikmprtuwz|}|{ywvuvwy|~}|||}~}|ywuuw{}zxy}{xwx||ywutttuuurolieccdfhiklopqqrrsuwz}~zwutttsplgb]YXY\`befffeca`^][Z\_elsz}{|~|z{|}~~}}~~{wspnlkklnqrsuuvusqpnlkllnoonmlkjkklmnnmkjklnpsuvwwwutsstwz~{vssu{|xurponnmlkjiiihhijkmoqsuvwxyz|}yvsqqqrpnliebaabcdeffedccbccca__`chntz}~}}}}}}~~}|||}}|{yvsokhedfjmorstssqpoonnmmlllmmmmmljjjklmmkhecceinswxxwvuuwz~}yvspooruy}|yupligfffghihhhijmorssuwy|~{xuronmmmmlkkjjjjjkkjiigeba__`aabcehlpswz}{ywvwxz{{zwtojfcceiknnnlkiiknpqqomjiijkkjhda__adefecaacehlpsttuvx{zuqonmnoqtwz|}~~~~}yuqnkhgfedcdegjnrvy{|}~~~}|{{zxuqnljjkllkihhhijlmmkifdbba`____`bfjotx{}~~{zzz{{{zyyxwvwwuromkkjifecccehkmnmlljjjjjiihgfeeffeca_]]^`cglpsvy{}~zupmkjiiknruxz{|~ {ywvwx||zxxz}|yvsqrv{}wuuw{|vrnmnu}zsqruy|uolknvwolnqw~}vplkmuwmhimszztolpvvkfeipx}wrprwujdcgmv|wttw~ujcadjt~|wuv{wld`chr|{vuxynf`agp||vrsz|qh`_dnz}uont}tjb_dnz~tljpywmd`dn{|qigmwypgcfo|ynfflv|rjfir}ulgiox}uomowzqkjov}}wttw|yqmlpw~~{yy}zsmiinv{xxzzqgaafp~ztru{vg[VZcsunmr{q`RMSauskinzn\NIO`vsjglxm\NIO`wulhlw}l\PKRdyxnjmw|l^TQXh|zqmow{maZX_m}|tqrw}yofbchr~~xvwxz~~{wplkoty}}}|{zywurppu{}xtommou}yuvx|xpiegnx{pkkowznd_cm{vjdciuzla\anre^]et{k_\aq~n`XYeu{k`]ds|l^VZfv{mdaiuyl_Y]iw|pjjoxxka_cmx}trru|~tkfgls{|yyz}xqllnsy~~|}}ztporty~}}~|ywsrtxz}|zz~{wvtsv{~|ywvy{urqruz}wtrsy~uolmqx{sonqzzrkgiq{ypllq{wohcgq}yojlr|uldagr~zplnt}|sjbait~{soqw~yqicdlw~|vuwz~woifhox|||}}ytnkknty~xuromorvz}~xojiikry~~{{{}rf`^`iu|wsswn_WTYfv|rmlrl\PMTdw|phgokYMIQcw{nfenkXKHRdxyldepjWJJTfyvjdgr~iVKMWhytiejt~iWNP[jzsigmw}jZSV_lz}rllr{{l`Z\dnzzqnqv~zmebdiq{~wqqu{wniikou}}ztprx}~uolmpsy{wsprx~}upnoquz~{xtrty~~xtrqquy}~||zxwx{~|zwtrswyzz{|}~~~}wtstuuvx|~{wtrqrsv||{}~yvrpoqt{zy{|}{vqmnpt}~wwxy{{vollot~|vuwx{ztmiinuysrsv{{skefktxpnnrz}sibbfryojimvuh`^bn{oifis~wj`]_k}~rjegp|yka\^i{tkeenyylc^^i{uleemxyld_`k|vldelxxlc_am~ujcclwyld`bn~tiabkuzne`do~th`ais|phcgrthabis}}skiluuicdkr{}unnrz}tjfhnt{|uqsxyqjilqw}}ytrv}}unjkpuyzvssywpjimsx}|wtqs||sjginu{{urps}ypgeiqw|ysppv~vmdelszvqoqyzribeox~{snmq{umeagr|wokkr~}ph`_hv~skfiszmc\]hx}qichsyk`Z\iy}qgcguwi^Y^l{zofcjxvg[Yap}wmfem{teZ[estjegq~~pbY]iv}pgditzm`Z`myznedlwxj^[co{xleemwwi_^fq|xlfhpyvibbhs}xnjmszulhhks}yrnquzvommns}{wuuw{yutsqu|}{{zz}{zzwtv|~}~}~{z|{vwzyx|ztsw{~ywwtty~sllqv|{vrnnu~|nfflr{|tmhir~zj`aem{~shbcn~xf][_izqe^_lucYVYg{naZ\jscWRVf|l^X[ksbUOVh~|i]W\mraSNXkyh\W]psaSP\owf[YarraSS`rue[[dsraUXetrd]_gurbZ_jvqe`cjurd`eox~qfdgmwrigkrz|pihkox~tnnrv}ypllnr||vtvwy~wrpqru~{z|}|~~zwuuvvz~|{~}zwvvxxy}zxzzxzyvttx{{~|vuutu{}wsruz|~ysqpor|{tpqw|~vqnkjq}{tprw|~|uplggo}|tpsxz~{vqkeeo|wsuwx}zwrkefozzwxxw||yxrjfhpy}|yx{}wwwsljmrw~zxz{vstwsnortv{}xwsmlrvtruwvux~ztlefotuw{|yvwz{~{pe]`jqv{{vvutx|l]VZdnvyupnr}}iWOS^jw{tlglxhSHLVevviaergQDEO_txi_aliQB?HYp{j__i{mSBXxx_SQWiv[E8>Yyw_QNTgy^I>AZzu^OLSf{`NEG]{t_PLTg~eTLN`{taRMUhjZTXf|raTNWj~oa\bm}pbVQZm~thdkt~pcYV^n}ypms{zod\Zbq||wuzvnf__gr{}}yrngbckt{smkhdhpw{~~ymhiihluz{}}|}uidfhipy}|}~|yyz~qfabfir|}}~zvvy~~oe__cis}~zsrv|mb\\`ht~yqot{m`ZY\fsyqlpxm_YVXcr{qkmvp_XTU_p~|rkkst`WTS\m}~tkip|ycWSSYizvminz~fWSRVewwnilwjXSRUasypklup[SSU^o~{smmsu`VTU\kz|uons{dWVW[gw~vqps}j[XY[cr}ytru}o_Z[\an{{vtw}ue^^^`iv||~}yxz~zlb`aafryyz~{z}rhddcdmtvx}}|xnhgechpstz~~unkhddjoqv~{tokfcfknr{|upibafjox{skc`cgluxne__diq~~~~sh`_bgnz~}{wlc_`dkw{{z}}pfa`ciszzzzujdabhp}yxyz{ngddgnyyxzz}tkgfglv~zxz|}{pljilry~{z{}~vqnllnsy~~}|}}~~vsolkmsx{||~~{usnihmtxz|~yupgc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pnpsxyrqwz|~xrpqty{trw{||}wrqsvz~wtw{|{}}xsrtwz~wtx||{|~|wssvy|yux||{|}{wssvy}yuy}}|||zvrrvz}~~yvy}~}|}{vrruy|~~|wtx|~|wrrtw{~|zusv|~}xsqruy{wsqtz~zuqpsv}yupnry~}wqnor{ysljnv}ypkjnxyqieis{|rjfiszpe`dmyshbdn|{oaY]hvug__ixp_UVbryg\Zbrp]PP[m}i[W\ls^MJTf}l\SVfyv_KEM`xq]QR`tzaKBGYtv`PNZoeMACTn|eSMWijPA@OikVNUdxnUD@Mep\QUbtrZGBMc{vbVXbqv^MGPbx{h\\dowbSNUewndcgpwfYU[ixtkjmtug^]cozxrruy{qhcdku~zxz|{tlgfiq}}z{}unfdflvyxy{{qhaaemzzttu{|nc]]cm{wpnpx}maYY_jzvmjktpaXV[fwxlgfnueYUXar{nfbhx|l]VV]mqhbdrscXUYgzwlbalz|k\UWbt|od_gssbXX`m|uhaemx|j^[^hvzmdekrqe_`fq~}qhgjnyylecgozulklmv}rkijoywpoopvvrppty}xssuuy~xwwwy}{yvtwzy}{wz|~{ussty}z{{vtzvomnryvttooxtjgioxupmijurgcdjvvmhdequgaagsxmgaal~yjb`ep~{pib_iypfbenz~smfafuvlfgnxuqkdfq~|smlpw~yvrjhp{{uttx{zzxqlqx|~~|zzzz{~|z}yrsxyw}zwvxxwyxwzwrt|~vrqqqv~~|~xnmu|xqmllq|{oipuz|rkgglx~phkpt|ukecgssiilnvzne_bm|xljjjq~sh__hv|pljimxyk`]co{unlhjsqe^`ju~zspjhnyxka_eoyxtniltre_ajtz|yskjpyzla_fns{~ypjmtsf`dimt~tmlpy{kcbegn{zpmmsrgcbaguunlnxyld_]an}zqljqrg_Z\gxtmhlyyk_YX`qxoggs~naYV[l~|pfen|rdZUWfzrgcjxuf]VVcvtichvxj`XVatvkdht{nd[Xarxngiu}qh`\bq~zqjlv~umfbep||uopy~wqlhir|{wsu|}xurpot|~~zwvyzwwwvux~}z{}|xx{~zwwy|}{|}vtwwvx~{vsuz~uprstx|wqpt|~rkloqwysnlr{rihknvwpjip{sgegktwohfmztgcdirwnfdkywhabgq}woecjwyjbchp{zqgcjv{meehox|sjejv}ohhjnv~wnhlu~}smmnou{rmow}~vsrqru}xssx|~}yxwwuv{}xx{|{{|}|{{}}|yy{~~~}xvxxwy~~{{z{|}~uqrrqv~{ywwx}tnnlkr}wsqrytljgen~xrmnuukhcaj|zqjiq}wkfa]fz{rhgo{ylf_[ex~tifnz{ng_Zcvvjfnx}qja[cuxlipw|tlc]cr~{olrwzwogaer|~sqtxyyrkegqz~xuxyx|{vpkkrx{|z||y{|xsootwz~~~zz~}}yvttuwxz|z}{{}{xxxwwwx{}z}}zxz}{y{{ywvux~{|{xuy}|z|}zvtuv{|{yvuy}|z}zuttuz|zxvty}{z}zsrsuz{yxvuz}y{}xpprv|}yxwww|}yz|vnnrv~{wvwwx}~zyyskkpwwuvvx{zxwphhoy}srtux}{vtmedmy{portx|uqkbak{ynmprw}uoia`jzzmknpu~~vpia`jz{njmos|~wpjcckz}okmnqy~xrlgglzrnnmnu}~}{vqnlozxrolknvyz|}{xvssz~wrlfgnrtz|xz|umd`ejnu|zoc[]bgr~||~qbVUY_l~|vu~tcUPSXg~zroxwfVNNSb|zpjryiYPMP^w}rjny|m`UPQ\rwmlt{}qg]UT\n~rmosv}~vph^Z^j|{pnmms{}ywriccjtxohdgpwyz~}umjkovre]]dntzxrnlnuxfXTZenyzskhkuhVNQ\huwlddlzmWLMVcr}ob_ftr[NMS_pqb\cpv_RPU^ntd]cpxbWVYaotd^eryd\\_gs|qd`hvve_bgoyvmcbl{scagowyogabn~m``ku~ti`]bpxh\^ly~pcYX_ntdY[j{~o_UT]msaVXhzp^QPYiuaUUdwr`QMVf}wbUT`swdRLSax{dXU^n|jVMR_ri]Y]j{p]RT]nnc^^gvveXW^lwmfekv}pe_^fvxofdju}pf`_gwyofcjt|of``iyxndbit|pfaajzxlbahr~}qgablzwkb`fq|tjdfo{xkbagpzvmiks}xldcipxwpmqxwlffkry}wrrw}|tlijpu{zvrt{wojjnsx}{wtrwzqkikqw{~xurryvmghlsy~}vspqz|sjehou{{tqps}xpfdjqx}ysppu|tlcclv}~upmowxogadozzqljpztjb^dr~vmggo|qf^\dsukdeo~~oc[[ettjcep|naY[gw~rhcgszl_Y^ky{ogdjwxi]Ybn{wlffmzuf[[er~tidgq}~rc[]iv~qfcis|oa[`lx|pfdkt{ma]cmy{ogfmvzmdbfoy{qjkqwynigipz{sopsxyqnmmqz}~~~~~~~~~~~~~}~~~~~~~~}~}~}~}~}~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~}~}~~~~~~}}~~~~~~~~}~}~}~}~~~~~~~~}~}~}~~~~~~~~~~~~~}~}~~~}~~}~}|}|}|}~}~}~}~~~~~~~}}}}}}|}|}|}|}}~~~~}~}~~~~~}~~}~}~}|}|}|}~}~}~~~~}~~}~~~}~}}|}|}|}}~~~~~~~~~~~~}||{|{|}|}~}~}~}}}}~~~~~~}~}}||}|}|}|}||}|}|}|}|}~}~~~~~~~}}||{|{|{zzzz{z{z{|{||}|}}~}~~}}|{|{{{zyzyzyzyzzz{{z{z{||}~~~~}||}~~}}|{|{|{||{zzyyxyyxyzz{||}~}~~~~~}}}|{|{{z{{zyzyzyxyyxyyyyz{{||}~~}|{|{{z{zyxyxyxyxxwvwwvwxxyz{{|}~~}|{{zzyxxxwxwxxxwvututuvvwwxxyyz{|}~}|zywvvuvwvvuutstststsststuvwxyzz{}~|{zxwwvvvuttsrqqpopppqrqrstuvwxyz|}~~|yxvuuttstsrqqppoppppopqqrsstvwxy{|~~{ywvtsrqpqppoonmnmnmmlmmnoqrstuvxy{|}~~|zxvtrponmllllkjjiiihijjklmnoprsuvy{}~zwtqnmmlkjjihhghihhggffgghijklnoqtw{~}yurpnljihgfeddddcbccbcbcddfgijmoruxz}~{wspmjhgedddcbcbaa`_`_``abbcefhjmoswz}ytpligdcbaa`a``_`_^^^^^____`abdgjnrw{|vqlgda_^]]\]\]\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VWY[^_aba`_]ZXUSQPPQRSVZ]bfkpuz{skd_[XWXY[]`abccba_\ZWURQQQRTVY]aejoty~|tle`\YWXY[]`acdedba^\YWUTSSTUX[^bfkosw||tle_[XWWX[\_acdddca_]ZXUTTSUVX[^bfkotx}}umfa\YXXXZ\^`cdddba_\ZWUTSSTUX[^bejnsw|~umg`\YXWXZ\_acdedcb_]ZXUTSSTUWZ]`dhlqv{woic^[YYZ\]`acdddcb_][YVUTTTUXZ]`cgkpty~yqje`]\[\]_abdefedca^\YWVUUTUWY\_cgkpty~yqje`]\[\^_bcefgfedb`^[YXWVVWY[]adhkpty}xpid_\[Z[]^acefggfeca^\ZYXWWXZ[^aeilquz~yqjd_\[Z[]^abeffffdb`^\YXWWVWY[^aeimquz~yqjd_\[Z[]_acefgffdb`][YXVUVWXZ]`dhkpty}zrke`][[\]_bcefgfedb`][YXVUVWY[]`dgkorw{|slfa^\\]^`cdfghhgeca^\YXVUVWYZ]`cgjnrw{zrke`]]\]`bdfhijihfda_\ZXWVWXY[^adgkosw{zqjd`]\\]_adehiiigfda^\ZYXWXYZ\_beilptx|yqkd`]\[\_adfhhihgec`^\YXWVWXZ\_behlpty}yqjd_\\[\_adfhijigfca^[YWVVVWY[^`cgjosx|zqje`^\\]`bdfhiihgec`^[YWVUVWY[^adhkosx|zrlea^]]^`begijkjhfda^[YWVVVWY[]adhkosx|zrkea^]]^`cehjkkjigdb_\YXWVWXZ\^adhkosw{zqkd`]\\]_bdgijjjhgda^\YXWWWXZ\_behlpsx{zqjd_\[[\_adfhijihfca^[YWVUVWY[^adhlptx|zrkd`][[\_acfhijihfda][XVUTUVXZ]`dgkosw{{rke`]\\]_adfhijihfc`]ZXVUTUVXZ]`cgjorw{|tlfa^\\]_bdfijjjhfda^[XVUTUVXZ]`cgjnqvz~{rke`]\]^`begijkjigda^[XWVUUVXZ]`cgjnquy~zrje`]\\]`bdfijjihfc`][XWVUVWY[]`cgjnquy~{slea^\]^`bdfhijigec`]ZWVUUTUWY\_bfimquy~{slfa^\\]`begijjihfc`]ZWVTSTUWY[^adhlosw|zrkfa^]^_acegijjihfc`]ZWVUTTUWY[^adhlotx}zrkfa_^^_bdghjkkjhfc`]ZWVUTUVWY[^adglptx}xpkea_^_`begijkkjhfc`][XWVUUVXY\^adhlotx|xpida_^_`bdgijjkjhfc`][XWVUVWXZ\^adgkosw|xpjea__`acehjklkjhfc`]ZXVUUTUWX[]`cfjnsw|woida`_`bdfiklmlkifc`]ZXWUTUVWX[]_cfjnsw|~voida``acegjklmlkifc`][XWVVUVXY[]`cfjnsx}}unidbaabdfhklmmmkigd`][XWVUUVXY[]`cgknsx}{slgca`acdgiklmnmlifc`][XWVUVWXZ\^adgkosw|yrkfca`acegilmmmljheb_\ZXWWVWXYZ\^adgkosx}xqkfcbbcegikmnnmljheb_\ZXWVWVWXY[]`cgknsx}wpjecbbcegjlnoonmkheb_][YXWVWXYZ\^adgkotx}|tnhdbbbdfhkmoponmjhda^\ZYXWXXYZ[^_beimqvzzslgdbcdegilmnoonligda^\ZYXYXYZ[\^`ceimqvzyqkfcbbcdgikmnonmkigda_\[ZYYYZZ[\^`beimpuzxpjfcbbcdgikmnonmkifc`^\ZYXYYYZ[\^`cfinrw{~wojfcbcdfhjmnopnmkhec`][ZYXYXYZ[\^`cfinrw{}uniecbcdfhkmnpoomkifda_\[ZZYZZ[\]_adhkosx||unhdbabdfhkmnoonmkhec`^\[[Z[[[\^_acfilpty}zrlgdbabdgilnoppnmjgdb_]\[Z[Z[\]^_acfilpty}wpiebabcegjlnopomligda_]\[Z[[\\]^_acfilquz~~vojecbbcfhjlnoonljheb`^][[Z[[\]^^_acfimquz~}unifcccegilnpppomkheb`^]\[\\[\\]^_aceilquz~{smheccdehjmnoppolkheca_^]\]]]]^^_`bcfilquz~zrmheccdehjlmooonljgeba_^]\\]]^^_`acdgjnsw|zrlgdccdegilmnoonkigdb`^]\]\]]^^_`acehkosw{xpkfdcbcegilmnonmkifca_]\\[]\]]^_`acehknsw|xqkgeddefikmnonnljhec`_]\\[\\]]^_`acehknsv{wpkgedefhjlnoppomkifda`^]\\]\]^^__`bdgjnrv{}unifedefhjmopqponkifda`_^]^]^__``abdfilorv{{tmheddefhkmopponmjheca`_^]^^__`abcdfgjmptx|xrkgdccdfhkmopoonljgec`_^]^^_``abbcdegjmptx}wpkfcbcdfhjlnonnmkifdb`_^_^__```abbcfhjmqux}xqkgdcddfhklnnonljheca`_^_^___``abcdfgjmptx}wpkgdcdegilmoppomkifdb``_^_`_`a`abbcegjmptx|}upjfdddehjlmoponlkhfdba`````ababccdeghknquy}}vpkgdddegilmnonmkigeca`_```abbbbcdefhjlpswz~|uniecccdghklmmnmkifdba`_`_`aabbccdefhjmorvy~}uniecbcdfhjkmnmljheca`__^__`abbccdefhilorvz~}uojfdcdegiklmnmljgec`_^]^^_``abbcdefhiloruy}|tniedcdehjlnoonmkheca`_^^__`abccddefgilorux}{smheccdehjmnoonmjhec`_^^^_`abcddeffgijmorvz~yrlgeccdfhjmnoonljgdb`_^]^_`abcdeeffgikmptx|xqkgdcbcegilmnnmligdb_^^]^^_`bccdeeghiknqtx{xqkfdccdehjlnnnmkifca^]]\]^_`bccdefghjlnqtw{yqlgeddegikmnonmkhfca^]]\]^_`bcdeeffgikmpswzwpkgeddegiknoopnligdb_^^^^_abcddeefghikmpsvy~~vojfdcdegilnoponljgdb`^^^_`abdeeffghijlnqtwz~}vojfdcdfgjlnoppnlifca_^_^_`bcdeeffgghjlnqtx{}vojfdcdegikmnonmkifca_^_^_`bcdeeffghijlnqtw{~wpjfdcdegikmnonljheca_^]^_`abcdeffghijlnpsvz~}vojgedeghkmoopomkhfca_^]]^_abdeeffgghjkmoruy}}vojgfefgikmopppnligdb`_^_`acddeffgfghijmorvy~{tojgfefhilmoppomlifdb`__`abcdefgfghhiklnqtwz~|vojgeeegikmopoonlifcb``_`abcdefgghghiklnqswz~|uojfedegikmoopomkhfca`_^_`acdeffgghhikloqsvy}}vpkgfdeghkmnoonmkheca_^__`acdefffgghijlnprux|~wpkhgfghjlnpqpomkheca`__`abcdefggghghijmorux|}wpkhgfghjlnpqppnligdca`aabcdefgghghghijlnqtw{|uojgfefhjlnpqppnlifcbaa`acdefghihiihijknprux}ztmifeefhjlnpqqpnkifcba``acdfghhijijijklnpsux|yrlheddehjmnpqpomkheca```acdfgihijjijjklnorux}xqlhedefhjmnpqpoligda`__`acdfghiihihiijkmoruy}wpkgeeegiknoqqqomjgeba```acefghhihihiijkmorux}}vpkgedfgilnpqrqomjhecbaabbdfhiijiiiihijkmoqtx}{tnifdefgjlopqrqoljgecbabcdfgijjkjjiihijkmprvy~{tnifeefgjlnopppnljgecbabcdfgijijjiihijklnpsvzzrmifeefgiknopponligecbabcdfghijjjiiihijkmpsvz~zsnigfefhjlnoqponlifdba`abcefhijijiiihiijmorvy~ysmigffghkmoprqpnkifdba`acdfghijjiiihhijkmoruy}yrmigffgikmopqqonkifdbaabdeghjkkjkjijiijkmnqtx}~wqlhgffhikmpqqqonkhfdcbbcdfhijkllkjjijijkmorvz~wqlhfefgilnpqrqomkhedbabcefhiklkkkjiihijkmorvz~xqligffhjlnpqpqomjhedbabcdfhijklkjjihhiijlorvz~xrmigffhilmopqpomkhedbabcdfhijkjkjiihihijlnquy~xrmihggijlnpqrqomjhedccbcefhijkkjjihhghijmorvzyrmjhggijlnopqpnmjhedbbbcefhjklkkjiihhijkmorvy~ysnjhgghikmopoonmjhfdcbcdefhijkjkjjihiijkmoruy~ysnkhgghiklopppomkhfdbabcdeghjkkkjjiihiijlnqux}ytokihhijlmopqpomkhfdbaabdeghjkkkkjihihijlnqtx}|uplihhijlmopppomkhfdcbbcdfhijklkkjihhhijlmptx}zuplihhijlmopqponkifdbabcdehijkllkjjihhijlnqtx}|upmjhgijlmoppponkifdbaabdehiklmmlkjiiiijlnptw||uplihghiklnoppomkifdbbabdfhjllmllkkjijijlmpsv{}vqmjhghijlnooponkifdbabbdegiklmmlkkjiiijkmpsv{}vqmjhghiklnopponlifdcbabdeghjklllkjjihijkmorvz~~ytokhghiklnopponligecbabdegikllmlkkjihhikloruy}ysokihiiklnopppnljgeccbcdegijklmlkjihihikmorvz~zuqmjihijkmnoponlkhfdccddehijkmlmlkjihiijlnqtx}{vqlihghijlmnoonlkhgedcddegijklmlkkjihijklnqty}{vqmjhhhijlmnoonmkigeddcdeghjklmmlkjjihijknpsx||wqmjhhhijlmnoonmkigeddddegikllmmlkjihhiijmorv{}xrmjhghijlmnonnmkigedddefhiklmnmlkjihiijkmpsw{}xrmjhgghiklmnonmljhfedeefhiklmnmlkjihiijkmpswz}xrmjhggghklnonnmljhfeddefhiklmnmnlkjjiijkmorvy~zsnjhgfghjlmnonmlihfeddefhiklmnnmlkjiiijkmoquy}{upligfghjkmnnnmljhfeedefhiklmmnmlkjiihijlnquy}{vqligfghijlmnnmljigfedefghjkmnmmlkihihijlnqtw|~wrmjggfgijklmnmljigfeedeghjkmnnmmlkjijijlnpsv{~xrmigfefghjlmmnmkigfeedefgiklmmmlkjijijklmpsw{xsnifedefhjklmmlkjgfeddefgijlmmnmlkjjiijkmpsv{xrmheddefgijlmmljigfeddefgijlmlmlkjihhhikmpsw{yrmifedefhjlmnmlkigfdcddefhiklmllkjihiijkmorvzztnjgedefgjklmnmkjhgedddefhikllllkjihihijloruz~|uojgecdegijklmlkjhgedddefhiklmmlkjiihijkmoruy}|uojgeddefhilmmmlkhgeeddefhijkllmlkjiiijjlnqtx|}vojfdccdegiklllkjhgedcddegiklmnmlkjihiijkmptx|}wpkgdcbcdfgjkklkjhgedcddeghjklllkjiiihijknpsx|~wrlhedcdeghjkllkjhgedbccdfgijjkkjjihhghijmosw{ysmiedccdfhjklmlkihfeddcdfgijklkjjihhghghkmpuz{tniecbcdfhjklmlkjhfedcddfgijlllkjihgfghiknquy~|tniecbbcfgjkmmmljifedcdefgijkllkjiggffghjmquy~{tmheccbcfhjlmmmljifedccdefijkkkjihgfffghjmpty~|unifcbcdfgjklmmljhfecbcdefhijkkjihgffffgjlptx}}vpkgdcdegiklmnmljifecbccdeghijjihgfefefgilosw|~wqkgeddeghklnonnljgedcbcdeghijiihgfeeefgiknrw|xqlheddegiklnonmkjgecbccdeghijkjihgffefgiknrv{xqkgdccdgikmoppomkhfdcbcdeghjkjihgfeeefgiknqv{xqkgdccdfhkmoppomkigeddcdeghijiiihfeeeefiknrvzwpkgdccdfiknoppomkigecccdeghiijihgfeeeefiknruzxqlheddehjlnppqpnligedccdefgijjihgfeddefhjlpty}yrlheddegilnpqrqomjhfedddeghijiihgfeddefhjlpsx|yrmheddegilnpqrqomjhfeccddfgijiihggfeffghjlpsx}yrlhedcdgilnqrsrpnkhfddcdefhijijihgfeefghilorw{yrlhdccdfiknprrrpoligeddcdfgijijihhgffghijlorvzzsmhdcbcehknprrsqolifecbcdfghijjkjihggfghjlnrvzzsmhedcdfilorstsrolifecbcdfgijkkkjihgfefghjmpuy~{tniecbcehknqstsrpmjhfdcdefgijklkjihgfgghikmpty~{tniecbcehknqsttrpmjgecccdfgijklkjihgfgghiknquy~yslgdcbcfilortuusqnkhfdccdfgijjkjihggfgghikmquy~yrlgdccdgjmpstuuspmjgeddcdfgijklkkjihggghikmptx}zslgdccdfilortutrpmjgeccbcegijklkjihhgfgghkmptx}yrmheddegjmqsuvusqnjgecbbcefijjkjkihgfffghjlotx}{tmheddehjmpstuusqnkhfdccdegijkklkjihggghiklosw|{tnifedegjmpsuvvtrokhfcbccefhjklklkjihihiijloruz|unifdcdgjmpsuwvtrolhfcbcbdfhiklllkjihhhghjlnquz{unifedegilpsuvutrokhfcbccdehiklllkjihhghijlnruz}vojfdcdgimpsuwvtrokhebaabcdghjklllkjjihiikloruz}vojgedehjnqtvwwusplheba`acdghjklllkkjihiijknqty~}vpjgedegjmqtvxwvtplieba`abdghkllmmllkjihijknpsw|}vpkgedegknruwxxvtplieca`abdfiklnmnmlkjihijkmorw|~wpkgfefhknquwxxwtqmifcaaabdfhjlmmmlkjjihiikmpsw{~wqlhfefhjmqtvwwvtqmifca`abdfhklmmnmlkjihhijlorv{ysmigfegjmpsuwwvtqmjfcbaabcehjkmnnmlkjjijjkmoswzysmifefgilpsuwxwurnjgdbaabcegiklmmllkkjkjklmoruy~zrmifddfhknruxyxvsokgdba`abegikmnnnnmlklkklmorux}zsmheddegjnquxyxwtplhdb`_`acfhkmnoonmmlklklnortx}yrlgdccehkorvxyyxuqmieb`_`acehjlmnnnmlkkjklmnqsw|yrlgdccdgjorvyzzyvrnifc`_`acehjlmnonmmllkklmnpsw{zrlgdccegkorvxzzxuqnifca``acehjlnnonnmlllklmnpsv{zrlgdbcegjnruxyzxurnjfca``adehjlnnonmmlllklmoqsv{yrlgdbbdfimquxyzxvrojgcaa`adfhjlmnoonnmmlmlmnpruy~zslgdbbdfimquxyyxurnjfca``acehjmnopoonmmlllmnpruz~zrlgcbacfimquxyyxvrnjfca``acehkmnoponnmmlllmnpquy~zrlgcabcfimptwyyxvrnjfcaa`adfikmnooponmlklklmorux}{slgcbbcehlptwxyxvrojgcaa`adfiknopoponmlklklmoruy}{slgcbbcehlosvxyxvrnjfda``adfiknoppponmlllklmoruy}{slgcaabdgknruwxxvsojgca``bdgjlopqqponmlkjkkloqty~|tmhda`bdgjnruwxwurnjgda`aacfiknoqpponmlkjkkloquy~}unhdbbcdgknruwxwurnjfc`_`acehkmnpoponmkjijklnqtx}~vojebabdfinqtvxwtqmifca``acehkmnoponmlkjjjklnptx}~vojecbcdgjnqtvwvtqnjfc`_``behjmnooponmlkjkjkmpsx}vojecbbdgjmqtvwwurnjfc`_``bdgjmopqponmkjiijkmpsx}}uoidbabdfjnruvwwurnjfc`_`acehkmopqpomlkjiijkmpsw}}unidbabdgjnqtvwvtqmifc`_`acfiknoppponmkjjijkmpsx}}unhdbbcdgknqtvvusplifca`abdfilnopqpomlkjihijmpsw|}unidbbcdgjnqtuvvtqmifca`abdgjlnooponmlkjiiijlorv|}uojfcbcegjnqtuvuspmifca`abegjlnoqppomljiihijlorw|~vojfcbcdgjmpstuusplifca`abdfiknooponmljihiijlosw}~voiebacdgjmpstuuspmifca``adfiknopponmljihhijlosw|}unidbabdgjmpsuvusplieb`_`adfiknopppomljiihijlorw||tmhdcbcegjnqtuvurolhdb`_`adfilnopppomljihghilorw||tmhdcbcehknqsuvurolheb``abegjmopqponlkihhhhjlorw}}uniecbcdgjnqtuvurolhecaaacegjloppponlkihghhilorw||tnhdbbcegknqtuvuspliecaaacegjlnopponljihghhilnrw|{smhdccdehknqtuutrolheca`acehjlnoponmlkihhghiknrw}{smhdbbcehknqtuutrokhdb`abcehjlnononmlkihhhhjlosx}{smgdbbdfilortuutrnkgdba`acegjlnoponmkjihihijlnrw}|tnieccdfhkoqtuutrolhecbabcehjlnoponmlkihihijlorw|}uoieccdehknqtuvurolhecbabcehjlnopoonlkjihhhilosx~|tmhdbbcehknqtuutrolheca`bcehjlnoponmljihhhijmpty{slgcbbcdhknqtuutqnkhecaabcfhkmopponmkjhghhiknqty~{rlgcbbcehknqsttsqnkgdbaabcfhjlmnonmlkjihhhijmptyzrkfcbabdgknrtutsqnjgdbaabdfhklnopomlkihgfghilptyxpjebabcehknqtutspmifcbabcehjlmnoonlkihgfggijmquzvnidbaacehloqstsrolhfcbabcehjlnoponlkjihgfghjmqv|vnida`acehknprsrqnlifcbabdehjlmoponmljihgghiknrv|~umhca`acehloqsrrqnkhecbbacehjmnoponmljihgghiknsx~}tlgca`acfiloqssrqnjgda``abegjlnnoonmlkjhihijlosx~|slfba`acfimprtsrpmifca``acehjlmoponmljihghhjlosx~yqjea``acfimprstrpmifca``acfhjmnopoonmkjihiikmptywohc`_`adgjnprsrqnkheca``adfiknoopponmlkjiijlnqv{|slfb`_`behloqsrrpmjgdb``abdgjlnopoonmlkjiijkmpsx}yqjea``acfiloqrrqolheba``acehkmnopoonmllkjjjkmpsxwnhca``adgjmprsrpnkheba`acdgiklnooponmllkkklmorv{}tmgc`_`bdhknqrsrpnkgeba`abdgilmopoonnmlmlmlmnqsw|zqjea`_`cehloqrqpolifdbaabcehjlmnoooonnmnmmnnoqtx}woida``acfilopqqpnkheca``adehjmnoppoononmnmnopsw{}slfb_^_acfimopqpnlifcba`abegjlnopopoponnmnmnpruy~ypid`^^_behknpqpomjgeba`abdfikmnopponononoooprtw|~umgb`^_acfilnoponkifdba`acegjlnopqpponnopoppqsvy~yqjd`_^_adgjmoppomkheca`abdfilnopopopopopqpqrsuw{vngb_^_`cehkmooomkhecbaabcehkmoqqrqqqpqpqpqrstvz~{rkea_^_acfikmnmmkifdb```bdgjmoqrsrsrqqqqqqrsuvy|wnhc_^^_adfijlmlkigdb`__`behkoqsttstsrrrrqrstvx{zqida_^_acehjlmlkifc`_^]^`cgjnprtututtsrsrsttuxz}vohda``acegiklkkigdb_^]^_adhknqsuvvuvutututuvwy|zqkfba`abdgijllkjgda_]\\]_bfimpstvwvwvwvwvwvwxy|~~vnhda`abcegijkjiheb_][Z[\_cfknqtuvwxxxyyyyxyyz{~zrkfba`acdfhjkkjifc`][YYZ\_cgkoruvwxyzyz{zzyz{}~vnhda`aacegiklkigda][YXYZ\`dhmpsvwyzz{z{{|||}~zqjebaabcfgjkkkjheb_\YXWXZ]`eimqtvxyzz{{||}}~~~vnhda`acdghkllkjhea^[XWWX[^afjnqsvwyz{||}~zqjeb`abdfhjlmmlifc_\ZXWWY[^bfjnqtvxyz|}~vngca`abdfijllljhea^[XVVWX[^bfjnqsuwyz}~zqjea``acfhjlmmljgd`\YWUUVX[_cfjmpsuxz|~~umfba`abdgjlmnmkifb^[XVUUVX[_cfjmpruwz|yqida`abdfikmnnmkhda]ZWVTUWY\`cfilortwz}}tmfbaabcfikmnonmjgc_\YWVUVX[^adgjloqtwz~ypjecbacehjmnonmkheb^[YWVWXZ[^adfilnqtx{~}tlgdbbcfhjlnonnljgc`]ZXVVVWZ\^acfiknqtx{~yqkgdddfhjlnoonmjhea^\YXWVWX[\_acehjmpswz~}uojgffghjlnoopnlifc`][XWXXXY[]_acegilpswz}yrmihghikmnpqpomkhda_\[YXXYZ[\]_`bdfilosvz}~vplihhiklopqqpoljgda_\[ZZYZ[\]^_`bdfhkorvy}|vplihijlmpqqrpolifca^\[Z[Z[\]]^_`bdfhknruy|{upljijkmoqrrrpolifc`^\[ZZ[\\]^__`bdfhknqux||vqmkkklnoqrrqpolifc`]\[Z[[\]^_``acdfhkmpsvy|~xsolklmopqrsrqolifb_][Z[[\]^_`aabdeghjlnpsvy}ztpmlmmnprssrqpmjgc`^[Z[[\]_`abbcdefgikmprux|{vqnmlmoprsssrpnkgda^\[Z[]^_`abcddefgijmoqtwz}~xspnmnopqrssrqnkhda^\[Z[\]_abcdeefghikmnqsvy|zurponopqrstsrpmjfb_][[[\]_`bcdeefghjkmnprux{~~yurpoopqrsttsqnkgda^\[[\]_`bceffghijklmoqtvy}|xtqpopqrststrpmjgc`^]]\]_`bcefghhijklmoqsvx|~yurppppqsttutrplifb`^]]^_`bcefghijjkmnpqsux{~|wsqpopqrsttutqokheb_^]^_`bcefhijkklmnpqtuxz}zvspoopqrstutrpmjgda`_^_`acefhikllmnopqsuwy|~zurpoopqstttsrolifca`_^_abdehijklmnoqrtuwy|~|xurpopqrssttspnkheca`_`abdeghjklmnopqsuwx{}|xtqpopqrsttsqpmjgeba`a`acdfhjklmnopqstvxz|~~{wtrpppqrstsrqomjgeca`abcdfhjkmnopqrstvwz{}}yuspoppqrstsrpoligecbabcdghjkmnopqrstvwxy{}zwsqpoopqrsrrqpnkhfdcbcdegiklnopqrsstuvwxz{}~}yurpooopqrsrrqnljgedcddegiklnopqrsstuvvwyz{|~|wtqoonopqrrqpomkigeedeeghklnopqrsrsttuvwxyz|~zvrpnnoopqqrqpolkhgfeefghjlnopqrsrstttuuvwxz|}xtqonmnopqqqqpnljhgfefghjknoqrrsrrststuuvwyz}zuqommnnpqqrqpnmkjhgfgghjlnoqrststtsssttuvwx{||wtpnmmnnopqqponlkihgghiklopqrsstssrsrrsstvwz{~{wspnmlmnnopponmlkjiiijklnoqrsrsrsrqqqqrrtvxz}~ytpnlkklmnnooonmlkkjijklnopqqrrqrqppopqrsuwy{~zurnlkkklmnooponnmlkjkklmnoprqrrqppoonopqrtvy|}xsolkjjklmnopoonmmlkllmmnopqqrqqponmlmnpqsvx{~~ytpmkjijklmnopoponmmmlmnoopqqpponmllklmnpruwz}{upmjihijklnooppponnmnnnoooppponmlkkkklnortvy|}wrmkhgghjkmnpqpqpoonmmnonopponmllkjjjkmoqsvx{ytokhgghikmnpqqqqpponononononmlkjihhijlnpsux{~{vpliggghilmopqrrqqpponnnmnmmlkjhghghikmoruwz}}xqligffghkmoqrstsrqpoonmmllkjihgfgfhikloqtvy|ysnjgffghjmoqsttssrqponmlkkjihggfefghjlnqsvx{~{tojgeeegilnpstuutsrqonlkjiihgffefffgjknpsuxz}}vqlheedfhknpstuvutrqonlkjihgffedeefgiknpsuxy|~wrlheddfhknqsuvvutrqomkjhgfeededeefgiknpruwy|~ysmifdeehjmpstvvvusqomkjhgfeddcddefgikmortvxz|{unjfedegilortvwvusromjhgfeddcdcdefghjlnqsuwz|~|uojgedefilortvwvusromjhfedcbcbccdefhilnpruwy{~}vojgedegilortvwwvtroligeddcbbccdeefhikmprtvxz}xqlhecdfhknqtvwvusqnligedccbcbcddefhikmoqsuxz|yrmhfeefhknqsuvvusqnkhfdcbababbcdefgiklnpsuwy|zrmifeefhkmpsuvutrpmjgecba`abbccdefghjlnprtwy|~ztnjgeefhjmpsuvutrolifdba``abbcdeefghjknprtwy|{tnifeefgjmpsuvutrolheca`_`abcddefghiklnpruwy|zsmheddfhjnqsuvusqnjgdb`_``abcdeffghijkmoruwz}{tnifddegjmprtutsplieb`_^^_`acdeffghijlnpruwy||uojfddegjmprttsrokhda_^]]^_`bceffghijkmortwz}}vpjfdcdfiknprsrqnkhda^]\]^_`bcefghhijkmortwz}|uoieccdfhknprrrpnjgc`^\[\]_`bcefghijklnprtwz}|uoieccdehknprrqolifb_]\[\]^`bdfghhijjkmoruwz~|tmhecbcegjmopqpolieb_\[Z[\^`bcefghijklnorux{|tnhdbbcdgjlnpponkgd`][YXYZ]^acefghiijkmorux|{smhdbbcegjmoppomjfc_\ZXXYZ\^abdefghiijmorux|{slgcbabdgjmoqpomjfb^[YXWXY[^`bdefghijknorux|yrkfcabcehjmoponliea]ZXVWWY[]`bdefghijknpsvy}xpjeb`acehjmnoonkhd`\YWVUVXZ\_acefghiklnpsvz~~vnhca`acehjmnoomjgb_[XVUUVWZ\_acefghikloqtw{}tmgb`_`behkmooomjfb^ZWUTUVWZ\^`cdfghikmprux{{slfa__`cfilopqpmjfa]ZWUTTUWY[^`cdfghilmpruy|zrkeb``adgjmoppoliea]YVUTTUWY[^`bdfgijmnpsvy|yqjda``adgjmoopnkhd`\YVUTTUWY\_`bcefhilnqtwz~wohc```behkmoppolhd`\XVTTTUVY[]_abdfhjlorux|~ungc`_`bdgkmoponkgc_[WUTSTUVXZ\^abdfhjmoruy}}tlfb_^`behkmopomjfb^ZWTSSTUVXZ\^`acehjmprvz~{slea__`behknoponkgc^[WUTSTUVXY\]_acehjmqtw{ypjda__acfilnppomjfb^ZWUTSTUVXZ\]_acehjmqtx{wohc`^_acgjlnopomjfb^ZWUTTTUVXZ\]_acehknruy|vngb_^_acgjmnoonlieb]ZWUTTTUVXY[\_`cehknrvz~}tmgb_^_acfjlnopnkhda]ZWUTUUVWXY[\^_behkosvz~}umgc`_`bdgjlnoomkhea^ZXVUTUUVWXZ[]_bdgknsv{|tlgb`_`bdgjmnoonlieb^[XVUUUUVWXZ[]_bdgkosv{|tmgb`_`bdgjmnpomkhea^[YWVVVVWXY[\^_bdgknsv{{slfb`_`bdgjmnoomkheb_\ZXWVVWXYZ[\^_bdgkosw|zslfba`acehjmnonmkheb_\ZXWVVWXXY[\^`behkosv{yrjeba`acfhkmnonmkheb_\ZYXWXWXYZ[\^_bdgkosw|yrkfcbabdgjlnopomkheb_][YXXXXYYZ[\^`bdgknsv{yrkgcbabegjlnoponlifc`]\ZYYXYYZ[\]^_bdgjnrv{yrlgdbbcegiknoponljfca^\[ZYZYZZ[\]_`behkosv{~{tmhecbcdfiknoponmjgda_][ZYZYZ[\\]_acehknrvz}}uoieccbdfikmoooomkheb_][ZYYZ[[\]^`acehjmqty|xqlgdbcdfhjmnoponlifc`^[ZZYZ[\]^_`bcegjmpsx{zsmhedddfhjmnpqqomjgda_\[[Z[\]^_`abdegiloswz{tokgedefhkmopqqpnlifc`^]\[\]]^_`abdegiloruy}}vqlhedefhjlnpqrqomjgda_^]\\]^_`abcefhilnqux|~wrmheddegilnpqrqpnkhec`_]\\]^_`acdefhikmpswz~xsmifddegiknpqsrqpmjgda_^^^^_`abcdefhikmpsvy}{tojfecdfhknprsssqoliec`_^]^_`abcdefghjloqtx{|wpkhedefiknqstutspmjgdb`_^__`abdefghijknpsvz~~ysnjgffgilnqsuvutqokheca`_``abcdefghijkmoqtw{zuplihghjloqsuvuuspmjgdba`aabcdefgghiijlnqtwz~}xsokiihilnqsuuvusqnkhfdcbbbccdeffghhijlmprux|zuqmkiijkmprtuvutspmjhedccbccdeffgghhiklnqtwz~}xtolkijlmprtuvvutrolifecbbccdefgghhiijkmorux|zvromlllnprtuvwvurpmjhfdcdcdeefgghghijkmnqsvz}}yurommlmoqsuvwwvtroljhfeddeeefgghghiijlmprux||xtqonmnoqstvwwvuspnkigfedeefgghghihijklnpsvz}|xurponoprsuvwvutrpmkihfeefgghghihihijkmoqtw{~|yuspoooqrtuvvvusqomkihgfgfgghghhihiijlnpruy||xurqpopqstuvuutsqomkihhgfghghghghhijklnqswz~{xurpopqrstuvvuusqomjihhgggghghghhhijkmorux{~{xurqppqrstvuvutrpolkihhgffgggghghijkmnqsvy|}zvsrqpqrstuvwvutrpnljihgfgfgfgghghijlmprux{~}yvtrrqrstuvuvutrqomkjihghgfgfghghhiklopsvy|}zwtsrrqrstuuvusrpomljihhgfgfgfgghijkmortwz}}yvsrqpqstuvuvuusqomkjhgggffefggghijlnpsvx{~{xusrqqrstuvwvutrpnljhggfeefeffghijlmprtwz}~{xutrqrstuuvvutspolkihgfefefeffghikloqsuxz}}zwusrrrstuvvuutrpmlihgfefefeffghiklnortvy||yvtsqrrstuvuutrpnljhgfededeefghijkmnqsuxz}|yvtsrssttuuutrqomjigfeededefgghijlmpqtvy{~{xvtsrsstuvutsrpnkigfeeeedeefghhiklopsuxz}~{xutsrrstutusrqomkigfeededeffghiklnorsvx{}}zwusrrsstuutsrpnljhfeedcdeefghijkmoqsuwz}{xusrqrrststsrqomkigfeddddefgghjkmnprtvy{~}zvsrqrrrsstssrpnkjgfeddddeefghijlmoqsuxz}|xurqqpqrsrsrqpoljhgeddcddeffgijklnprtwy|~zvsqpopqqrqrqpnlkhgfeddcddefghijkmoqsvy{~|xtqpooopqrqqpomlihfeeddcddefghijlnpruwz}~zurpoonopqpqponmkigfeddcdddefghikmoqtvy|{vspnmnnoppqqponljhgfedcdcdeefghkloqtvy|{vspnmnmnooopoonlkigfedcbccddeghjlnqtwz}|wspmlmlmnnooonmlkihfecbbabbcdfgiknpsvy}|wspmlkllmmnnonmlkihfecbaa`abcefikmpsvy|~ytpmkkjklmnononlkihfecbaa`aabdfhjmorux{~zupmkkjklmnnonnmljhfecbaa``abcegilnqtx{~{uqmkjjjklmmnnmmljhfecba`_``abdfhkmpsx{~{vqmkjiijklmnnnmljifeca`_^^_`abegjmptw{~{vqnljjijklmnnmmljhfdb`_^]]^_abegjmqtx{{vqnkjjijklmnonmljheca_^]]]^_`bdfilpsw{{vqnkjijklmnoonmkigec`_^]\]]^`bdfimptw{zupmkjijklmnonnmkigdb`_]]\\]^`adfilptw|~xsnljjjjkmnnoonmkhfca_]\[Z[\]_acfimpux|}xrnkjijklmnooonljheb_]\ZYYZ[\_acfjmquy}|vqnkjjjklmnoonmkifc`^[ZYXXY[\_acfimquy}zupmkjjklmnoponmjheb_][YXYXY[\_`cfimpuy}ztpmkjjklmnoponmjheb_\ZYXYXY[\^`cfjmquy~~xsoljjjkmnopqpnmjgda^[YXXXYZ[\^`cfimqvz}vqmkjjjkmnopponmjgd`][YXXWXYZ\^`cgjnrw{ytoljijklnoqrrqnlifc_\ZXWWWXY[]_adgkosx|~xsoljjjlmopqrqpnkheb_\ZXWVWXY[]_behlpty}{vqmkjjklmoqrsqpnkhda^[YXWVWYZ\]`cfimquy}ysoljijkmnpqsrqpmjgc`]ZXVWVWYZ]_adgjmquz}}wqmkjjklnoqrsrqomifb_\YXWVWXY[]_adgknrvz~{upljijkloprsssqolhea^[YWWWWXZ[]`behkosw{~ysnkjijkloprssrpnkgc`]ZXWWWXYZ\^`cfimpux||vplihiikmoqsrsromjfc_]ZXWXWXY[]_adgjmpuy~yrnkihhikmoqrsrqolieb_\[YXXYYZ\]`adgjnrvz}vqlighhikmoqrsrqoliea^\ZYXYYZ[]^`behlpsw{yrmjgfghilnqrssrqnkgd`][YYXYZ[\^_acfilptx||uojgeffhjmorsssrpmifb_\ZYYYYZ\]_`bdgjnruz}xqlhedefiknprstsqolhd`][ZYZZ[\^_abdfiknrv{~|uokgfefgiknpstsrpmjgc`]\ZYZ[\]_`bcefilotw|~wqlhfeefhjmprsssqomifc`]\[Z[\]^_`bcegjmpuy}{tnifedegilnqrstsrolieb_]\[[[\]^`acdgilpsvz~~vpkgdddehjmorsttsqnkgd`^\[[[\\^_abdfhjmptx{yqlgdccdfiloqstutrpmjfc`^]\[\]^_`abefilorux|~vojfdccegilortutsqnkheb_^\[\\]^_`bcegjlosvy}{slgdbbcehknqrtutspmjgc`^\[\[\]^`acdfhkmptw{~xpjebabcfiloqsttsrolieb_]\\\]^_`abdegiloruy}}tmhcaabdfjmprtutsqnkhdb_]\\\]^_`bcdfhjmorvy}zrkfbaabdgjnpstvusqnjgc`^]\\]^_`acdfgiknpswz~woida`abehknqstutqolheb_^]\]^_`bcdefgiknqtwz~}unhdbaacfiloqstsrpnkgda_^\]]^_`bcdefgjlorux{|tmgca`acfiloqstsrpmjgda^]]]]^_`bcdeghjmorux|{slgca`adfiloqrssromifc`^]]]^_`abcefhikmprux|zskfcbabegjloqrsrqnliec`^]^^^_`abcefghkmoruy}yrkfcaabdgjloprrqpnkheca_^]^^_`abcdeghjmpsw{~xqkfcaabdfiloqrrrqnkheb`^^]^^_`abcdegiknqtw{xqkfcbacegjmoqrrrpnkheb`_^]^_`abbcefgilnqtx{xqkfcbbcegjmoqrrqpmkheb`^]^^_`abcdefhilnqtw{yslgdcbcegjmopqrqpmkheb`_^]^_`abcdfghilnqtx{ztmhecbcegjloprrrpnkheca_^_^_`abcdefhilnqtw{~{toiecbcegiloprsrqolifca_^^^_`abcdefhilnqtw{~|uojgdcdefiloprsrqolifca_^_^_`abcdefhilnqtw{~~xqlhecdegilnprsrqomjgdb`_^__`abdefghjlnpsw{~ysnifddefiknpqrrqomjheca``_`aabdefgijlnpsvz}{tokgedefhkmoqrsrpnkifca`_`_`abdefgijlnpsvz}}wqlhfeefhkmorssrpolifdba``_`bcdefgijlnpsvy|ztojgffghjmnqrrrqomjgeca``_`abdefgijlnpsvy||wqmigfghilnpqrrqpmkhfdba``aabdefgijlnprux{~ytokigghikmopqqrqnligeca`a`abcdfgijlmprtx{|wrnjhgghjlnpqqrqonkifecba`abcdefhjlnprux{~{vqmjhghjknoqrrqpoljgecba`abcdfgijlnpruwz}}xtoljihikmnqrrsqpnligdca``abcegijlnpruwz}{vqnkiiijlnpqrsrqomjhecba`abcegijmnqruwz|}ytqmkjijlmopqqrqomkifecbaabcegijmnprtvy{~|xtpmkjkklopqrrqpnljgfedddeefgghjkmnprtvy|~{wsrpppqqrrrqpnmkigfeddcddefghijkmoqsvx{~}xurpooppqqrqponkjhgfeddcdeefghiklnprtwz}zvsponooppqqppomkihfeedcdcdefghikmoqsvy|{wsponnnoopqqponljigfedcdcddefgijlnqsvy||xsponnmnoopoponmkigfedccbccdefhilnqsvy|}xspnmmlmmnooonmlkjgfedcbabbcdegikmpsvy|~xtpnlkkllmnoonmlkjhfdcbaa`abcdfhkmoruy|ytpmkjkklmnononmkjhgedbaa``acdfgjlorux{~zuqnkjkklmnonoonljhgecba`a`abcefiknqtwz}{vrnkjjjklmmnnnmlkhgedba``_`abdehjmpswz~|wrnkjiijklmnnnmlkigeca`_^___`bdgjmpswz~{vrnljjijklmnmnmkjhfdb`_^]^^_`bdgjmpsw{~{vrnkjijjklmnonmljhfca_^]\]^_`bdfilorwz~{vrnkjjjklmnnonmkjgeca_^]\]^_`bcfilpswz~zuqmkjijklmnnonmkjgeb`^]]\\]^_acfilosw{~ysoljijjklnnoonmkifda_]\[Z[\]^acfilptx|xsnljijkklnooonmkheb`^\[ZYZ[\^`cfimqty|}wrnljiijlmnooomligda^\ZYXXYZ\^`cfilqty}|uqmkjjkkmnoponmkheb`][YXYYYZ\^`ceilptx|zupmkjjklmnoponmkheb_][YXXYYZ\^`cfilqty}ytolkijkmnopqpomjgda^\ZYXXYZ[\^`beilquz~~wrnkjijklnopppomjgda^[YXWXXYZ\]`cfjmrv{~{upljijjlmoprqpolifc`]ZYWVWXYZ]_adgjnsw|ytoljijkmnpqrqpnlifb_\ZXWVWXY[]_adgkotx}}vqnkjiklmoqrrrpnkhea^\YXWWWXZ[]`behlptx}ytolkjjklnpqrsrpnkhd`][XWVWWXZ\^acfimpuy}~wrnkjijlmoqrssrpmjfc_\ZXWVWXY[\_adgjnqvy~{vqmjijjlnprsssrolieb^[YXWVWXY[]_begknrvz~ztoljiijlnpqrsrqnkhda][YWVWXYZ\^`beilptx{~vqmjihijmoqrsrrpmjgc`]ZYXWXXYZ]_acfilptx|zsnkihhikmoqrsrqomifc`]ZYXXXYZ[]_adfjmquz~}xqmjhghijmoqrsrqolifb_\ZYXXYZ[\^`behkosvz~ztojgfggiknprstsqnkhda^[YXYYZ[\]_`cehlosw|~vpkgfefgjloqstsrpmjfc`][YYXYZ[]^`bdgjmquy}zrmifeefhkmprstsrolida^[ZYYZZ\]_`bdfhknqvy~}vpkhfeegiknprssrqnkgda^\ZZY[\^_abcdfikosw{xrmifedehjmorstsqpmjgc`^\[[[\]^_abcegilptx||uojgeeegiknprstsrpmieb_]\[[[\]^_abdfilosvy}wpkgeddfgjloqsttsqolhda^]\[[\\]_`bcfhjmpsw{~zslgdccdfiknqrtutspmjgca^]\\[\]^`acdfiknqtw{wpkfdbcdfilorsttsrolieb_^]\[\]^_abdegiloruy||tnhdbbcegjmprtttsqnkgda^\[\[\]_`abdfhjmpsvz~yqkfcbbcehknqstutrpmifb`^]\\]^_`abcegiknqux|~vnhdbaacfilorttutqolheb_^]\\]^_abcdfgjloruy||tmgca`adgjmprtuutqnkgda^]\\\]_`abdegikmpsvz}xpida`abdgjnqsutsrolieb`^]\]]^`acdefgiknqswz}voida`abehknqrssrqnkheb`^]\]^_`acdefgilnqtw{~~unhda`acehknqrssrqnkgda_]\]]^_abcdefhjlorux{}tmhcaabcfilnqrssrpmjgca_^]]^_`abcdfgikmortx{{slgdbbcdgilnqrsrqolifc`_^]^^_`abcdffhjlorux|{slgcaabdfilnqrrrpnlifca_^^]^_`abcdefhjlorvz~zrlgcaabcfilnqrsrpolifc`_^]^__`abcdefikmqtwz~yqlgcbbcdgjloqrsrpnkhec`_^]^__`abcdfgiknqtw{~zrlgcbbcdgjloqrsrpnkheb`_^]^_`abccdfgiknqtwz{smhdcbcegjloqrrqpnkheb`_^^^_`abcdeghjknqtw{~{uniecbcdgilnqrrrpnlifca_^^^_`abcdeghjknpswz~|uojfcbcdfilnqrsrqolifda`_^^_`abcdefgjknptwz~}vpkgdcddfilnprrrqoligda`_^__`abcdeghjknptwz~xrlheddegilnpqrrqpmjgdb`__^_`abcefghjknpswz~zsnifedegiknpqrrqpmkheca``_``acdefghjknpsvy}{vpkgedefhkmpqrrrpnlifcb`__``abcefghjlnpsvy}}xqlifeefhkmpqrsrqnligdb``_``acdefhijknpsvy|ztokhffghjloprsrqomjheca````abcefhijlnprux||wrmjgfghjknoqrrrpnkifdba```abcefhijlnprux{ytpkhgfgikmoqrrqpoljgecba`aabcefghjknortw{|wsnjhggijlnpqrrqpmkigdcba`abcdeghjknpruw{~{vqmjhghikmpqrrqpnljhedba`aabdeghjlnpruwz}}xsolihhiklopqrrqpnkifdbaaaabdeghjlnpsuwz}{vrnkjiiklnoqrsrqomjgecbaaabdegiklopsuwz|~yupmkjjklnoqqrqqomkhfdcbbabdegikloprtwy{~|xtpmkjjkmnpqrrqpnlihfedcddeffgijklnprtwy|~zwsqpopqrrrrqpolkigfeedcddefghijkmoqsvx{~|xurpooopqrrqpomljhgfeddcdeefghijlnpruwz}~zvsponooppqqppnmkjhgedddcddefghikmoqtvy|{wsponmnoppqqponlkhgfedcdcdeefghjloqsvy||wspnmnmnooppoonlkihfedcbbcddeghjlnqtvy|}wspnmllmnnooonmlkihfecbbabbcdfgiknpsvy|}xtpnllklmmnoonmlkihfecba`aabcefijmorvy|~ytpmkjkklmnoonnmljhfecba`aaabdehjlorux{~zupmkjjklmnnonnmljhfecbaa``abcdgiknqtwz~{vqnkjjjklmmnnmmljifecba`__`abcfhjmptw{~|vqnkiiijklmnnnmmkigeca`_^_^_abegjmptw{~{vqnljiijklmmnmmljhfdb`_^^]^_`bdgjmptw{~|vqnljjijklmnonmljheca`^]\]]^`bdfilosw{~{vqnljijklmnonnmligeca_^]\]]^`adfilptw{zupmkjijklmnoonmligdb`_]]\\]^_acfilpsw{~ysoljjjjklmnoonmkifda_]\[Z[\]_acfimptx|~xsnkjijjkmnooonlkheb`]\[ZYZ[\^`cfjmquy}}wrnkjijjkmnoonmkifc`^[ZYYXY[\^`cfimquy}{uqmkjjklmnoponmjheb`][ZYYXY[\^`cfimpux}zuqmkjjklmnoponmjheb_]ZYXYXY[\^`cfimpuy~xsoljjjkmnopqpnmjgda^\YXXXXY[\^`ceimqvz~}vqmkijjkmnopqpnmjgda][YXWWXYZ\^`cfjnrw{ztoljijklnoqrqqolifc`]ZXWWWXY[\_adgjosx|xsolkjjlmopqrqpnlieb_\ZXWVWXY[]_adhkpty}|uqmkjjklmoprrrpnkhea^[YXWVWXY\]`ceilqty}ytoljijkmnpqrsrpnkgd`]ZXWWVWYZ\^acfjmquy}~wrnkijklnoqrsrqpmjfc_\YXWVWXY[]_adgjnrvz~{upmjijkloprstsqoliea^[YXWWWXZ[]_behknsv{~ztokjiiklnprssrpnkgd`][XWWWXYZ\^`ceilptx|}vqliihikmoqsrsrpmjfc`][XWXWXY[]_adfimptx}ysnkiihikmoqrsrqolifc_][YXXXYZ\]_adgjmqvz~}wqmjhghikmoprsrqolieb_\ZYYXYZ[]^`behkoswzzsnjhgghilnprssrqnkhda][YYXYZ[\^_aceilptx|}vojgfefhjmoqstsrpmjfb_]ZYYYYZ\]_`bdgjmquy}yrmhfeefhknprstsqolhd`][YZYZ[\]^abdfiknrvz~|vokhfeegiknprssrpnjgd`]\ZYZ[\]_`bcefilosw|xqlhfdefgjmprsssromjfc`]\[Z[\]^_`bcegjlptx}{unjgedegilnprstsrolieb_]\[[[\]^`acdfilosvz~~vqkgeddehjmorsttsrokhda^\[[[\\^_abdehjmpsw{zrlgdccdfilnqstutrpmjgc`^]\[\\]_`abdfiknqtx{~wojfdccdfiloqsttsqolheb_^\[\\]^_`bcegjloruy|{tmhdbbcehknprtutspnjgda^]\\[\]^`acdfhkmpsv{~yqjebabcehknqsttsrolieb`]\\\]^_`abdegilnruy|~unhda`bcfilorsttsqokheb_]\\\]^_`bcdfhjmoruy}{slfbaabdgjmpstvusqnjgc`^\\\]^_`acdfgikmpsvz~xohdba`bdgknqstutrolheb_^]\]^_`bcdefgiknqtwz~~vnidb`acehloqstsrpnkhdb_^]]]^_`bcdefgilnqtx{}unhda`acehknqsttspnkgda_]]]]^_`bcdeghjlorux{|tlgca`adfiloqsssromjfca^]]]^_`abcefhikmprux{{slgcbabdgjloprsrqnlifc`^]^]^_`abcefghjloruy|zskfcaabdfiloprsqpnkhfca_^]^^_`abcdeghjlosvz~yrkfcaabdfiloprsrqnlifca_^]^^_`abcdeghknqtw{~xqkfcbabegjloqrsrqnkheb`_^]^^_`abcefgiknqtw{~yrkfcbbcegjmoqrrqpnkheb`_^]^_`abcdefhilnqtw{~zslgdcbcegjlopqrqpmkheb`_^]^_`abcdefhilnqtw{{tmhecbcegiloprrrpnkhfca_^^^_`abcdefhilnqtw{~|unifcbcefiloprsrqolifca_^^^_`abcdefhilnqtw{~|uojgeddefilnprsrqolifca_^_^_`abcdefhilnqtw{~~wqlheddegilnprsrqomjgdb`_^__`abdefghjlnpswz~ytnifddefiknpqrrqomjheca``_`aabdefgijlnpsvz}{tokgedefhkmoqrsrpnkifda`_`_`abdefgijlnpsvz}}vqlhfeefhkmorssrpolifdba``_`bcdeghijlnpsvy|ytojgffghjmoqrrrqomjgeca`__`abdefgijlnpsvy||vqmigfghjlnpqrrqpmkhfcba`_`abdefgijlnprux|~ytokhgghikmopqrrqnligdca`a`abcdfgijlmprux{|wrnjhgghjlopqqrqomkifdbaa`abcdfgijlnprux{~zuqmjhghjknoqrrqpoljgecba`abcdfgijlnpruwz}}xsoljiiikmoqrrrqpmkifdca`aaccegijlnpruwz}zvqnkiiijlnpqrsrqomjgecba`abcfgikmnqsuwz|}ytpmjiijlnpqqqrqomkhfdbbabbcegikmnqruwy{~|wtpmkjklmopqrqqpnljgfeddddefghijkmnpruwy|~zvsqpppqqrrrqpnmjigfeddcddefghijlmoqtvy{~|xtrpooppqqrqpomkjhgfeddcddefghiklnpruwz}~yvrponoopqqqponlkihfeeddcddefghjkmoqtvy|{wsponnnopqpqpomljigfedcdcdeefgijmnqsvy||wspnmnmnoopopomljigfdccbbccdefhjlnqtwz}|wspnmlmmnnooonmljigfdccbabbcdegiknpsvy|}xspnlkllmnnoonmlkigfdcbaa`abceghkmpsvy|xspmkkjklmnononmkjhgedbaa`abcdfhjlorux{~ztpmkjkjlmnononmkjhfdcba`a`abcegiknqtx{~zuqmkjijklmmnnnmkjhgdcba``_`abdfhjmptw{~{vqnkiijjklmnnnmlkigdca`_^__`acegjmqtw{zuqnkjijjklmnmnmkjhfcb`_^]^^_`bdgjmqtx{{vqnkjijjklmnonmljhfca_^]\]^_`bdgilpsw{zuqnkjijklmnnnnmkjgeca_^]\]^_`bdgimptx{zupmjijjklmnnonmkigdb`^]\\\]^_acfilpsx{~wroljijjklnnoonmkifda_]\[Z[\]_acfimqty|~wrnljijklmnooonmjheb_][ZZYZ[]^acfjmquy}|vqnkijijlmnoonmkifc`^\ZYXYYZ]^acfjmquz}{upmkjjklmnoponljheb`][YXYYZ[]^acfimquy}zupmkjjklmnoponljheb_\ZYYXYYZ\^acfjmquz~~xsnljjjlmnoqppoljgda^[ZXWXYZ[]^`cfimrvz~}wqmkjijklnoqppoljgd`]ZYXWWXYZ\^`cfjnsw{ytoljijklnpqqrpolifb_\ZYWWWXY[]_bdgkosx|~xsoljjjkmnpqrqpnkheb_\YXWVWXY[]_behlpuy}|upmkjjklnoqrrrpnkhda^[YXWWWXZ[^`cfimquy}ysoljjjkloprssrpmjgd`]ZXWVWWX[\_adgjmqvy}}vqmkjjklnpqrsrqomifb_\ZWVWWXY[]_adgjnrvz~zupljijkmnqrssrqolida^[YWWVWXY[]`behkosw{ytokjiijmnprrsrpnkgc`]ZYWVWXYZ\^`cfilqtx|}upljhhikmoqrsrqpmifc_]ZYXXWXY[]_bdgjmqty}xsnkihijkmoqrsrqolifb_\ZYXXXY[\^_bdgjnrv{~}vqlihghikmoqrsrqolhea^\ZYXXYZ[\^`behlotw{~xsnjgfggilnprssrpnkgd`][YXYYZ[\]_acfimptx|}uojgfefhjmoqstsrpmjfb_\[YXYZ[\]_abegjnqvy~xrlhfeeghknprstsrokhd`][ZYYZZ\]_`cdgilorvz|uojgfefgilnqrssrpmjgc`][ZZZ[\^_abcegilpsx{wqlhfeefhjmprstsqolifc`^\[Z[\]^_abdegjmpty}{snjgedfgilnprstsqolheb_]\[Z[\]^_abdfilpsvz~}vojgeddfhjmpqsttsqnkgd`^\[Z[\]^_`bdfhkmptw{yrlgdccdfilnqstutspmjfc`^]\[\]^_`acdgilorux|~vpjfcbcdgilorsttsqnkheb`]\\\\]^_abdegjlorvy}{slgdbbcehknpstutrpmjgc`^\[[\\]_`abefhknpsw{xpjebabcfiloqsttsqolieb_^]\\]^_`abcegjloruy|}umgcbabdfjmprtutsqnkheb_^\[\]^_abcdfhjmprvy}zrkfbaabdgjnqstuutqnjgc`^]\\]^_`abdegiknpsvz~wohda`abehknqsttsrolheb_]\]]^_abcdefhilnqtwz~}unhda`acfiloqsssrqnkgda_^]\]^_abcdefhilorux{|tmgcaabcfilnqrssrpmjgda_]\\]^_abcdfgijmorux|{smgcaabdfiloqrtsqomifc`_^]]^_`abdefgikmprux|zrlgcbbcdgjmoqrsrpnkhec`_]^]^_`abdefgijmorvy}zrkfcaabdgjloqrrrpnkhec`_^^]^_`abcdfgijmpswzyqkfcaabdgiloqrsrpnkhec`_^]^__`abcdfgiknqtx{xqkfcbbcegjmoqrsrpnkheb`_^]^_`abcdefgilnqtx{yqkfcabcegjmoqrrqpnkheb`^^^^_`abcdefgjlnqtw{yrlgdcbcegjmoqrrqpmjgdb`_^^^_`abcdeghjlnqtx{zsmhecbcdgjloqrsrpnkhec`_^_^_`abcdeghjknqtw{{tniecbcdgiloqrsrpolifca__^^_`abcdeghjlnqtw{|uojfddcdgilnqrsrpolifca`__^_`abcdeghjlnqtx{~wqlgeddegilnqrrrqoljgdb`__^_`abcefghjlnqtw{~ysmifddegilnpqrrqpmjheca`_``abcdefghjlnpswz~zuojgedeghkmpqrrqpnkhfcb`_```acdefghjlnpsvz~|vqlhfeeghkmpqrsrqnlifdb`_```acdefhiklnpsvy}~ysnjhffghkmoprsrqoljgeca````acdefhiklnpsvy}|vqligfghjlnpqrrqomkhfda````abcefhiklnpsuy|~xsokhgfgikmoqrrqpnligebaa`aabcefhijlnprux||wrmjhghijmnpqrqpomkhfdcba`abcdeghjlnpsux{zupmjhghilnpqrrqpnljgecba`abcdegiklnpsux{~|xsokiihikmoprsrqonkifdba`aabdegiklopsuxz}zuqnkiiiklnpqrsrpoljgecbaaabdegikmoqsuxz}}xtpmkjjklnoqrqqpomkhfdcbbabdegikmopsuwy|~{xspmkkjkmnpqrrqpnlihfedcddefghijklopsuwy|~zvsqpopqrqrrqpnlkhgfeddcddefghijkmoqtvy|~|xtqpooppqqrqpomkihfeeddcdeefghijlnpruxz}}yurponooppqqppnmkigfeddcdddefghikmoqtwy|{vspnmnnoppqqponljhgfedddcdeefhikloqtvy|{vspnmnnnooppoonlkigeddcbbcddeghjloqtwz}|wrpmlmlmnnooonmlkihedcbbabbcdfgiknqtwz}|wspmlkklmmnnonmlkihfdcba`aabcegikmpsvy|}xtolkkjklmnononlkihfecba`a`bcdfhjmorux{~~ytpmkkjklmnononmljhfecbaa`aabdegilorux{~zupmkjjjklmmnnmmljhfecba`_``abdfhkmqtw{{uqmkjijjklmnnmmljifeba`__^_`abegjnqtw{zuqmljiijklnmnmlkiheda`_^]]^_abegjnqtx|zupmkjijklmmnonmljheca_^]\]^_abegjmptw{zuqmkjijklmnoonmkigec`_^]\]]^`bdgjmptx{ztpmkjijklmnonnmkigdb`_]\\\]^`adfimptx|~wrnkjijjkmnnoonlkhfca_]\[Z[\]_adfjmquy}}wrnkjjjklmnooonljgeb_]\ZZYZ[\_adgjnquy}|vqmkjijklmnopnmkifc`^[ZYYXY[\_adfjnqvz~ztplkjjklmnoponljheb_]ZYXYXY[\_acfimquy~ztpmkjjklmnoponljheb_\ZYXYXY[\^acgjnqvz~wrnljjjkmnopqpnljgd`^[YXXWYZ[\^`cfinqvz|upmkjjjkmnopqpnljgc`][XWXWXY[\^`cgjosx{ysnkjijklnoqrqpnlifb_\ZXWWWXY[]_behkosx|~xsoljjjlmopqrqpnkheb^\ZXWVWXY[]_behlquy}{upmkjjklmpqrrqpmkgda^[YXWVWYZ\^`cfimquz}xsnljijkmnqrrsqpmjgc`]ZXWWVWYZ]_adgjmruz~}vqmkjjklnoqrsrqolifb_\YXWVWXZ[]_bdgknsv{~{toljijkmoprssrqolhd`][XWWWWXZ[]`cehkpsw{ysnkiijkmoprssrpnjgc`]ZXWWWXY[\^`cfimqux||uplihhikmoqrrsromifb_\ZXWXWXY[]_bdgjmquy~xrnkihiikmpqrsrqolieb_\ZYXXYYZ\^`bdgjnrw{|uplihghikmoqrsrqnlhda^[ZYYXYZ[]^`behlptx{xsmigfghilnqrssrpnkgc`]ZYXXYZ[\^_acfimqtx||uojgeefhjmorstsqpmifb_\ZYYYYZ\]_`cegknrvz~wrlhedefiknprstsqokgd`][ZYYZ[\^_abegilosv{{tojgfefgilnqstsrpmjfc`]\ZYZ[\^`abcegilptx|~wpkhfeefhkmprssrqolifc`]\[Z[\]^`abcegjmpuy~zsnifedegilnqrsssqolhea_]\[[[\]^`acdgilpswz~}vojgeddfhjmprsttsqnkgc`^\[[[\]^_abdfhkmqtx{yqkgdccefiloqstutrpmifc`^\[\\]^_`bcegilorux|}vnifcbcegjmortutsqnkheb_^\[\\]^`abcfgjmpsvz}zslgdbbcehknqrtutspmjfc`^\[\[\^_`acdfhknqtw{wpiebabcfilorsttsrolieb_]\\\]^_`abdegilorvy}|tlgcaabdgjmpstutsqnkhda_]\\\]^`abcefhjmpsvy}zqkfba`bdgknqstutsqnjfc`^]\\]^_`acdfgiknptwz~vnida`acehkoqtuutqokheb_^]\]^_`bcdefgjlnqtw{~}ungca`acfiloqstsrpnkgda_^\]]^_`bcdefgjlorux||tlgca`acfiloqstsrpmjgda^]\]]^`abcdeghkmpruy|zskfcaabdgjloqrssrolifc`^]]]^_`abcefhikmprux|yrkfcabbegjmoqsrrqnkheb`^]^]^_`acdefghkmpsvy}yqkfcaabdgjloqrrqpmkheca_^]^^_`abcefghkmpsw{xqjebaabdgjloqrrrpnkheb`^^]^_``abcefgiknqux{wqjfcabcegjmoqrrrpmkheb`^]^^_`abcdefhilnqux|xqjfcabcehjmoqrrqpmjgdb`^]^^_`abcdefhjlnqtx{yrlgdbccehjmoqrrqpmjgdb`_^^__`abdefghjlnqux|zsmhdcbcegjmoqrrqpnkheba__^__`abcdfghjlnqtx{ztmhecbcegjloqsrrqnlifca_^^^_`abcdefhjlnqtx{{tojfdcdegjloprsrqnlifca_^_^_`abcdfghjlnqtx{}wpkgeddegjloprsrqolifdb`_^__`abdefgijlnqtw{yrmifddegilnprsrqomjgeca``_`abcdefgijlnqtw{~ztojgedefiknprssrpnkheca`__`abcdefgijlnqtwz~|uplhfeefiknprrsrpnkifda`_`_`bcdeghijlnqsvz}~ysnjgffgikmoqrsrpoljgeba`_`aabdeghijlnqsvy}{vqligfghjlnpqrrqomkhfcba``aabdeghijmnqsvy|}xsnkhfghikmpqqrqpnligdca`aaabdefgijlnprux|{vqmjhggikmoprqrqomkhfdbaa`abcdfgijlnpsux{~zuplihghjlnpqrrqpnljgecba`abcdfgijmnqsux{~|wsnkiiijkmoqrrrqpmkhfdba`abcdfgikmnqsuxz}~yupmkiiijmnpqsrrqnligecbaabcdfgjkmoqsuxz}|xspmjijklnpqrrrqomjhfdbabbcdfgikmoqsuwz|~{wspmkjklmopqqrqonkigfedddeefghijkmnqruwz|~zvsqpppqqrrrqpnljigfeddcdeefghijlmoqtvy||wtqpooppqrqqpnmkjhgeedcddeefghiklnpsux{}~yurponoopqqqponlkihfedcdcdeefghjkmortwz}zz}z|{V;6/@Shʼzvtx}mYTWh{}dYTPOHIS[^fq~||{z}~upqw|y~{{zrgX^suoopfVB:IS__Y\ZX[dvs}{rjn|xvxzwsqiacutxy{ywo_K>HRZ]U[cltvsv}}roqokhn{}znnklj_]hw~|{z{popmcL<:CNYZamqwuzzpsqrnjutrory{wmnphghimedl{}vsh``]ZL<9CS`egruz||thhknoluzy{}tswhgiigihmhbjv{mc]XQUVXRAAHWhorw}wiehnqrx{uvdadeedfjkejr|odb\TPPNI<8?Mdouy~{gbajrv~ƶ~yq^UYZ^`bhmkkr}zk[VOIEEED>:BQhz~vc\]jx}̻}kXMPW^efmponpv~~paOE@;<=CHGCFSh{zwwz|vh^`iyɾxk\PPX_hkptqnkntum^L?<77:?GGFGQat{uuuxukccl}ƻ}zrgYLKS^hmpuspnkoohZH;7559>FLNS[k~|xponpqkfeoù}sple[ONS_jpsuuqlfee^Q?2--18?HRW\co~wrmjklrpnowÿrhcb^ZQNS^kqstrle]XXSK<.)(.7@KW^bfl{{sniffktyx{ƿymc^]\[UQV^jpoolf^UNKH@7*(*2=FQ^egkoxxpkfedju}Žuk`[Y[]ZUX`jpnmhaZOE@>:3)&+2>GSaiprsx~tkieegkwżxme[WWZ^\Z\bjpojd\VJ?;970*).8EPYentusw|{riffglq|qf`ZVWZ_`]^bjong_VNC85443//4?N[dnvzzvwz|zrjeejpxûxi_ZWVW[aebabgmjdZPG>5002555:EVbksy{yvtuwwrhdflurdYTSTVZafeccehf`UIA92..38;FLRZdpx{|zxrljjlopqu}wqle^XUX[aehkkhbZVSLC:2.,.27AJRW^gqwyzwrnigfjoruz}rlgc_ZY[_dhjlkg`XSMG@92..16=FRY_dkqvxwsnkfccgotyſwmfb``\[^cgkmmlf_VNHB=71/14:BMX`fkosvwupliebchpx¼{qhb``a``cfjmmlic[SID@<9557;9:<=BHQYajptutsrpnmjhhkov|tlfb_`aeijjkkjgb^VOGA<98;>AGOV^fnsuvurpnmkjjknt{yqjfcbbehllmljhd`ZSLF@<;<@CHOU\dkqtvvspnlkjjknrx|unifddfilnoomjgb]VOIC><<>BGMU[bhnruutqmkjiijlpv~xrmjhghjlnpqpmhd_YRLGB?>?BGNT[agmpsttsoljhhjlpu{{upmkjjjmnprrplgb\VPKFC@ACGLTZ`flprtusqnkhghknry}wrolkklmopqrqnje_YRMIDBBCFKRY_ekortttrpmiggimqw~ztpnlklmopqrrplhb[TOJFCCCEIOU\cinqstsromkhggins{|upmkkkmopqrqpmid]VPJFCBCDGLRY`floqsrqoljhfegjpwxrnlklmopqrqpmje_XQLGCBBDGKQW]djnqrrqnligedehls|{upmllnpqrsrqnkf`ZSMHDBBCFJOU[agloqqpnkigedegkpx~xsommmoqrssrplhc\VPJEBBCEHNSY_ejnpqpnkhfdcdfimt|zuronnoqstttqnjd_XRMGCBBCGKQV\bhloppnkhfdbcdgkqx|xsqoooqsuvusplg`ZTNIDAABDINTZ`fjmopolifcaaceiov}yusqpqrsuvvurnic\VPKFCABCGMRY^dilnoomjg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`cfhhhgda^[YWVWY\agmtz|voha\WTRQRTW[_begiigfc`]ZXWWY\`ekqx}voib]XUTSTVY]`dgijjigda^\ZYY[]bglryyrle`[WUTUVY\`cfhjjjhfc`][ZYZ]`ejpv}{tnhb]YWVUWY\_cfhjkjigeb`][[[]`diouz}wqke`\XWVWY\_bfhjkkjifda^\[[]`chmsy~ysmgb^ZXWXY\^behjklkjhec`^]\]`cglqw|{vpje`\ZXXY[^aehjlllkigdb`^]^_bfjouz~xrlgb^[YYZ[^adgjklmljhfca_^^_beinsy~zuoie`][ZZ[^adgikmmmkigeb`_^_adhlrw||wqkfb^\[Z[]`cfikmmmljhfca`_`acgkpuz~ysnid`^\[\]`behjmmmmkigeca``acfjnty~{upkfb_]\\]_begjlmnmljhfdb```beimrw||wrmhd`^\\]^adgilmnnmkigeca``bdhkpuz~ytojeb_]\]^`cfikmnnmljhfcba`acfjosx}{vqlgc`^\\^`behjlnnnmkigdcaaaceimrw|}xrnida^]\]_adgjlmnnmljhecbaabdhlpuzztojeb^]\\^`cehkmnnmljhfcb``acfjnsx}{vqlgc`]\\]_begjlmnnmkifdba`abehmqv{}xrmhd`]\[\]`cfhkmnmmkigdb```acfjoty~ztojea^\[[]_behjlmmmljheca```beimrx}|vqkfb^\ZZ[]`cfikmmmljheca`__`cgkpuz~xsmhc_\[Z[\_behjlmmlkifdb`__`beinsy~ztoid`\ZYYZ]`cfiklmlkifda_^]^`cglqw||vpje`]ZYXY[^adhjkllkigdb`^]^_bejouz~xrlfa]ZXWXY\_behjklkigdb_]\\]_cglrx~ztnhc^ZXWWXZ]adgiklkjheb`]\[\^aejpv{|vpjd_[XVVWY\_bfhjkkjhec`][Z[\_chmsy~xrle`[XVUUWZ]adgijkjhfca^\ZZ[^afkqw}ztnga\YVTUVX[_bfhjjjigda^[ZYZ\_ciou{}voic]YVTSTVY]adgijjigdb^\ZYYZ]aflryyrke_ZVTSSUX[_cfhijiheb_\ZXXY[_djpv}{tmg`[WTRRSVY]adghiihfc`]ZXWXZ]bgmsz}voib]XURRSUX\_cfhiihfda][XWWY[`ekqx~yrkd^XTRQQSVY]adghihgda^[XWVWZ^bhov|{tmf`ZVSQQRTX\`cfhihgeb_\YWVWY\`flsz}voha\WSQPQSVZ^beghhhfc`]ZWVVWZ^djpw~yrkd^XTRPQRUY]adfhihgda^[XWVWY]bhnu||unf`ZURQPQTW[_bfhhhgeb_\YWVVX[`flry~wpib\WSQPQSVZ^beghihfc`]ZXVVWZ^cipw}zsld^YURQQRUX\`dfhihgdb^[XWVWY]bgnt{|unga[VSQQRTW[_cfhiihec`\YWVWX[`ekrx~xqjc]XTRQRTWZ^begiihgda^[YWWX[_dipv}ztmf`ZVSRRSVY]adgiiigeb`\ZXWXZ]bgnt{}voib]XUSRSVY\`dgijjigda^[YXXZ]aflrxyrke_ZWTSTUX[_cfhjjihfc`]ZYYZ\`djpv}{unhb\XVTTVX[_bfhjkjigda^\ZZZ\_dhnt{}wqjd_ZWVUVXZ^behjkkjhfc`^[ZZ\^bgmrx~ysmga]YWVVXZ^adgjkkkjgeb`]\[\^bfkqv||vpjd_[YWWXZ]adgiklljifda^]\\^aejotz~xrlfa]ZXXXZ]`cfikllkjheb`^]]^adhnsx~ztoid`]ZYZ[]`cfiklmlkigdb`^^_adglqw||wqkfb^[ZZ[]`bfikmmmljhfda`_`acgkpuz~ysnida^\\\]`cfhkmnnmljheca``acfjosx~{upkfb^]\\]_behjlnnnmkifdbaaacfimrw|}xsnieb_^^^`behjmnoonljhfdcbbcehmquzzupkfc`_^^`bdgjlnoonmkigecbbcehkoty}{wrmieb`_``begjlnoponmkigedcdegkosw|}ytokgdb```bdgilnopponljhfdddegjmqvzzvqmiecaaabdfiknopppomkigfedegilpty}|xsnjgdbaabdfhkmoppponljhfeeefikosw|}yuplhecbbbcehjmnppppomkigfeefhknrvz~{vrnjgdcbbcegjlnpqqppnljhgfefhjmpuy}|xtokhedcbcegilnoqqqpomkihfffgilosw|~zuqmifdcccdfhkmopqqqonljhgffgiknrvz~{wrnkhedccdfhjlnpqqqpnmkigffghjmqty}}xtplifdccdegilnpqqqponljhgffhilosw{~zvqmjgdcccdfhkmopqqponljhgffghknrvz~{wsokgecbbcegjlnpqqqpnmkigfffhjmptx|}ytplhfcbbcdfhkmopqqpomkihfffgikorw{~zvqmifdbbbcegjlnppqponljhfeefhjmquy}|wsnjgdbabbdfikmopqponljhfeeefilosx|}ytokhdcaaacegjlnppppnmkigeeefhjnrvzzvqmifcaaabdfiknopppomkigeddefilpty}|wrnifca``abegjlnoppomkigedcdegknsw{}ytokgda```adfikmopponljhedccdfilquz~zuplgda_^^`bdgilnooonljhedbbcdgjosx}|wrmieb_^^_acfhkmooonmjhfdcbbcfimqv{~ytnjeb_]]]_adgilmnnnmjhfdbaabdgkoty~{upkfb`]]]^`cfhkmnonmkigdbaaaceimrw||wqlgc`]\[\^adgilmnnmkigdb```adgkpuz~ysnida^\[\]`behkmnnmljheca``acfjnsx}{upjea^\Z[\^adgilmnmljheca___adhlqv|}wrlgb^\ZZ[]_bfhkmmmlkifda`__`cfjotzysnhc_\ZYZ[^adgjlmmmkifdb`^^_adhmrx}{vpje`][YY[]`cfikmmmljheb`^^^`cgkpv{}xrlfb^[YYZ[^aehjlmmljhec`_^^_aeintyztnhc_\ZYY[]`cfikmmlkifda_^^^`chlrw}|vpje`]ZYYZ\_behklmmljgeb`^]^`bfkpu{~xrlgb^[YYY[^adgjlmmljhfca_^^_aeinsy~ztnid_\ZYYZ]`cfiklmmkigdb`^^^`chlqw||vpkfa][YYZ\_behklmmljhec`_^^`bfjpuz~xsmhc_\ZYZ\^adgjlmmmkifda`^^`beinsx~{uoje`][ZZ[^adgjlmmmljheca_^_adhlqw||wqlfb^\[Z[]`cfikmnnmkifdb`__acgkpuz~ytnida]\[\]`behkmnnmljheca``acfjnsx~{vpkfb_\\\]_adhjlnnnmkifdb``abehmrw|}xrmhda^]]]_adgjlnoonljhecbaabdhlpuzztojfb`^]]^adfilnoonmkifdcaabdgjosx}zupkgca_^_`behjmnooonljhedcbcehkoty}{wrmieb`__`bdgjlnoponmkifecccegjnsw|}ysokgdb``abdgjlnopponljhfeddegjmqvzzvqmiecaaabdfiknopppomkigfedefilpty}|xsokgecbbcdfiknopqqpomkigfefgilosx|}yuqlifdbbcdfhkmopqqponljhgffghknrvz~{wrnkhfdcdefhkmoqqrqpomkjhgggiknquy}|xtpmigeddefhjmoprrrqpnljihgghjmptx|~zvrnkhfeeefhjmoprrrrqonljihhijmoswz~|xtpmjgfeffhjlnpqrsrqpnmkjihijloruy}}yuqnkigffghjlnpqrssrqpnlkjiijlnqtx{~{wsoljhgfghikmoqrsssrpomljjijknpswz~|xuqnkiggghikmoqrsssrqpnlkjjjkmorvy|}zvroljhgghikmoprssssrpomlkjjkmortx{~{xtpmkihghijlnprsstsrqonlkjjklnqswz~|yuroljihhijlnpqrstssrppnmlklmoqtwz}{xtqnljiiijlnprstuutsrpomlkklnpsuy||yuromkiiijkmoqstuuttrqonmlllmorux{~}zvspnkjiijkmoprstuutsqpnmlllmoqswz}{xtqnljiiijlnpqstuutsrpomlkklnpruy||yuroljihijkmoqrttutsrqonlkklmoqtw{~~zvspmkiiiijlnprstuttsqpnmlkklnpsvy}|xtqnlkjijklmoqsttutsrpommllmmorux|}yuromkiiijkmoprstttsrponmlklmopswz~~zwspnkihhijlnpqstttsrqpnmlkklnpruy||xtqnkihhhikmoqssttssrpnmkkkkmortw{}yuroljhhhhjlnprtttttrqomlkkklnqtvz}~zvspljihhhjjloqsttttrqomljjjklorux||xtqmkihghijlnprstttsqpnllkkklnqtw{~}yvrnliggggikmoqrtttsqpnmkjjjkmorvy}zwsoljgffghjloprsttsrpomkjiijloqtx{|xtpmjhgfghikmpqrsssrppmkjiiikmpswz~}yuqnkigffghjloqqsssrqpnljjijjloruy}{wsoljgfffgikmprrssrrpnlkjiijkmqsx{|xtqljgffffhjloqrsssrqomljiiijmosvz~~zurnkhgffggilnprstssqonljihhilnqtx|{wsoligfefgijmoqrsssrpolkiiiijmptw{|yupmjhfeefhjloprsssrqomkjiiijloruz}~zvrnkhffffgikmpqsssrqpnlkiiijknqux|{wspligfffghkmoqrsssrqolljiiikmpsv{~}yuqmjhgffghjmnqrsssrromljiiijmorvy}~{wsoligfffhilnprssssrpnmkjjjjlnqtx||xtpmjhgffgiknorsssssqonlkjjjknpsw{~}yurokiggggikmoqstttsrpomljjjkmpsuy}{wtpmjhhhhiklopsttttsqpnlkkjkmoruy|}yuqnlihhhijlnqrstutsrqomlkjklnqtwz~~zvspmjjiiijlnprsuuutsrpnmlkklnpsvy}|xuqoljiiijlnorstuutsrqonllklnorvy|}zvspmljjjklnorstuvutsrponllmnpruxz~}zwtqomkjjklmpqstuvvutsqpnmmmnoqtwz}|yvspnlkkkmmoqstuvvvutsqpnnnnoqtvy|}zwtqonlkklnoqstuvvvutsrqonnnoqsux{~~{xusqomllmnoqrtuvwwvutsrpooooqsux{}}zwtrpnmmmnoqrtuvwwwvutrqppppqruwy|~{xvsqpnnmnpqstvvwwwvvusrqpppqstvy{~~|ywtrqonnopqstvvwxxwvvtsrqqqqstvx{}}{xutqpooopqrtuvwwxwwvutsrqqqrtvxz|~~|ywtsrppppqrtuwwxxxwwvttsrrrrtuwy|~}zxvtrqpppqrtuvwxyxxwwuutsrrstuwy{}~|ywusrqqqrstuvwxyyyxwvuusssstuwxz|~~|zxvtsrqqrstuvwxyyyxxwvutssstuvxz|~}{ywussrrrssuvwxyyyyxxvvuttttuvxz{}~|zxvtsrrrsttvwxxyyyxxwvutttttvwyz|~~|zxwutssrsttvwxxyzzyxxwvutttuvwxz|~~{yxvutssstuuwxyyzzyyxwwuuuuuuwxz{}~}zywutssssuuwwyyzzyyyxwvuuuuuvwy{}}{ywvutssstuvwxyyzzyyxwvuuuuuvwy{|~~|zxvutttttuvwxyyzzyyyxwvvuuvvwxz{}}{yxvuttttuvwxyzzzzzyxxvvvuvvwxz{}}{zxvuutttuvvxxyzzzzyxxwvvuuvvxy{|~~|zxwvutttuuvwxyzzzzzyx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}pf^XVSVbuuj_XSPP[n{lbZTRPVg|}pf^XTRVcuuh_XTRR[nxlbZVRPZjynd^XVTXgysg[VSRS^qwj_XVTSZj{nbZWVSWfxqf^XVSS^qwj^XWVV[lyk_XXWW[g{|pd[XZZZbstg[VTVW^ouh\XXZX\j}{nc[Z[Z[dttg\WVWW_otg^XZ[\`nujb\\^^^fwsf\ZXWX`qsf\Z[\\`otj`\\^\^hx}pd\[[Z[bstg^[[\\bo}pf_^`bbcn}{pf___\\gwpc\[\__dqynd^^`bbdpxnfb`b`_hxpc\[\^^cqylb^^bddfpwnfdfgfdj{{od^\___dtuh`^`dfcgstkfdghgfn|{nfbbbbbftxkc`bfgght{pjghlnjhp}wkdbdgfbhxwkdbbfgdguxngfgkkjjsunhghhfcjwwlfcdggdhuwnjhknoklu}slhhkkhfkxsjdcfhhfk{tlgfhllklwyqkhjkkfcjxtlhgjkhfjxtnjjlonjkwupkknpnhfn{{qlkklljgn}{qkhjnpnjlytolklnkddp{sollnlgfl{|tollopojlwwsonppnggqytpopqohgpxqlklpqnhly|wqolnnkfhtytqonolgdoxspqpspkgny{uqoonhcgtxusqssohgp{wspqsqkgl{}xtpoonhbfu{usqsqlfgq{utssqofbky{wsqpld`fs{wtstqjcgsywssutoggp}xtqppld_jyxtsppngcjyyusqqqkbdq{uqpog__ky{tqqplc`hx{usstphbgw}xsqqpg_`nysonlf^_l}wspppld`jy|wqppkbX_p{tnkhbZ^oysoookb_k}}wqppk_Zctxqljf^Xbt|tolnnf^bo{uqoldZZg{tolkf[Wcw|upnlh_Z`q{tonjbW[n{sonldZZj|sljjd[Xfxunkhf^W_p{snjf\V\oysnljbWZj}tnkjcXVcw}sljhc[V`uuljhf^W\pxohgf`WWh}|qjfc[RSf|}tlhgcXVbuulgfbZS[oyog`_XPShxngdc_XXk}skdc^TR^tukd`[SNZqsjdbbZT\oyogc_WNPd{sjc`ZRTcy|phc_\VTcwtkd`\TOXlxnf`^VOTjyld`_XRVh}{ogb_ZOO^twkc\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YVXY\^begjnrvzwmc]\\]^abcegjmrw}si^YXXZ]`acfjmptz}rga\ZZ\^`begjmot{|oe]YYZ]^`bcfjnpv{wkc]ZYZ^`bcfimptxxkaZXXZ]`bcfiknrv{|pf]XVXZ\^`cfjmpw|ti`ZXY]`bcegjmpsw|xkaYUTUX\^aeimpv{{oe]YY\]`befiknosz}rf]VTTUXZ^bfjnsxznc\YYZ]^`aegknrv{{ocYSQSUY\^bfjnrx}rf]XUUX\`bfimnptx}tg\TPPSUY\^bfjot{vg]VTTVX\^beinsvx|}ocYSPPQUY\^afjov}pc\USSTX\^bfjnrtw|vj`XSQSUXZ\^aekrwsf]UQQSVY]`cgkptx}|ocYSPOQTVY]`cgmsz{m`UOLOQVZ]acgkotztg\TPPQSUVZ]acint|rcXPLLPTX\^aeimrv|zk^UPOQTVX\^abfmrx|m^SLKMQUX\^bfkpv{}obXQOPSVXYZ]aejnt{teYPLLMQUXZ^bgmpt{xi\SOMPSVYZ]^aejpw}naVPOOSUXYZ^bfkrw}oaUOLMQUYZ^`beinrxtfZSPPSTVXZ]acgmrxseXPLLOSUXZ]aegjov{maXSQSTUVXY\^bfkt|}n`VPMOPSTVY\]agnt{sg^YVXXYXYY\]aeioxvi\TPOPQSUVY]afms|zmb]ZYYZYZYZ\^cgnt{zkaYUSQSQSTX\`biov}pf`\Z\\\Z\Z\^aejpwsg^YXYXVVVUXZ`ekrxvkc`^`ba`^]^^aeint{xmc^\]\\ZZYZ\^bgnt{wkc`^`bccb```aeiov{|pfa`aaa^]ZYZ\^cipw}{pga`aceccbbabcinsx}vmfccceeca`]^acgmsz}tkcaacefffeeegkptzwnigfgfgfecbbceinsztjcbabcffgigikmptx|vniggijijigiggikosw{}zoieeefgijjkmmnptx{xojgimnoonmmkmmnptx{}zpifefikmmnnorsvx{|xojiijmopprrpprtvx{}xngeegjmnopprrswz}wnifgknoprsrsstxz{|}wniggkmoprststvz|woifgjmortvtvwx{wniggjmorsttvxz||skeceikopstvwz|wngefgjmpstvwxz||skebbfjmpstwx{|vmgccfimostwx{|{rga^^bfkosvxz|}tme``bfjnpsvwz{|pf`ZZ]afkpswz}|sib^]^cgkortwz{}|sjaZXY]bgmpvz}|sjc]ZZ^cjnptwz|vkbZUUX\bgmpvz}{sjaZVVY^cgnrvz|xncZUTTV\agkpvzvkbZTSTX^ejnsvz}|rg^XSQTX\afkpv{zof]VSQTY^ejosx|}sj`YSQSUY^cimrv{}tj`VQPQTY`cjnsx}{rf]UQPPTY^cgmrw{zpf\UPOPTY^einsx|xncZSOMPTY^binsw{xmbXQOOPTY^cjosx}wj^VPMMQUY^cgnsx}zmaVPLLOSY]cgnszti`VPMOQUY]bint{zmaVOLLOTX^cjov|wj^TOMMQUZ^ejov|{nbXPLLOSY^ekptx}vi]TOLMPUZ`ejov||ocYSOOQUZ`ejosx|tg]TOMPTY]afkptz|ocZSPPQUY^cinsx}vj`XSPQUY]bfkosw}|oeZUQQTVZ`cinrw|znbZUSSTV\`cinrw||pf]VTSUX\`cimptzzof^XUTUX\`cgjot{}si`XUUXZ^aeikosx}|sjc]YXXY\^beintz|siaZXVXZ]acgkotx}}tke^ZYYZ\^acgnrxwne^ZXYZ]`bfikot{wngb`^^]^abegkoszwnf`]ZZZ\^aegkpv|xrmgca`^^`abfimsxwpic^]\]]^acgkovz|vojea`^]^`bfinsx}|tmgb^]\\]^bfinrw|xrmiea```abeimpv{vniea`^]]^aejnrw{zsnjfca``acfjnptz}wpmieca`^`acgkotx}ztokiecbaabeimptw{|vpmifca`^`beimptz}xsnifba`abegkosw{ztokifca``acfjmpvzztpkiebaabegknrtw{}wpmjgecbaabeikosx||wsokgebabbegkosw{}ztpnjgecbabcfimptz{tojgebbabcfimptx|}xsomjgebaabcgjnrv||vpmifcbabbegkosw{ztpnkifcbaaceimpvzzsokgeba``beikptz}|wspmjfebaabefimpv{{vpmieb`^^`cfjosx}}zvrpmieb``abfikotzxtokfb`^^`aeimptzzvtpnjfb`]^acgjotx}|wrmgc^\Z\^bfjnsx}x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TPPSV\aejnsw||oeZTPPSV\aejnrv{xj`XQOPTX]afjotx}zmaXQOPSV\`einsztg^UQPQTY]afkpw|vj^VQOPTY]bgmrw{reZSOOQUY^cintzvi]UPOQUY`cjnrvz}pcYQMOQU\`ejoszti^VQPSV\`ejnrvz}{obXSPPTY]bfkotx}sf\USSUY]aejosw{znbZTQSUY^bgkptx}}rf\USSUY]afkosw|zne\VTTVY]afkotx|}rf]USTVZ^cgmpswz}zoe]YVXY\`cfjnrvz|pe]VTUX\aeimpsw{zoga\YYZ]`bfimpv{{of]XVVY]aeikosw{{pga]ZZ\^aceimptz}sia\YXY]acgknrsw|{pjc`^^`acegjmosv{}ria\ZZ\^acfjmptz}{rkfbabbcefgjknpv{|sib^\\]`acfimptx|}tniecbbccegiknrvzvnfa^]]^abegkosw{xpkgfeeceefiknptx|xngb`^``acegkosvz}wpkgfeeeeefiknrtx|xpjebbabccefjmptx|xrmigfefefgijnrtx{|smifeceecefikosvz||vpkigfeeefgknrtw{xpkgfefefefiknptvz}wpmigffeefijnptvz|{tojgfefeffgjmortx||tokjggfffgjmortw{wpmjiggfgfgiknprvx|xsnjigffggikmprvx||tokjigigigijmnpsw{{tojigfgfggiknpsw{}}wrmjjigigigijmnrvz}wrmkiggffffgknptx|ztomjiigigiijknorvz{tokjgffeffgjmosw{|vpmmkjjiggfgjmortx||vpnkjgfeeceiknptx|xrnmkkjigfefgjmosw|ztpmjifcabceikorv{}wrnkjjifeefgiknrvz}wrmjgebaabceimptzxsonkjgfeccfiknpsw{xsokieca`aacgknsw||wrnkigecbbceikosw{|vrmifcb`^`beimptz}zsokjgfcbbcegjmptz}zsokgea`^`acgkosw|{tpnjieca`abfjmosw{{tokieb`^]^bfjnrv{}wrnkgfba`abcgkorvzxrnjgca^]^aeimptz}{vpmieca``acgjnptzzsnjfca`^^acgkosw||vpmifb`^^`bfjmptx}ztokgca^]^`cgkorv{wrmgca^]]^aeimptx}}wrkgca`^^`aeimptz}xsmiea^]^^acimpsw{wpmg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DDDGLQW[_begikmnpruy}~ztpmmnqtwz}~~~|xsnhdaabfluzurpqsvz|wsnid_YSOKIGECAACFLRW\`dfiklnoqtx|}wqmkkmprux{}~~~|wqkfcaadiq{|vsqqsvz{vrmhc]WQLIFDB@@ACHNTY]adgikmnprvz~ztokkkmpsvy|~~~{uoida_adks~ytqpqty~{wsoje^WRMIFC@?>@CHNSX]`dfiklnprvz~zsmjikmpsvy{~~~~}ysmhca`bflv~wrpprvz~zvspkf_XRNJFC@>>@DJOUY]`cegikmorv{yrljiknquxz}~~|xrlgca`bgnxzsommpty}yvsplf_XRNJGC@==?CIOUZ^acegikmpsw|xqliijmquwz|~}}}}zvqkfcaachpyzrmkkmrx~}yvtqnha[TPLIFC@?@CHNTZ^`bdfhkmpsw{zsnkklorvxz|~~}}}}{xupkfcaachoyzsmjjlpu{}zwurnic\VQNKHEB@@BGMSX\_acegilorvy}|vqnmnpsvxz|}~~~}{ywtplhecceipxzsmjhilqw}~{xurnib\VROMJGCA@BGLSX\_`bdfilorux|zurqqruwy{|}}{yxvtqmifeegkpx}uniggimsy|yvrnjd^XSPNKIFCBBEIOTX[]_adgjmprux{}~~}}~{wuttuwyz{{|}~|ywvusroliggikpu}zqjfcdflry{wsplga\WSPNLIFCBCFKPTWZ\^adgjmprtwy{||{{}~{xxxxyzz{{|~~{yvutssqolkjkmpuz~tlea`aflsz|wspmie`[VSQOMJGDCDGKOSVX[_bfilnprtvwyyyxy||zyxyyyyyz{}~}zwusssttsrpppqrux~yphc``bgmsy~zvrpmje`[WUSPNKGECDFIMRVY]`cegijkmpruvwwwy}}zxwwwxyy{~~|{zxwusstuvwvutsrrrsv{wme`\\^bgntzyurolie`\XVTRPLHDBACGLQUY\_acefgiknqtuvvwy~{yxxwwxyz}~}|{zyxvuttuwy{{zxvtsstw|ukc]ZZ\`flsz~yvsqnlhc^ZWUROKFB??BGMRVZ]_abcdefiknqrtuwz~zwvvvwxz|}|zyxwwvvvwx{}~|yvtrrsv{tkc]ZXY]c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aqŮ|{zx~~|qkb`fnxxjjgb\VUTTV^^XW]bitxuoj`al|}{zu}}~xmkmlhjq{|njjg^XUXWX]]ZXZ\`k}vijkilw~{yz|zqfipurot{yqmkjb[\Y\\[XTUW_bgu}ohlsvy}{x{{{z|z{oiny{wu{vrzuonkgc_a``[PLOXbfkqw|qmty~~|w||wvzxxpt{|vrptmppmfbdiic[TJIVfhkoty{u|~y}vtw|rput}|zts}nnrtkiknjdhmle]VKJQbmnomtyv|vwwrpw|soos~~y}zzmgmromlnhdgtrgbWONS_gpoipwy~plqjkwqlmr|z}rfbjlnlolddmtlaYSW\beimjmrdebcuzqnu~y{zuh`fjmkkjgcimkf]UW`ddhjkqwf_Z[o}yusq{~wxy|xoea_hkmigfjngb]X[cjffkmq~xlaXVbz~~zvuxz~yzvtwskidachlighmohc_Z^hpmghmswol^U[l}yvw~~{tnoy{jhjgffkhhlrska\Y]jtqihltzynke]]gsx|u}|xilqzqhkkonjihmsune]Y^jwwommtu}}xnhddhl}~|w}znjnryzpkfkqngdhqxre`Y[fryuvvxw{}y|zsfcfnnv}}}ypnkkrzyvklpsmehovuk_[]`pxzy{uz}|z~ymdeow{zy}}}{pomiquqnrssqmotska[^dmsv}xzxx~~tifkw~wsz}{urnmnt}yoprswusrqlc\^dnwyz~|sov~v|~njgs{~yw{zxtpnou}xtqrz||wrk`[]fpy~ypms|{t}tlilx}vty|}}yqmowz~ztwz~~tocXYes|yprtw||ztrwsinvxtssvy|}}}xurrz~~{vy~yng\T[muoqyz{~nxynnwqjq|}sprtvtv}{~}ttxz}w}x|z}rg]YZfy|xux}zy{ppupfltomtvnmqwttz|~xtv}qr{v{~xnaVYgt{}~}wunnoqbbmuss~tootvv{yw{{wv}simzyy~vwk^W_syr|ljikc^`myx~|v|}ytsss|{oqw~z{yigqswxtqh_^j|rtogcdbb`apxluxuryzkmo{}z|xmgkmv}urneclz{uod`\Z`gffyyijy|tx}nmmw~y{~~ihjhnxrpjjp|sb`XTSdqmt{fbr{}znlou{~{wyz}kgmkl|wunmpsv`\WRO]pxuykdl{vpppruxwvvtxmfiomuxqpmrx|^WTSNUhx|uysjoutorrtrxyrqprqioupt}~roqty`RPVTXemuvowwuvu}srxsppqwtmlpxslqwqqyxttxx|iQMT[`geirpqwz}~xuuqkosurljmwnvxwrwwyvt}yxpWRW`ceedirvt}~~yuonoqsmlnovyytyxu~|sr}~yq{v]\^_\aeeiowwy{xokopqnjpswxsx{{vuxvwvnr|hge^UUahlox~v~~|{qiklqroppqrprv|~~~{~|ukhpodbaWP]glqy~xz}{|}sgejpuwrjgilpsz}wjbals[\_]WZcknu}zt{xy~ypkglrxwpg`agqxx~qe_`n[PY`]afffnuz|{}|wkioprtrmd`_fpxww|xqifhltgRV]agic[aky|}{{ojoqromhaaeglstt{vvrqrljlwu\SWabhdZZeyw{~xojklmkfbejihjpv~~yrvwz}uiffoeVU[^__ZZ`uwx|~vkccfigbflnjinv{~{vqpwsmhdj{x^SPTVZ^ecn{|~~vj\[_inedilmopv~zww}|uoorz{rljiktcSOPSVajgh}zqf\XZgnfbflswww|}{vuuwxqqqy{spnohmlTOQQU^ihfv~{ric^Z[bhfbenv~|xz{sutnnprrv~}xqpspjho{sXORWV[finz}tjb\`_^]^bejoz~~ywyjookjotw}xtsvupjbboygSUXWXagq{odZV^da[X\hnty~}wz˿~mfechqy~yrvzxqjb]\ova[[[\cen}p^URXbc]X[goty|||й~p_\]ds|}tuzvuha[Tdyud[Zafip}|q`ROSZ_]Z]fpvy{{}Яt_UVcr~}wyzxuj`YSXn~o^\bkkswtgWOPSX\]`empvw|ĩzshVWbn{z{||ujb[SRb{|d\bnpusli]UROQU\^ajotx{ն|qj_Ybks~}}{oe[TOUosbamyxvig^YVRQQWZYcmty|̫mfc_djo{~~yk_TNM\{memx|}wide_[WRPSTT[fryֽqbbfelpx|{{~rgXNJQm}km{}ytjeeha]YSQOPXdlvҲyf`dglqw||xvx|yl_TIJ^wzo{}}~wwpkfeklc^UNNOV_ep~ɬ~ocdjmovxvutuzug]RJPiuzuwyz~yomegjgold]NIMR^glxտwjahpouuwtqtt}qaXRN\w{}wrrtxzrjfhlgkri_SKLQZcitӿzqfepqoqrtqrv|{m^VQSfzxsnkousnfeijiqrdWOMP[ejq{и{rlekrqoqtprvzug\UT_}rrytoignnrodfghoqiYRRRXdiqxtnignuqqolpw{qf_W]onjqupmgegjuodggiom_TRYZaknu{étnkfguyusjms{xld__mreeqmljbadrwjghfikdWSZ_bgmsx{|ұxomgcly|yphpwskigrmcfmjljc]fqrnjc`cg]TY^eikqtwx}Ĩzrld_fuvmns}}pmq|xebehhki`_isrod]\]e]X^_gmqwwwyԷ|||tjc_do}}tqovyqwm^a_dklg\^ornja\W[c[\aajswyyzzȩ}x{ti`_flw{vrsz}~}{yzi`_Yanja]fmjjgbXR\a^``eovy||{{۷zyrdYYhns}zvuw|{x{}ofa]\eid]bhb`diaTS[ababhrz|}{|~ɨxqbTQ_rw}zy{z}}ywy~vjfb^\bf`bh_\ZbgZQQ\cdcgmwyvx|ӱscSLXn{zy{}|uvw~hhih^Xaa`gd[UVegXOU_defltyrtzӾziWMShx|uv~ysv|rglmcZV]acf^SLUedUQY`bemu~}qqxŬ~paVUaryvs{|trw}}jinldYUW]eaXMN\gaRR_`bmu}qpyȰupc]]esurv{tqvyxklokaVNRbd]QGS_e[NT`ck{{sp~ɼ}yui]]irtt|wsyy|okmle\NIWd`VKKW_^RK\gmyzus«raY\hrx{}}spqqi_UJN\c_QEKVYTOWhtyz||{yxui[Z_l{}~yqtrkb[RQV[^WKINOOQZky|wvwz{~ujc^ajxttume\WW\XYTKJFIIT`gr{~yvvzymfdgmsvostg`XYaZVOFIHGKTbhn|yx}qllpqpr}~~yoprkb\[a\RLADOPNMXelwxspmnkhrqmnkd^Z^[QH@BPXQHN^mu|wohdfgm~rklkd\XZTKHFJORPJMZjx}}wj`]aku|vjgd_RSWQMOOSQKMLQWcz~qb[Ydp|{mh`XKDQTRYRSXOJKPXcxzyyxyl^Z\gu{~|xxeZ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tlmtv}~cV]luzeZ`ijjqw{}wmdZLEACRjz~|siirw~~}}bV_my{}~~m^cmmkntw}zmaXLDABSj|~tqgfpw}zz}}eV`pz{w|vafqrpnsv{{l^QIDAHVowmhfo{|{yxyiX^m|zuv{~geqwtsquyyoZLC?DM[m|wmggmy}zvv|o]]k{~wttxocmyzxvstvn[J=:EUcnw{vphgmvzvutyyue^jt|uqsx~wgiu~~uqpi[I<9H[hqtutqnjowyzvrrpsumciu}~uoqy}iis}|oieXL@;IZhotuqstqorvwzrpnmptmdhu~}|xqpw~lit}tf]SLHDJVbouwuuxvqonqy|pnkjoumbgt|zytpvrkv{i[PNOMIOWes|}zxtrnilvtnjhpwn^bt~~zxvsv}ymv|n`TRRJIMP\l|qmmjjszujgmts_[m|z{wuuw|rxxplbYQGGHLTf~}ofjnpv||wnhiqrd[fz~yyxwwxy{}txxtuo`QD@CIVexpcenx~xnigmocZduyxxxxuwwzvv}}zytfVD;@GVfttfdnzylhgilbYcs}{yyxurru}utz|ri]H<EQ`pwx{xtppv}zqf`cidW[o}{voigmzqjoyqhaSHCFO^ltvxxvvsuz~wsh]_hfXXi{~ukgdkzqejvtgbZOHFN\hosxxxxuwy}rrj^YdfZVcuujfcjxscguwhc]ULHO[imrvwzwuxzsnl^U_c[U^p{ldcivsbctylf`\PINYhoswtwyuy|tkiaWZb\SYl}rfaguqa^qxnjd]TMQ\jsuuqrvw{~wmhc[[`]RSg~|tj`dsp][k~xnmi_WQT_kuxvqorw}ypie^Z_[QPd||ulecpq\Uey~vmlmfZTWanvwupmpw~yohec]`^RN^ywmfen|t`R^t|vmloiaXYcpyvspnpv~znfddcbcXN[u{phhp{xeUYpzumimjd^]ft|ysonpu||sjddffeYMVo~zrhgo|}gSTh||sokjjd`cjv}snoqty~uogcgih[NTj{{yrjinynUQbu~}uoljjfcdlwvooprv{uqlefkj_NQfz~zvvrlknvuZQ[oz|~upojjhcfny~|rqqosw~xtqlfjlbTPcw~xurplkpv}bOWgvz{wnomhlfepy|xrurosyyvvrjjmgXR_s~yvrollrxzjUTcpwvtpoqmjjhoz}{wvsoow{wwvploj[S]o}~|xtspmlqy|}t\T^mttqmlqrnlkox~~|~|yvnns|}xyxuqqpaUYkz{xwsrqnmpy~|{~|eZ^iprpljmuqpnnwz}|}|yrlsy~{yzxurrgVXfv~~{urqqrroou|}z|l`agnqokiirxsposxzy{{toqz~~}{ywuumZUbs||ysonpstrnqx{yxpeeimonkhhlwyqoquxuv}~wttx~~}~zxvup_T]o{}yrnlpuwuqoruwv{}rhimnmmkihjrywsprsssxxvvz~}~}wuvqfVZjw~ztnjntxxuqnoruzzqilqqnmmjikowwutppnos{{vxy}vqrrj]Yfsz}woklsyzxtokmqx{ojmttqooljmotxuurnkhmt}~xx{xoookc^cmuzztmmsz{xupjims}{ohnuwsooomostwtrsokhgow}|yz|qnkgcbekpwyxtptx}}wqlihmv~ofkvzuonqqrtvxtooongdfoxz|z~tmjc^bhnprwwwttxy{xromkjow~seit|zqorutuuwvllnomcbgpvz|~tmicZ]irtqruyzyyxxwuqnmkjnvxfes|}vorwwvvvwnjmmog^`gqvztlif\Zdputqrw{{|zvuvuqmjihpz~mboz~yrsvyxwwwqlnnlg]Y_lrvtlih_Zamvvtqsxz~~ystwvpjfekt|tfjx}zvwyzzywurppnkd]UYfmt|ukhjc[aktutsqvz|vswxsjdbjsx}mku}{wy{{yzxttsuoh`XRSbkrzxkghf`blttqrqtzxvxxtlb_gqv|tpuz|vy~}{zyuxxyth\ROS`ipvz|mgfedglssnmpuy}z|{vlc]cltzxvy{|xw}}{yw{~}xk[NIQ]hpru~phfeekostnklqw}|}~xob^`gov}xy}~~zuw{}|{{~yl\KGOZfmoqytlifemsstpjhkt{~pc\^diq{u|}spuz||m\KFLZchklswomhfovvsplhhnw~td[\_do||r}~tlmtzn[MHOY^bfiozvppliqzxrpnigkrzwf^\]cm{zt}}qjgly~n\OLRXZ\^emwwrqnlt~ummjfinw{yjb^\clz{vxlhejw}n_VSUVVXY_iu|vtonw{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oy}n`WSLHCADEM^p}trv~yvw|wuxxunlv~}xofgku~qbXQOJIIEEHTiztmrz}wtw~yuw|{uqt}{wolhkrzzbYUOMLLJEFO_swlmuytpu}~~xv{~{wv~{xpjklpxiWTTROLJFFJWk}zolqtpmq{|~|yz|~|z|wngimpwrZUTWWOKECIQdy}pkmpmkpxz}}{|}~xneflqyyeWYWYTJGBFP\rsjjllilu}|~{|~zlcdks|zn^Y]YUPHEDM[kzxkghfejt~}{y~yl`akvxrha^[WNJGEMXfu}{picaait|~y{}wk``m{vrofb[WPFGIOYaoy}|qjd]^fr|zy~ztjadoyprma[TRJCKSZbhryytng]Ybo{yzwohcht}tqoe\VQLEIT]chkputoh]X`lyzw}}tlfgn{xqng^TRPIGO[fjjjnrpj^W]juyv}}snhgq}qngcULPLIMWgmmjhoqkaV\it}|xv~zrolmttmgdYIMNHKScnomhhnofZ[gs|~xtu~wqqptxzphd]MEGILS^hmligimi^\epz}upr}uqsty~~uke^PC?DMS]cikiigii`^dmy}ynp}|tquy||pg]QF;=HQ[adjhijiia`fnx}zom{yrqt{uj`PI<7CNZ_aefhjkjdciow~|~{qmvyppu}xm_PIA8>IQY]^ccimknrx{z~{xwx}|uqsz|tbRMGEC@EMTZ^aadkmpu{~yy}|}~zz{{}~yvst{{teUOJGFDEKQV\``chmry|wx|~~}|{z{y||yutty{rfZSMJGGHIQUY\]belszzuwz|}}{zxwy{}yusu{xrf]XOMKJKIOTVYZ^ejs{{suyz|~|xwwvwzytqu}xtia^UPNLNMPUVVW[ciox{ttyyy~xvvxvwyurt{~vqlda[URPQQPTVUTXaint}~uswyx}zwvwxvxvqt{~|wqmgca\VSRSSUVWVX`glpxwsvxy{~{xwxwutuuv}}|vonigea\UTUTWUXYYaegls}zuvxyy~}{zxwvtrtvw}yyqmlfhga\UTVVVWZ]`defnyxwyyxz|z{zxvsqrvy}{vrmmjhif`ZVVUWXY^cecbhu~{zzww}}|xy{xwrqru{}~wspmmkjie`ZWUVXY_fhd_co}~zwux||yvxxwussuz~~~yusoolklhe_XVVXZ]fje`_kx{usu{||zxwwvutssx}}}}uutpsmlmge_XYWX]cjibbhs~vrsw|zzyvuuvvutv|~}}~{|}vvuqrnmkec`\[WYbgjgdhoyyrqu}zyxvtqtwutuy|||~}xz~}{xxwsqplhddc_YX\bfggjow~tpsy{zxtppuwwvwyz{}{xv{~|||{ytsnhfeje^[Y^adilqv|xqqx|xuqoquwyywvx|~zuvy{||ytpkegijf]]ZZ`cksw|zusw~zvroopuz{xuvy}~zusy{{}yrkjikljd^\ZZahpx|xsuz}xurpnpx|zvtwz|xtsv~||uolmnlkid^[Z^dks{xrsz}zxusonrxzywvwx|{ttw}}xqoprnkigd^]^agnvzsrx~zzzwroosvyyxvvx~wuw~~squtqlhhfc``cdjq{ztrv~zy{ztqqrruxywuvz|yx}xuvzvplgeeedcdgmwytrv~zxyzxutsrrtwvuvy~{{}{xyzxupjedgheegkt~zssv~{xxzzywtrqqrtuwz}}{z{{{ytngdgjiffkr|ytrv~}xxyz{zwtqpopsw}}}|zz||}yrkggijjiks{ytru}{xwxz}}zvroooqv}}}{{|}}|vnkiikklns}}|{vsu|zwwxz}~{wronnqv~|{~~|||~~}ztokiiknpu}yy}~|vtvz~zvuwy|~{xtpoosy~~zz~~||||}}{wpomlmnrw}~xw{~|xvvy}yvuuwz}|xurqqty}}yy}~{{|}|~{ysppnnptx~~yvy}|ywvy~xwutuxzzxvsstvy|}wx|z{{{}|xvrqpoquy}zwy{{ywwz~zwtstvwwwvvuvwy{{wv{{z{{|~|ywtrqprv{~zxy{{xvwy}}wtrsuutvwxxxwx{~zvvz|zz{}~}ywvtqqsv|zxz{{wuvy~yusstsrtvyyxvwzzwvy~{z{}~~~{xwtrrsv|{zz{yvstx{vtsrrqsvz{yvvy~~zwwz|yz~~|{yywsrsv{}zz{xustx~}wutrqqrv{|zvvx}|zxx{}xy}~|{|{xursvz~z{{xuttx~~}|xuuspprw{|{wvw|{xxz|~yx{~}||}|wsrtx~{zzwttuy~~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X`oqd`sqjraynuzgui|yxb\^[|yQd{pm~`yhnvvM^vRkjdf|jazulecnq~mQ{[vq{_ymRmvnp}vdot{~svUxwSGtwigoi}{ryk_yql}wjbku^}xtq}okzk`}}x|a]fxZvasug}{qqw~{s}qkl~y]|wkyislh{eQsbp|xr^y~el{rwWYeS|~[ctp~BMdWeh[snmqrliyf}tzoa~{f{`Zd_}prpWso_urexvm{iPha`v}cywlq~{{~{~]gpWs`Sz~nfm~oz|xr\recx~g{{vacqj[okupnbvhdz|~sgo{up}runvypot~x~txqmseUg{z~y|~~}~|~rxhqjzjw|g}crsu~ggt|~yx}s~nt~w|zjyyq~|}us^Gxguad|zkk~dMwg{|xzpust||lnqobzl~r|~|muJYen~mUxowysr~gw}qs{x{{~cWru\_yins~m[p~scOnec^Nqysrbcwmanneqxmyxrogmyj`qohqhUknm|fehteiujs|Vwqz|eX}nut|odn[g{dzqpjYmT]m|uj{nz|youysS_}tscmhqwnRjxg\}ysuqtpwtwr}nhmvub|rysiZ^ugtuxwvswwzp|~pn||lrpw~y{~qjxb|sufvryccv|zvs{kfsx{}sy|{ygll`tttg}~gm`|tytp}s{~urs~z{i|no{f{|yny~}ck|y^cltmr~zwpm|{ou}xnkvlSjsuo^j{tq~qz}yy~khdx}~}mzhf|llqtn}~ztap|xmnty|p{x{Zj}~rmjr~}pruzklkmnsvmc}wxw}vz|epcf||elvdlyix||o|it{fm{vjres}|f`aw{zyouqjuj`{xfqzrpnjqjg}wvxjkx~xwzuco|oxijycj~wv~jpuk]}|}mpz~xtfhrwtjrp`jq}[lnpxmej|twrozxsmwaqwslj|xQondmx]gl{}pkqqwzqwpysvykg~{snzvsn|}x}m`wzmxz}olp|zxngq|xvpqpvuxq|kmxofov|zpoz~~p{~{~}y~w{~qi\ncem}u~zxxw|w}scdW{{r{r{{|y{zoci~{`VoqRptzzjq`{`dnnryswmx{pkp{zpflwzv}vork|rxqdluz~jnvytwmj}l~yzztyxlyzz{zvwyfptxzs{~}}x|w{q{w|{u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?$*BXfigiu{nd\TK?2% &(2GasvjWF<;>CFEGSftxxzudI3)$!5Kc};wqpqsqmga_eusechnu~ʹvg\Zbnw~˾Ʒvkge\L:,%  '=Wovrrpj_QD;69CRao{wqpnlmqrnktzy{{yumbTHA@GQWXTQRTX\_a`^[XTNF@DSgxmXB2(  "')*+,+*& )/5?Qgyzsld]]dotwٶäujec`\YY[dt~ǿ~mc[RIHKKD812430,),4?JYk|Ż|qow}xxźhP<0*#"1@HKRbw{mho{Ŀƽqgc_][Z[^fr{l^VUZeq}~mXE:4*%#"$,5<><98745;GT`ilou~˾Dzüŷ¨{tsrk`QD<;>CHMPPLJOW\[XW\jymd]WUUVY^dggfhnw~sbP@5-& "-49;:5*#%0BT]_^aixż~nb]_bc`UE0  )8GU_hpuvvx|zvqhZJ>:?Of|þwj[L@;>GQY^chloqstssyĸvdWPNNORUYapù}}ulfa_bn~{pkihgeddbagq|r`SJB:3////2:BIPWam{~{~|nd_^`abdipu{lP6 (.4:?CEGJMNMJIINV`luyyxy{|~|{{{{~~}ȳ~kcbgsļwsvxoe_ZXXVOD81-,+*))/8CJKGB=<>@AA?@DKT]cb[QE;3,(&',4>IVeqx{ztlilqw}qmnqsu{óscWOKIIJMS[fovxvrooprttpia^_]UI9(   -;866=IVbkrvwvvtoh^UNIFA=;:95116;AIR\hvvng`[VSOIA<;?GTdsű|peZTTY`flrz~sg\RE8.*+,+))+-2;JXfr~}}~xtqpoppojc_`bdgkoruvvuttuxyz{~xnihiikq{þygVH>8668=DKPT\gq|yl^SIA:3+# "%,4M^n}~{ywqja\YYZ]_adiqyȿujbZSLGA==BJS^is{|ywwxuqnmlifb`^\YVUVX\]\[ZYZZYWSQQTZais}~xromic_^adeegimrw}~sh_WROPTX^eoyſwk^QF>71-*(%"! '.2554441-' #-7BKRX]adkqvxwuvx{Ÿº{tlfbacglpsv{»znc[UPLLOTZbku~|{||ri`WQNNNMKHC=964116?L[itz~}ysk`TIA<<>DKRZaipw|sh]URSV\cksxywtrqomljhaVH9,!  "/@?=:61*$  #)18437>GNU]emu{|zunga][ZYYXWTNIEBAEJPW]chloqpmie`[VRNLNRX\]YRH?720026=DLRWZ\_aeks|Ŀſ}|{z{}xpidbbdeffffhihbYPH@;:=>@DJQX\_`]WM@1!  !$%%$#""!  "###'.8COZdlt{ºü{vsrqponmlnrx~}vqlhc^ZZ]cjr{{wspnoqsvz{rkea]YURQQTWY\^abcccba_][[[[^cjs~zuronmmnqsw{}yurpmjf`YPF<50../0/./39?DHJHD@<;::;<<<:9899878;AIRZ_cgikmopqrtuwwxz|~|yvsqruy¼~~{xurokgdbabfluytokgc_[WTSRSUWZ]afjpw~}{yxxyz{{{{{||zvqlf_XPJFEHOWblt|}zxxy}~zvrokfa\XVVWY]_cfhjjjhd_YSMHDA=:63/-,-/26;>AB@<72-)%#! !$).4;AGLOQPMKKJKMPV^gow~{zyz|}~uld\SKE?=<>BFKQX^cinrttromkhghjlnqtw|{sh^TNJGEEGHIIIHGGHILPUZ_cgknnnnoqrtuurmf`ZUPMJGB>;99;>CHOVZ[[XTOIDA?=;::8631026=DLSY]adgjnqtwy{}~|z|~{ywvwyz{{|}~~}|{|||{{{|~}wsponmkigedddfhknppnkjjlosx~~|zwtroljgc`\YWVWX[`ejnsx|ÿzuqnnptx{~{uokgdbbdhlsz~wohaZUPMJHGEEFFEC@;61+$#)06<@BCA>:63238?GPXajt~}ume_\^dlu~º{snjiknqsttsrqqqrrssstuvwwwxxxz|~}{{{|}~~}|||{zzywsokheba`abcfhlqw~~}}||{yvsoljiiijlnpplg^ULB8/'! ',122222359@JSY^abbbcdgjmoonnmnprsstvy|~~}~}{zyyzzz{~~}|{|~}voiea^[YYY[]_``_][ZXVTRSUWZ]`dglpv|~yusstvz~}{{|}~zvsqomlkjiiijkmoonmkjhhhjmprssrpmie_YSMHD@><<>AEINSX\aejmoonlgb\UOHC?;8779=AEJQZdmu|}{xvuroliggginsx|~}{xustwz~||}|xuuvxz|~{ywvvwyz{{{}{wustw{~}{{{|}}|{{zyz{|~}zxuspnmljhea^YVTUVY\`ejmonlifb`]ZVSNIEA???@BDFGGEA=9532358;>@@?<97668:=@CEEDCBBCEHJMQTX\^`adegikmptx}ž{xvvwy|{wtqonmoqsuwy{||{zxurokfa\XVVWZ^djpuy}}wpib[WTRQOMKIJLOSW[`dgjmquy~|uojfc_ZUQNLMPTZ`gotwxvrld]WRNJGEDEFFGHGGFFFGGGHHGGGHJLORVY]bfjlmlic^XSOMLLORUZ^cfjmpux|~{xxy{}{wtqonnorxzuqnllmpswz}~~~}|{zyxy{~}ytpmkihgfdcb_]ZXWWY\_bcdcb_[WSPMJFDB@><;<=?@BCDDEEEFGIKMNOOONMLJHGEDEFILPTY]acdca^\YXXZ\^_adfhknrw||vqligghhiigfdcb`^ZVQMIGEEEGJOTY^beilnqstttstux}~|||}~}yuojd^YTQONMMMMMNOQSUUUTRPNMNOQRSTTSRQQPPQRSUWZ]`bccccdefhknrtvxyyyxwvtsqqppppmjgeefhkoty~~}}}~~|zyzz|~zupjd^YUROMLJIHFEEDDDCCCCEHLPSWZ]_abbaa_]\ZYXXWVVVWWWVUUTSSRQPONNNNNNNMMMNOQRSUWY[]_abdegijmortuuvxz|~}zwtsrrqqqqqqqqqpnlkjjkmoruwz|~~}yupmjiijkmnopqrtvwxyyyyxxxz{}~~}}||{{{{|}~zsnieb^ZVSPMKIHGGHIKMPSWZ]_acddddefghjknoqqpnkheb_\ZXWUTSTVXZ]_abcbba`___``aabbbdefhjlnqsvwxxwvutuvy|~}}~~|yxwvwxy{}}yvrokifecbbbbaa``_^]ZXWVUUTSRQPOMKIFC?<841.,*)*+,.0258;>BEHKNQSTUUVWY[^_`a`__^\[YXWWXY[]`dhlqv{~{ywurqppqsuwyyywuuuttsrpnkheb`_^^^^____`acdgimrx~|yvtqnmlnpsw|~{xtplgb^ZWSQONOPQRTUWZ\^_accb`\YURNJE@;743348:75434445679;>AEINRUXZ[\]]]\ZXUQNKIHGGHIKMOQTVWXXYZ\^adfhjmoqux||zz{}|ywvutttssssstuwz}~zuqmkjkmpswz|~{yvsrqppqqstuwy{}}zwsqonnoprstttsqolifca_][ZYXXXXYYYYWVUTSQQPQRSTUVWXZ\]_`bccdeeddba`^]\\\\]^_``bdfimqvz~~~~}{zxvutsssuwz}~~~{wtrqppqrsttuvvvwwwwwwvvutsqpooprsuwyz|}~~|zxvsqnljhgggfedb`^\YVSPNLKKLMOOPPOONOPQSUVWXXWWVUUTTSRQONLLKLMNOQSUX[^adgikmnpruw{~|zyxwwwxyz{{|{{yxvtsrpooopqstvwyz}~{yxwwwxyz{}~~}|{zzzzz{||}||}}~~}|{zxwutssttuwxz|}~~~}|{zyxwvusrpnlkjjjjklnoooonmmlkjjjjiiihgfedccbbba`^\ZXXXY[]`ceghijkkkkkjjjjjkkkkkjjijklnprtwz}}|{z{{{||||}~|zwusqqqrsuwyzz{{zzzzyyyxwvussrrsttuvvvvutrpnkigdca_^][ZXWWVVVUUUUTTSRQPOONMNNOPRTVXZ]_abcdefffghhhgfdb_][YXXXXYZ[]^`bcefgilnprtuvvwwxz|~}{ywvuuttttuvy{~}|{zyxxy{|~~}}}}~~|zxwvutssstuvwy|~zvsqpoprtwz}~~}~~~|{zyxxxxxwvutsqpnmkjiiiijjjkjihgfdcb`^\[ZYYZZ[\]^_````^^]\[[\]^`bdfhkmnpqqqqpponmlkjiiiijlmpsvy|~~{ywutsssstvx{~{wtrqpoooopqqrrrrrpomljhfeeeeffgggghhijkllmnopppnmkifdb_[XUROMLKKKKKKJJIIHIIJLNQTVY[]_acegjlmopqrssssrqpoonnnnnopruwz~}{zzzzz{{{{{|||}~}|{zyyxwwvuttssttuvwxy{|~~|ywutrpomljjjjkmpsw{}{zyyz{}}|zxwusrpoonooppqppppoooooooooppqqqrrrqqponljhfdcbaa`__^___``____`abcdfgiklnoppqpponnmllkklmoqsvx{~~}|zzzz|~~~~~~}}|}}~~|yvspmkhfedccdddddcb`][YWUTSRQPONMMLKKKKKKKLMNOPRTWZ^bfilnpqqqponmlklmoqsuwxyyyxxwwvutstuvxz|~}{yxvutsqponmmnopqsuwy{}~~}|{zzz{{|||{{||}}}}}~~~}{zxxwwwxxxwvuuttsrrponmljihggfedcbbbccdfghhijjihgedba_^\ZYYYZ[]^`bcefhjlnprsuvwxz|~~~~~~~~~~}|{{|}~}{yyyz{}~}|{zz{|}~{ywvutssrqponmmmmnopqrtuvvwxxyyyyxxwvvwvvutsrponmllkkkjihfec`^\ZXUSRRRRRSSRRQPONMLKJJJKLNPSVY\^acefhhiijklnpruwz|~~|{zyyyxwwvuutssssttvwy{~~}|zxvusrrqrsuwy{}~}|zywvtsrqqppppqrstuwy{~}|zyxvutsrqppppppoonnmmmmnopqqrrqppnmlkihfecb`_^\[YWVUTTUVX[^adgikllllkkjjjkklnoqstuvvwxyzz{{|}~}{yxwvvwxy{}~~|{yxwwwxyz|}~~~~}}}}~~~~~~|zyxxxyz|}~|{zyxxwwwvtsqpnmlkjihfedca`_]\[ZYXWWVVWXZ[\]^^^^^^_`abccccbccddeghikllmnooooonnmkjihffeeeefgikmoqtwz}~|zyxwwwwwxyz|}}|{zzyyyyyyyxwutrpnmkjjjjklnpsvz|~~}}}~~}{ywusqponmllllkkkkjjihhgffeedddccccba`^]\[[[[\]^_abccddddefgiknpsvxz|~~|zywvutuvwy{}~|{yxwvvvwxz{|}~~}}}}}~~~~}|||}~~}}|{zyxwvuuuvvwwwwvusrpnlkihfedcbbaaaaabbcddeeeeddcbba``___^^^___^^]\ZYXXWXXYZ[\^_acegjmoruwy{}}{ywutsrrrsstuvxy{}~}}}}~~~~~~~~~}}||{zyxvusrpooooopqqrsttuvvwxyz{{|||}}~~~}|{zxwvusrpomlkkjjjjiiihhfeca`^]\\\]]_`aabbbbbbbbbbcdefgijkmnopqrstvwxyz{{{{{zzyyzz{}~}|{zzyyyxxyz{|~~~}|{zyxxxxxyyz{|}~}yvspmjhfdbaaaabcdfghjklmmnnnoooooonnmmmmmmmmmlkihgffeeffgghhggfedcbbaabbcdefhijklnoqrtuwxz|~~~}}}}}}}}}}~~~}||{{zzyyxwwwwxxxxwwwwxyz|}|zxvtsrqqqqrsuwx{}~}|{yxwutsqpnmkjhgfeeddccccddeffgghhhhhiiijjiiijjjjklmmnopqrrsssssstvwy{}~~~}|{zzzzz{|}}~~~~~~~~}}}||||}}~~}}}}}~~~~~~~|{xwusqponmmnnopqqrqqponmkjhgfeddccbbbcccdddddcddddeefghijklmopqrrstuvwyz|}~}|{zyxwwvvuuttttuuwxy{|}}~~}}||{{{{zzzyyyyyyz{|}~}{zxxwwxxyz{|~~}{zzyyyyzzz{{{{{{{||}~~~}|{zyxwutsrqpponmlkkjjiiiiihgfedcba`__^^__abdfhjlnprtvwyz{{|}}~~~~~}}}||{{{zzzzzzyyyyzzzzzzzzyzz{|}~~}||{{{||||}}~~~~~}|{ywvussrqppooopqqrrsrrrqqqqpponmkjihgffffffgghhhhiijjkklmmmmnnnnmmmlllllmnooppqrstuwz|~~~~}|{zxwvvuttttsssssrrsssttuvwxyz|~~|{zyxxwxxyyzz{||}}~~~~~~~|zxvtsrrrrrrrrqpponmmmmmmnopqqrrssssrrrrrrrqqpponmlllllmmnoopqrrsttuuuuuuutuuuvwwxyyz|}~}{yxwuttsssstttuvwxyz{}~~~~~~~~~}}|||}}~}{ywvtsrrqrrsstuvvwxyzz{||}}~~}|{zyyxwwwwwwwwwwwwwwvutsrqpnmljiihhhhiijkmnoooooooooppqqrrrrsssttuuvvwwwwwvvvwwxy{|~}|{zyxwvuuttttttssrrqqqqqrrrstuvxz{}~~}||{{||}}~~~}}|||{{zyyxwwvvvvwxyzz{||}}~~~}|{zywvusrqqqppppoonmmlkkkkkkkkkkkllmnnooppqrsstuvwxxyyyyzzz{||}~~}|{{{{{{{{{{zyxwvvuutssrrrrrrrsstttuuvwxy{|}~}|{{zyyxxxxxxxxxxxxxxxxyyyyyyzzz{{{{{{zyyxxxwxxxxyyzz{{||}}||{{zyyxxxxwwwwwwwwvvuuttssssssssssssrssssssssssrrqqpoooooop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{{{|||||||||||}}}}}||||||{{{{{||||}}}~~~~~~~~~~~}}}}||}}}}}}}}}}}}}}}}}}}}}}}}}~~~~~~~~~~~~~~}}}}~~~~~~}}}||{{{zzzyyyyxxxxxxxxxxxxxxxyyyyzzzz{{{||}}}~~~~~~~~~~~}}}}}}}}}}}}}}}}}}}}}}}}}}}~~~~~~}}}}}}}}|||||||||||||}}}}~~~}}||{{{{{{{{||||||||{{{zzzyzzzz{{|||}}}}}}}}~~~~~~~~~~~~~~~}}}}|||||||||||||||{{{{{|||}}}~~~~~~}}}}}}}}}}}}}}}}}}|||||||}}}}~~~~~}}||{{{{zzzzzz{{{|||}}}}}}}}}}}}}}~~~~~~~~}}}}}}}}}}}}|||||||}}}~~~~~~~~~}}}}||||||}}}}}}}}}}|||||{{zzzzyyyyyyyzzz{{||}~~~~}}}}}}}}}}}}}}}~~~Fenix/bin/readme.html0000644000000000000000000001324210572216250013522 0ustar rootroot

README

What is Fenix?

Fenix is an interpreted script programming language, specially designed to develop and execute 2D games. Fenix has a full graphic library, sound engine and full featured 2D game engine, making game developement extremely easy. Fenix major features include:

  • Fast sprite blitting with rotation, scaling, animation and transparency
  • Pixel perfect collision check
  • Native PNG grahpic support
  • Parallax (2 planes) automated scroll routines
  • Multiple clipping regions with or without scroll support
  • MOD/XM/S3M/IT support through MIKMod
  • Keyboard, mouse and joystick controller support
  • 8 and 16 bits per pixel color depths
  • Win32 (all flavours), Linux, BeOS & MacOS X support, experimental support for DC and GP32
  • Basic Pathfind routines
  • Blendops in 16 bit color depth
  • OGG sound support
  • DLL interface for custom extensions
  • Easy to learn language

Fenix language is specially designed for game developement. A PROCESS (or function) can be created as a graphical object on screen. A single change in it's LOCAL variables and a call to FRAME command will almost be enought to have it stay resident in cooperative multitasking mode, moving and interoperating with other PROCESSES as it's variables are changed and the FRAME command is called inside a loop. There's also a set of functions designed to kill, stop, frezze and search for active PROCESSES, also multiple instances of a process can be run at the same time allowing multiple objects with the same behaviour on screen at the same time.

Even experienced coders will find in Fenix a practical tool. The language is powerful enough to match most other script procedural langauge (datatypes, pointers, multidimensional arrays, structs, loop and flow control statements...).

Fenix is distributed under GNU General Public License, so it's source code is available to anyone who wants to get it, extend it or change it in any way fitting his/her own purpose.

Is Fenix a DIV compiler?

DIV Games Studio is a commercial product including an IDE, debugger, profiler, graphic editor and installer. Fenix is only a compiler and an interpreter. Anyway Fenix has many similitudes to DIV and most DIV code will be easy to port thought this is not the main target for Fenix. Remember, Fenix is NOT DIV.

Many similitudes exists betwen DIV and Fenix, but also many incompatibilities exist as well. DIV borrows features to C, Pascal and other languages, as well as Fenix borrows many to DIV. Some old simple DIV games compile almost without a single change in Fenix due to Fenix supporting most of DIV syntax, but keep in mind many functions and internal management in Fenix is not working like it's DIV counterpart, specially Mode 7, string manipulation and DIV 2 MODE8 features (wich Fenix does not implement)

What is the current state for Fenix developement?

Fenix is still under heavy developement. Many bugs are waiting for fix, features come and go and many features are at a very early stage. Current official release is 0.84a.

Even thought not finished, Fenix is stable and powerful enough to allow you a big brand range of developement experience. Give it a try and help us polish and fix the bugs.

It is a good idea to have a look into the bugtrack section in the official website for a list of known bugs and keep an eye in the devel status for new releases (the webiste can be found @ http://fenix.divsite.net)

Where can I get Fenix?

The current official site for Fenix is located @ http://fenix.divsite.net. A CVS and a CVS-documentation site can be found @ http://cvs.jlceb.com and http://fenix.jlceb.com respectively. Fenix has also a sourceforge project, though current state for this project is a bit outdated http://fenix.sourceforge.net/

Who created Fenix?

Fenix is the initial effort of Jose Luis Cebrian, and is currently maintained by the so called Fenix-Team. You can contact the team in the official website.

How to use Fenix?

Fenix is a command line utility. The base package includes a test program... to execute it just type in a console (dos-box, linux console, etc) the following commands

FXC TEST.PRG
FXI TEST.DCB

The first sentence invokes the compiler, the second one invokes the interpreter. If everything goes well the compiler will create the DCB file for the interpreter from the PRG source code. Check the documentation included with the package and in the site for further reference. It is also a good idea to have a look to the FAQs in the site.

Is there any sample game developed with Fenix?

The site has several demo games for you to check and test. Also Fenix has a big user community with a big load of game projects (complete or under developement) that you might find interesting.

So, I am a coder... might I help develop Fenix in any way?

Sure... take your time and have a look into Fenix code. It is a quite not well commented ANSI C and not so ANSI C (sometimes... ) big code.

If you're still in the mood, contact us, get the last CVS and you'll be on the run!

License

This program is only distributable under GNU General Public Licens, version 2.0 or higher.

A License text should have been distributed along this program. If not contact us @ http://fenix.divsite.net. Fenix/bin/fenix-ref.pdf0000644000000000000000000160457510304031130013756 0ustar rootroot%PDF-1.2 %쏢 6 0 obj <> stream x5IO@ ,bIhf4,mJs[T*@\,yy8Sd61dTBYYC*dUV9.ykX_^7 9OoeՌjgkow:<8bN&0 Q\qj WHāD WY:]~DP QxK}Ru;xw/xe dLHȆS|x}y#T ?h00dC ^:endstream endobj 7 0 obj 248 endobj 84 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /A 4 0 R >> >> /Contents 6 0 R >> endobj 86 0 obj <> stream xYmpme4{92/\wimt5.vuh+1[=;w[g㝟gms K;Y7,vo+~[ޗ<_n܁m| 7=\=={Ծ5 ҩT'0>KQ]`Eo}5S_]׍.~olfPt@T ]Bϡ*\0/j@}Bwayp͑[&wt2CB~^UL25l_,K8d avnNBXR#ACB< KQvNǾ%9Kci?H~ :YQ 4ĕ:: bnKC?^$G^ 慽!j헒cɶ¬'֮zjSҰ:OM?ET_( 6*c ؄| IOrIVHRX2A>%CDPǼ`m%g bc.ngp[f2?q0;Kgf}g&s8l=OgЄ3mHp@=s9h*WP^E HL0!KLӫViuHHULt@W )/?ۦ.c#bݮi*sZb*`TXu\&[$c/O}6t_l[NdN?[ve+Yԙ9hQ7/ԍV&xPO2ZiЄ˿4pOntwEpD3&uCa3 1 EVಪ KU@vOȐĴ2S}JSs`!Vi,5?UD%j.5]SA?JGWe[J!aT́V {Z?G$\^$%KKh )b-)r<;M|+[СaCm1֩Zt._:T%PpE ,LZM?Vυ"B'xtIH1oKG&șbGZ`U}$0x}dqQ-~J\hJwX<{lD9X׸ <4WFH(C kdɆ+lX371:@?$Z]e%|,,D'7V|k̋v o#1t}{XhD aGiVN)M;^+1H~8'>Up>SoyHkpنN'/zG XpaQPQ!3uZDrBM@=w9(EQ|Еbλ"ɂŃ~a!{/Xm]*@(^xkS-FVZer  vԊK!J[}2aH; ֍~M[ďaGN6Up1JO'|~ϣ9,OR J8O*eK;mk/:s]C|(vTЬNe64endstream endobj 87 0 obj 2172 endobj 270 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /B 266 0 R /A 4 0 R >> >> /Contents 86 0 R >> endobj 271 0 obj <> stream x33T0A(UU`Qɹ N!\ !i\0 9elll..&&,5D! #c&z z  P'O.}O_TpC} v pV0tQ`r $+z& Fz l]W?ibVKvt{jrD%3`aF ` [Բwa{L̪u.sW Zj􅓑`gC6Bj, )$yۀDZAiYaQ5d$WWZ:fVAknl٤Dn?u-, M@qr!{B$qݸg1QB)%=KJ瞚["w-n $O֞?EvQű}'AUJ,(, &g_B\}@ Y?j$|-0\MӁbknS1 r4n4Вe]4Ϙ3eGk|6ZqRȁFp[a!H] M-0e*;]t" Nf !׉|cal`jah6p "endstream endobj 272 0 obj 668 endobj 283 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /B 266 0 R /A 4 0 R >> >> /Contents 271 0 R >> endobj 285 0 obj <> stream xZml[uM#AY,l3'WvK[]ْLeu4Yy  )dl0b%V2JjD91 $xo0[S{Iݗ(#{>l.9~7lV1~vvy&F.7l^6r>?FgJr+6_/' Ow@xj=.<HHX|vψmeEvl>Ms|6O~__L8_I9Acq#^Evd6D}x YJUՏDK]NTxDK='<?P VTZv$$";_EcxB! &";֙xhBzTӂ[AJ5HX,`2XKi]+Fw'?)pa! l[][XˉkuVXdz%RTn̆'B yki.y2b?DcW|I)Xqx5퟉D;ִ5v;1')y\2&`2{/Y LLD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`QԬ(T4JNn|:?n4DuK0 .ZOߟD:V)e?v&Oea@h`D21:0&rw=^z=¤s 6>OOTWh*U#A; #˜Fz ob'P4?<4<64(xS8 zA8/9 -Ygb \<+k{ir\ P&ZBH*ƺ. b< 5F"WpHm+LKԄ^ y#2J8#*Ld%"/ Wp{h%Bfb8nTwxbο_OᠢU0F@,1UkQ򔴬1Glms$!7)kUrB=2o]@`|5LD(NSqo\) m\Dv^=[Ew)(/2i'd *T* <ϓ ޢDr*p "bE9١3h9+ z[t}<À2BU F$f7B,q=n`R2IC,6t MlҏR+_ Dku5v@ ٷD] :,ˊOXp?V;J;&[" ߍu=4;d5XY-*ϝ䳃?uM뿠A|cx!pq/=,1TYp u(}&,Z7猨(戧{b`03oa h.['LY6Sr#I!{UU{ DIߓ\mAuOUֆ]N1+ F]\uN )-s[$oý}ώAD㫚Of0׊aBPi`+W]L놃"TF38Պnz-Z(U.={w7A1gz SC 4'.^A;s5G؃~Xh36]w |pWY]j}k1d dvR.ϰ>' h(ܵԝ)P$3$e ,csxc_}'C&N4av -Ph6d릑,Gw*TPR"#l5+w[F&쳩S}MJd7bpi7LZm璋2C{@%(8-]TeJy iIFfK%THE84Wb\-?_~aN1t~GbK+Ǖ@yLjz' La8\Yd%V5Z=i٥.b[P7I;GnPrfz] Ux( $u~8_>RbyfaW뜍H9.:Of>6&wLt_8mhY<Pts0;mk =iM22d w0)T;i;̠);enm*1m@kv=A;T86:=>Y}z6S֝&7kJ<;n"JPM!:=Gh .KmqXQ}N?_9l.Z|Rb l/ \B.?fy1#m/\q~9j!$f.jtPS)v@3non*OwB79X[LϒpFI[h"<7̬4"#! zendstream endobj 345 0 obj 3401 endobj 375 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 344 0 R >> endobj 376 0 obj <> stream xZoBV5*x:|>i),rGI 1ymkӚ~pڮ/9_$5f8 $i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+HD{g%+ km3Y@2arvlI A(~M-:%hU̎>2D 1FDD>n#sH&ZW(y髆8lF}LIa&}pWLPbDo*u P_p^^Ȓn=5˱ 9{V[9dEޕ@Բt7D>I˙=lBIɩq aP+ $fd5u#E}'~Nft>}# U@+`Y 6uG:ٹta* (T$ rI >_ړ8 ʴ}[\wH#-. r>4DF>D;xtg\+lTZuG+, 4o住_ ЁqAGB Y1%%哠84оJ h>TROYczq=~_#L^7 @VEw\1)cu~\/r,QmQw7؝W;oNiXչIC=~: )L3kM*{B3T.)x4ROBPf?i_aNBxP>_H xh/ahv*5B\DNE^̔fl .h#J( ۝ AZޭ?|~eI.|EIΞ2tVLe۬ hiZVAzto^ȹ2P05yeyTbE !r)yqnA4cxY'*PwD+rwӔ]x*Qg{4Y&PF$nLJR+v³}{*wkaY2LdNB&{BpFendstream endobj 422 0 obj 3827 endobj 427 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /B 266 0 R /A 4 0 R >> >> /Contents 421 0 R >> endobj 428 0 obj <> stream xZml[g,+VX%KJ䂢P\__mYty#w.DLj!eZέZ6_spdTwh2O4Hcꏑccs}}q"4i<9n9\svU~lqTu_n௃G~}>9;<ק8Hw T?:8x<~p;УOz$zpwǸ2rwnS \'x+WEig}g Τz*~4yx"oG?^d:u`rtЃC-GO$\E׷o[BϴD>~OGόBM443'?хP) %#N霋\$ Ei(1)I*`Uɘ3ӦRL6 bI5oK\ޖ  C -,ɥYxΆTCX())) w|/8D$ڔ^:\ 3B˲lAԚZ@2) vχݱ!#e 7ccO qy-?q{N^c:>K`!@v bxGeg %|\.fsRx.^URVm0 GIJ7Lav CLkB2 ;߀9nEm m%Fž 42LrG`("67_^O1J3A- lm}v[Jr1Vs/ mj#|LLW))0(vg;d:Z %(fnq$b]sx< { uer7|< 6V#6'U] ̐2cI6L4 t:%ԙQp Q0x-d0F;S&Ȑb e3;V;*Qբ{SS@-ܱ{roM0`,`4 A6,j3*T Yi|!J2$$8r9Gs&r3zL]4-Gl` eEmwcP*۩DRNЙujHo2KBK^genx/竷_2W$dz5 qCnxgen1KMNncHR P_F j! Mx\J,%Q$h|S~(h6lFw\QDeq<މ M/ReqdB_F#֐IUVn0[ x`aԨʒ Ѐ*#RvNYG'1n\elY(ɻ3Ӑ$P*YIgvW<~$'a!vV zJjUekH@ ӍՄIXI.3'XH֩V7 A_ B(Td##WF"$rQ LB%~a1(G0mHR%qc<ͣRXƘ(Q(gsi(pf_+-!Rtu낑= RTBR (* žQo,m!<;;\^Sz"A#[k-9p,7[T*T6PTāpE;+={enA/LC3L +^7\}(N6YD}>NIk![ \CcUcȳ9y@RCc"fmh$#(#K΀F}P 1F϶^f' 5d4 Z֯2Uv:r94eU *Lh*[bʤmߨo i#Prɏ'/Y!uSR]xgЋEc )?r<{hHskGu19rD 8|ZEC_ 'ሰK II@Y f4lSIfX(Lc:e_{{B_ m.]a"FyjV=p: =mCtqAza7f8˸"k1nA gkto6qU5i2Me@v ڰWz*.pT9C WMTObL3NJ knl۽owKS`tfST%P,wMnطaIjb) zb3@~ϧ'O5 H p)$L5FJZ} |`#c}>赟p%xNo&<;GfbXK֧jW7sV.[7tpsؑ6n&fFHl c魃V[ oKlzQ8[f#&@BԓK~԰A)Xce3|# doFpn׹|h]{ܱ0p[=x`?u=I| 4 Uh)S!@b<~piyyF^71'yźdS~yıKA4 ޡ!W%^[uCha,cPe$XѿpLendstream endobj 429 0 obj 3852 endobj 438 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 428 0 R >> endobj 439 0 obj <> stream xYml[nMh4riGLp.XqgڦM7 8̋lT#{f4}Ǚ$'MK'e٦MȦ?cE6`=׎ *}?y99i'1=RXcƊtV;R;.g|Ѫ]~&痛?fW9pp`;?r{.4`xV~#l珹(w,|.΋A3^O7.xj緮)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ream endobj 440 0 obj 3148 endobj 498 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 439 0 R >> endobj 499 0 obj <> stream xYmlSNS/uM`L.(apY/_|xfhHa -hcOžË6Am5~S/&U0ic?VGWMV6=^^{Ц(=y>yωp~c~rp{W8:u|*z闠M_<=2<|-و3U>|U=|乫C^>2Vxsy4'hoh-*pM[SrDu}bJ"GxFP.#u띏YA ?oAB UxA#ltt9vqt۪Zn p7ԛ of W\Fi7xM$u<5MɄ ?T%f#8`oǶ wH"&8d2 r^t:E92 B,_2 \&y)M}٢0G4+"J < ?LCZ_[hSc#Yˮ%fMȺ l"}yv܍36ǿ`ʩ7_jN;N6bC&x"A(cij| eIm*$]%]'52vZR)eܘ* Ҥ4h d/wV;t62b.uL @ a/6aڪT4 6K"R}^Иw~?:z6,Ѵi ~)6 (%571K,{F5}4wG+JЄؽί3 OcSrǰI nn놖JD g0z7(&<:nkj* np<ڈ~sl8"2|uyR.:Z# ۷F?A?4eA(T{ܻaj$:r'iEnty%MN- 7u6Ɯ F c+?DZ}a `)%1V>i{!j@*O:*MI]+0Mgk9YAd^0/e+ W lzRAkIЯ $J"[ x=ByЋU)Wr3;$*ҭʊQi\\UڴvtW7.9D9XyQ. ky }k`A2Ղ3ґ> >> /Contents 499 0 R >> endobj 517 0 obj <> stream xY]PD% a1 EGҊqƪ@I {& N% -ݵFR3-dJqM҇!/nI'y$8qϽ+Y@u;}ds9s݃W?rc$ڷՖPP_{Opsվ}'Y/>d12`KX|[Ǐh>aY,Y^xA8Hǵq#M׸x__V^Fk''G#!o,/D?)B{*dB3$Đ(;7dK-+z4$'V/^&B9'HV"uaJJoL!/f3OB 5&?I IІO~4߅T& G2916x2)^ e8#ɛ:wGQKKht4;$H"0gJu!@}?+ Y9lQ "]*& -~AIdT`A }gWm g@2b<Û*'Ia6@kD"USn߄rkj0b-Hb%׹<1ĉP=4*BWNf (jGet@Lii~n^uy{ȊF8F}w1Tl3xYr  79Dq=œl P%nQaDp|2LuP.؅b"0rb/vq4m6@`pHH2.o]< W#s>ĜOd@N Γ'\F=y3,Hhm« s5.{= K 60Lfz{)򄿹Zd(VN|^ qqj6~2Z$@:+mJav3fZIb ,PH!QV#dڇa܎}77{5q,컓"mTi+v9p>̺h9"bRz,5k₻*U"a6Jn V'Uyv69>\ &5ON 7B`1:r'W VIoC E@"J~x?ntBހ>DdސXP;12-K;* D( cQ5 Lr|՘v~yT-;V+9K % TCEDt~W=/KԤТVqС0B?ǀ',/{C5 DymCN<3!f$rZ%}BDÁZÁ Py97-2 HO9*ݺqeIg*MQ{[xgnod#hrmWYο} 43ɉ^x렱yl JVgGh)S=>w`k _UKǁ7@d.<0>H\pOJUjz!0Qh}+`V#<ҩObZ:9Xk cg\99%>7]WåCFZ_7ڦOj3Ug(L7̭1t9F<(6惀R/ GYpXt7Y4;\QWv:Ír1za,na@hxɏȲٔE=ָ|wR gfkKCd)xJeʚ5u6L 3 v:Q}w~:~JпvW ھXendstream endobj 518 0 obj 3124 endobj 532 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /C 467 0 R /B 266 0 R /A 4 0 R >> >> /Contents 517 0 R >> endobj 533 0 obj <> stream xYml[n,5YZLYMc{}mN]K̅~ť7X1݀z׎b>;m2Ծ`6+#4b?T ZiC(lݺ=qa҄J}}9_y#G{WaNF|&9x}OtrWsd|ʽ싹/{CUvؿo瞽CWWMaa[w _+| *7꼹Y zIUkvrӯ/hz :vp`\#iï<!q=hXCroß;79΁͎E[:w}ƛXT/k k[GsSw~ݱm1=C]߮GoEw[ }7Teظ?eVa릯?XJushϳϟx+}p^|wEBܲPjma<'Nd5ʟ]3cI#=pv1I*5gCv `UǫpxEJDDPPQ\`+Բو̥X&}P9z 2E_5¹箂T3bL2vF" {CҚ*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|;KR:tSq)=rXDXB =*X'Wp9qDeU0~9̙XP1hgPmx ѓu1tX$Y288?7(0`[so^cvb2W#t@͖%.9nUyA^jH>y~]l#XCO6w&^>VM?En?uYTR\hX엔zF*~;VM ȵw0q.FЗ  O iP7j `h)@K {T~P㦀e!@* y%6-o /h_}DTգ|I}I䣈U(IW.jOϝYHobjv:ثFz@!$@nHՐ:"!@0Q>,h?bendstream endobj 544 0 obj 3951 endobj 556 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R538 538 0 R /C 467 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 543 0 R >> endobj 557 0 obj <> stream x\_lo#+:YBQȾ5TvxU%E4qw\ K"N֩H!*UUAUfvg}x@~ovRC("9S?xԣ i? CK EVGu!QK O<4p~XK?3rdlȏ?|#|.=^‡=ߎ)XKp޺A+^2CŜk򻟿'~+Dϑ_7ȀDԄiCP$55R['GO]N%?t,)[!OaBJBf UH!aV8pą R$۹g53,V$|(0|zr̥֨4h1]UcR wHɶAb w+W&ߥ`]dGC`ό+Xױ,+@Q-kb|raeMR>48;|sݾ+{xy+ zwE6+S/-}1YN'Jh>f&i/ xWQ/f AI'*F! N+|`s[,I4{_d{P#2:} k#YӢ0D9Wo \.t>P9O#dE_:Gi$V'`t9$~#JO2$7<^[.a^`>˩0V]VB%v҉@zġ!1PO3i5dZ\hTkv8.Ukb}z3`4W-ZAج6+bkv8"ŭOZۜV?ۢ sl1MDm 3X]! @Ral"t(;'h{rr Ñ`[Hν^*'<^LYdH_31Y$ ~9LR _ #H'a:h 3k _AH7 -bCyQ CrjGhVk,iDN81^Ҵ0Vx%r2Wm#!sJBa;[[V"Lۛf5Ht`Km>YRd;"3UHro$xK v]E?»Hs(O@JpV:2VgVxWQ$y( '>>[B_YG,jv ?AR@+W>0M],+dm.$&[|(g+y\. 7!?i$X:pʰt)YA f !(by "y$HvV`ԉG2$G}2$[qSquljȇiD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1R]] Cu'NR=*I{9qϡNRUv5kmMyKBN^au5-9F?a4&Xk coNjVvVA4`h|%ݡԇ;@`#aZꂅ0Lld#!azѸoiGfi$e_6Lú ȢZY=_*;۳]6HlTi6*N}Ϯ螯^s{գ: [ziE 1&sG0 ʑ#},!Cd*=>;JD.iٖ4$LT0{!'SLdO>.j^ 嬀PVȤ5ϝl.)0MjR7< \EF5 MM3(sa?aB14o::/4j@F&8+Q2=פ%5]Rr4>UzܓL]T$x*bj_TZEqT5w|q)P#/hqVZ5pHEKG<^V{/ʍDd(''I|cÛq?,mү%1V>y`0jNU=hP;O !;3c .qJ6ND+OX&uId0?"Zg)jt­b wJp~Y[V8{ HqOqetUZgN3,n_N}#%Pefn(M}bMY Ie-RԀ'<_B]<ԷBR@( -&WM_)P>ER#q+@g}IN_}z`]{v ,E `@\@n>LD|X͂/7zsUE]9BlZAqIp$mKۄb#`=bxη˷E&6*~0r3B8dePd~p\O䅛__R .XʟPjZ,᣺ ~qQh\IM .6/u~À ͢_03c:\rA[(iّG*?*AI@-T"(AE(aD#^2JȨ x2m68GY?qendstream endobj 599 0 obj 3654 endobj 613 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 598 0 R >> endobj 614 0 obj <> stream xY]h[PX 2-9G5kev^Lp]5q$eś&LR<(>:$W(LeE^boJobrSyXGoc;y=~??pK5u}|[rCDޠ;?~}`ο5|W_#Koϝ}amup߅[QxYo|?0E~vYm ]`#aǯOZemWOkXv:u!k}Kszy(|a|OqGQ/D #~?B^:=ڕ}o%߯s5=s~AQoyw3߳U%Φe[]x&Q,:R+_˧ (ė}\FYe0f* ]ryO%Jm#.T#ur1Qbj4+QXya%e=8g?0gqP_)mk :EܙI23T'M1z Z!ax)JBD>WIpWܨrxgU;dUWqk?}; z!@%!d/:$쮥=nT 9Ȣ֯ _敗^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ǚ{ha#{VxN>o'P~h2hax<4юoGKF9G3v+c:H ?LƮzdU^渻)g eq2쵈ԓRK*/ROqh:70fciq`TfBH}c,w7J󔨧w42),N#O )&Ǯ,>TA@ZJ@7m`tlhX2Nˑa%*n/E/ ʴ &MTmޛQA¤`e1+!APy0 "oW b+f`UxfbL] !R0 'RB2Sqt'2 X!gg_f ږIzz^sx"cĜiF!NYrl1YGτ_zqtS.瑕<-z ֙Mgc.bm+M 249@F6xZu>ɣ'$3N` %\z*No3}g,ܦ,#%aV+Aeϩ;Ar!vGédlLKיd6|hM!1`a8 vY @6piLMHXm ѾѸqMKjHr8OY18L]w@P,=n6r`k5bHڳ1P \I p(+6ϞeL5 "cs@h!gCՔ$IC;sTŽp_gp#}xwٽ?c<ЙӲ0Є囬a SIM譱ܧmu ٍM^# z4""ݾnxzt4ĕԤf:-Z@tZ52g'XX4?R}Rfv/j <ˉpDVy_)G\ɰ z =[^1,kdmqB5'0uP(G̢ Q/Rz4IӀ1@r uendstream endobj 624 0 obj 3927 endobj 632 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /R538 538 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 623 0 R >> endobj 633 0 obj <> stream xZ]Ln)V^Xᢵ,jffI֕6Y ET1IWuI3lvH0;WvTxyZU~C C<93;;RE;|;w$_]j{Mğ]<|~V__@K'څI8V]֧/KC?>e#'k'.p$6Ξ/u_/lSO%lNܾ塽>r$|ywŽßĕqǖejjo ˊR8E@(N?3城_I3am/06tPvNe'X3R! exޥ9ZIT^Z*zrlG-ua1eW5}mCV5ɓzNcN͞[lP]ɦZFlɖT{e|Jfn,-zv8r S:>6I uT388,ssZ]C8ɛ™jer$[$oeovWB< Ylv!-fs]Xae:M^VnVusg=EVZQʎh `!!Oޯ++y fX] AJ&U&בB$T' ɏ8>KUlzq 'ꁽ3EXMoOi,z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:~ɞ߶1 mޑjD̗%k\ޫ(n-Ľ|' |- yendstream endobj 638 0 obj 4705 endobj 649 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 637 0 R >> endobj 650 0 obj <> stream xYoSҌYQEbVNQEs+PS-2U4@U=6@9>IjITBk?شMzSM=!>>w>߉3]g<31khG>ռK~ "xxzgky~wĮWc?4{w+ "GekO yyqD)adsx"ѨSyٷ&~푆~!Fbt{T)rEC¢8M'y~V#yxԉgiC$Lu$?276ʮbTe%m\ympaX50_^*^]ɚweU_5&ecue5{LZYj'Y]UCTjم,Vo S;f FM&\N]p_^W;H{X&(Wt,q5>"G{l_T/ݟH~)FoL]vb;)L2:Esa:Ii?F+ﳆ\!|%$a -4aʼn?@? -_o/2F]19a%.5:FNlFSlF/ݴڂNBgc'oZ~/Vhg|NSEFឞ|P-H c$핂@%B;\;Ŋ#3 )5%ʗq{1M@ҹ\-4D}/՘7#Tol!GG*[Q,Z6fiƴKD"z)|`bLeWF_m­jÎ9c#M%qxᑝyݞn;$+ңD(@B"^?v<5q猂H %_< b`ݖcy1Q$ VFǤ}Wl-쌀'"Ln+Db³ e `ڭ>BQ )?[C3|^E&y}H(?RIyb?:vլbG|0sԫz2B=nܨTw6Ќr`(3D(,Whk:4e׾ s6*֛?6)8g'[0ɳ>hP>ޖ@HxC}Ar2­ Z:Q,I%2ʮk6.F$ hh1 a㠜>L~fc}vdh [ZZ;PtS|F[cMGbk*^.XKPnQ]败 .x 2k.e/s+ 5I (,itt׿0o6МNT&e~?cT!U.C%iJfۉRB(&`[,FK͓qPq%"g*76J䆅2n,L\qLC U峜F4G2I_~ްC>P &n,!*Sل+RwyYe>]̏[]K܀ l{G~ %;:& r힚SråxiΊ5*=[C u/V2wBԷ. J8ꓔM c7&OJ(,ԁUB,Ro`m]|']rc>b A&0%y$bvr8vewBDQz7t 1`s*9+۹ݣg4kix`yY 0yWw/z i`VZmQF/L~%cc&fc;'SpEr„6Z_`}RN! tuMmR/L" տqgb )mEյBl^j-el9]!";0/ڶ}G: !mGs̮db!A?GBN,cⅥZyHQb6KX}gr60ԹL:ސn 0!&w׶#TB؞;ї VxDf#=%^U" bHFcjMl5sٛn4k $lr C㚔͸2P0l>gr%->IBgt `X爍LK'eʻޤN N3]9GUi0fim6_alX Gǀ2Je@eXoyuJ8S옞:)>N~HM'ڍaakw>'mQs'x4$4)`. P#&l7Us}:bp=a߁'vYҕ"x[/" I3 KPY||Ԣ3UH5 +RUX:78&nȇȳ1xU>3&t) JPZPPt*  tbur~qdk}M'}FK0~S%bqL8Y[ޕ /۰dݬ#Ws Yidl3gN vdnfEAP䆍ՀκVhex%YZk66b+Ig) sق>3C&ӝV_~/S0HC"K%FD^X]|y 5.[:[Y #KBbŢ8[>Y$%\X1阖zO$K緑ѡ*Gۨ vTzv?rD\f–8NLɰ,9Ɯ4vc)MN)}6%(t^QYSKHAǦ9;5L/uZG5,<բd[3=Ə'!/Z)z S'&'ʱ'p(rF@ &[ͭ}a9wǩGRcY#J|<]Ĕf{ͽaHkfb`.0byGv([߯|(BC^<HC@y&ze9,y!?skٺ#PW^xW߄{ qM5'ߚμd'wM͚<9y}+"mm`Ƙ\KV95N}G.̬t v>Uξ/Gu,xfT@ہf/hw0}cIu55kc$mW^tf8CO/ F:!v,V2Uz_BMZ^&U,Y}j(N +74 ;S-℔d _Pml>\^H⡠}!J%Emj%jn<,0=B.6r j ^2VoNNpG׋-!4J'+Xl}VNCkU\zmOQlǬSK^} 9&$py=( *Az%]bǺsrendstream endobj 651 0 obj 3718 endobj 655 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 650 0 R >> endobj 656 0 obj <> stream xY]lJW%]4pi3~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ځQ z{)0MGuλ:1Pt&p a浑[e.Q VUg"(U`,YߙtJ$j+E21 +R-[!P͉ y0Zb3a`6 Q(*e |DВH A3AXe#(UynLd)t ػq)!A:}&O%!y%wV7X-( gl}^&t$Z[*a=ptcqF={ܾ⎑o}4xanģㇸ_ܠ?=W8XKp8NA?<ӭU#=lp(?qKoAe<򇧂ܰܰߓa`B sC(iy$v'oO'!fR۽}~S> }rOnm8P=ma;ӋoU)w# @Rvl vZ\~;VA"@7`ndj#_;k}X"FW*TPvj$thEVgz_'薃NGa_Ago-xn~E8.tH, .ȪJ]v yFkDζY(` QjԮuQ nF){&s(͞nKڵ.J~!N߷I- %?PRRvH qrm|F68[8"եҩԠ]z,f7!AXt5h׺(A7f7PBZ՛@AEI뫷o* C骺-7åZ%ilQY\ FݣW# ©ʉ›Ԡe$M?s:>s, vW!YbzdI֨dݤ>#eksC.hR0]AZmH:V 4J{ lX뵿I;v1שLEh'y{GlHLJ]./,e x ?q~o{ܯ3="z?>Ľ; yiܤ6׻hctMy agl*0IVS< _eBuû4VIF?m'KCD*ގo QzbD2d4#jѩkNdq=:@8Og&L&f(vMHd: [Vg31xo;̠.b+X^5"p< oG.v 7h.!ٳc'\Ei3ꤚHja%(-ؘ߂$viݫr2PkkڡY`b:ɀXᒽzRƀ`Fq|@ټYW]y|Bo6; Bnj𭌀+bڍz R4}gϧGf֍TJF..eYk"\JZ TxADd-kpPĮq4@w|xc>@E*;aVjUƛ]['cs],[2(p /ڗypZ[ʖNg?0^c5^^KgߘHmxӜf* Q RyA_,Q[-``t}]ElO;NҪVսT˜f%7`km2 iKz`J^) XhuպycYxuWyCEee"gF|7o+u=엝_U-dendstream endobj 671 0 obj 3496 endobj 678 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 670 0 R >> endobj 679 0 obj <> stream x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\}cIlMUbTς/z$ \D-KTuEԋKu:BĭGu[l^y( U #|R?j!k(lvMlhi3sYjFh3D# 6/;l5Z2ߊT٣SG"Êo#;8Dz(81z0.56h)ǏݏK鸇<+8p#~|>`u ɻBu/ydE+Fx-Iaѿ Q*Z_)A!5dJ RCM`#'QEjB[/@%X_&E""etNd"Pu2M{ Udsl”le E6 d` F_&vŻd m,A[#c'S}48 Zb.[vMdjiݝq}vA.  XN'պ̓]䥗kޭ[=) 꺭{e νF0&F EUo1'\j_ױA-5@k4,2{HK 2l4lP,vD`Bkx\h<Wi BE 7wTWjnjhXW+HYwtq!>C1*gG&ĸmo)e$(N$=9qSayslv^ z3\TGi>}T.ZQ/e^,Λ>kQ{SUc\dQIЬDw3Lڜh~ŕ;@ط,+m73 endstream endobj 680 0 obj 3978 endobj 687 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 679 0 R >> endobj 688 0 obj <> stream xY]lW`eYRi4Qd)̝H$u֖6m#6J#ǵjCG8I6^v7C;] kJU?:/^wn:?)̹}|NaYҟ=8RK5G%Yx! 36$Cr`$_pdUB .''"GvmO%;VMU$w_0k8#*ZƊC~i=t!`^`̘x/e6M֍.!^#gxֿ^Q>w'=ן'Pme+7qa؅ٗsIV8cR4ÈŢhp#Ui|PYI|cOvC*S$3lꊮrf$Ca.bƎ?zrh8٤)aM3Md8wda#3?GHE kpzX5LSjP3ɐN&P%Vk a #w䓉] *~IsKstE=;ݙNjVk~1-JNzJPEWם=m9{jXϜ}gilSݟ6E q`pt3{5[/W馺 $Z2l ֱjo:]c;_(M 27qoj8u+s9}xJ'rY3W/{2{YҞ/X](DN$+(Z7QB\q3=GZCVy2($^Pi"R%O+j2~ V+m_\y{ݣlw9w}^r9z5.>eSҙz_feT^:zyݲMЙyiY'T e8|E>^F3'cgy2flDVY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?WCxQ7P.Q. @iwbj^gi}jB׭NzbQ-Hgiwv{v'<.\o@P4/.}]p3EQQ(%PB viE0S-d `O= "GZr],an 3̰*]xѲ0C{Pl8~,j0 |, = fcˢ_˄ѭՀw %k? kE),̲u(i`ߠ%:@xo5_|"O<x0D;ai22@(fD=ۃ1zdϏ ?}1͂<惁;D l>K+KZ[7pjSjmGz QzkLJeF:W~kܦ+o_nWom\a鿸#RCLWbHV<%(Em7;sāq+{4S8[#'3Nu|Ĕsk5 %Lإ}$YK:&QdjK֚r ͗Vjj39]Z "Gq9jFP'|ix L*D^oĖ|fr5ov6̶j֯=ζ;] ]\!m53þW |SCz$ HUr5 Q. F1'@ez 7 ȁEV 懄ns}`7je϶)R2Zfkv*s,بHt}?neW Ζ yLl0M԰ ^v(!5y !6R3?i͋G z!AFߝVu4CPq=$y~qiXKlG/"K$m;'c X>$]3g.Ɩ+8n p;GFE2P#I0j#p5BmaF팛I7URPEQZudмQb-[p Zѱc; .i%V,!&on9a3"I6Bh drQu#T3k#FS y}>|T zr!& K(cGtf(o"R=@Ix\ul"k *:,[g.X\ҨS, vf!߆UV ʸfp%)@F;],9尌BiZBEpnQ5)1RMMz~yendstream endobj 693 0 obj 3185 endobj 695 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 692 0 R >> endobj 696 0 obj <> stream xZml[BYQU5TkNlm%t hZTNS!mľI$JGդ6~TLڏE4JWiBb{ν=jb&=x} 䉺H<ا47˻Q猃OtqP4y!Yq-Fa[_PUMVU{[J.(]`#/Hoo4/.E-l=:ó-eA}SvofC{y5A7W}^}?ji [||?kC4iȯIQ_T%8-`m_k]gR'}r'oA\Vֺ"*>]JXcEPQTǻ{Iٶk} K:O8Kª,K?y4)$WLzN+TtI'R}Yt#h>Vo VOM7ޓ{ΌUpVYq qЎC3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 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 696 0 R >> endobj 700 0 obj <> stream xY]lN[V)TKҝ{֪7u)k2HY+Բ;V  `a/I>!bT5BЄ{gv=z*ds99% ~o {V%h F`I4B0$Q4Uۺnn{%!Y"~|9W~MѶ=^S9TEƂc,W˨BJ{D]TT:^ "UJeqҚ^aW,06JqZR_Odw8}Z}knM{`82Hwd6FGٺb[ٱ{ԓ!*VeF+Cub@3;4QOa 4 X*' l-M^ tLuf#JU lIv]x훪, '@%܅3(VJ`ZQ5jm BŠ Fr7.;ݏ?Aۍ=pP9^G]8겼:ob]u케\VǁSںNs= /j3k0GGF]hUW,Z~Kޜ8}mZm|[>Ug2|j*;%K$~̗ wɼSN :PeleX|гoleUQ<,Lr2g|&?C&} zE&Xy-Bj's?Cs}4ó 7L﯍ϠcLz7!Ȫބ^yxX*eψ&W 9ggA6zRkz\Brendstream endobj 701 0 obj 2475 endobj 714 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 700 0 R >> endobj 715 0 obj <> stream xY]h[R7ӌq/ #SL]cغNk8jgbl&Mյ# Itbˮlo\Xѕ,]̔;)?7%I7#8}yS$"}<|^j ?P~X7V$ oOxSh U}~yT|q𩞓F4<$?qwj@,V4O>w+;͈j'5SPj'G:i5(>gsK_Tժ4+rį4яlfr<{ 3_4ة@UM:̀iY!865#I8I`šS%c}5tx1j5Z Z!Pz~^~o %V%j x/;9sBz:OC0"B#kKvg4'*礗R5rbuf8Ӟ,J8#Rߜ.bVe't=1{Y+X(||'3,92ɼMxR|eΨȷ%@LQDʍΗ"<6$Xن+]dzſT-v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#eDH"Gp 0ȷw2Jam⋃@v9!45X,}u'l y+2̈́H:B +fVWy?/{nr~6c60vW\m)ҴDμe`f,@ $(;Ihn.x,) xtsIk]gE 2\̍IF* &{삄&O[inZ]Ka}&x{԰xk>p2|?rK|rX + q16J0DS-[C71}/,9ՄSE9،DKA$siS>_Xˍ5d=޺]ڭ9TGTK\v Ik[/ӕPn">2+__n0endstream endobj 722 0 obj 3157 endobj 723 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 721 0 R >> endobj 724 0 obj <> stream xYml[f!Lb w CvJD掐p Bњ6ՂR;m1Q3PuO[UFں~*fkqQmOzh#|3-r`BHs [K@U&ޤ_ 'ZP$Qy]ݼZL'g'}B mlxAbrܬjLD ǶMQE RIExM >_:=&#Ѧ[rTZ.%fjhoeqx~NG0v`QrWnٍǢV뱸,݇߿n6&|zB:ƣۧ34m* yj\FpjKJDG/=p)S``pK3u~Q Qm'NgÉAZeK^ZB̠fJ\5F Ia=\ju<Í& \MR"Lsb.aPd:UL4օ&-mcwm\KmB4y 71cL.JB2a*$1w\,Dy ]Q[>=dꬔ聦ʲ<ܢHTO[f"ѮXB"_G6w^Z&"O^bu2ݘOeH0MqRq2s6WA'\%PҤG>rnR)J`hV rt&"`98Ө૏k2I~iظ!kkHǩT)~0HruDͧ5dlEBj j"?|w]Gw w[_lɴ_ d^cW}M&?ٜh$БnIXpwˍ8;=z&']Fh"ܯUp!;;<=n1ޱ曶uW7?$X#0о( Ϧe77G†m  w7Aߛz^ Aѿ B;=~^yqPVAkP71>!/˗v)BVwI-([v~a)KL*,VnacQ\t}= 0ט8Eo.ؔ/[ݍ4Į^ʑF0s;̬P^ y>|M>|t/e(pI<uV6i~ E*1CaJHW" OC01#KS&8:(ayNuJk%fB - 5_|Yq־A]U-q~aD)Z`0Dd겼7'SxC2CI'Yd@A˒1\E'fWB{Xm_a(@r~6m ^ Z,D/Qʫ񞄍ĮO4=y(s``-bi$/f8-4efHlIX#JRP{8AϳK3`+BҼ:ײ970el,~Y<<΢Q 8k,fStxc@Lfʚ$ s)@Le ŀ*=TJ訟҄XC2Z5 Mls /Bd>`߸eT)qYTGdo6*^wf h6eP'@6:v7 b:`ܒZ-#Fs5;^KL:bg+S@by@՝:vxz|H:eb#@x^DDHb425`WP!5eQ:P#n`j!Ir4HsAx`9;SyZG|׻m> ÷^t5U)j3Q6MWPTPRZ%f8C1S"eU)AlFa At&lHK4#;JzkHYC[BP*0ųB&MS!:("+`H޵[%v̠R2.yOdqM;FkQI:Ot wز.1t3^.sCzlxG͡w2A/+(V""^oɟqPq&j00Lys}:Yެ]%l=[ ^ }OsN]3m'!UIg-a}|eۄM;fz@|c_ۥsV0@ 9B,['˨Xa^;)PD&g'{&F+|p1|: j8,E+rQQ+rm0L8m.dMز_saNp{E@ ޚFhd*ˑdQoQH -z@̀kVd;{Eo=,Ud]E >"e#HBxu*/4QٜF&Dv+;})`+%V l.yï{QoXendstream endobj 725 0 obj 3793 endobj 728 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 724 0 R >> endobj 729 0 obj <> stream xZml[f(*x)3boF,TѺ)̢ЉX6&b;$k\J -J}u]*TA"?cԎޯ $y?/Կ`ɳꝏym9\v_n~\h%&ϴo7ƛ;un5/nYay<x<ʒ`7% [~ 񥾐[ͫE72u2H?>i^?!rF_~e^B@k|f/0k G0+^;ͬxJc~;>_cYs<]k9ahKda{l0Wpݪkd7č :y-G}~WcrP*]uH#@+.]huW^Axر]=wcYtȼ'nKVUx(|ܪ<>g;+E(V~lPDUuOn88W᳾uϗ#Y@] wמyFQf U..D20 5/nؗ@`^F9o|X$iIZ=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#lx|@:S1J" O=ɐ(X-ـF}b<{$AWRFL%{~Ahl׻nJYL̒J.:Q~+;1 6qZXUYF5a{+5VlEOV70v͠MKKⲳ *ޗ!ʦsr#\U-l,džR ;N$<݁<205= ]pļw8K!'2Jz]0VCBcc\k-n`)\6Lzڗ֊3(+VvJ$FE s6 !TeنQla_z7Ud?SpX+4+Qz'͘{^xPOb_¶*3>k%*2)~ "h@E/TlASv0b@$ =-@އ_(UX L{WTVcϬHC(`d/蚁#姇&H}8I(4LơX&wDY{YR X݇M~ ? Wϥ |"@ 0do ap\ar##nWKFN)0tqcހ[~'2&88Hj[A)#1f!1} HhS.9?MgƴfYmPzLK%ZmvUtAv21Y@\t{1jҜ̝뤚M)* gQ`2od)`|]VlEugۮ#cwl|ϫLix8$~_OR& Bǎ- 1V*U@?OrB*2ƐzKd2oڄH BO@*tW۶a8eEyZ JȫVV8QSQ([҃ƚdϚU5s!jq#'~gou }*3ʹ2@MSnfR-T%*4 Ek5JX9W涔\?2)MIJ9+˛u_޽0o6q:EBjNNgMޱHA6 x.%S,VQpP 7F#`Щ E@i,r#e g3La:řb!ip<']èvXe 0KPyJ#nnLz1/8!C*6p&hE[#@{XU-_ooU8O=C~nYPgTugJqs 3xf ,DJ0O\jtioB2d(^٠%3p#l_^oX[#Ҳ.BT\Ժǐ%T# ݓCknS){Ae=*15诉xE,Dcuf.lZUXί]J ~0XIt_$VX9<af_♬WT.dlʗȍFpRn#*=ޒ69—;[ݫѯN8% J|Y`31 MVKm O)Nn۠y&F%8Iq+KO=V)!rAњZ1gZOؔZ5ΰ"IYudd<\C32 F&,, P&G{ ]endstream endobj 736 0 obj 3796 endobj 741 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 735 0 R >> endobj 742 0 obj <> stream xY]lWDU#hȊ؟;(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_kGF֑nR˛y4] jAU9"dL_B.|xjd?D3:d`,JL|yfv$0 gRٚ_̴B?oW$u:7 ɒm{Ls®lI/шtv³<Vt8 Oy IJɜ=۳d-iy`/gvdH.99EBfR8мcm 2?]6QVsAS㟚WI1 gW2J-m7!:p*T/ˬWHd%?+,Q[uZV(Jx[2JnM4zRytBd7 i6'W(٫ut%eV7c!H^?-BѾԜM1m%iyrb-VTrnUJ>+<ѺV+&mnf՟XE<(=Bj#MV(s00GSbIx5SZM~?OBj~O2Lj:JdL5'}/OQHj@##$sk20UCXR%;âjHIp=:LkPI#}M.dly|6qKppܨQFc4HmM",tkTτȞ&agNW^=1 rTS1spcdm^Bt8͂Œ"hƾhh*)tsR &\{#qjVP)@p8 X <ۊ2TR(~}d6Ѻ,gC%s| Ǩg92.0NCcmc~6_!iu)`14+סt_Z^͛&u7k`<#C(u@ygMI~G-gz)|(v7DPρ dyy^Ӊ*T*SOQ7kvUb Ru^v:=nyQi .6sZ=x0A oW o^5Yєkcϒ Yeo&>KUQpW?x,խYǩ93HđY"'e8Jǩ/iw4 ;XΞF6"ڗO(kfmk<)P/JV7/2Mx/z[b|VHN(L$׭jwCpę+\., u"c'˗6{TT:a7uR,uDC 9Wz DCq=DB`Сu A^ ؅Z5 yq_݆Ћu4.Qwyᇇ/\W)?36i`9!QV _Z,SVz. l(8Ԁ4$wڎ(Mնz.)4uBs/k$ƦU_p@j]Þ9<0hSovS1cnw#:FPh:&h"RIќo"Eg%H{p!xKDОXѐz/J$D8Z.㤒:D,/рćc3єpyt &[ڰf kZ zcxϭ|ZEIb"'Xu'1r!0endstream endobj 746 0 obj 2969 endobj 750 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 745 0 R >> endobj 751 0 obj <> stream xY_l[WR"+BĤnTEۇ`yk&R.S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߆7Q^2ֻ-%LZ82?vոQ̺荷[#Ce26ȕދcoغO3m.ѿHt4k endstream endobj 752 0 obj 2405 endobj 753 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 751 0 R >> endobj 754 0 obj <> stream xZml[޲PYQELU,)׾߾A׮QČcB׵l [; ќd$CM%el M~ mA&^ސO۟ I=_9903~<[s~ďv~}?iqHԀDkߑ?lYKhEKJ ({[lg𭡾noC|k,v;[o%!`13܄smr$~8#b[,w#/978|Z ;ryե?znp3TӹDʹPtoO'=_Pxv?gf{<9u_ޖ59J{k ZAH i\ʑ0P4n u(04x,qv-{_ir`xݽtU s#P2L!t+G-cѨbElu4i&F^7K.]˻T|$i^2Gt>U ۠_s:(B$F'Jœ!sN&[Gϝ7ϧJ/mȋ Km8K0vjr@"ӹL<ܔ˄6ZwHzVt|f+@b!) <}6dY`,;@?Q-LRL YEPrly`#G?u ˏ>ඇ:yO#{a * ic^ &gYxM#"%ߥq2ilaaOÆFd‵@K6Eyξs\AigIga.mHj0m.0mK,1gnƹS%eԘMQCqps$$:cۿ;])2ѓjF_;cGxmg;^/\,6$*Xl;bX=hsn/!/M^7vŚD!q"(kfUd^=#w=0gk}YgbޣCk>{݃ZR`NQv(obiSDMSŲ(\Xu%k߿{:x%Y KvD1 YF<RU Ht }߽C[X'Ut =H(|ZOs!s~t/`N% 12=8k Ά2eXaE8nb֒fC ط:cHm@<Պ]-8aלt{#sNa);2Θ "+m1 RRuppFLA4n !olLv0n(TV &QLBXӨi Dijza܆;+m8boxe+f&F/ĎR[h`;hX&ol{a'5NI^[!Ɩ 9I07҆ z˺. S 4zƽ 6U,D_JɲS8h0y!iNJ%dΒe y!E f\U#LL:--C hn"Eq^QA礪8FGaH|Ăk`xW+D`ŋN7])PǨj vQvh)"(:BbB=t9PZCے?yN<{tsWj*!ͮtH呆R=acٓvRHYEv]Ir eCj@# S>p5*U i-ȼ `Nm;,;IK =?`5&eyݛ 6:PՄvi 5irʦsjx!a$J6}&*`n]`a Y16108}ݵ0'*b]g>l/K}yYMPMM ꂦlsQi;(aa:.oa},#੹3o6?'endstream endobj 755 0 obj 3269 endobj 756 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 754 0 R >> endobj 757 0 obj <> stream xY_l[gUVD5Q9d|#ҒQ`kd[Ke!N&Zvױl$}'e$'ђICJ c/xLh@xw{wj{?s8A9p}? ||?E!4dq})d񥶟?U3#Nᶯ5$꞉DO[YʲNPȾpsG9O2"'8K2KeW\ulcd^sJ+m\jy';X%ӕ`ƩGvI=_tI8wwГ8t~k^;t~0/~c39ϧJ5YLe! R) v: HBc+Ysx_eM[J\Jy=7m3bKz6ۍe]8K<d(~&x,NCoJ 'Rz,7}{ϻs}*1/^5 ek5DJ`5N|Γ-nbeE&L_2Ͱzv NsEd02%׍?Xxuݛ^Cقi~|*Y7jv7jۿ.| UExK7g^V.(F%X*iruFt2֜D+W:G;_=7<~so=2S.(EL>p~s4+&Trn(u#dֽ0MJl!Ir?7tSjӦJr5ƻ&d%ytdb7̰#lѾ .63] Jz`a_*kO\L=F^,,N#MS\ٸXȮ?:VyO ^c,5_fĎ[KDKsCea`~0c<{u1doANJ0r8DXfdB|h~ o\^ dWw>YE"~js[Zw@]"ie8-UXq%rʚrvaޓgjbT<2TQX톩qd!rha"1A׏ k*HLU$M "a3ѽgG:Rbg J,`Dg)y D|v.\2UJ-iHw!T F'=` <!,g|G|=Na*4&PEzp"o+!0M)Le@w"p3ߔ2|Xܼh%e<ߖijͤ0D"#0;&#f_|JC"EbU)4H5&zbѲGF~c=BQDLV2䅇̏筎D4R8\AGG3E)w40? -K 5nr]އE ;t #2RȮoV1I*-mLR(]H"o8F֕kY]$utԫΗ]D"x#(鹾t7 KքjtCU i) :@A㉏Ki=i$9ag4WL &I͓."iӧS9})e&tX5!ln )} fUEp^@sx;}&'uxh$9)y=ĤQZt4w܄UC 1$PZi6.U^g .xs'|[G lbVQ텪)MBoH)cZh> O")@%v.L4{"؄t+*C*%\ s}yC_!X lۅC :.*6\s,>/}F`O }jJ԰u95oVth|x2V#l4vo\q`v~&.&$<ERzzc3=Gb(ЉƞmnAW|! Ro[5^endstream endobj 758 0 obj 2703 endobj 759 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 757 0 R >> endobj 760 0 obj <> stream xZkh[L1ftTKf#tt]R̨kbRWu%J&=]N"$ţEG'6 ʜl?ۏqK(c3;ϖo-.#G<={@?N4?L@dϜC'n5F8pO 9'*@Otzw7o(8w;ws#v3wCi1~n DsSΨpc[0<lc`0> v\կ.)8*pllOv.Bpb&1J1cUw{;j LM}ɟ/hEAC(.H~bh4}(3xV.WJ684QFo-tG ?Y1фxVf+ cu*6L8:IO]8heZp@^C>?7 #fsk_호~y~Nr,w:`PkΑfS mx^Nch#W! oXl 9v]kGBbH>%w <5*!yɏU(԰1˥z߯<\T]> A(ʖzB6bYPh9,HQ.$(X_ŃYQl.[lƓuŴՏozGqk~yXlw8|G?#"J U,F(_( mF kDd!, %_,d8; $ڐ5~~EHP ), >;nv}0+[J%5kn-ڷvBmK%qBe+` RT*!.0yg<v0 xn5]ȻVA9Q%5]6L^3aM oO9=a5A< "׿)t}qF@FNД$桒`|R5wxogBeVt ri;i!)|ft>;Tg*dg ߢ{btCqS.aGjo  7%ܨAm.~>{+OWǠ?@/fPPzXxs}#}//tzH;O>}G>qSeߓ8*Ae2ۃeD/A]/@'|IX­PH1pjHvB`jmGe*^<"K#WȖgp8)> 6vQdB?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@7re~p1&/S251g& Rb@/nJNY)I3:DHTRJі֘͗-Ed&G:J/_MRjYlG%ˆDt  ϤyQ? %{nkXk,bƧ:`\H9R6tmêaJ@YҊul2`Y8]ǁ(jX) <#>W=VeO46_ 8tGg"6Bqˆ9PTX  ::Dg~lYFӖ}U}[7qeuK`2Xpv 5ERRL~v|B*O4 FiosPpc)!i[c(˔lJauY֬hK#IMHf,x~8 o5}YWHxgȾNpNeWR6}FgD4Lr>'5;QiLlš[XkGkagaM}FKEa> P[Kl”fVPijKjFZRB*AB+ .ݿ~4Rv@8 %j]:-$[%ͿB[3iJ< QZ7RDQ |W@qe}U]h;Y;KcIHWƑ90~2 t`ZWp>!:PB\|סoqب->^E"ume6ڷ*k|۝Snej1qĪA2X c4&RPKKM!Gl2gN{&W@s0.kq(LeueJHcɕxԦpI{C5۬^b ?qvJD\%&@Q/+xwKM:1>MDD=`D8q&B_Uho,NQ߷3uC {fzX{_^BgߛGyH lvTkR d~ຖ! VV%$+%4Zɍ!0JB-О*wo:>KmŠD`|4Q[f x5m!\<[h7.>xa$^? lGqGq~QO:fþzr2B(^"%ut{, ֔Չ7i}R 7@Ʋ%fO4ORlB݋k>knTG{SˏV\ )S )-01>{)jғW J~ɱ維C /koGzm W?HQBa~D-,sDr-}[cxgkeEendstream endobj 771 0 obj 3411 endobj 772 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 770 0 R >> endobj 773 0 obj <> stream xYoh߄g164lDsN:ݽwXΘQi,L$e$N8kvmH>$–Ų]2l'0a}Xe4+#k,={J/%Nq((C:l۳~?}K>&=~V;b` G㽿ۤ9Y  ~|_:dIҁý*hٛL>ɟ8oTo 3;COo(j7OpQ+,MP_Mf̹>_p:hqGN N<{'4>5x0Ń=FWl`ł,ECP|MlԐt/KݏCѶ>  Uc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ˤJT=S Gc/i2pYPSrƈʆ^=i+5nn#HyP- ?YWtMi">Mz?Q&d7^5&s6I?]al(åꍜ7cSUU$Ȧ29},Yh4چk[ƅX@R/t5FpKDQTM0,фR ?4M q&[DړиA)UbOf J)>]l:\(VVI;RHB 6H?'|,tbwVk"uIoɳ%#i2'JOePɨY])*TXuBCWCY9web3pK}b?{EcQ'Εלe?W] c0͖Klo"x ;z?a}n "9J,^/guQ -(w\-۬eԾ&oշ q~i7:pF{lQih6-l,B.s@b)og9Hݐ\SKx=16+B8Ә}lGw*#7gxmQݭ' \P|M+ P(ۊWE֥x|9J׉"^?ưQu~oZsz<}KO_#lB3O7Ԉ Z'UIFv±޼fe[?EJlQH؟_'=?)endstream endobj 777 0 obj 2932 endobj 778 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 776 0 R >> endobj 779 0 obj <> stream xZ]ln-7ZYQR)*6i40-s䡔`ZKɏQY b&,ND;zőv:VE$ %BPUҗVHHw~xڣTQ3s$&B>xgށȃ谇- 1Eׁ{tO:"{qDR7=' jN׈GOUeILaƁjqGgYkLGS5؂{].x}.lRkQ3G*s_{F b{5t}}F=?S޺Kz  Dj2ªjZzj4U }_86~|$D{`^Kulf$m$TLFRi̖KSFr-G._\_דŕH*osYlVkΖ:fug&]}USIA5_(A Uw0X}%Ŷd)&Σq4{%Kllk6wT.L|IˉZ!]k`n3گ'i̧Nܝُ,ۈ'ΆGyq:X:l*8Ŷ/a 8lA\`zVbv$4Yʔ[\;RY`2d xeX{97Fdž$(7&Ȅy0vX? LJ8-3zXoN:4\v?'ܶ͠۰V fNeLDY -n np~hi֡uKov" @? ) b1T-P`>f札)FpͮJ71c>yv?3LiTʂ 5D%8׃q FJY,r79:} $Ik 3R%^Bݬc5mkI8%:aڽD5^CɱcLuY% !\]0%'Y>s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/Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 782 0 R >> endobj 785 0 obj <> stream xY_lSҬ" m6Ń->ܿ"Ph\f`L&0jٱl&/qY$Z *<$<4MÐ>ºi¾k!aB$ν~8$!߽glzS YWY@wS;O5U#$jlۇ{<#*Kd;_:{yv`wp܈ƃ쉻"K=^{cǽ3$Ԛʌ#Tf2ky]mRwwQ.JTw8#_l8k(ڞO^Ð6YNeQt!:Đ=zU? HkYSWSOM2DS2/}O.bOߔI},}egw\>f&";춉mN'擹Yc-V ]ȅ\n9ڿo<2LEbp\&>32r,KSCHnO)Ψ8{2eVI7ѕo̼/6g欠=R4otL'A0l# UReV̟@!A5t zc8ObJ.25DCΞ2jiUWDݏ!A/pD;H=x23;, c-qr-^pr6Ǡdr5kPOvnJeԐYepݓA(bh7WVU(se"A@|; 1 .# \ c}[_56WD|8dɄ7tcV4"Qn{.<ڟT:KZm y[ !E Kk@ӼFusE;4SDROqo,*3" e2f8tLblJ0aXME& #aMZ"q3 " ̹'{N= 1-?y? @(>ن,c 3>A3{yܣjs6iht0ݓؐh`Cͺ(W9hg=@ Vܙ3lyI\Nl-HYKUY*3D^n~XrG'j]dim=,g.OHdeڹIl:XxkW $EșgN@$m,l9U*fm"yn-43t:#1Ӿ8 .{M4&rJrmos*0MKKFKcqc xfٕ Ci t֙lO+r%u멻r_fUhOlBô6AtD 2\4 +p7ܨ"[s-{!I Z:|DW#p;6DϺ& j&V!`C}H ;%z -aZI42h+V%K2.`:@맟zY?:_4NN* YK Ӽuv8iv|LW@7u%NOO5g\*~1y?~էMlendstream endobj 786 0 obj 2856 endobj 787 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 785 0 R >> endob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7akl۷JѢpG]ض(: 5{ToZ%u͹GWY<'IEA '(V$Xl]?x-R4OHX8oWo6LW>YBQ_hPy/gG\L>~ŷNאNS4uӬr`]f̖RlKwI+ÊtAW.]QW6RBEaEiExU;4}V[+0S~`;endstream endobj 789 0 obj 3692 endobj 796 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 788 0 R >> endobj 797 0 obj <> stream xZ}l[BVYQN6KuYS?އ* Y. chB 봦%mb`sm,;QP餪)C؄c1 M|}/MU~ssq 3~hza~pir=5Ֆ:C;>֞5wp`o f.wOhuqǭ܊]}qW:1պ0qo=,j;v[WKnO-:^M$cuUnO-ձc_?lj7.q}4~k36Dbx_'bΑ;ʿ/`qtβ(vʮ# N7qy ;BM=#G9^t|PSJHtW`ģ4zMޣ:?pQ :#r:E)loĸMx J&=^gg%;=/;mLkŤTPEufjf4śˉd]|}e%OV?;tSJRJh]2ZŦfөXS%aC峽7^/1B@d-RW⁌RPd;,J: LIGS'd4֪a|TV•dzO!j"5՞h&٧<] zۮ%ݞr"S%6{U;t-CػJX8Y^LɹߠdtrTIIKES%cfGkH鷨3cӅ;w!MKTr{`gQ!)ۡ~%wJD6,]L_3I JL'|*Ƈƶk23C(9諝Vےy "p9:0ŴRo@366nˆ$*u%iP6%xj$-1b:DmJѨGX+ThiDLЕ&x a21=% b|N|irP[! h,+91IINMm܂dIȶ´2wJ3w=^/iC+|IOY3w;fDCs&v!?J}M4K;iwjF-kn2?݅؉.$T7Aɰ3q%t}Ofi+'z]Gh`xC{nOd%F.uĶZEl* Mn.!/gg-J~sj|{[A>z~aZ05p ;$]MdW?{} 21Vw$5|K{r I.[[y;.. g|. ^l?yG}L8UaR)#%mX W"LG[hJ?8?\J$gdm! ~!ה#\$cK*i;ZY.9^w67PY6vb'b*˾*J h!im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y =zN:sǙ <$x$v8h3%!wStU24ȅCX0Xlo1J #2[۽,^]@51] PG04Tl 15N $bŞ5FKS:3P 2 .$tH!u{JU:2f~c9NoryoUdYypdnx1n=˖4K& BiMJc଩IэdFH5+3,w;d钑5"]ڵ_;si iɁVA^W%97+A:OP|t';n[wȂX(֢J]ܖ=9pǽ{'gƏ;$ZiBV_V/Kxy Ko!˸.v1uI2\ 6j$j}n,+~jP EQ5֞e>~s\@VmD{8ܢbdrߣ[RaDeqR=ԾT?jt y7E4-Z>W\ĐRd 1AkL,|n)qȈuښ#r6Wr!u["JH{ͿGYu~I)1ģVZ0?~Uq|g)|ZS]๕3:b TrTKйnD7&.Z)Fv 0#Oo:(oU#c4KuLJ{I+LYu_+8*T@PRX58'p%zac-;iG;fLA:wکVLڿV;ĒVK :WQug-JfnVdendstream endobj 804 0 obj 3868 endobj 805 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 803 0 R >> endobj 806 0 obj <> stream xY]h[2/#و,ls~t$F-3ʚ*ڙLGCu5Ict,LWuCmX1zSb3&Es39:>'mZvSF-?) ~=ldzϚN< ¹v4C4 a5=~8eUIx_|}_?p2(?v )`.VvD{<"3:G`,Ul˼>m,[לpWWA ٝmw[LgX3z9!L*lЧ#B$#`P$F(ק:}F/^<&G]G_pWǃ}pk4HBX@C617f*ZF}zܘY!eɹV%EI(kS^I6vC+Jwl ZO HXEi/8\×7߹u+os#z4bŌ]Mdk65R|kOĞTڳB&?(*ɤ5fǮ.K07 k\(ǎk,R#Vݒp]4Vٺ9!QEo S#Z'nxQzsj텹b 9}cBV.{z4bF3o3R+yd[Z0[% *,8!;LL# 3ʑ uXN17ȉ -5ClJ]ڊ%G"4u10.d Chz^9d;6‚e3~t?Ӛ^nؕbe5Lqsaqɕ6`>,SWp.=9S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IW"XEEVeYPL-mz8H좲Fu'})'cNh.I9jDtA s%pfqBuN+b@# g; x[endstream endobj 822 0 obj 3340 endobj 823 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 821 0 R >> endobj 824 0 obj <> stream xY]L[":YqiGEt-ίO.5%Ӑ$#N:ke[6?fD GʤF@b7^$7X.yp1`]T? HV5pwN5Wv3 >Cc?>f!KǓ=}΋/z9w>ǵHeĺUSe8,\ Vx:w*CS;9W+AbK,U%^K6(e*kuP֬.{u/џ⻏M;_q|"dt|<ɿ춾|w';pVeE8KiJ0R Hq>1~u{}j>ܻQ<_?f!N1o օOqOt\pZe[nl5$ҩB99P3PbBeqK'$#qd^{qx"Ã..$9o~J0?7/3la>dsc=w+ L&{o.x.by~eLt3H.@WFO+7[\-2 <+YZn|19`J.*=8\S*THS\4YйŔh1 ?3i Kt sW% =T`LbO#ytnpM U gwt/dpG9/RJ'sp#KO-:ҥʵBuIVLؗen7i S$U1Ma3 d O.Q:MA8xm]mHK%cq20x\{ LIw1)'u8D>[[ؙ*NstlےD)ܘ#((I<.,URPkyC N HN 2DF! xe.6NV-ĐEޭ2 dW5I.9%ƪrQOdKmJRyrWSԉ]L!;ܗ$z82RR[aA7"iTjW?([;Ƅު" R|fplAb qg2BLW4%Ŷծ~/"4IVRW6]Rq.Y0P:R:FͿA[u nBEY<ӭXQnxQyJ8J>q\DnXFqGm")-pâA+@Vp>[M w{?dG܂]%]5e7Y1MUU͠ExZ`]$}+ov?>s \[Qupz#`xvW Bm_dLVmf02 Va!3Q9 aچɁvRܩ2Io7<;s[ܩKcdhh( \[AܘضR6'EU|&fXBEzŊaz$*=8{ fm7Zt;3nO@0Dwrf<^Gn77+dƆS!O1cr:` ^ύ{yӿ/qZ!g ZN~ʙjs j,W(b0}>lxj[T] ș3{/]O'OFUf^I} +Eh'PK34jQPSX"[YGGɡkY 4J+6U k5>8?KQ27`|92MY=tՠFi7>ulOJSdڍSԝ]} wST$hukP"(QG|xG,s8_ñɭT]/TߡAj(GfȖ9IC9Wm9ju`8f*[roJA]:rgr_ҕ;'peUWnޣWUꆭ!9My7ve?xnj}ixme/HuݕPBicݷ4|g~Y{׎8j⾗&'wӡr%+4ɩܠ|% ?-,1H " =Ғ+җ;K.f’MaKi*fXNg7iUD5C Trn 3V=XL3*LpA+ՖsU̲s 4+1^ԔUWM/ bqуW$A7osNDi CL4FKy+Zբ |KަeȲjpwNFӂՈ@L*VLvJNĶn~lV+s 罐X3XP4&^B6iV8 5vƦendstream endobj 825 0 obj 2896 endobj 826 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 824 0 R >> endobj 827 0 obj <> stream xZolSXYQҐ6PhiP-r6$BƸL"TX}/oϮNl??s * - B&uh*4&ms߳^P=w~"7qxaGC{;OHhpGci~P#%>c?uA P[|=Lxx`wq|+ڞǟgOSE9 ޅ8㹡G^jH;{WSŷUK"_7ӍPn^R_Vx]W~"޽_D!W_0dwFg{ۯ}áAS}UDw#?,}DIz}0oRZ7beףvb4Kh%] fpJeǮVIUKi];!Հ+ Ix2 Ze5֋gln,UbR6;g'v|S6(;`=vdflO |GeI _M%mEP~Q ds0(y*g٨X7+g3;@ʩ/ ,wHRD(h#L97ʾMO^gU%>*G:6%$‰#ɱI (Lb@V?}'ESN}"]b!q-γ`x k.^l^Њ]t'Wgl>竁B+hT -]D 5I8zM{99Ux@:ubU?Z/Ugg왺o݀?9@n& fx|ҿv0촭M:q'C,FLxa/-77eB 뺼әz4{n,{rvd4|J86O<=*p:HCF #`yVA ֫Lvw=}픑zs TRExf Vo2hWͼĶ+.N466#V8Iuj[V(؛8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抦 ;űpLMםH G񝛯鉇'6saiHĶ7s:.xLƋ/Yw*1we͝vJM \_z1=C;ܙ,=)J;BK־JN;=X ubQ/_" 17]rʫ+k\R3r4SBͻ>XDT.^Oq'5gK09S0Unfa_Zn`YlH6 ˩R֥HR@7+kU /),9^:ﭭUn4G"wْs=һNnTio!&fφma{pLߎOwqK"| iȅӜEbfZQWf9^\/BT#(PWĦ4LIn_ ^`5O -&9aP ?]H ߅f ǂa<,EQHȍUݾ(1~9^&by3m} S"r_mӼU .*u8JK5"h6>Oɉ\8ܑ&$m(` hZw̿冗 (y 7|NY/ ^Z=δSHdPce7L@gR%VBM]i|:H[Lm]qUoi0Ћ3ǿn}UIL__cXA,asD\R[f˩+/Nybkp LFff6` 1P؀LMA"ūcl :hSF5Scdל*<ɍG*RsjQ5Sv ENDe#B]cbMLBs.4ŕ7֭UKQ/\0bUzga ^9es) WITB0ϴK.;iFRa(JR|  y=}c)N 5m0mItcUŜ,II45++&QKZP.T5VYfx]RNpl#owdL>_d| A ;D>̻tWf>3Q um{H`=Epw`pyh @:5Ŕ)vlݛ]PMN59dSMح"rm02%9 A!!<L~L(GLR^7`ۄ=YL(3c(Pj(mE9{}/r3 "(2X!V[֛lVn95$Fx[?מ;pT5Az/a+YdyP[NMA宲 qA:ƸgSm!V8a<2赔RC\a4=ˡũpTT4G=tm1ϋ 30:8Q1?@U"ʝwA#sgF;3^ԅ53 >1 NY sو{W7UrnKErW6fJeB˳eŕሆѽݕM lbq85;\Оgqᰱәo}ٜxj ڧLn=9mLendstream endobj 833 0 obj 2506 endobj 834 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 832 0 R >> endobj 835 0 obj <> stream xYkh[g1[f-Y8YUrnґadI2ckBHϤ4*f'Eǚ6Xp6(۟6(+X0Bk9R*Nؒ+!}P@B=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IMˉX"OoK|yP"s18b@6U90 E[}&[ ac iΠ?-ܼ ]]G45f])O/Hˌ 6m/R;!խi* > OA'L! CϤ!Q5,쓆$O;"ɓG&9ڨwfuaz1yx\EYk ʇR9:tBnޚE% ES}UdmD%h"A2RT4S`r*VuZ;j_e 9-t7mz[Fcrj Hz%kz$k`?$)endstream endobj 845 0 obj 3813 endobj 846 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 844 0 R >> endobj 847 0 obj <> stream xY]lWt,J%*,N ޹3;c̦uf[*6 5NӟͬEjv'Bk[F(ӧR E(r_@OpνwsMBU{9}9SP룭*=>}GZy[/VL+q3_ u#nn* '>t7zppq;{3!5V .L$<N0pp5MHZ&JRWҍP*6/WYoHX\,< -{]]W%47S;sbby痤>qbp[{w}Y\CR7ayf+{#J?DQ*]M( R1q#Sc }{ѳ ~;Z{Z{[7:KLԙ p(Й*TZa(II$Xjo)02z8_FNԸ-.1Tv1lSq$jf{emO6N,dMK5g"3}-4AZ2wCamS%Nj#(+:~gw}I:;)3]ZpaRZ>=_Ֆ)sMr)ٖ|RQkmܠTtk qK磕puJf-ƶ_Spt_O]`; p`|v5.L'V fzlvX!P}DnR7z# :nTX2v ΪF {ivNN u_p%޵O2SӥmbG/_OUc3$7Dyǟ<{5wϜ8+,MS"P¥v,DRSQOi=KZ|=v:bQȝ”' sԸʉ-:7?lnss@Vo- ?6C9 BP6 Z(HG~!j(qywBhc ;f7)&q^Lr@G* qrc'hP ,fk`훏wgS;!Q) ր<,-]x%% XH#du P/H>E-"#K03dɩ1"do"@CA蛽\=b#4HB#+R+sJLNKY$mova/֕:EfB*4zkS{,v,[ lzkDj< UB>I^OKNdόis{8f2(g,a99ȬF%n~_Hc/ڜ (HtGXwV0+6$08lGJ s;k kqq3c !״bP gg /p|s}xILx (BDmi73v!vB0<ED@ 3B) f" Q48Nb~qͰTg^hSeUsr4tʋPmn㕰?±`=+*m3i&eb u3M|;X©fm"˴1dI$f t3tȫGe؟7Np<5\@PR$;+6+@ 0Y'ZDqŋRmC=B)[2D=;H0#fC"CDO>t.*mN 1Zw==$D7TDN 1 2^Wn neI1՟ 3lS]S|4{:;v@7BI$TjH&9P FMO_ױ[ xendstream endobj 848 0 obj 3045 endobj 857 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 847 0 R >> endobj 858 0 obj <> stream xZolߢ6irTE {wբۀ45Z  m3CfX}ph'j'>PIyܛ:M28{}?k"!)ϡ-<-R}-AÈǻxZu2>s{p!V4>8x➪*rV.wuwHvw5ӅŮZT[A>A71wwQ+auQŻw>ս$(&u>n}'CmOxJ a?[Ս_6z }=p8ЏQdJP 0BLT#N9%#/Rgw87}-[:HQQ%N [,~z=T_'vޅ $~P8e*Je59alpM*ҭsX:XWl벳IЦ3/mOMlT^JLt6@xl#=;^=oK4OAde"617ߵr~6L;3wL OwfE+ʟ/VFl.f o!}tK+Y&Sp?}^}IBk6ro)L/ϱ]xJ=^m ⬭sb/ vl6E#G7?G<\8)Qsh>2sR2[gO荟Pk,qmk&]oȹt}<'t4>mj.2HerEsFx$Rk~]{ ^)>C{ppj~/ ԑ_? ߡL<69$Jl݂sim $):}cu!9)mCXys'7h\g ?a&j3@tMs?*߃endstream endobj 859 0 obj 3252 endobj 860 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /R631 631 0 R /C 467 0 R /R432 432 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 858 0 R >> endobj 861 0 obj <> stream xYml[g.ER%I\jY׾vٴ5M<U4eYV8]>Xv]^$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,`W>ux\9{ Z:zKG$+h/| (t~ݟ\|%?:HS!k T!mhCC0UD >KQ n80w֟9:D&2 'Zz€nS6W\rV! pm{3991+1 1,lУ{ra "$C\ `ryWO? SdrxAZD$jO4tUP ڮ.V?WJwnQTEWDkf(ҟL4~@6JcPwc/c*@8i0$hM|Y3 AB)b < }C\H\\ DT5 rEy44fi͚L`lǓ a w_^Hն/z/xFaF`]TJ1"4 ]P Ku`uҎk(/ҳxBs8Yv38 UHE t!m`脏#RE-SO]WgtW_X驦'gY+Ѧ̋pGq{K|j.JS-`K@(yҼJ<$f%t~OwN-Wv=#g܍҅{v9 Fx֮g҈p1o WHw,Xcta)L]=nENM D5lɱz%# Vka- ehqΡ*pjc!(>+STLgVc'%ӜSp6j Jh5SYO?8{>6;q !lռi5,ӱn~RZ{Tu(g`+M+J=nv=F\Vc YYstWR=MTLANLunWLͿ`[זrx!_?WZX+T 1O8PYvf4\"ץ8TONۀYtpC?uF^eX0p@OwEFX\10@h$̳Ӯ[S7هNh9iݨ$mCrNaݤxD7l$$9z'ӗ ιWT 0jLc(A;]͜~69Sm+S|,E.@"BG7zkJW&"tuo/CpdeƟƾbU0endstream endobj 890 0 obj 3863 endobj 894 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /C 467 0 R /R341 341 0 R /B 266 0 R /A 4 0 R >> >> /Contents 889 0 R >> endobj 895 0 obj <> stream xYolSo Eeҵyef)ձ?4:B52-x)fLʼHVmCT-/vFFŸ)@$|ڍkTeÖ|sߟ8I`R;{~s~˱>g~k}u#c1ջ៷ZS=G+9|_zy\PY?JF~9՜s<1ɰTϏ sf/۝D v8IFc\:^; Ω!ajv@1'(6/#4_9*O{eʀNj"{Ϝ[ Yl}wqěʤEkE*{C80`#`( 'A$z_f8y_`oc/ Fzs>Wb|׏`50?n].eWt̬J(BBQVz{pTx *L*4>d3-Ig<`AyOz4?1'z ? _M6{b=.wXJl΍w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9uendstream endobj 896 0 obj 2915 endobj 897 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /C 467 0 R /B 266 0 R /A 4 0 R >> >> /Contents 895 0 R >> endobj 898 0 obj <> stream xVaheK:^Sd ^KRٮqIktQcAp2e?B.\V6m6nS`Y" J 7'? r~|pbKҧ- ؔz4gN(4e:؉B(",Io.X+pÇS_.ToK_UT6p cR6"d0+^ <Y|i9UfvmQ+zתum~j7a+,5\F20Z e8ް42 klP}X!)Jn̼F=A1PLby[S&Sp ˫Cu Mi+7WwSdm sK=W~"; Glbe E[q~7KMNR;nӖlF}4b-OP(L-n֯!X)C5cc.پݤxܿ语[%kWgW8PSxiz#;^8׵"aeDor:jiOe9P>%9hX;=4/ &R<"`'ч,9%~=X; LS*noin)a^v@WHks irn 2΍HKv> >> /Contents 898 0 R >> endobj 901 0 obj <> stream xYkeSK}ӣdʠ֦H52/tP N_8\.@045Z;3+_^ _r~PJ||?%y敺zVma+`=>F">zma>T#\}&`o_5!#aĿ/GZ*7ՆtI=-ܑ#jVh@`Eꆢl' J?GA(S2)6#;9!ʼnQCR6ѤT{g}rLcRgK|&`;o4I8jϣy c\F=dxUj"[ (C|q; Tn9)/O/>1 Ƽ7+G*ޓov?j*2Ch%Py FQ:2;GLduqUѱD Wraޓ[/V.(1]am/. l=:+tă\ fa4$IJlވ*يk6hbNrL6o'V9nG(eq%?]|M)L0y=2egEJYb]H:bׇȘ}XC6bEy5BZ\*phtXTnq$ f%~4[#J/}I6'U&:dPxVLKAEپ'US.])-l\1~W Kƍl8`E /4Yݟ5 Y\aPn68%2[w/5̶L7gYA'#l/(K;D~\70uƄZ7)f" (x<Ce[F_;I_ Xm+*R25۪!WugZޕwQݲ$; N1ATJt)VTxaAuT.uДUJnI4Ije=S!cXDti{v>@J ڼt腚P`8hn5͑%3Mt͗鷟d5r¬ρ= ʪRT+vl z\=fV"ﰅJ005tCP =X" H7ب[iSc`3B_?tȍDpl 6ki,x׆~*WTU,^$QI"88,kا}F&,qtPwee GWI=bN?"iԥ̐ܥѾJxL ,t.D=Ü>C Vֲ좘Y'-(xJ¢EnZhE7=^Ljy]G;mZ H[k [L\#nqcaP}`On/CݟnˤodeƢh?~7L%mb{8ꋋ0}Sc;*E*w% ⴇ O!ngIlNj%Z6vijYWIop2`f2{IJ5endstream endobj 902 0 obj 1778 endobj 904 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /C 467 0 R /B 266 0 R /A 4 0 R >> >> /Contents 901 0 R >> endobj 905 0 obj <> stream xZ_hSWF|> /qQ4:kԵξ9W9.rCv%5oEٮNZZL{ ͝s$ν97qI9|sp1>.//8θ;\ڏ<3 }'&OMgO>5}ꭙO܃t)_`y lxTܷZSzNNiFA1ռT}|pϯO۬6|9 l Xۣ쥋ƾ>>w@pTc5:YtC`XH.W7WYbc`0A,~炘Uj˔ PD%(l1[&/cgm%}n.SJI1X7NSVޒHemd:]7nhe)YV QղA].K[\4 Զm Tb7;'<+Ɖ H0LF)k`ůu)/Stsh+@`fdfD}VOC_&z3ϙhJ>7W-Gz34U\X&p!K QƐU%[KjD)=$=w**Qop&ZTM%q%5+/T{P {V#ڕ|V=1o$6!z"ٱ 9ÎrV-|1H$U6KΠ=5)"R E C01J7G:!jªZI꾓/TڬJ_9}s'x`Q6x-7$!z%JO [ƌu!x x:0:|_},` u)_|qB![Qh:NOF2#; |Ӄe U"jt%5+mzo$R!£Gch/|p; :'IMB%利 *=,ef3'xpVC5WQrST}^ԮMd,HvVd~<! 8|r05tQ 9~` 4u~S%m+e#PK.ev&d^xbމwDA/)ʕendstream endobj 906 0 obj 2003 endobj 907 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /D 712 0 R /C 467 0 R /B 266 0 R /A 4 0 R >> >> /Contents 905 0 R >> endobj 908 0 obj <> stream xVMh`qAWƠ;%$v۩UvCƶD$Ղ^#T<1XOm}I%"{}_vBV?bX&dc1|Q5 >& UzN 0zGgál,]>!\NG[ Q5O/wkݷik#Jݺ{l=^=VOEZ/A Єi$; 4~: )[i)oJ)q- E"f1bۘBhAA5TZiv2џjJ.DV, (yHKdBX-y4-' =7Qj†*(^V;~ czt.U*cbzrji[fygJ4gdYܐ|-IӻBb؏$^;$ɲUфw 6VY>J :m&1 &̝flv ZZ$]S/Y@q jYDUzl+D(UiZVQ!sX=Έl-TVhey8k}ι8jG3iuD'EӸn,} KZ_dh+z`^)Jt^ݶ 0J2Zޖ\Y@^8qTt.CA X6y2C>9ٚ߱ԋBn ,5f*#f飭^5)^H.k_(endstream endobj 909 0 obj 895 endobj 910 0 obj << /Type /Page /MediaBox [0 0 595 842] /Parent 2 0 R /Resources << /ProcSet [/PDF /ImageB /Text] /Font << /C 467 0 R /B 266 0 R /A 4 0 R >> >> /Contents 908 0 R >> endobj 712 0 obj <>/FontBBox[0 -60 140 136]/FontMatrix[1 0 0 1 0 0]/Widths[ 0 73 75 0 0 86 0 78 0 52 0 47 70 0 24 0 145 0 33 0 0 25 0 0 0 144 0 50 0 84 0 49 0 0 0 0 43 0 0 91 46 63 0 37 88 0 56 118 0 45 101 68 0 0 51 0 87 0 89 0 0 0 81 0 62 0 0 121 0 94 0 107 0 130 106 90 0 0 0 115 0 0 83 0 48 0 76 0 0 40 39 38 0 53 0 55 54 0 80 0 125 74]>> endobj 631 0 obj <> endobj 686 0 obj <> endobj 538 0 obj <> endobj 596 0 obj <> endobj 467 0 obj <>/FontBBox[0 -94 123 132]/FontMatrix[1 0 0 1 0 0]/Widths[ 0 0 46 0 54 0 103 0 68 0 89 0 0 53 0 55 0 50 0 52 0 104 58 0 0 0 105 0 109 0 49 0 59 0 56 48 102 111 0 47 51 106 67 62 0 65 86 0 0 76 0 0 0 32 0 0 0 0 57 0 0 101 88 0 0 0 0 0 0 0 0 98 45 107 0 100 99 60 0 71 0 0 0 0 0 108 0 0 0 0 117 0 0 0 0 0 37 38 96 114 93 95 0 113 39 63 90 0 0 61 0 0 85 0 0 36 0 92 0 80 0 81 78 0 34 73 0 72 74 70 0 69 0 0 110 75 0 97 77 0 33 0 112 0 0 0 0 27 0 0 0 0 149 0 0 118 0 0 0 0 66 0 0 0 0 0 0 0 0 115 0 0 0 0 0 0 0 124 0 0 0 128 0 0 0 0 0 0 0 0 0 148 0 79 0 42 0 0 0 0 26 145 0 25 146 0 116 0 0 87 0 82 0 0 0 0 83 0 84 0 0 0 0 31 0 30 0 0 0 0 0 43 0 0 0 0 41 0 0 0 0 0 0 44 0 0 0 0 0 0 0 0 0 0 0 0]>> endobj 432 0 obj <> endobj 437 0 obj <> endobj 341 0 obj <> endobj 386 0 obj <> endobj 266 0 obj <>/FontBBox[0 -84 118 114]/FontMatrix[1 0 0 1 0 0]/Widths[ 0 0 0 71 0 76 0 93 77 0 0 150 0 80 0 32 0 63 0 126 127 0 0 81 0 78 0 87 0 44 0 0 0 0 65 0 0 43 0 0 66 38 0 0 64 0 97 0 74 0 107 0 62 0 98 72 0 0 0 36 0 0 49 0 56 50 0 45 41 42 55 0 0 34 0 58 0 0 30 0 33 0 27 60 75 94 96 48 57 0 0 0 0 52 0 67 0 99 0 0 0 54 112 0 111 0 102 0 146 73 0 0 69 106 39 37 68 0 0 46 28 0 47 0 51 0 0 0 0 0 0 0 53 0 0 0 40 0 0 0 61 0 0 84 0 0 26 82 0 0 0 0 0 113 108 0 90 0 0 0 0 0 0 0 59 0 0 0 31 95 120 0 117 0 35 0 0 89 119 0 0 0 88 0 0 110 0 83 0 0 0 0 0 79 0 0 29 0 0 0 0 0 0 85 0 0 0 92 0 0 0 0 86 0 0 100 101 0 0 0 0 24 0 0 103 70 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 122 0 0 0 0 0 0 0 0 0]>> endobj 4 0 obj <>/FontBBox[0 -70 127 125]/FontMatrix[1 0 0 1 0 0]/Widths[ 0 0 89 0 71 0 91 0 40 0 0 146 77 0 85 94 0 0 100 90 0 130 115 0 70 51 0 72 62 0 48 0 0 58 0 59 0 46 0 92 0 0 65 33 0 86 0 82 0 52 0 45 0 35 0 0 105 0 76 0 0 0 0 47 0 99 0 0 79 0 34 104 0 64 0 28 0 0 0 37 0 74 0 75 0 44 0 0 109 68 0 0 73 0 108 69 0 0 0 87 0 88 0 43 0 0 119 0 0 0 80 0 0 145 0 0 0 0 0 0 63 0 50 0 0 32 0 0 0 0 0 0 55 0 78 0 0 56 0 0 0 27 0 125 0 0 24 0 149 0 38 0 0 0 41 0 39 57 0 0 42 83 0 84 0 0 36 0 49 0 0 0 0 29 54 0 0 60 31 26 113 0 81 0 0 128 0 0 148 67 53 0 0 25 124 103 0 0 0 0 0 0 0 0 0 0 102 0 0 66 106 0 0 0 0 0 0 144 0 132 61 147 0 150 0 98 0 0 137 133 0 0 0 134 0 0 0 0 97 0 0 0 0 136 0 143 0 0 0 95 122 116 101 120 0 0]>> endobj 2 0 obj << /Type /Pages /Kids [ 84 0 R 270 0 R 283 0 R 343 0 R 375 0 R 395 0 R 420 0 R 427 0 R 438 0 R 498 0 R 516 0 R 532 0 R 542 0 R 556 0 R 566 0 R 583 0 R 590 0 R 593 0 R 597 0 R 613 0 R 617 0 R 622 0 R 632 0 R 636 0 R 649 0 R 655 0 R 661 0 R 665 0 R 669 0 R 678 0 R 687 0 R 691 0 R 695 0 R 699 0 R 714 0 R 720 0 R 723 0 R 728 0 R 731 0 R 734 0 R 741 0 R 744 0 R 750 0 R 753 0 R 756 0 R 759 0 R 762 0 R 766 0 R 769 0 R 772 0 R 775 0 R 778 0 R 781 0 R 784 0 R 787 0 R 796 0 R 802 0 R 805 0 R 808 0 R 811 0 R 814 0 R 820 0 R 823 0 R 826 0 R 831 0 R 834 0 R 839 0 R 843 0 R 846 0 R 857 0 R 860 0 R 864 0 R 867 0 R 870 0 R 879 0 R 884 0 R 888 0 R 894 0 R 897 0 R 900 0 R 904 0 R 907 0 R 910 0 R ] /Count 83 >> endobj 1 0 obj << /Type /Catalog /Pages 2 0 R >> endobj 911 0 obj << /CreationDate (D:20000815203027) /Producer (GNU Ghostscript 5.50) >> endobj 3 0 obj <> endobj 5 0 obj <> stream 0 0 0 0 89 118 d1 89 0 0 118 0 0 cm BI /IM true/W 89/H 118/BPC 1/F/CCF/DP<> ID %MB j__ o$C( ?zPLH EI endstream endobj 8 0 obj <> stream 0 0 0 41 61 120 d1 61 0 0 79 0 41 cm BI /IM true/W 61/H 79/BPC 1/F/CCF/DP<> ID &C DAC 7>oIA[}/ k_P w\:\5K 8!~@  EI endstream endobj 9 0 obj <> stream 89 0 0 0 0 0 d1 endstream endobj 10 0 obj <> stream 0 0 0 42 80 118 d1 80 0 0 76 0 42 cm BI /IM true/W 80/H 76/BPC 1/F/CCF/DP<> ID &ԃNMap׶V(_m/ @:  EI endstream endobj 11 0 obj <> stream 71 0 0 0 0 0 d1 endstream endobj 12 0 obj <> stream 0 0 0 4 31 118 d1 31 0 0 114 0 4 cm BI /IM true/W 31/H 114/BPC 1/F/CCF/DP<> ID &&Xk / ?l,P EI endstream endobj 13 0 obj <> stream 91 0 0 0 0 0 d1 endstream endobj 14 0 obj <> stream 0 0 0 43 82 118 d1 82 0 0 75 0 43 cm BI /IM true/W 82/H 75/BPC 1/F/CCF/DP<> ID )ɩ, ðްu޶ t\6Koh.zkK m,:]V\. zzDzO7 7 7`Ae "@ EI endstream endobj 15 0 obj <> stream 40 0 0 0 0 0 d1 endstream endobj 16 0 obj <> stream 0 0 0 0 127 118 d1 127 0 0 118 0 0 cm BI /IM true/W 127/H 118/BPC 1/F/CCF/DP<> ID &YOi ,5k(M[7oX Ioa [&L?oIa ?bL EI endstream endobj 17 0 obj <> stream 0 0 0 41 70 120 d1 70 0 0 79 0 41 cm BI /IM true/W 70/H 79/BPC 1/F/CCF/DP<> ID & < h<&D =C'?L4-zQj7߰0upc AT U[iv al@b 7D@ EI endstream endobj 18 0 obj <> stream 146 0 0 0 0 0 d1 endstream endobj 19 0 obj <> stream 77 0 0 0 0 0 d1 endstream endobj 20 0 obj <> stream 0 0 0 42 80 120 d1 80 0 0 78 0 42 cm BI /IM true/W 80/H 78/BPC 1/F/CCF/DP<> ID &C?0^AA> o<- n~WrP#m_  EI endstream endobj 21 0 obj <> stream 85 0 0 0 0 0 d1 endstream endobj 22 0 obj <> stream 94 0 0 0 0 0 d1 endstream endobj 23 0 obj <> stream 0 0 0 -2 33 118 d1 33 0 0 120 0 -2 cm BI /IM true/W 33/H 120/BPC 1/F/CCF/DP<> ID &&Xk/* @ EI endstream endobj 24 0 obj <> stream 0 0 0 -2 79 120 d1 79 0 0 122 0 -2 cm BI /IM true/W 79/H 122/BPC 1/F/CCF/DP<> ID &H ?.2ADL #@AAAh Å߬xH0O/Kxav=5 0` Ax0 .AT3d@ EI endstream endobj 25 0 obj <> stream 100 0 0 0 0 0 d1 endstream endobj 26 0 obj <> stream 90 0 0 0 0 0 d1 endstream endobj 27 0 obj <> stream 0 0 0 0 109 121 d1 109 0 0 121 0 0 cm BI /IM true/W 109/H 121/BPC 1/F/CCF/DP<> ID &x' xgOPAcx[OrjD` 5/ |/_K/K2T6@e~A_ ?!aa |/_K/K V!""&V@ EI endstream endobj 28 0 obj <> stream 130 0 0 0 0 0 d1 endstream endobj 29 0 obj <> stream 115 0 0 0 0 0 d1 endstream endobj 30 0 obj <> stream 0 0 0 -3 51 118 d1 51 0 0 121 0 -3 cm BI /IM true/W 51/H 121/BPC 1/F/CCF/DP<> ID &l,5 B2c=O~~kl?X` g EI endstream endobj 31 0 obj <> stream 70 0 0 0 0 0 d1 endstream endobj 32 0 obj <> stream 51 0 0 0 0 0 d1 endstream endobj 33 0 obj <> stream 0 0 0 42 53 118 d1 53 0 0 76 0 42 cm BI /IM true/W 53/H 76/BPC 1/F/CCF/DP<> ID &%[ a? o[ xw+%`c EI endstream endobj 34 0 obj <> stream 72 0 0 0 0 0 d1 endstream endobj 35 0 obj <> stream 62 0 0 0 0 0 d1 endstream endobj 36 0 obj <> stream 0 0 0 41 61 120 d1 61 0 0 79 0 41 cm BI /IM true/W 61/H 79/BPC 1/F/CCF/DP<> ID &C K C @ &oW\++kAO?߿ v %0Da/! EI endstream endobj 37 0 obj <> stream 48 0 0 0 0 0 d1 endstream endobj 38 0 obj <> stream 0 0 0 0 48 85 d1 48 0 0 85 0 0 cm BI /IM true/W 48/H 85/BPC 1/F/CCF/DP<> ID &^B'#=`zM'訽p~7x EI endstream endobj 39 0 obj <> stream 0 0 0 28 51 84 d1 51 0 0 56 0 28 cm BI /IM true/W 51/H 56/BPC 1/F/CCF/DP<> ID &4|0<-oM ްo[[;__kio_ a- !ax EI endstream endobj 40 0 obj <> stream 58 0 0 0 0 0 d1 endstream endobj 41 0 obj <> stream 0 0 0 28 38 84 d1 38 0 0 56 0 28 cm BI /IM true/W 38/H 56/BPC 1/F/CCF/DP<> ID 0$< zÈ ap_uAY py  @ ^j P_d5ȁx20O EI endstream endobj 42 0 obj <> stream 59 0 0 0 0 0 d1 endstream endobj 43 0 obj <> stream 0 0 0 4 44 84 d1 44 0 0 80 0 4 cm BI /IM true/W 44/H 80/BPC 1/F/CCF/DP<> ID & "A &ޗZ_&kXa m\ ?; =o X0 EI endstream endobj 44 0 obj <> stream 46 0 0 0 0 0 d1 endstream endobj 45 0 obj <> stream 0 0 0 0 64 82 d1 64 0 0 82 0 0 cm BI /IM true/W 64/H 82/BPC 1/F/CCF/DP<> ID &?4!> cO P@ EI endstream endobj 46 0 obj <> stream 92 0 0 0 0 0 d1 endstream endobj 47 0 obj <> stream 0 0 0 29 57 84 d1 57 0 0 55 0 29 cm BI /IM true/W 57/H 55/BPC 1/F/CCF/DP<> ID &CAa<3 o OZ]W A5A  EI endstream endobj 48 0 obj <> stream 0 0 0 1 26 82 d1 26 0 0 81 0 1 cm BI /IM true/W 26/H 81/BPC 1/F/CCF/DP<> ID j)@_5L/ EI endstream endobj 49 0 obj <> stream 65 0 0 0 0 0 d1 endstream endobj 50 0 obj <> stream 33 0 0 0 0 0 d1 endstream endobj 51 0 obj <> stream 0 0 0 -2 72 85 d1 72 0 0 87 0 -2 cm BI /IM true/W 72/H 87/BPC 1/F/CCF/DP<> ID &t  8< 3 @&o_I&|$ ސ}~I ?_kao[\50 W 4p EI endstream endobj 52 0 obj <> stream 86 0 0 0 0 0 d1 endstream endobj 53 0 obj <> stream 0 0 0 28 44 84 d1 44 0 0 56 0 28 cm BI /IM true/W 44/H 56/BPC 1/F/CCF/DP<> ID & "A &ޗZ_&kXa m\ @ EI endstream endobj 54 0 obj <> stream 82 0 0 0 0 0 d1 endstream endobj 55 0 obj <> stream 0 0 0 -1 57 84 d1 57 0 0 85 0 -1 cm BI /IM true/W 57/H 85/BPC 1/F/CCF/DP<> ID &N>D?h0A7a}?_v&/a dᣏQ0 EI endstream endobj 56 0 obj <> stream 52 0 0 0 0 0 d1 endstream endobj 57 0 obj <> stream 0 0 0 29 39 82 d1 39 0 0 53 0 29 cm BI /IM true/W 39/H 53/BPC 1/F/CCF/DP<> ID A?&=~C?Ѣa=5BN  EI endstream endobj 58 0 obj <> stream 45 0 0 0 0 0 d1 endstream endobj 59 0 obj <> stream 0 0 0 5 53 84 d1 53 0 0 79 0 5 cm BI /IM true/W 53/H 79/BPC 1/F/CCF/DP<> ID &DxDa l#KQM?O=߆3S!&@y[AxU\a\^,,a` [P EI endstream endobj 60 0 obj <> stream 35 0 0 0 0 0 d1 endstream endobj 61 0 obj <> stream 0 0 0 29 57 82 d1 57 0 0 53 0 29 cm BI /IM true/W 57/H 53/BPC 1/F/CCF/DP<> ID $&k.6p &C'  EI endstream endobj 62 0 obj <> stream 0 0 0 0 68 82 d1 68 0 0 82 0 0 cm BI /IM true/W 68/H 82/BPC 1/F/CCF/DP<> ID &Ț@|>P ?߆_}xAz_ (AC` EI endstream endobj 63 0 obj <> stream 105 0 0 0 0 0 d1 endstream endobj 64 0 obj <> stream 0 0 0 28 53 84 d1 53 0 0 56 0 28 cm BI /IM true/W 53/H 56/BPC 1/F/CCF/DP<> ID &DxDa l#KQM?O=߆3S!&@y[AxU\a\^,( EI endstream endobj 65 0 obj <> stream 76 0 0 0 0 0 d1 endstream endobj 66 0 obj <> stream 0 0 0 28 54 108 d1 54 0 0 80 0 28 cm BI /IM true/W 54/H 80/BPC 1/F/CCF/DP<> ID &A6| =>z o.Kz!\Ap B)uGL8#P(>H {7&av/^ +Ma7$ EI endstream endobj 67 0 obj <> stream 0 0 0 4 57 84 d1 57 0 0 80 0 4 cm BI /IM true/W 57/H 80/BPC 1/F/CCF/DP<> ID &CAa<3 o OZ]W A5A10`OX 5@@ EI endstream endobj 68 0 obj <> stream 0 0 0 0 80 85 d1 80 0 0 85 0 0 cm BI /IM true/W 80/H 85/BPC 1/F/CCF/DP<> ID *+&u CP%[PU\=kK^_l2]z5u޿k i_P EI endstream endobj 69 0 obj <> stream 0 0 0 9 37 84 d1 37 0 0 75 0 9 cm BI /IM true/W 37/H 75/BPC 1/F/CCF/DP<> ID &O?t?jd0" EI endstream endobj 70 0 obj <> stream 47 0 0 0 0 0 d1 endstream endobj 71 0 obj <> stream 0 0 0 3 47 82 d1 47 0 0 79 0 3 cm BI /IM true/W 47/H 79/BPC 1/F/CCF/DP<> ID &= f{o7{}o= >oO7 ]XzimX0 EI endstream endobj 72 0 obj <> stream 99 0 0 0 0 0 d1 endstream endobj 73 0 obj <> stream 0 0 0 3 49 85 d1 49 0 0 82 0 3 cm BI /IM true/W 49/H 82/BPC 1/F/CCF/DP<> ID &3.=X=&Oo[o\=]Xad4  EI endstream endobj 74 0 obj <> stream 0 0 0 0 82 85 d1 82 0 0 85 0 0 cm BI /IM true/W 82/H 85/BPC 1/F/CCF/DP<> ID &`5?EG^O>[VP?^ׅ}o߅>~&0O?BA@ EI endstream endobj 75 0 obj <> stream 79 0 0 0 0 0 d1 endstream endobj 76 0 obj <> stream 0 0 0 5 51 84 d1 51 0 0 79 0 5 cm BI /IM true/W 51/H 79/BPC 1/F/CCF/DP<> ID &4|0<-oM ްo[[;__kio_ a- !a|.{x}{ EI endstream endobj 77 0 obj <> stream 34 0 0 0 0 0 d1 endstream endobj 78 0 obj <> stream 104 0 0 0 0 0 d1 endstream endobj 79 0 obj <> stream 0 0 0 70 13 82 d1 13 0 0 12 0 70 cm BI /IM true/W 13/H 12/BPC 1/F/CCF/DP<> ID &Mu` EI endstream endobj 80 0 obj <> stream 64 0 0 0 0 0 d1 endstream endobj 81 0 obj <> stream 0 0 0 1 52 85 d1 52 0 0 84 0 1 cm BI /IM true/W 52/H 84/BPC 1/F/CCF/DP<> ID &f~a}~ݾߋ EI endstream endobj 82 0 obj <> stream 28 0 0 0 0 0 d1 endstream endobj 83 0 obj <> stream 0 0 0 0 34 66 d1 34 0 0 66 0 0 cm BI /IM true/W 34/H 66/BPC 1/F/CCF/DP<> ID &l/='} EI endstream endobj 85 0 obj <> stream 0 0 0 0 43 87 d1 43 0 0 87 0 0 cm BI /IM true/W 43/H 87/BPC 1/F/CCF/DP<> ID #aI&a?(߿fF`H $3| |@ EI endstream endobj 88 0 obj <> stream 0 0 0 18 79 87 d1 79 0 0 69 0 18 cm BI /IM true/W 79/H 69/BPC 1/F/CCF/DP<> ID !7~5"@ip`O<}_+K_/ |w~R EI endstream endobj 89 0 obj <> stream 37 0 0 0 0 0 d1 endstream endobj 90 0 obj <> stream 0 0 0 18 72 87 d1 72 0 0 69 0 18 cm BI /IM true/W 72/H 69/BPC 1/F/CCF/DP<> ID %`BpB@߆lo}~~{ pin^Ld*\ EI endstream endobj 91 0 obj <> stream 74 0 0 0 0 0 d1 endstream endobj 92 0 obj <> stream 0 0 0 18 43 87 d1 43 0 0 69 0 18 cm BI /IM true/W 43/H 69/BPC 1/F/CCF/DP<> ID #aI&a?(߿ EI endstream endobj 93 0 obj <> stream 75 0 0 0 0 0 d1 endstream endobj 94 0 obj <> stream 0 0 0 16 67 90 d1 67 0 0 74 0 16 cm BI /IM true/W 67/H 74/BPC 1/F/CCF/DP<> ID & 0D@exEC = o} ޓ[†~}7{AV8w\7{. 50|=> $ Sd8 EI endstream endobj 95 0 obj <> stream 44 0 0 0 0 0 d1 endstream endobj 96 0 obj <> stream 0 0 0 18 68 87 d1 68 0 0 69 0 18 cm BI /IM true/W 68/H 69/BPC 1/F/CCF/DP<> ID +a058p?@m?k'owC(B EI endstream endobj 97 0 obj <> stream 0 0 0 16 68 90 d1 68 0 0 74 0 16 cm BI /IM true/W 68/H 74/BPC 1/F/CCF/DP<> ID &\ R~ D\" o?Ǥ_I?a> stream 109 0 0 0 0 0 d1 endstream endobj 99 0 obj <> stream 68 0 0 0 0 0 d1 endstream endobj 100 0 obj <> stream 0 0 0 18 71 90 d1 71 0 0 72 0 18 cm BI /IM true/W 71/H 72/BPC 1/F/CCF/DP<> ID &ph,?0 НzMɨ@o;߿ץAx]_0H9 oׯ/ AP ȸ7 EI endstream endobj 101 0 obj <> stream 0 0 0 15 68 87 d1 68 0 0 72 0 15 cm BI /IM true/W 68/H 72/BPC 1/F/CCF/DP<> ID %߹50D35ȓka5w?aw,?koLJ~@ EI endstream endobj 102 0 obj <> stream 73 0 0 0 0 0 d1 endstream endobj 103 0 obj <> stream 0 0 0 18 60 87 d1 60 0 0 69 0 18 cm BI /IM true/W 60/H 69/BPC 1/F/CCF/DP<> ID $&7 >woK  EI endstream endobj 104 0 obj <> stream 108 0 0 0 0 0 d1 endstream endobj 105 0 obj <> stream 69 0 0 0 0 0 d1 endstream endobj 106 0 obj <> stream 0 0 0 0 50 125 d1 50 0 0 125 0 0 cm BI /IM true/W 50/H 125/BPC 1/F/CCF/DP<> ID `cĉPR??%)0xo}X j  EI endstream endobj 107 0 obj <> stream 0 0 0 60 80 125 d1 80 0 0 65 0 60 cm BI /IM true/W 80/H 65/BPC 1/F/CCF/DP<> ID & JfT׿?)C |2Wb/0A EI endstream endobj 108 0 obj <> stream 0 0 0 25 79 127 d1 79 0 0 102 0 25 cm BI /IM true/W 79/H 102/BPC 1/F/CCF/DP<> ID &t:C`9&&  D`A\RI _H?O\6k0`Ȁ[bipazx*i EI endstream endobj 109 0 obj <> stream 87 0 0 0 0 0 d1 endstream endobj 110 0 obj <> stream 0 0 0 24 35 125 d1 35 0 0 101 0 24 cm BI /IM true/W 35/H 101/BPC 1/F/CCF/DP<> ID &BU+9O=?( EI endstream endobj 111 0 obj <> stream 88 0 0 0 0 0 d1 endstream endobj 112 0 obj <> stream 0 0 0 59 60 127 d1 60 0 0 68 0 59 cm BI /IM true/W 60/H 68/BPC 1/F/CCF/DP<> ID &t F<zF| AoXzO^O_l5ֿֿ~C(? ?߷톶Xaa_C. EI endstream endobj 113 0 obj <> stream 43 0 0 0 0 0 d1 endstream endobj 114 0 obj <> stream 0 0 0 59 62 127 d1 62 0 0 68 0 59 cm BI /IM true/W 62/H 68/BPC 1/F/CCF/DP<> ID &u ^<xAo@7?Af__L`߿ׯ~ ,?m]% Y ` EI endstream endobj 115 0 obj <> stream 0 0 0 25 108 127 d1 108 0 0 102 0 25 cm BI /IM true/W 108/H 102/BPC 1/F/CCF/DP<> ID &S61 1p\Ih\ ap^U\ A N~|}//_/~CYJc x5ɪ~@ kmv4`O@a>CLY a EI endstream endobj 116 0 obj <> stream 119 0 0 0 0 0 d1 endstream endobj 117 0 obj <> stream 0 0 0 60 56 125 d1 56 0 0 65 0 60 cm BI /IM true/W 56/H 65/BPC 1/F/CCF/DP<> ID "GMB?O~u_o66})5  EI endstream endobj 118 0 obj <> stream 0 0 0 59 73 127 d1 73 0 0 68 0 59 cm BI /IM true/W 73/H 68/BPC 1/F/CCF/DP<> ID &Aː_\H qCO ymn!%  ,__ᤸA-*_ @@ EI endstream endobj 119 0 obj <> stream 0 0 0 25 36 125 d1 36 0 0 100 0 25 cm BI /IM true/W 36/H 100/BPC 1/F/CCF/DP<> ID &BUW@ EI endstream endobj 120 0 obj <> stream 80 0 0 0 0 0 d1 endstream endobj 121 0 obj <> stream 0 0 0 0 40 65 d1 40 0 0 65 0 0 cm BI /IM true/W 40/H 65/BPC 1/F/CCF/DP<> ID &H&y  EI endstream endobj 122 0 obj <> stream 0 0 0 -4 37 65 d1 37 0 0 69 0 -4 cm BI /IM true/W 37/H 69/BPC 1/F/CCF/DP<> ID 5 u I EI endstream endobj 123 0 obj <> stream 145 0 0 0 0 0 d1 endstream endobj 124 0 obj <> stream 0 0 0 20 59 65 d1 59 0 0 45 0 20 cm BI /IM true/W 59/H 45/BPC 1/F/CCF/DP<> ID )R@g$ :¶߰av+k MBA  EI endstream endobj 125 0 obj <> stream 0 0 0 1 36 65 d1 36 0 0 64 0 1 cm BI /IM true/W 36/H 64/BPC 1/F/CCF/DP<> ID &@O oP\I;jt EI endstream endobj 126 0 obj <> stream 0 0 0 20 42 65 d1 42 0 0 45 0 20 cm BI /IM true/W 42/H 45/BPC 1/F/CCF/DP<> ID &ɨ`<~h?FbPg@ EI endstream endobj 127 0 obj <> stream 0 0 0 20 50 65 d1 50 0 0 45 0 20 cm BI /IM true/W 50/H 45/BPC 1/F/CCF/DP<> ID &Ap +& }o5kAm a[ !3 EI endstream endobj 128 0 obj <> stream 0 0 0 -5 57 65 d1 57 0 0 70 0 -5 cm BI /IM true/W 57/H 70/BPC 1/F/CCF/DP<> ID &A \D1GA&_W_50`pdžU /C.AG EI endstream endobj 129 0 obj <> stream 0 0 0 20 59 65 d1 59 0 0 45 0 20 cm BI /IM true/W 59/H 45/BPC 1/F/CCF/DP<> ID &\.A:< Wc!ɨI  EI endstream endobj 130 0 obj <> stream 63 0 0 0 0 0 d1 endstream endobj 131 0 obj <> stream 0 0 0 20 43 65 d1 43 0 0 45 0 20 cm BI /IM true/W 43/H 45/BPC 1/F/CCF/DP<> ID &A <,'u> ҽoOP_!k_?א ~o l,΁|@ EI endstream endobj 132 0 obj <> stream 50 0 0 0 0 0 d1 endstream endobj 133 0 obj <> stream 0 0 0 -6 26 65 d1 26 0 0 71 0 -6 cm BI /IM true/W 26/H 71/BPC 1/F/CCF/DP<> ID 5_ ?B'` @ EI endstream endobj 134 0 obj <> stream 0 0 0 -1 50 65 d1 50 0 0 66 0 -1 cm BI /IM true/W 50/H 66/BPC 1/F/CCF/DP<> ID &Ap +& }o5kAm a[ !3 eA [|7_m@@ EI endstream endobj 135 0 obj <> stream 32 0 0 0 0 0 d1 endstream endobj 136 0 obj <> stream 0 0 0 0 50 65 d1 50 0 0 65 0 0 cm BI /IM true/W 50/H 65/BPC 1/F/CCF/DP<> ID &346&~߷oo~~=|>} EI endstream endobj 137 0 obj <> stream 0 0 0 55 12 66 d1 12 0 0 11 0 55 cm BI /IM true/W 12/H 11/BPC 1/F/CCF/DP<> ID &ۂ!MPX0 EI endstream endobj 138 0 obj <> stream 0 0 0 15 37 87 d1 37 0 0 72 0 15 cm BI /IM true/W 37/H 72/BPC 1/F/CCF/DP<> ID &H`D@f="a7 {{o  a EI endstream endobj 139 0 obj <> stream 0 0 0 -5 66 86 d1 66 0 0 91 0 -5 cm BI /IM true/W 66/H 91/BPC 1/F/CCF/DP<> ID &f/ > C,:?4 $`azTa}i>LS~ xQ Oa/h/ ] z a`@@ EI endstream endobj 140 0 obj <> stream 0 0 0 21 50 68 d1 50 0 0 47 0 21 cm BI /IM true/W 50/H 47/BPC 1/F/CCF/DP<> ID &8cAΡ 9A,d_Qh EI endstream endobj 141 0 obj <> stream 0 0 0 1 39 68 d1 39 0 0 67 0 1 cm BI /IM true/W 39/H 67/BPC 1/F/CCF/DP<> ID &8DFb0Iޯp%h j_ׇ_h,=a a_'+>x`{{{ EI endstream endobj 142 0 obj <> stream 55 0 0 0 0 0 d1 endstream endobj 143 0 obj <> stream 0 0 0 20 39 68 d1 39 0 0 48 0 20 cm BI /IM true/W 39/H 48/BPC 1/F/CCF/DP<> ID &8DFb0Iޯp%h j_ׇ_h,=a a_' EI endstream endobj 144 0 obj <> stream 78 0 0 0 0 0 d1 endstream endobj 145 0 obj <> stream 0 0 0 20 32 68 d1 32 0 0 48 0 20 cm BI /IM true/W 32/H 48/BPC 1/F/CCF/DP<> ID 0!_ m8 7_ PU/BX%Z8PD3kkapboN<@ EI endstream endobj 146 0 obj <> stream 0 0 0 -3 57 66 d1 57 0 0 69 0 -3 cm BI /IM true/W 57/H 69/BPC 1/F/CCF/DP<> ID #`cj!4"?N }tl# EI endstream endobj 147 0 obj <> stream 56 0 0 0 0 0 d1 endstream endobj 148 0 obj <> stream 0 0 0 21 50 66 d1 50 0 0 45 0 21 cm BI /IM true/W 50/H 45/BPC 1/F/CCF/DP<> ID &Nis4-[ BQ@ EI endstream endobj 149 0 obj <> stream 0 0 0 -1 22 66 d1 22 0 0 67 0 -1 cm BI /IM true/W 22/H 67/BPC 1/F/CCF/DP<> ID jDkXQ=?0 EI endstream endobj 150 0 obj <> stream 0 0 0 23 50 66 d1 50 0 0 43 0 23 cm BI /IM true/W 50/H 43/BPC 1/F/CCF/DP<> ID #C(;m/]t0]Ktk=yOVoI׬<-d!1 EI endstream endobj 151 0 obj <> stream 27 0 0 0 0 0 d1 endstream endobj 152 0 obj <> stream 0 0 0 -5 37 66 d1 37 0 0 71 0 -5 cm BI /IM true/W 37/H 71/BPC 1/F/CCF/DP<> ID &`D xO a > ?U_ᆁa"  EI endstream endobj 153 0 obj <> stream 125 0 0 0 0 0 d1 endstream endobj 154 0 obj <> stream 0 0 0 -1 45 66 d1 45 0 0 67 0 -1 cm BI /IM true/W 45/H 67/BPC 1/F/CCF/DP<> ID & `57`Bj~~߿߿߿߰߷߿ǿ} EI endstream endobj 155 0 obj <> stream 0 0 0 0 41 66 d1 41 0 0 66 0 0 cm BI /IM true/W 41/H 66/BPC 1/F/CCF/DP<> ID &=a{7߶o ?{}{}OAu[0]X0`a EI endstream endobj 156 0 obj <> stream 24 0 0 0 0 0 d1 endstream endobj 157 0 obj <> stream 0 0 0 -3 84 66 d1 84 0 0 69 0 -3 cm BI /IM true/W 84/H 69/BPC 1/F/CCF/DP<> ID !OɩCb0`i?OOoOMM?c!2\7? EI endstream endobj 158 0 obj <> stream 149 0 0 0 0 0 d1 endstream endobj 159 0 obj <> stream 0 0 0 -1 26 87 d1 26 0 0 88 0 -1 cm BI /IM true/W 26/H 88/BPC 1/F/CCF/DP<> ID &4 0d.d%_'2@k @ EI endstream endobj 160 0 obj <> stream 38 0 0 0 0 0 d1 endstream endobj 161 0 obj <> stream 0 0 0 20 45 68 d1 45 0 0 48 0 20 cm BI /IM true/W 45/H 48/BPC 1/F/CCF/DP<> ID &@13PzMAXz Ow&_K_ m.ް !~( EI endstream endobj 162 0 obj <> stream 0 0 0 21 34 66 d1 34 0 0 45 0 21 cm BI /IM true/W 34/H 45/BPC 1/F/CCF/DP<> ID *8k |a>- `IC  EI endstream endobj 163 0 obj <> stream 0 0 0 20 47 68 d1 47 0 0 48 0 20 cm BI /IM true/W 47/H 48/BPC 1/F/CCF/DP<> ID &IϟFm<,zA矠c7\?~ |ʿ!?w__A K A~A EI endstream endobj 164 0 obj <> stream 41 0 0 0 0 0 d1 endstream endobj 165 0 obj <> stream 0 0 0 21 49 86 d1 49 0 0 65 0 21 cm BI /IM true/W 49/H 65/BPC 1/F/CCF/DP<> ID /85".G? O}x_Kv4 [Rj8` EI endstream endobj 166 0 obj <> stream 39 0 0 0 0 0 d1 endstream endobj 167 0 obj <> stream 57 0 0 0 0 0 d1 endstream endobj 168 0 obj <> stream 0 0 0 20 38 68 d1 38 0 0 48 0 20 cm BI /IM true/W 38/H 48/BPC 1/F/CCF/DP<> ID &8joHxA7}&_}u!ɮ#=|0ݬ0N@ EI endstream endobj 169 0 obj <> stream 0 0 0 5 32 68 d1 32 0 0 63 0 5 cm BI /IM true/W 32/H 63/BPC 1/F/CCF/DP<> ID &A|fo_?$$}  EI endstream endobj 170 0 obj <> stream 42 0 0 0 0 0 d1 endstream endobj 171 0 obj <> stream 83 0 0 0 0 0 d1 endstream endobj 172 0 obj <> stream 0 0 0 -3 66 66 d1 66 0 0 69 0 -3 cm BI /IM true/W 66/H 69/BPC 1/F/CCF/DP<> ID %`\MD$7῿o~ׯ^_^L@ EI endstream endobj 173 0 obj <> stream 84 0 0 0 0 0 d1 endstream endobj 174 0 obj <> stream 0 0 0 -3 32 66 d1 32 0 0 69 0 -3 cm BI /IM true/W 32/H 69/BPC 1/F/CCF/DP<> ID jă @ EI endstream endobj 175 0 obj <> stream 0 0 0 -3 69 69 d1 69 0 0 72 0 -3 cm BI /IM true/W 69/H 72/BPC 1/F/CCF/DP<> ID &l?|}oa~  [A·oa}B~D8Hn@ EI endstream endobj 176 0 obj <> stream 36 0 0 0 0 0 d1 endstream endobj 177 0 obj <> stream 0 0 0 -4 22 66 d1 22 0 0 70 0 -4 cm BI /IM true/W 22/H 70/BPC 1/F/CCF/DP<> ID jDkɨ EI endstream endobj 178 0 obj <> stream 49 0 0 0 0 0 d1 endstream endobj 179 0 obj <> stream 0 0 0 21 78 66 d1 78 0 0 45 0 21 cm BI /IM true/W 78/H 45/BPC 1/F/CCF/DP<> ID ȃ?jDA80PV /a.fo66L4Q / EI endstream endobj 180 0 obj <> stream 0 0 0 -4 49 68 d1 49 0 0 72 0 -4 cm BI /IM true/W 49/H 72/BPC 1/F/CCF/DP<> ID &8c97>(|-| ZA~_ .a]x1^ _eҜ@ EI endstream endobj 181 0 obj <> stream 0 0 0 0 43 69 d1 43 0 0 69 0 0 cm BI /IM true/W 43/H 69/BPC 1/F/CCF/DP<> ID &bB Fz/I }] %렺,.Ap L?]^Kfc\{As@ EI endstream endobj 182 0 obj <> stream 0 0 0 -5 60 69 d1 60 0 0 74 0 -5 cm BI /IM true/W 60/H 74/BPC 1/F/CCF/DP<> ID &C D@c6$Xx A o &}'¿__@am[k0{Da8 EI endstream endobj 183 0 obj <> stream 29 0 0 0 0 0 d1 endstream endobj 184 0 obj <> stream 54 0 0 0 0 0 d1 endstream endobj 185 0 obj <> stream 0 0 0 -4 49 68 d1 49 0 0 72 0 -4 cm BI /IM true/W 49/H 72/BPC 1/F/CCF/DP<> ID &+ao7//u .yi{^ɨ EI endstream endobj 186 0 obj <> stream 0 0 0 -5 34 66 d1 34 0 0 71 0 -5 cm BI /IM true/W 34/H 71/BPC 1/F/CCF/DP<> ID &gfa> EI endstream endobj 187 0 obj <> stream 60 0 0 0 0 0 d1 endstream endobj 188 0 obj <> stream 31 0 0 0 0 0 d1 endstream endobj 189 0 obj <> stream 26 0 0 0 0 0 d1 endstream endobj 190 0 obj <> stream 113 0 0 0 0 0 d1 endstream endobj 191 0 obj <> stream 0 0 0 0 41 69 d1 41 0 0 69 0 0 cm BI /IM true/W 41/H 69/BPC 1/F/CCF/DP<> ID &|W@ >8`/8.. y ^/kh EI endstream endobj 192 0 obj <> stream 81 0 0 0 0 0 d1 endstream endobj 193 0 obj <> stream 0 0 0 0 43 69 d1 43 0 0 69 0 0 cm BI /IM true/W 43/H 69/BPC 1/F/CCF/DP<> ID &1j#3AxX>&} O?[w__4ް ba` EI endstream endobj 194 0 obj <> stream 0 0 0 -1 43 69 d1 43 0 0 70 0 -1 cm BI /IM true/W 43/H 70/BPC 1/F/CCF/DP<> ID &~ao~yPa߿|]@@ EI endstream endobj 195 0 obj <> stream 128 0 0 0 0 0 d1 endstream endobj 196 0 obj <> stream 0 0 0 0 43 69 d1 43 0 0 69 0 0 cm BI /IM true/W 43/H 69/BPC 1/F/CCF/DP<> ID &8/A` [>ҿ_߯+ KB .\1 Mxaxf3m?=?|0Kk ,s@ EI endstream endobj 197 0 obj <> stream 0 0 0 -3 62 66 d1 62 0 0 69 0 -3 cm BI /IM true/W 62/H 69/BPC 1/F/CCF/DP<> ID +oj! C5!/N]0J# EI endstream endobj 198 0 obj <> stream 148 0 0 0 0 0 d1 endstream endobj 199 0 obj <> stream 67 0 0 0 0 0 d1 endstream endobj 200 0 obj <> stream 53 0 0 0 0 0 d1 endstream endobj 201 0 obj <> stream 0 0 0 23 48 68 d1 48 0 0 45 0 23 cm BI /IM true/W 48/H 45/BPC 1/F/CCF/DP<> ID &75}o߅XoOzi@ EI endstream endobj 202 0 obj <> stream 0 0 0 1 45 68 d1 45 0 0 67 0 1 cm BI /IM true/W 45/H 67/BPC 1/F/CCF/DP<> ID &@13PzMAXz Ow&_K_ m.ް !~,!>}k EI endstream endobj 203 0 obj <> stream 25 0 0 0 0 0 d1 endstream endobj 204 0 obj <> stream 124 0 0 0 0 0 d1 endstream endobj 205 0 obj <> stream 103 0 0 0 0 0 d1 endstream endobj 206 0 obj <> stream 0 0 0 0 46 65 d1 46 0 0 65 0 0 cm BI /IM true/W 46/H 65/BPC 1/F/CCF/DP<> ID &< ;m Ao }x~ys^/ _ t@ EI endstream endobj 207 0 obj <> stream 0 0 0 -4 83 67 d1 83 0 0 71 0 -4 cm BI /IM true/W 83/H 71/BPC 1/F/CCF/DP<> ID &CȰhzz5O&Nb? .>4k ?o~~ /PPR EI endstream endobj 208 0 obj <> stream 0 0 0 20 45 65 d1 45 0 0 45 0 20 cm BI /IM true/W 45/H 45/BPC 1/F/CCF/DP<> ID &A<,1z: D z' kK? 6&oa] b `@ EI endstream endobj 209 0 obj <> stream 0 0 0 -5 42 65 d1 42 0 0 70 0 -5 cm BI /IM true/W 42/H 70/BPC 1/F/CCF/DP<> ID @R@7 R@7?x {ma B  EI endstream endobj 210 0 obj <> stream 0 0 0 20 51 65 d1 51 0 0 45 0 20 cm BI /IM true/W 51/H 45/BPC 1/F/CCF/DP<> ID &*p@փZ:@¤QOk! E~~x@ح@ EI endstream endobj 211 0 obj <> stream 0 0 0 -5 27 65 d1 27 0 0 70 0 -5 cm BI /IM true/W 27/H 70/BPC 1/F/CCF/DP<> ID 5?X5  EI endstream endobj 212 0 obj <> stream 0 0 0 19 53 86 d1 53 0 0 67 0 19 cm BI /IM true/W 53/H 67/BPC 1/F/CCF/DP<> ID &HSC @hzx?d ʶ+|5h. c5 0E=A7OFz-:d!d A EI endstream endobj 213 0 obj <> stream 0 0 0 -6 35 85 d1 35 0 0 91 0 -6 cm BI /IM true/W 35/H 91/BPC 1/F/CCF/DP<> ID &>LF=>P`G?5~zO@ EI endstream endobj 214 0 obj <> stream 0 0 0 -2 51 67 d1 51 0 0 69 0 -2 cm BI /IM true/W 51/H 69/BPC 1/F/CCF/DP<> ID &zz{ayX߿ /}σn EI endstream endobj 215 0 obj <> stream 0 0 0 -5 51 66 d1 51 0 0 71 0 -5 cm BI /IM true/W 51/H 71/BPC 1/F/CCF/DP<> ID &/},Gf??O K ,t@@ EI endstream endobj 216 0 obj <> stream 102 0 0 0 0 0 d1 endstream endobj 217 0 obj <> stream 0 0 0 -3 65 66 d1 65 0 0 69 0 -3 cm BI /IM true/W 65/H 69/BPC 1/F/CCF/DP<> ID &?ek _ k_޽޻'dG EI endstream endobj 218 0 obj <> stream 0 0 0 0 43 69 d1 43 0 0 69 0 0 cm BI /IM true/W 43/H 69/BPC 1/F/CCF/DP<> ID &D?a鿇>>Fd7IPɯ.t0im ,0  EI endstream endobj 219 0 obj <> stream 66 0 0 0 0 0 d1 endstream endobj 220 0 obj <> stream 106 0 0 0 0 0 d1 endstream endobj 221 0 obj <> stream 0 0 0 -5 46 69 d1 46 0 0 74 0 -5 cm BI /IM true/W 46/H 74/BPC 1/F/CCF/DP<> ID &`3>@l}?O¿ ?_,Ak !Arx. a. ^ D h/GP~D2㯯x_k#; ^' EI endstream endobj 222 0 obj <> stream 0 0 0 0 48 67 d1 48 0 0 67 0 0 cm BI /IM true/W 48/H 67/BPC 1/F/CCF/DP<> ID & < xOGAC恎zPk.N pao"&w}W`_ C@ EI endstream endobj 223 0 obj <> stream 0 0 0 -4 81 67 d1 81 0 0 71 0 -4 cm BI /IM true/W 81/H 71/BPC 1/F/CCF/DP<> ID &|5~?οX7^M}o(O^}o&?IOXq*a& EI endstream endobj 224 0 obj <> stream 0 0 0 -5 57 65 d1 57 0 0 70 0 -5 cm BI /IM true/W 57/H 70/BPC 1/F/CCF/DP<> ID &<H6A1C_o_. .׃CxayP EI endstream endobj 225 0 obj <> stream 0 0 0 20 38 65 d1 38 0 0 45 0 20 cm BI /IM true/W 38/H 45/BPC 1/F/CCF/DP<> ID 8! 8fP=<+o)5 2&@%XPR4) 5k] 8dw@ EI endstream endobj 226 0 obj <> stream 0 0 0 0 48 67 d1 48 0 0 67 0 0 cm BI /IM true/W 48/H 67/BPC 1/F/CCF/DP<> ID &/OD3@}o zO?>z ޶ +ad3  EI endstream endobj 227 0 obj <> stream 144 0 0 0 0 0 d1 endstream endobj 228 0 obj <> stream 0 0 0 -9 39 92 d1 39 0 0 101 0 -9 cm BI /IM true/W 39/H 101/BPC 1/F/CCF/DP<> ID &i߽o~~ EI endstream endobj 229 0 obj <> stream 132 0 0 0 0 0 d1 endstream endobj 230 0 obj <> stream 61 0 0 0 0 0 d1 endstream endobj 231 0 obj <> stream 147 0 0 0 0 0 d1 endstream endobj 232 0 obj <> stream 0 0 0 -3 55 66 d1 55 0 0 69 0 -3 cm BI /IM true/W 55/H 69/BPC 1/F/CCF/DP<> ID 5v7Jo  EI endstream endobj 233 0 obj <> stream 150 0 0 0 0 0 d1 endstream endobj 234 0 obj <> stream 0 0 0 1 24 66 d1 24 0 0 65 0 1 cm BI /IM true/W 24/H 65/BPC 1/F/CCF/DP<> ID 5"qmj?I|{ᇰ|=x{ j  EI endstream endobj 235 0 obj <> stream 98 0 0 0 0 0 d1 endstream endobj 236 0 obj <> stream 0 0 0 20 46 88 d1 46 0 0 68 0 20 cm BI /IM true/W 46/H 68/BPC 1/F/CCF/DP<> ID &0@0|'M5L/2+Z 0z3_䏶?&  v׆a! EI endstream endobj 237 0 obj <> stream 0 0 0 1 47 68 d1 47 0 0 67 0 1 cm BI /IM true/W 47/H 67/BPC 1/F/CCF/DP<> ID &IϟFm<,zA矠c7\?~ |ʿ!?w__A K A~AϏ~= EI endstream endobj 238 0 obj <> stream 137 0 0 0 0 0 d1 endstream endobj 239 0 obj <> stream 133 0 0 0 0 0 d1 endstream endobj 240 0 obj <> stream 0 0 0 0 48 67 d1 48 0 0 67 0 0 cm BI /IM true/W 48/H 67/BPC 1/F/CCF/DP<> ID & |a>I-=/K]/KP0[?A`z 0Y EI endstream endobj 241 0 obj <> stream 0 0 0 -3 43 69 d1 43 0 0 72 0 -3 cm BI /IM true/W 43/H 72/BPC 1/F/CCF/DP<> ID &I#PG=[oIh x5׵ 8 EI endstream endobj 242 0 obj <> stream 0 0 0 21 49 86 d1 49 0 0 65 0 21 cm BI /IM true/W 49/H 65/BPC 1/F/CCF/DP<> ID &AsFcߠ~L}>}_5~_\0ha/z'  EI endstream endobj 243 0 obj <> stream 134 0 0 0 0 0 d1 endstream endobj 244 0 obj <> stream 0 0 0 -6 67 66 d1 67 0 0 72 0 -6 cm BI /IM true/W 67/H 72/BPC 1/F/CCF/DP<> ID %"zoo_߽z_=vv_=ǵk@ EI endstream endobj 245 0 obj <> stream 0 0 0 0 46 67 d1 46 0 0 67 0 0 cm BI /IM true/W 46/H 67/BPC 1/F/CCF/DP<> ID &@g"01=$ ?I\u^ / Я0?pٕ`}`f<@ EI endstream endobj 246 0 obj <> stream 0 0 0 -4 63 65 d1 63 0 0 69 0 -4 cm BI /IM true/W 63/H 69/BPC 1/F/CCF/DP<> ID %_: '&*  EI endstream endobj 247 0 obj <> stream 0 0 0 20 92 65 d1 92 0 0 45 0 20 cm BI /IM true/W 92/H 45/BPC 1/F/CCF/DP<> ID )?QIc;& oa~40ǃAaIHd0H?@ EI endstream endobj 248 0 obj <> stream 97 0 0 0 0 0 d1 endstream endobj 249 0 obj <> stream 0 0 0 23 38 66 d1 38 0 0 43 0 23 cm BI /IM true/W 38/H 43/BPC 1/F/CCF/DP<> ID _'2jþ۷ ?}<7Eaoÿm @ EI endstream endobj 250 0 obj <> stream 0 0 0 23 48 87 d1 48 0 0 64 0 23 cm BI /IM true/W 48/H 64/BPC 1/F/CCF/DP<> ID &ftټ$Èwa~/0?M ߿_M%A@ EI endstream endobj 251 0 obj <> stream 0 0 0 -3 67 66 d1 67 0 0 69 0 -3 cm BI /IM true/W 67/H 69/BPC 1/F/CCF/DP<> ID !Jjd0k{^_/BK~K_/ _/ _ KƟAA>  EI endstream endobj 252 0 obj <> stream 0 0 0 1 50 68 d1 50 0 0 67 0 1 cm BI /IM true/W 50/H 67/BPC 1/F/CCF/DP<> ID &8cAΡ 9A,d_Qh|?m@@ EI endstream endobj 253 0 obj <> stream 136 0 0 0 0 0 d1 endstream endobj 254 0 obj <> stream 0 0 0 -5 68 69 d1 68 0 0 74 0 -5 cm BI /IM true/W 68/H 74/BPC 1/F/CCF/DP<> ID &H ? "@ k/I^ _/?!___dck5k>xA`Iy   EI endstream endobj 255 0 obj <> stream 143 0 0 0 0 0 d1 endstream endobj 256 0 obj <> stream 0 0 0 0 43 69 d1 43 0 0 69 0 0 cm BI /IM true/W 43/H 69/BPC 1/F/CCF/DP<> ID &@/!~xF oA}>a?WjMzKmxa. `-5@}? Ou׮K턶f*,X3@`@ EI endstream endobj 257 0 obj <> stream 0 0 0 -3 60 66 d1 60 0 0 69 0 -3 cm BI /IM true/W 60/H 69/BPC 1/F/CCF/DP<> ID `5.~ /~~EB# EI endstream endobj 258 0 obj <> stream 0 0 0 -3 69 69 d1 69 0 0 72 0 -3 cm BI /IM true/W 69/H 72/BPC 1/F/CCF/DP<> ID &phP@@BzOɨP~x^+@73o__ z }b!ABpi@ EI endstream endobj 259 0 obj <> stream 95 0 0 0 0 0 d1 endstream endobj 260 0 obj <> stream 122 0 0 0 0 0 d1 endstream endobj 261 0 obj <> stream 116 0 0 0 0 0 d1 endstream endobj 262 0 obj <> stream 101 0 0 0 0 0 d1 endstream endobj 263 0 obj <> stream 120 0 0 0 0 0 d1 endstream endobj 264 0 obj <> stream 0 0 0 -3 61 66 d1 61 0 0 69 0 -3 cm BI /IM true/W 61/H 69/BPC 1/F/CCF/DP<> ID RH h?~_/K_ q' 0x]0D(P@ EI endstream endobj 265 0 obj <> stream 0 0 0 -4 50 66 d1 50 0 0 70 0 -4 cm BI /IM true/W 50/H 70/BPC 1/F/CCF/DP<> ID &Nis4_` ޼ɨ EI endstream endobj 267 0 obj <> stream 0 0 0 0 24 99 d1 24 0 0 99 0 0 cm BI /IM true/W 24/H 99/BPC 1/F/CCF/DP<> ID &XZZ -p]~z/Z_ /Mw|= ߀ EI endstream endobj 268 0 obj <> stream 0 0 0 -3 97 69 d1 97 0 0 72 0 -3 cm BI /IM true/W 97/H 72/BPC 1/F/CCF/DP<> ID &`no[\,?]oO,i_^_^0P?k]7OO0&_~o =8o EI endstream endobj 269 0 obj <> stream 0 0 0 -9 24 90 d1 24 0 0 99 0 -9 cm BI /IM true/W 24/H 99/BPC 1/F/CCF/DP<> ID &h{{{>{ZX_^Akֽa.Z]iu EI endstream endobj 273 0 obj <> stream 0 0 0 -5 66 69 d1 66 0 0 74 0 -5 cm BI /IM true/W 66/H 74/BPC 1/F/CCF/DP<> ID &C B%0 <,< @oo }o}o [}o_p__Avia q  EI endstream endobj 274 0 obj <> stream 93 0 0 0 0 0 d1 endstream endobj 275 0 obj <> stream 0 0 0 0 79 70 d1 79 0 0 70 0 0 cm BI /IM true/W 79/H 70/BPC 1/F/CCF/DP<> ID $?ɨC@5]k___>k__v]z޸a EI endstream endobj 276 0 obj <> stream 0 0 0 1 80 72 d1 80 0 0 71 0 1 cm BI /IM true/W 80/H 71/BPC 1/F/CCF/DP<> ID &jW=A [~A>W8a`7  EI endstream endobj 277 0 obj <> stream 0 0 0 20 57 85 d1 57 0 0 65 0 20 cm BI /IM true/W 57/H 65/BPC 1/F/CCF/DP<> ID )&!2<>D  M>}ׯp4F )5 "@ EI endstream endobj 278 0 obj <> stream 0 0 0 -1 30 65 d1 30 0 0 66 0 -1 cm BI /IM true/W 30/H 66/BPC 1/F/CCF/DP<> ID $5sC?G>P }>P EI endstream endobj 279 0 obj <> stream 0 0 0 -3 69 66 d1 69 0 0 69 0 -3 cm BI /IM true/W 69/H 69/BPC 1/F/CCF/DP<> ID *"Jz vk_Xm. mߺ nwxZ_=}&zPOWMCI@D* EI endstream endobj 280 0 obj <> stream 0 0 0 -3 67 69 d1 67 0 0 72 0 -3 cm BI /IM true/W 67/H 72/BPC 1/F/CCF/DP<> ID &PRU<"qxAh&ҽ~xW?޿W8 7 EI endstream endobj 281 0 obj <> stream 126 0 0 0 0 0 d1 endstream endobj 282 0 obj <> stream 127 0 0 0 0 0 d1 endstream endobj 284 0 obj <> stream 0 0 0 0 35 66 d1 35 0 0 66 0 0 cm BI /IM true/W 35/H 66/BPC 1/F/CCF/DP<> ID MB{47?|<@ EI endstream endobj 287 0 obj <> stream 0 0 0 18 66 87 d1 66 0 0 69 0 18 cm BI /IM true/W 66/H 69/BPC 1/F/CCF/DP<> ID &% l-Aw{ # EI endstream endobj 288 0 obj <> stream 0 0 0 16 67 90 d1 67 0 0 74 0 16 cm BI /IM true/W 67/H 74/BPC 1/F/CCF/DP<> ID &܆ P@!iA oH7I+z aW]\?mK ,`qi EI endstream endobj 289 0 obj <> stream 0 0 0 18 68 90 d1 68 0 0 72 0 18 cm BI /IM true/W 68/H 72/BPC 1/F/CCF/DP<> ID &A 5xXx@cAސoW}aIp EI endstream endobj 290 0 obj <> stream 0 0 0 0 67 90 d1 67 0 0 90 0 0 cm BI /IM true/W 67/H 90/BPC 1/F/CCF/DP<> ID &܆ P@!iA oH7I+z aW]\?mK ,`qiFaEa @ EI endstream endobj 291 0 obj <> stream 0 0 0 0 57 94 d1 57 0 0 94 0 0 cm BI /IM true/W 57/H 94/BPC 1/F/CCF/DP<> ID &?(Ap؟ cL> EI endstream endobj 292 0 obj <> stream 0 0 0 -5 50 94 d1 50 0 0 99 0 -5 cm BI /IM true/W 50/H 99/BPC 1/F/CCF/DP<> ID `cĉ EI endstream endobj 293 0 obj <> stream 0 0 0 34 50 127 d1 50 0 0 93 0 34 cm BI /IM true/W 50/H 93/BPC 1/F/CCF/DP<> ID &Pzz5 0^ ċ5>  EI endstream endobj 294 0 obj <> stream 0 0 0 59 70 127 d1 70 0 0 68 0 59 cm BI /IM true/W 70/H 68/BPC 1/F/CCF/DP<> ID &j nOD N(| k7޷ސa}>>_=o a.m- a 1 `fi EI endstream endobj 295 0 obj <> stream 0 0 0 60 80 127 d1 80 0 0 67 0 60 cm BI /IM true/W 80/H 67/BPC 1/F/CCF/DP<> ID &j!C`IV??H7)pWVC9? dt EI endstream endobj 296 0 obj <> stream 0 0 0 30 70 127 d1 70 0 0 97 0 30 cm BI /IM true/W 70/H 97/BPC 1/F/CCF/DP<> ID &j nOD N(| k7޷ސa}>>_=o a.m- a 1 `fi3=CK#}^}=-ᭅ EI endstream endobj 297 0 obj <> stream 0 0 0 0 47 78 d1 47 0 0 78 0 0 cm BI /IM true/W 47/H 78/BPC 1/F/CCF/DP<> ID &A(? 1Cb? EI endstream endobj 298 0 obj <> stream 0 0 0 60 19 78 d1 19 0 0 18 0 60 cm BI /IM true/W 19/H 18/BPC 1/F/CCF/DP<> ID &|ɮkaa EI endstream endobj 299 0 obj <> stream 0 0 0 18 49 102 d1 49 0 0 84 0 18 cm BI /IM true/W 49/H 84/BPC 1/F/CCF/DP<> ID &"B+>u C9 Uk >{}g 0€ EI endstream endobj 300 0 obj <> stream 0 0 0 -5 87 101 d1 87 0 0 106 0 -5 cm BI /IM true/W 87/H 106/BPC 1/F/CCF/DP<> ID &~hx@O^x_?!U?C4O0,? tAD,<#^[t A7p ի0Wо>XU \=v]Ap Apap a`,0!c!T@ EI endstream endobj 301 0 obj <> stream 0 0 0 24 67 80 d1 67 0 0 56 0 24 cm BI /IM true/W 67/H 56/BPC 1/F/CCF/DP<> ID &/ a AD~?P=5rp.D@ EI endstream endobj 302 0 obj <> stream 0 0 0 -1 54 80 d1 54 0 0 81 0 -1 cm BI /IM true/W 54/H 81/BPC 1/F/CCF/DP<> ID & 0z#| 7}&5M?IC:_k.a-a`0 ?>ht=`} } EI endstream endobj 303 0 obj <> stream 0 0 0 23 54 80 d1 54 0 0 57 0 23 cm BI /IM true/W 54/H 57/BPC 1/F/CCF/DP<> ID & 0z#| 7}&5M?IC:_k.a-a`0  EI endstream endobj 304 0 obj <> stream 107 0 0 0 0 0 d1 endstream endobj 305 0 obj <> stream 0 0 0 23 43 80 d1 43 0 0 57 0 23 cm BI /IM true/W 43/H 57/BPC 1/F/CCF/DP<> ID &R?K>/jAp/׮Ay $Z kPe8aAG_k.%  EI endstream endobj 306 0 obj <> stream 0 0 0 -4 73 78 d1 73 0 0 82 0 -4 cm BI /IM true/W 73/H 82/BPC 1/F/CCF/DP<> ID &o%__|)~}}( EI endstream endobj 307 0 obj <> stream 0 0 0 24 67 78 d1 67 0 0 54 0 24 cm BI /IM true/W 67/H 54/BPC 1/F/CCF/DP<> ID &"hA?(оd* EI endstream endobj 308 0 obj <> stream 0 0 0 -6 30 78 d1 30 0 0 84 0 -6 cm BI /IM true/W 30/H 84/BPC 1/F/CCF/DP<> ID &D\_A?_[ ( EI endstream endobj 309 0 obj <> stream 0 0 0 25 66 78 d1 66 0 0 53 0 25 cm BI /IM true/W 66/H 53/BPC 1/F/CCF/DP<> ID *)(:iauim[ /[Xk KF~70սoH7 ? EI endstream endobj 310 0 obj <> stream 0 0 0 -6 49 78 d1 49 0 0 84 0 -6 cm BI /IM true/W 49/H 84/BPC 1/F/CCF/DP<> ID &(X4w}}xoo}7&Bia`Xb`^Az EI endstream endobj 311 0 obj <> stream 0 0 0 41 27 47 d1 27 0 0 6 0 41 cm BI /IM true/W 27/H 6/BPC 1/F/CCF/DP<> ID @ EI endstream endobj 312 0 obj <> stream 0 0 0 55 13 86 d1 13 0 0 31 0 55 cm BI /IM true/W 13/H 31/BPC 1/F/CCF/DP<> ID &~˾c  EI endstream endobj 313 0 obj <> stream 0 0 0 -1 50 66 d1 50 0 0 67 0 -1 cm BI /IM true/W 50/H 67/BPC 1/F/CCF/DP<> ID &Nis4-[ BQ#B9LONO0 EI endstream endobj 314 0 obj <> stream 0 0 0 21 34 68 d1 34 0 0 47 0 21 cm BI /IM true/W 34/H 47/BPC 1/F/CCF/DP<> ID &> z7s0&{ t]-xXK:tA/p0KXb`  EI endstream endobj 315 0 obj <> stream 0 0 0 21 50 86 d1 50 0 0 65 0 21 cm BI /IM true/W 50/H 65/BPC 1/F/CCF/DP<> ID 3i%|L}?-wo^5n~ /zئ!aA EI endstream endobj 316 0 obj <> stream 0 0 0 21 40 68 d1 40 0 0 47 0 21 cm BI /IM true/W 40/H 47/BPC 1/F/CCF/DP<> ID &l~6_dp?}pn~ OS @ EI endstream endobj 317 0 obj <> stream 0 0 0 0 25 68 d1 25 0 0 68 0 0 cm BI /IM true/W 25/H 68/BPC 1/F/CCF/DP<> ID & A>MV~X0_/@^@ EI endstream endobj 318 0 obj <> stream 0 0 0 3 30 68 d1 30 0 0 65 0 3 cm BI /IM true/W 30/H 65/BPC 1/F/CCF/DP<> ID & |=0[߿;"y5_!g} EI endstream endobj 319 0 obj <> stream 30 0 0 0 0 0 d1 endstream endobj 320 0 obj <> stream 0 0 0 21 36 68 d1 36 0 0 47 0 21 cm BI /IM true/W 36/H 47/BPC 1/F/CCF/DP<> ID & jGHz}"*d(/{o~ol,0ia Bl@ EI endstream endobj 321 0 obj <> stream 0 0 0 -4 49 66 d1 49 0 0 70 0 -4 cm BI /IM true/W 49/H 70/BPC 1/F/CCF/DP<> ID R' axA}z}zzAz_v ῿o?~O  EI endstream endobj 322 0 obj <> stream 96 0 0 0 0 0 d1 endstream endobj 323 0 obj <> stream 0 0 0 0 55 78 d1 55 0 0 78 0 0 cm BI /IM true/W 55/H 78/BPC 1/F/CCF/DP<> ID &of0a}o;߾k { aa.OwKU^X`ȀX`Y @@ EI endstream endobj 324 0 obj <> stream 0 0 0 -4 118 78 d1 118 0 0 82 0 -4 cm BI /IM true/W 118/H 82/BPC 1/F/CCF/DP<> ID &s`O&du?EA?M?[7ooAMO[ 7Ooodl7@ EI endstream endobj 325 0 obj <> stream 0 0 0 -6 40 102 d1 40 0 0 108 0 -6 cm BI /IM true/W 40/H 108/BPC 1/F/CCF/DP<> ID &`" <zz k 3l5C/z€ EI endstream endobj 326 0 obj <> stream 0 0 0 23 60 80 d1 60 0 0 57 0 23 cm BI /IM true/W 60/H 57/BPC 1/F/CCF/DP<> ID & >@ x zxFC`=7 ɯx\5zz/kaK`ȺAF EI endstream endobj 327 0 obj <> stream 0 0 0 24 48 78 d1 48 0 0 54 0 24 cm BI /IM true/W 48/H 54/BPC 1/F/CCF/DP<> ID "At  Ԛh  EI endstream endobj 328 0 obj <> stream 0 0 0 23 61 80 d1 61 0 0 57 0 23 cm BI /IM true/W 61/H 57/BPC 1/F/CCF/DP<> ID &@i|A 0E8p }?a ]AqLZ ? _],6.= @` EI endstream endobj 329 0 obj <> stream 0 0 0 24 66 101 d1 66 0 0 77 0 24 cm BI /IM true/W 66/H 77/BPC 1/F/CCF/DP<> ID #AQDxA |C  >o ?_]iD%†B)5 !Q EI endstream endobj 330 0 obj <> stream 0 0 0 23 52 80 d1 52 0 0 57 0 23 cm BI /IM true/W 52/H 57/BPC 1/F/CCF/DP<> ID & 0<"0G&x[>CLQ~> aiq0Y 0gP EI endstream endobj 331 0 obj <> stream 0 0 0 2 43 80 d1 43 0 0 78 0 2 cm BI /IM true/W 43/H 78/BPC 1/F/CCF/DP<> ID &ܠ' <.}&޾!ā5>3? EI endstream endobj 332 0 obj <> stream 112 0 0 0 0 0 d1 endstream endobj 333 0 obj <> stream 0 0 0 -4 91 78 d1 91 0 0 82 0 -4 cm BI /IM true/W 91/H 82/BPC 1/F/CCF/DP<> ID &VM/4aA* \o?7_z_zz^ׄ` FVp\ @ EI endstream endobj 334 0 obj <> stream 111 0 0 0 0 0 d1 endstream endobj 335 0 obj <> stream 0 0 0 -4 43 78 d1 43 0 0 82 0 -4 cm BI /IM true/W 43/H 82/BPC 1/F/CCF/DP<> ID ?ā EI endstream endobj 336 0 obj <> stream 0 0 0 -4 97 80 d1 97 0 0 84 0 -4 cm BI /IM true/W 97/H 84/BPC 1/F/CCF/DP<> ID &|Wo׭ (~_'׭X_ o()0 EI endstream endobj 337 0 obj <> stream 0 0 0 -5 31 78 d1 31 0 0 83 0 -5 cm BI /IM true/W 31/H 83/BPC 1/F/CCF/DP<> ID &D@@ EI endstream endobj 338 0 obj <> stream 0 0 0 24 106 78 d1 106 0 0 54 0 24 cm BI /IM true/W 106/H 54/BPC 1/F/CCF/DP<> ID &M(Ђ?KtMvE`L41A_kY d00H  EI endstream endobj 339 0 obj <> stream 0 0 0 -5 66 80 d1 66 0 0 85 0 -5 cm BI /IM true/W 66/H 85/BPC 1/F/CCF/DP<> ID &9@_ xA@P T2 tA^ᆻaw 'k"7#ra? @@ EI endstream endobj 340 0 obj <> stream 0 0 0 0 39 38 d1 39 0 0 38 0 0 cm BI /IM true/W 39/H 38/BPC 1/F/CCF/DP<> ID &f?z k- EI endstream endobj 342 0 obj <> stream 0 0 0 0 51 71 d1 51 0 0 71 0 0 cm BI /IM true/W 51/H 71/BPC 1/F/CCF/DP<> ID &/}QLG\?o  ` EI endstream endobj 346 0 obj <> stream 0 0 0 55 12 66 d1 12 0 0 11 0 55 cm BI /IM true/W 12/H 11/BPC 1/F/CCF/DP<> ID &. ( EI endstream endobj 347 0 obj <> stream 0 0 0 0 46 69 d1 46 0 0 69 0 0 cm BI /IM true/W 46/H 69/BPC 1/F/CCF/DP<> ID &D@|@Xz ML>foaC__֖ B~1L}߽p{[[ a0x EI endstream endobj 348 0 obj <> stream 0 0 0 41 46 89 d1 46 0 0 48 0 41 cm BI /IM true/W 46/H 48/BPC 1/F/CCF/DP<> ID & <,<$>o߯ > _~\0ia 0`~ @ EI endstream endobj 349 0 obj <> stream 0 0 0 42 51 87 d1 51 0 0 45 0 42 cm BI /IM true/W 51/H 45/BPC 1/F/CCF/DP<> ID Cɨ9wwf_z1Y xa EI endstream endobj 350 0 obj <> stream 0 0 0 41 37 89 d1 37 0 0 48 0 41 cm BI /IM true/W 37/H 48/BPC 1/F/CCF/DP<> ID 0!/5h7&@~M_\|.C@yu,/g { mo>& L @ EI endstream endobj 351 0 obj <> stream 0 0 0 20 26 87 d1 26 0 0 67 0 20 cm BI /IM true/W 26/H 67/BPC 1/F/CCF/DP<> ID f!{G1 } EI endstream endobj 352 0 obj <> stream 0 0 0 17 50 89 d1 50 0 0 72 0 17 cm BI /IM true/W 50/H 72/BPC 1/F/CCF/DP<> ID &pG=&XW?ÓU;o^x0k> stream 0 0 0 41 41 89 d1 41 0 0 48 0 41 cm BI /IM true/W 41/H 48/BPC 1/F/CCF/DP<> ID &5A<-}ޯG(_h 0~߶  W EI endstream endobj 354 0 obj <> stream 0 0 0 42 40 87 d1 40 0 0 45 0 42 cm BI /IM true/W 40/H 45/BPC 1/F/CCF/DP<> ID *Qxad+A};oL0 EI endstream endobj 355 0 obj <> stream 0 0 0 41 48 89 d1 48 0 0 48 0 41 cm BI /IM true/W 48/H 48/BPC 1/F/CCF/DP<> ID & Ϗ#Xh0z] n~&6ۻvNg1W oX0`  EI endstream endobj 356 0 obj <> stream 0 0 0 41 39 89 d1 39 0 0 48 0 41 cm BI /IM true/W 39/H 48/BPC 1/F/CCF/DP<> ID & z@߾o[orja" }ᷰa 10P EI endstream endobj 357 0 obj <> stream 0 0 0 17 45 89 d1 45 0 0 72 0 17 cm BI /IM true/W 45/H 72/BPC 1/F/CCF/DP<> ID &haAp a 95_޻kv4Ϡh/^ B?/_!i EI endstream endobj 358 0 obj <> stream 0 0 0 17 27 87 d1 27 0 0 70 0 17 cm BI /IM true/W 27/H 70/BPC 1/F/CCF/DP<> ID Q.  EI endstream endobj 359 0 obj <> stream 0 0 0 16 44 87 d1 44 0 0 71 0 16 cm BI /IM true/W 44/H 71/BPC 1/F/CCF/DP<> ID *?e /I'1'{wxl5ǃX` EI endstream endobj 360 0 obj <> stream 0 0 0 42 45 89 d1 45 0 0 47 0 42 cm BI /IM true/W 45/H 47/BPC 1/F/CCF/DP<> ID &I3FuPFcwX}gB {oӌMU'? EI endstream endobj 361 0 obj <> stream 0 0 0 26 30 89 d1 30 0 0 63 0 26 cm BI /IM true/W 30/H 63/BPC 1/F/CCF/DP<> ID &LM7=[? Ą j0}@ EI endstream endobj 362 0 obj <> stream 0 0 0 18 66 87 d1 66 0 0 69 0 18 cm BI /IM true/W 66/H 69/BPC 1/F/CCF/DP<> ID "@5p1~^!>?<}-2  EI endstream endobj 363 0 obj <> stream 0 0 0 44 56 87 d1 56 0 0 43 0 44 cm BI /IM true/W 56/H 43/BPC 1/F/CCF/DP<> ID #y5 $X<-4m-m{[poZiaVo[a9 eN EI endstream endobj 364 0 obj <> stream 0 0 0 23 12 66 d1 12 0 0 43 0 23 cm BI /IM true/W 12/H 43/BPC 1/F/CCF/DP<> ID &ۂ!MPX0˼qj EI endstream endobj 365 0 obj <> stream 0 0 0 0 55 80 d1 55 0 0 80 0 0 cm BI /IM true/W 55/H 80/BPC 1/F/CCF/DP<> ID &>Azz4 _a,.Ap. Ȁσ 'oȴNv @@~,05 EI endstream endobj 366 0 obj <> stream 0 0 0 -5 82 80 d1 82 0 0 85 0 -5 cm BI /IM true/W 82/H 85/BPC 1/F/CCF/DP<> ID &k jI| )<- ޓ| IW¾s\(xd;k [k~07*~<x0O5y m\@ EI endstream endobj 367 0 obj <> stream 0 0 0 -5 66 80 d1 66 0 0 85 0 -5 cm BI /IM true/W 66/H 85/BPC 1/F/CCF/DP<> ID &P DA'  7_~K0\y ?P EI endstream endobj 368 0 obj <> stream 0 0 0 -6 48 78 d1 48 0 0 84 0 -6 cm BI /IM true/W 48/H 84/BPC 1/F/CCF/DP<> ID & Ij Gߺ߇[k!D@ EI endstream endobj 369 0 obj <> stream 0 0 0 -4 46 68 d1 46 0 0 72 0 -4 cm BI /IM true/W 46/H 72/BPC 1/F/CCF/DP<> ID &<@}sz_5Ww ;]n5mp>CGxf EI endstream endobj 370 0 obj <> stream 0 0 0 -4 35 68 d1 35 0 0 72 0 -4 cm BI /IM true/W 35/H 72/BPC 1/F/CCF/DP<> ID & '0z߆~Շoۮ gֽ^K]_ EI endstream endobj 371 0 obj <> stream 0 0 0 21 48 68 d1 48 0 0 47 0 21 cm BI /IM true/W 48/H 47/BPC 1/F/CCF/DP<> ID & 0@h(v͍~MV?o~`z}k~  EI endstream endobj 372 0 obj <> stream 0 0 0 21 44 87 d1 44 0 0 66 0 21 cm BI /IM true/W 44/H 66/BPC 1/F/CCF/DP<> ID &i =~A1?;~ o?8ww~o[ P2 EI endstream endobj 373 0 obj <> stream 0 0 0 -3 67 66 d1 67 0 0 69 0 -3 cm BI /IM true/W 67/H 69/BPC 1/F/CCF/DP<> ID bB@!i' h8 @ EI endstream endobj 374 0 obj <> stream 0 0 0 4 29 41 d1 29 0 0 37 0 4 cm BI /IM true/W 29/H 37/BPC 1/F/CCF/DP<> ID &`j  EI endstream endobj 378 0 obj <> stream 0 0 0 -1 47 66 d1 47 0 0 67 0 -1 cm BI /IM true/W 47/H 67/BPC 1/F/CCF/DP<> ID &ak?ol4 o oaxmxw|7} EI endstream endobj 379 0 obj <> stream 0 0 0 42 79 87 d1 79 0 0 45 0 42 cm BI /IM true/W 79/H 45/BPC 1/F/CCF/DP<> ID ȃ5&( rMwp;m뙦at/%Q_4z1@d1/ EI endstream endobj 380 0 obj <> stream 0 0 0 21 45 90 d1 45 0 0 69 0 21 cm BI /IM true/W 45/H 69/BPC 1/F/CCF/DP<> ID &D#Pg#3A&o&&w0uip`b<@ EI endstream endobj 381 0 obj <> stream 0 0 0 -1 46 69 d1 46 0 0 70 0 -1 cm BI /IM true/W 46/H 70/BPC 1/F/CCF/DP<> ID &p4?|?{}{ 7mɪ=÷~|[@ EI endstream endobj 382 0 obj <> stream 0 0 0 0 60 78 d1 60 0 0 78 0 0 cm BI /IM true/W 60/H 78/BPC 1/F/CCF/DP<> ID &CK_&fg@~?? ߰ { EI endstream endobj 383 0 obj <> stream 0 0 0 0 58 80 d1 58 0 0 80 0 0 cm BI /IM true/W 58/H 80/BPC 1/F/CCF/DP<> ID & AAz:Az aI}oo ?턿zk `-a~,r37 EI endstream endobj 384 0 obj <> stream 117 0 0 0 0 0 d1 endstream endobj 385 0 obj <> stream 0 0 0 -3 57 80 d1 57 0 0 83 0 -3 cm BI /IM true/W 57/H 83/BPC 1/F/CCF/DP<> ID &A4=<'{~ =onp2o[7}`ٞ}|@ EI endstream endobj 387 0 obj <> stream 0 0 0 0 55 80 d1 55 0 0 80 0 0 cm BI /IM true/W 55/H 80/BPC 1/F/CCF/DP<> ID & Cx |@& ?|?N ENkKpa. % 0^ /C c)f>f~l4 EI endstream endobj 388 0 obj <> stream 0 0 0 -4 81 78 d1 81 0 0 82 0 -4 cm BI /IM true/W 81/H 82/BPC 1/F/CCF/DP<> ID ; 55_5U?4g_ep?/O}/}@ EI endstream endobj 389 0 obj <> stream 0 0 0 25 66 78 d1 66 0 0 53 0 25 cm BI /IM true/W 66/H 53/BPC 1/F/CCF/DP<> ID &x)?Η[&} }azҸ EI endstream endobj 390 0 obj <> stream 0 0 0 -1 60 80 d1 60 0 0 81 0 -1 cm BI /IM true/W 60/H 81/BPC 1/F/CCF/DP<> ID & >@ x zxFC`=7 ɯx\5zz/kaK`ȺAFC@3r Xx}{ l( EI endstream endobj 391 0 obj <> stream 0 0 0 23 67 68 d1 67 0 0 45 0 23 cm BI /IM true/W 67/H 45/BPC 1/F/CCF/DP<> ID &g0?_AtդMx}PT'q:@ EI endstream endobj 392 0 obj <> stream 0 0 0 8 66 74 d1 66 0 0 66 0 8 cm BI /IM true/W 66/H 66/BPC 1/F/CCF/DP<> ID &`VA? EI endstream endobj 393 0 obj <> stream 0 0 0 0 55 80 d1 55 0 0 80 0 0 cm BI /IM true/W 55/H 80/BPC 1/F/CCF/DP<> ID &܆> A >t 7>A7_îsRi|0_b`P?O6?om[_ ,`p EI endstream endobj 394 0 obj <> stream 110 0 0 0 0 0 d1 endstream endobj 396 0 obj <> stream 0 0 0 0 49 66 d1 49 0 0 66 0 0 cm BI /IM true/W 49/H 66/BPC 1/F/CCF/DP<> ID &?|7m}c<7> >oax\oAy0v߆ l aǃXa`@ EI endstream endobj 399 0 obj <> stream 0 0 0 18 54 90 d1 54 0 0 72 0 18 cm BI /IM true/W 54/H 72/BPC 1/F/CCF/DP<> ID & J>@zMOy_ EI endstream endobj 400 0 obj <> stream 0 0 0 0 64 94 d1 64 0 0 94 0 0 cm BI /IM true/W 64/H 94/BPC 1/F/CCF/DP<> ID j}>}~o߿݃ f<7~a#(' |%Uh,0awKv kaa"@Q@ EI endstream endobj 401 0 obj <> stream 0 0 0 -5 113 96 d1 113 0 0 101 0 -5 cm BI /IM true/W 113/H 101/BPC 1/F/CCF/DP<> ID &x(5JDx'f [kK_K^%. 50  ~ _~}}/ׄP+u\.w0lrd ~  EI endstream endobj 402 0 obj <> stream 0 0 0 24 55 125 d1 55 0 0 101 0 24 cm BI /IM true/W 55/H 101/BPC 1/F/CCF/DP<> ID &!**J1?o5+ᅐk  EI endstream endobj 403 0 obj <> stream 0 0 0 60 72 155 d1 72 0 0 95 0 60 cm BI /IM true/W 72/H 95/BPC 1/F/CCF/DP<> ID &` Y p a}>}a0. {uTxArXa 5 QC|Co [’/K[څa<<1:!5C:k P` EI endstream endobj 404 0 obj <> stream 0 0 0 24 45 154 d1 45 0 0 130 0 24 cm BI /IM true/W 45/H 130/BPC 1/F/CCF/DP<> ID &΁ AoA߆[& \@Pr 5~~`@@ EI endstream endobj 405 0 obj <> stream 0 0 0 -6 68 78 d1 68 0 0 84 0 -6 cm BI /IM true/W 68/H 84/BPC 1/F/CCF/DP<> ID &!4 O#5tQ?? ߰>p+k!!@ EI endstream endobj 406 0 obj <> stream 0 0 0 0 42 71 d1 42 0 0 71 0 0 cm BI /IM true/W 42/H 71/BPC 1/F/CCF/DP<> ID &@"=!{[cx|7a/?Xa|@ EI endstream endobj 407 0 obj <> stream 0 0 0 -19 76 71 d1 76 0 0 90 0 -19 cm BI /IM true/W 76/H 90/BPC 1/F/CCF/DP<> ID &hz.AA0lk# p >GJ==aW} 0^ ~?MOkkia %0Aa⅃Y T@ EI endstream endobj 408 0 obj <> stream 0 0 0 -1 45 65 d1 45 0 0 66 0 -1 cm BI /IM true/W 45/H 66/BPC 1/F/CCF/DP<> ID &A<,1z: D z' kK? 6&oa] b `?0D#X/} EI endstream endobj 409 0 obj <> stream 0 0 0 20 55 65 d1 55 0 0 45 0 20 cm BI /IM true/W 55/H 45/BPC 1/F/CCF/DP<> ID &\A!oIO[A7OħS@ EI endstream endobj 410 0 obj <> stream 0 0 0 -5 42 65 d1 42 0 0 70 0 -5 cm BI /IM true/W 42/H 70/BPC 1/F/CCF/DP<> ID &=_ ,߽<7ӾW^[Xa~A EI endstream endobj 411 0 obj <> stream 0 0 0 -4 35 27 d1 35 0 0 31 0 -4 cm BI /IM true/W 35/H 31/BPC 1/F/CCF/DP<> ID &p6?s)ý p EI endstream endobj 412 0 obj <> stream 0 0 0 -4 34 27 d1 34 0 0 31 0 -4 cm BI /IM true/W 34/H 31/BPC 1/F/CCF/DP<> ID &g0.}ww6d!15H5A EI endstream endobj 413 0 obj <> stream 0 0 0 21 40 68 d1 40 0 0 47 0 21 cm BI /IM true/W 40/H 47/BPC 1/F/CCF/DP<> ID & g:G=oH>վoX?]  ) EI endstream endobj 414 0 obj <> stream 0 0 0 21 36 68 d1 36 0 0 47 0 21 cm BI /IM true/W 36/H 47/BPC 1/F/CCF/DP<> ID & j|a >޷ ۿol ް,|@ EI endstream endobj 415 0 obj <> stream 0 0 0 21 42 68 d1 42 0 0 47 0 21 cm BI /IM true/W 42/H 47/BPC 1/F/CCF/DP<> ID &> stream 0 0 0 21 50 68 d1 50 0 0 47 0 21 cm BI /IM true/W 50/H 47/BPC 1/F/CCF/DP<> ID &l  G}aB߇6?;_> stream 0 0 0 21 75 68 d1 75 0 0 47 0 21 cm BI /IM true/W 75/H 47/BPC 1/F/CCF/DP<> ID &l6L r>w}? a~͏UaßO44!A EI endstream endobj 418 0 obj <> stream 0 0 0 84 61 89 d1 61 0 0 5 0 84 cm BI /IM true/W 61/H 5/BPC 1/F/CCF/DP<> ID &E( EI endstream endobj 419 0 obj <> stream 0 0 0 -4 22 68 d1 22 0 0 72 0 -4 cm BI /IM true/W 22/H 72/BPC 1/F/CCF/DP<> ID &|'x#)wy5_~߿*C  EI endstream endobj 423 0 obj <> stream 0 0 0 16 52 87 d1 52 0 0 71 0 16 cm BI /IM true/W 52/H 71/BPC 1/F/CCF/DP<> ID (w&4 ÿÿ=Eǐ?c ?w >pxm, d4 EI endstream endobj 424 0 obj <> stream 0 0 0 21 40 68 d1 40 0 0 47 0 21 cm BI /IM true/W 40/H 47/BPC 1/F/CCF/DP<> ID &G]tx>~6O߇wo]k  EI endstream endobj 425 0 obj <> stream 0 0 0 21 41 68 d1 41 0 0 47 0 21 cm BI /IM true/W 41/H 47/BPC 1/F/CCF/DP<> ID &`/AO +#߿ c {{ 7a\O EI endstream endobj 426 0 obj <> stream 0 0 0 -1 51 65 d1 51 0 0 66 0 -1 cm BI /IM true/W 51/H 66/BPC 1/F/CCF/DP<> ID &*p@փZ:@¤QOk! E~~x@ح?}GPo`o|>P EI endstream endobj 430 0 obj <> stream 0 0 0 42 56 107 d1 56 0 0 65 0 42 cm BI /IM true/W 56/H 65/BPC 1/F/CCF/DP<> ID &_ZA~xi}7oY ' EI endstream endobj 431 0 obj <> stream 0 0 0 -3 84 78 d1 84 0 0 81 0 -3 cm BI /IM true/W 84/H 81/BPC 1/F/CCF/DP<> ID &UCJf_fĆ+? EI endstream endobj 433 0 obj <> stream 0 0 0 -3 71 66 d1 71 0 0 69 0 -3 cm BI /IM true/W 71/H 69/BPC 1/F/CCF/DP<> ID &܁ha?ׂ*5+}zOa/z>o}7}(zhėo EI endstream endobj 434 0 obj <> stream 0 0 0 -9 39 35 d1 39 0 0 44 0 -9 cm BI /IM true/W 39/H 44/BPC 1/F/CCF/DP<> ID &Ab3^{ / 7KoA`  |@ EI endstream endobj 435 0 obj <> stream 0 0 0 22 61 78 d1 61 0 0 56 0 22 cm BI /IM true/W 61/H 56/BPC 1/F/CCF/DP<> ID &A X@, Aap@ApX \., ,X X.XGO !p a`>x0x0|0x0x``8 EI endstream endobj 436 0 obj <> stream 0 0 0 13 61 69 d1 61 0 0 56 0 13 cm BI /IM true/W 61/H 56/BPC 1/F/CCF/DP<> ID 6 paL<<x>x`x0x`|0yᇐS>? A^, X X\, , ` p  EI endstream endobj 441 0 obj <> stream 0 0 0 23 13 86 d1 13 0 0 63 0 23 cm BI /IM true/W 13/H 63/BPC 1/F/CCF/DP<> ID &~˾c MPX0 EI endstream endobj 442 0 obj <> stream 0 0 0 0 43 65 d1 43 0 0 65 0 0 cm BI /IM true/W 43/H 65/BPC 1/F/CCF/DP<> ID &@OO}N' o`.C`̂UxK\-  Q@fׅZ/$x^24{O EI endstream endobj 443 0 obj <> stream 0 0 0 2 48 63 d1 48 0 0 61 0 2 cm BI /IM true/W 48/H 61/BPC 1/F/CCF/DP<> ID &ʰO! ~MPP EI endstream endobj 444 0 obj <> stream 0 0 0 2 50 65 d1 50 0 0 63 0 2 cm BI /IM true/W 50/H 63/BPC 1/F/CCF/DP<> ID &|RpAd)I||/7 /I$@ EI endstream endobj 445 0 obj <> stream 0 0 0 2 52 65 d1 52 0 0 63 0 2 cm BI /IM true/W 52/H 63/BPC 1/F/CCF/DP<> ID & O @ EI endstream endobj 446 0 obj <> stream 0 0 0 0 45 65 d1 45 0 0 65 0 0 cm BI /IM true/W 45/H 65/BPC 1/F/CCF/DP<> ID &OOA>x_ ] k?| џӿ ~}[ .;VkO! EI endstream endobj 447 0 obj <> stream 0 0 0 20 47 63 d1 47 0 0 43 0 20 cm BI /IM true/W 47/H 43/BPC 1/F/CCF/DP<> ID &l6A~0wUw?[$KhA EI endstream endobj 448 0 obj <> stream 0 0 0 20 39 63 d1 39 0 0 43 0 20 cm BI /IM true/W 39/H 43/BPC 1/F/CCF/DP<> ID & D#/< BzA =C}?߿ol0[>,@@ EI endstream endobj 449 0 obj <> stream 0 0 0 20 54 63 d1 54 0 0 43 0 20 cm BI /IM true/W 54/H 43/BPC 1/F/CCF/DP<> ID &sA/_5 w{wp?xa߿wl;\ a@ EI endstream endobj 450 0 obj <> stream 0 0 0 2 35 63 d1 35 0 0 61 0 2 cm BI /IM true/W 35/H 61/BPC 1/F/CCF/DP<> ID &= ➘x}5_?~l.Kc[yUG EI endstream endobj 451 0 obj <> stream 0 0 0 20 49 63 d1 49 0 0 43 0 20 cm BI /IM true/W 49/H 43/BPC 1/F/CCF/DP<> ID & HO߿n@᧼? Tao `5m5 , @@ EI endstream endobj 452 0 obj <> stream 0 0 0 20 38 63 d1 38 0 0 43 0 20 cm BI /IM true/W 38/H 43/BPC 1/F/CCF/DP<> ID &Ma ExD}^1_*ɪ`o0kX0` EI endstream endobj 453 0 obj <> stream 0 0 0 0 46 43 d1 46 0 0 43 0 0 cm BI /IM true/W 46/H 43/BPC 1/F/CCF/DP<> ID & }|0_{ja<@ EI endstream endobj 454 0 obj <> stream 0 0 0 0 43 43 d1 43 0 0 43 0 0 cm BI /IM true/W 43/H 43/BPC 1/F/CCF/DP<> ID &>,  zѝwӾw۾0þoOc>d9` @ EI endstream endobj 455 0 obj <> stream 0 0 0 0 35 63 d1 35 0 0 63 0 0 cm BI /IM true/W 35/H 63/BPC 1/F/CCF/DP<> ID &@A>o]f/ɪ~~[a@~_ EI endstream endobj 456 0 obj <> stream 0 0 0 2 28 63 d1 28 0 0 61 0 2 cm BI /IM true/W 28/H 61/BPC 1/F/CCF/DP<> ID & =< D7waaPT EI endstream endobj 457 0 obj <> stream 0 0 0 20 18 78 d1 18 0 0 58 0 20 cm BI /IM true/W 18/H 58/BPC 1/F/CCF/DP<> ID &}ߒ"kk ?.zOkaa EI endstream endobj 458 0 obj <> stream 0 0 0 0 14 13 d1 14 0 0 13 0 0 cm BI /IM true/W 14/H 13/BPC 1/F/CCF/DP<> ID &_- EI endstream endobj 459 0 obj <> stream 0 0 0 0 48 61 d1 48 0 0 61 0 0 cm BI /IM true/W 48/H 61/BPC 1/F/CCF/DP<> ID &(ɪ@^?A3Oa׏?T EI endstream endobj 460 0 obj <> stream 0 0 0 0 48 61 d1 48 0 0 61 0 0 cm BI /IM true/W 48/H 61/BPC 1/F/CCF/DP<> ID &>(~MR^8KK___UF|€ EI endstream endobj 461 0 obj <> stream 0 0 0 0 46 61 d1 46 0 0 61 0 0 cm BI /IM true/W 46/H 61/BPC 1/F/CCF/DP<> ID &8w&G_^_x_AzxK(V: MPP EI endstream endobj 462 0 obj <> stream 0 0 0 20 55 63 d1 55 0 0 43 0 20 cm BI /IM true/W 55/H 43/BPC 1/F/CCF/DP<> ID &];#g/Ça0g.HG[Mt @@ EI endstream endobj 463 0 obj <> stream 0 0 0 20 43 63 d1 43 0 0 43 0 20 cm BI /IM true/W 43/H 43/BPC 1/F/CCF/DP<> ID & 1<x@E z>o}oOiv0K %_ P EI endstream endobj 464 0 obj <> stream 0 0 0 20 50 63 d1 50 0 0 43 0 20 cm BI /IM true/W 50/H 43/BPC 1/F/CCF/DP<> ID &@A'CuuDHMc_T EI endstream endobj 465 0 obj <> stream 0 0 0 20 39 63 d1 39 0 0 43 0 20 cm BI /IM true/W 39/H 43/BPC 1/F/CCF/DP<> ID &ا@"\Q>u Az| ֤%d  fBa," :q4 .ɪ|>B]@ EI endstream endobj 466 0 obj <> stream 0 0 0 20 43 63 d1 43 0 0 43 0 20 cm BI /IM true/W 43/H 43/BPC 1/F/CCF/DP<> ID &C0" 5Z φ_uXa~ EI endstream endobj 468 0 obj <> stream 0 0 0 0 38 63 d1 38 0 0 63 0 0 cm BI /IM true/W 38/H 63/BPC 1/F/CCF/DP<> ID &EjAy5^? EI endstream endobj 469 0 obj <> stream 0 0 0 20 50 63 d1 50 0 0 43 0 20 cm BI /IM true/W 50/H 43/BPC 1/F/CCF/DP<> ID &%TYd\xRj2p`@ EI endstream endobj 470 0 obj <> stream 0 0 0 8 43 63 d1 43 0 0 55 0 8 cm BI /IM true/W 43/H 55/BPC 1/F/CCF/DP<> ID &ܠ$ >[(^/5K! EI endstream endobj 471 0 obj <> stream 0 0 0 20 48 63 d1 48 0 0 43 0 20 cm BI /IM true/W 48/H 43/BPC 1/F/CCF/DP<> ID &.8|."x31.K/mp~O?~a_Oa?  EI endstream endobj 472 0 obj <> stream 0 0 0 50 18 78 d1 18 0 0 28 0 50 cm BI /IM true/W 18/H 28/BPC 1/F/CCF/DP<> ID &}ߒ"kk @ EI endstream endobj 473 0 obj <> stream 0 0 0 20 48 85 d1 48 0 0 65 0 20 cm BI /IM true/W 48/H 65/BPC 1/F/CCF/DP<> ID &fTCl> ?A{_7~}|% "_rj( EI endstream endobj 474 0 obj <> stream 0 0 0 18 49 86 d1 49 0 0 68 0 18 cm BI /IM true/W 49/H 68/BPC 1/F/CCF/DP<> ID &0@;a@L:Y5X]`.+k ɀft,> {0IH=0T ,@5 EI endstream endobj 475 0 obj <> stream 0 0 0 20 46 63 d1 46 0 0 43 0 20 cm BI /IM true/W 46/H 43/BPC 1/F/CCF/DP<> ID & MRyia?h(cX5&  EI endstream endobj 476 0 obj <> stream 0 0 0 20 48 63 d1 48 0 0 43 0 20 cm BI /IM true/W 48/H 43/BPC 1/F/CCF/DP<> ID &" a@P # :'cG4'4GpAix_kj EI endstream endobj 477 0 obj <> stream 0 0 0 20 47 85 d1 47 0 0 65 0 20 cm BI /IM true/W 47/H 65/BPC 1/F/CCF/DP<> ID &j?$7 ?}? /\? (:&O EI endstream endobj 478 0 obj <> stream 0 0 0 2 50 63 d1 50 0 0 61 0 2 cm BI /IM true/W 50/H 61/BPC 1/F/CCF/DP<> ID &%TYd^+^d?( EI endstream endobj 479 0 obj <> stream 0 0 0 2 41 63 d1 41 0 0 61 0 2 cm BI /IM true/W 41/H 61/BPC 1/F/CCF/DP<> ID &*&bDc  EI endstream endobj 480 0 obj <> stream 0 0 0 2 42 63 d1 42 0 0 61 0 2 cm BI /IM true/W 42/H 61/BPC 1/F/CCF/DP<> ID &kP EI endstream endobj 481 0 obj <> stream 0 0 0 20 44 63 d1 44 0 0 43 0 20 cm BI /IM true/W 44/H 43/BPC 1/F/CCF/DP<> ID &k}}}~=xo`{}=>loMa~@ EI endstream endobj 482 0 obj <> stream 0 0 0 22 45 44 d1 45 0 0 22 0 22 cm BI /IM true/W 45/H 22/BPC 1/F/CCF/DP<> ID &X+Mu EI endstream endobj 483 0 obj <> stream 0 0 0 38 36 44 d1 36 0 0 6 0 38 cm BI /IM true/W 36/H 6/BPC 1/F/CCF/DP<> ID &(ɪ  EI endstream endobj 484 0 obj <> stream 0 0 0 2 43 65 d1 43 0 0 63 0 2 cm BI /IM true/W 43/H 63/BPC 1/F/CCF/DP<> ID &c( =>Cp釯oI~\>]~0^!u ax&x EI endstream endobj 485 0 obj <> stream 0 0 0 0 35 63 d1 35 0 0 63 0 0 cm BI /IM true/W 35/H 63/BPC 1/F/CCF/DP<> ID &> stream 0 0 0 0 43 63 d1 43 0 0 63 0 0 cm BI /IM true/W 43/H 63/BPC 1/F/CCF/DP<> ID &߃l5>{<7|7{ᇿ6_w. k ,5 !|@ EI endstream endobj 487 0 obj <> stream 0 0 0 0 43 65 d1 43 0 0 65 0 0 cm BI /IM true/W 43/H 65/BPC 1/F/CCF/DP<> ID &1'. 7M}&OM /zw_ 4Ka @ EI endstream endobj 488 0 obj <> stream 0 0 0 2 48 63 d1 48 0 0 61 0 2 cm BI /IM true/W 48/H 61/BPC 1/F/CCF/DP<> ID &qV4=a %O|'?_&av׵0\1% / _ڀ EI endstream endobj 489 0 obj <> stream 0 0 0 0 68 69 d1 68 0 0 69 0 0 cm BI /IM true/W 68/H 69/BPC 1/F/CCF/DP<> ID &j>@ƞo?Ck|'w__   EI endstream endobj 490 0 obj <> stream 0 0 0 -5 59 65 d1 59 0 0 70 0 -5 cm BI /IM true/W 59/H 70/BPC 1/F/CCF/DP<> ID )R@g$ $&a}/ ,@ EI endstream endobj 491 0 obj <> stream 0 0 0 20 16 65 d1 16 0 0 45 0 20 cm BI /IM true/W 16/H 45/BPC 1/F/CCF/DP<> ID &} _/_?5K_ EI endstream endobj 492 0 obj <> stream 0 0 0 29 66 53 d1 66 0 0 24 0 29 cm BI /IM true/W 66/H 24/BPC 1/F/CCF/DP<> ID &@@ EI endstream endobj 493 0 obj <> stream 0 0 0 -5 63 87 d1 63 0 0 92 0 -5 cm BI /IM true/W 63/H 92/BPC 1/F/CCF/DP<> ID &|98pM}??G7V ÿ}߿_ ^}ݿ퇇{ku EI endstream endobj 494 0 obj <> stream 0 0 0 2 48 63 d1 48 0 0 61 0 2 cm BI /IM true/W 48/H 61/BPC 1/F/CCF/DP<> ID &1O? ׿?њ~zޗUE&@ EI endstream endobj 495 0 obj <> stream 0 0 0 2 45 63 d1 45 0 0 61 0 2 cm BI /IM true/W 45/H 61/BPC 1/F/CCF/DP<> ID &T9 Bo0p߃~zׅ(T4  EI endstream endobj 496 0 obj <> stream 0 0 0 -30 48 13 d1 48 0 0 43 0 -30 cm BI /IM true/W 48/H 43/BPC 1/F/CCF/DP<> ID &looaooTkӓU EI endstream endobj 497 0 obj <> stream 0 0 0 2 47 63 d1 47 0 0 61 0 2 cm BI /IM true/W 47/H 61/BPC 1/F/CCF/DP<> ID & 1 uAz}. }sY\/ 5J  EI endstream endobj 501 0 obj <> stream 0 0 0 0 41 65 d1 41 0 0 65 0 0 cm BI /IM true/W 41/H 65/BPC 1/F/CCF/DP<> ID &p" ?0htOXad: EI endstream endobj 502 0 obj <> stream 0 0 0 2 45 63 d1 45 0 0 61 0 2 cm BI /IM true/W 45/H 61/BPC 1/F/CCF/DP<> ID &ȾAG& EI endstream endobj 503 0 obj <> stream 0 0 0 0 47 65 d1 47 0 0 65 0 0 cm BI /IM true/W 47/H 65/BPC 1/F/CCF/DP<> ID &Ah dA~(.}}A?ƃ5C+~k]axF.| EI endstream endobj 504 0 obj <> stream 0 0 0 2 47 63 d1 47 0 0 61 0 2 cm BI /IM true/W 47/H 61/BPC 1/F/CCF/DP<> ID &dXA.o/__ }0~~)Rjp EI endstream endobj 505 0 obj <> stream 0 0 0 0 48 63 d1 48 0 0 63 0 0 cm BI /IM true/W 48/H 63/BPC 1/F/CCF/DP<> ID &k>MVO _?m/]o  EI endstream endobj 506 0 obj <> stream 0 0 0 0 40 43 d1 40 0 0 43 0 0 cm BI /IM true/W 40/H 43/BPC 1/F/CCF/DP<> ID & ,7p[O5QɪCdp 'c A EI endstream endobj 507 0 obj <> stream 0 0 0 2 50 63 d1 50 0 0 61 0 2 cm BI /IM true/W 50/H 61/BPC 1/F/CCF/DP<> ID &%TYd\xRj2pb#\ }|4a<14}|40L( EI endstream endobj 508 0 obj <> stream 0 0 0 0 78 69 d1 78 0 0 69 0 0 cm BI /IM true/W 78/H 69/BPC 1/F/CCF/DP<> ID *aVA8p)3z7 ?oo qBPT3 EI endstream endobj 509 0 obj <> stream 0 0 0 0 41 79 d1 41 0 0 79 0 0 cm BI /IM true/W 41/H 79/BPC 1/F/CCF/DP<> ID &ӧ߽~o?߽~?߿~oj  EI endstream endobj 510 0 obj <> stream 0 0 0 18 38 62 d1 38 0 0 44 0 18 cm BI /IM true/W 38/H 44/BPC 1/F/CCF/DP<> ID &bwq <+ 5A`0 /$gkaɮ  j  EI endstream endobj 511 0 obj <> stream 0 0 0 0 50 43 d1 50 0 0 43 0 0 cm BI /IM true/W 50/H 43/BPC 1/F/CCF/DP<> ID &k.% ;k EI endstream endobj 512 0 obj <> stream 0 0 0 -6 69 69 d1 69 0 0 75 0 -6 cm BI /IM true/W 69/H 75/BPC 1/F/CCF/DP<> ID &`$A "q$?A > 5'š&:MW%|>OJ}}oacOzt{ d }o$߿{x\5k ( EI endstream endobj 513 0 obj <> stream 0 0 0 2 37 63 d1 37 0 0 61 0 2 cm BI /IM true/W 37/H 61/BPC 1/F/CCF/DP<> ID &EjC)ɪP EI endstream endobj 514 0 obj <> stream 0 0 0 2 48 65 d1 48 0 0 63 0 2 cm BI /IM true/W 48/H 63/BPC 1/F/CCF/DP<> ID &4}[&'-O>Ud=Qh?5I EI endstream endobj 515 0 obj <> stream 0 0 0 0 46 65 d1 46 0 0 65 0 0 cm BI /IM true/W 46/H 65/BPC 1/F/CCF/DP<> ID &AM >>h{A4Z Z&5_ 8A {^4w0amxqv~a|@ EI endstream endobj 519 0 obj <> stream 0 0 0 -9 18 92 d1 18 0 0 101 0 -9 cm BI /IM true/W 18/H 101/BPC 1/F/CCF/DP<> ID a?  EI endstream endobj 520 0 obj <> stream 0 0 0 -9 17 92 d1 17 0 0 101 0 -9 cm BI /IM true/W 17/H 101/BPC 1/F/CCF/DP<> ID '  EI endstream endobj 521 0 obj <> stream 0 0 0 20 50 85 d1 50 0 0 65 0 20 cm BI /IM true/W 50/H 65/BPC 1/F/CCF/DP<> ID &!??H.IנMz^kc ^ P EI endstream endobj 522 0 obj <> stream 0 0 0 0 28 79 d1 28 0 0 79 0 0 cm BI /IM true/W 28/H 79/BPC 1/F/CCF/DP<> ID &E?&@@ EI endstream endobj 523 0 obj <> stream 0 0 0 -7 29 72 d1 29 0 0 79 0 -7 cm BI /IM true/W 29/H 79/BPC 1/F/CCF/DP<> ID &Qɯ?ɮ@ EI endstream endobj 524 0 obj <> stream 0 0 0 -7 28 73 d1 28 0 0 80 0 -7 cm BI /IM true/W 28/H 80/BPC 1/F/CCF/DP<> ID &, h-tXAikZ𰿥k/a EI endstream endobj 525 0 obj <> stream 0 0 0 -7 27 73 d1 27 0 0 80 0 -7 cm BI /IM true/W 27/H 80/BPC 1/F/CCF/DP<> ID &l5Axaᇿ__kiiapT*MPP EI endstream endobj 526 0 obj <> stream 0 0 0 9 48 70 d1 48 0 0 61 0 9 cm BI /IM true/W 48/H 61/BPC 1/F/CCF/DP<> ID &jad/'-L'8}&@ EI endstream endobj 527 0 obj <> stream 0 0 0 0 68 69 d1 68 0 0 69 0 0 cm BI /IM true/W 68/H 69/BPC 1/F/CCF/DP<> ID "MBCkV|>u> ~^^^UAAJg@ EI endstream endobj 528 0 obj <> stream 0 0 0 20 55 85 d1 55 0 0 65 0 20 cm BI /IM true/W 55/H 65/BPC 1/F/CCF/DP<> ID &h |8O}&>WOO?C oJ>o N  EI endstream endobj 529 0 obj <> stream 0 0 0 7 43 72 d1 43 0 0 65 0 7 cm BI /IM true/W 43/H 65/BPC 1/F/CCF/DP<> ID &I}~߾}<#[ u"@O_ aKkka` EI endstream endobj 530 0 obj <> stream 114 0 0 0 0 0 d1 endstream endobj 531 0 obj <> stream 0 0 0 8 41 59 d1 41 0 0 51 0 8 cm BI /IM true/W 41/H 51/BPC 1/F/CCF/DP<> ID &pA}x}|x>> >p{aX%X\  ւpXa@@ EI endstream endobj 535 0 obj <> stream 0 0 0 0 48 63 d1 48 0 0 63 0 0 cm BI /IM true/W 48/H 63/BPC 1/F/CCF/DP<> ID &pᬆoP$CLa?707ǿ EI endstream endobj 536 0 obj <> stream 0 0 0 0 31 31 d1 31 0 0 31 0 0 cm BI /IM true/W 31/H 31/BPC 1/F/CCF/DP<> ID &`_[z  EI endstream endobj 537 0 obj <> stream 0 0 0 10 45 56 d1 45 0 0 46 0 10 cm BI /IM true/W 45/H 46/BPC 1/F/CCF/DP<> ID &h75hڀ EI endstream endobj 539 0 obj <> stream 0 0 0 21 54 68 d1 54 0 0 47 0 21 cm BI /IM true/W 54/H 47/BPC 1/F/CCF/DP<> ID &l2τa8{ppp߿ }&> stream 0 0 0 8 66 74 d1 66 0 0 66 0 8 cm BI /IM true/W 66/H 66/BPC 1/F/CCF/DP<> ID &`~4?dsj  EI endstream endobj 541 0 obj <> stream 0 0 0 -1 34 66 d1 34 0 0 67 0 -1 cm BI /IM true/W 34/H 67/BPC 1/F/CCF/DP<> ID &l/MB  EI endstream endobj 545 0 obj <> stream 0 0 0 -1 41 66 d1 41 0 0 67 0 -1 cm BI /IM true/W 41/H 67/BPC 1/F/CCF/DP<> ID &=Qa{7߶>{7.@ vvK0\ !@ EI endstream endobj 546 0 obj <> stream 0 0 0 19 39 63 d1 39 0 0 44 0 19 cm BI /IM true/W 39/H 44/BPC 1/F/CCF/DP<> ID &Abρ4޸x-[zX0<1 ,0_|pz}oal,Bc EI endstream endobj 547 0 obj <> stream 0 0 0 -1 43 69 d1 43 0 0 70 0 -1 cm BI /IM true/W 43/H 70/BPC 1/F/CCF/DP<> ID &bB Fz/I ~ %렺,.Ap <|<0%[` ج0[  EI endstream endobj 548 0 obj <> stream 0 0 0 -9 24 90 d1 24 0 0 99 0 -9 cm BI /IM true/W 24/H 99/BPC 1/F/CCF/DP<> ID &XZZ -p]~z/Z_ /Mw|= ߀ EI endstream endobj 549 0 obj <> stream 0 0 0 -9 24 90 d1 24 0 0 99 0 -9 cm BI /IM true/W 24/H 99/BPC 1/F/CCF/DP<> ID &h{{{>{ZX_^Akֽa.Z]iu EI endstream endobj 550 0 obj <> stream 0 0 0 27 66 54 d1 66 0 0 27 0 27 cm BI /IM true/W 66/H 27/BPC 1/F/CCF/DP<> ID &?4@ EI endstream endobj 551 0 obj <> stream 0 0 0 -3 45 66 d1 45 0 0 69 0 -3 cm BI /IM true/W 45/H 69/BPC 1/F/CCF/DP<> ID & `57A|0a EI endstream endobj 552 0 obj <> stream 0 0 0 -1 43 69 d1 43 0 0 70 0 -1 cm BI /IM true/W 43/H 70/BPC 1/F/CCF/DP<> ID &DGok ? _#2t}cר_] [kivb ,0  EI endstream endobj 553 0 obj <> stream 0 0 0 38 61 44 d1 61 0 0 6 0 38 cm BI /IM true/W 61/H 6/BPC 1/F/CCF/DP<> ID &|^MR EI endstream endobj 554 0 obj <> stream 0 0 0 -1 43 69 d1 43 0 0 70 0 -1 cm BI /IM true/W 43/H 70/BPC 1/F/CCF/DP<> ID &8/4=oAo?}߯׫V+k(A)5{hʹ a0\0  EI endstream endobj 555 0 obj <> stream 0 0 0 -1 43 69 d1 43 0 0 70 0 -1 cm BI /IM true/W 43/H 70/BPC 1/F/CCF/DP<> ID &1j#3AzM&} L?[w__]kvz\]-4@ EI endstream endobj 559 0 obj <> stream 0 0 0 -3 51 66 d1 51 0 0 69 0 -3 cm BI /IM true/W 51/H 69/BPC 1/F/CCF/DP<> ID &/@la?~o>o?=wΡ@ EI endstream endobj 560 0 obj <> stream 0 0 0 0 50 3 d1 50 0 0 3 0 0 cm BI /IM true/W 50/H 3/BPC 1/F/CCF/DP<> ID  EI endstream endobj 561 0 obj <> stream 0 0 0 0 71 81 d1 71 0 0 81 0 0 cm BI /IM true/W 71/H 81/BPC 1/F/CCF/DP<> ID & )OMOH7}wah,;[\8~6om {o?Wމh/0oti>b5@ EI endstream endobj 562 0 obj <> stream 0 0 0 -9 6 92 d1 6 0 0 101 0 -9 cm BI /IM true/W 6/H 101/BPC 1/F/CCF/DP<> ID &?_ EI endstream endobj 563 0 obj <> stream 0 0 0 2 28 18 d1 28 0 0 16 0 2 cm BI /IM true/W 28/H 16/BPC 1/F/CCF/DP<> ID &pش[il4{ l-5P EI endstream endobj 564 0 obj <> stream 0 0 0 0 71 72 d1 71 0 0 72 0 0 cm BI /IM true/W 71/H 72/BPC 1/F/CCF/DP<> ID &j!OC@xDp|8@z o 7A}XzO[P_ k?`\ d|1' \ \@ EI endstream endobj 565 0 obj <> stream 0 0 0 -10 46 91 d1 46 0 0 101 0 -10 cm BI /IM true/W 46/H 101/BPC 1/F/CCF/DP<> ID &6x~~a߿߿߇~oa߽~߇ EI endstream endobj 569 0 obj <> stream 0 0 0 -5 54 69 d1 54 0 0 74 0 -5 cm BI /IM true/W 54/H 74/BPC 1/F/CCF/DP<> ID &` a Oo|' dkXux. axZ .A|х.fG_u{ {]k (7a> stream 0 0 0 -5 59 80 d1 59 0 0 85 0 -5 cm BI /IM true/W 59/H 85/BPC 1/F/CCF/DP<> ID 6W v\Appz.דPTZ4d3@Ŀ![p..,",26+@i0pl}t/5_ׇ] ^vu EO . g@π EI endstream endobj 571 0 obj <> stream 0 0 0 2 46 63 d1 46 0 0 61 0 2 cm BI /IM true/W 46/H 61/BPC 1/F/CCF/DP<> ID &㾤r9A0OT EI endstream endobj 572 0 obj <> stream 118 0 0 0 0 0 d1 endstream endobj 573 0 obj <> stream 0 0 0 20 47 63 d1 47 0 0 43 0 20 cm BI /IM true/W 47/H 43/BPC 1/F/CCF/DP<> ID &3h 0AOz:7aMW8ᅸs0'zx{ɪoL%a  ` EI endstream endobj 574 0 obj <> stream 0 0 0 20 50 85 d1 50 0 0 65 0 20 cm BI /IM true/W 50/H 65/BPC 1/F/CCF/DP<> ID & ɪ_}a{΍ݾow?9w ". ,0 EI endstream endobj 575 0 obj <> stream 0 0 0 20 41 63 d1 41 0 0 43 0 20 cm BI /IM true/W 41/H 43/BPC 1/F/CCF/DP<> ID &ĐL $ E!&?`7 |%\Ѭ187/|/{}Xk d4 EI endstream endobj 576 0 obj <> stream 0 0 0 -2 42 63 d1 42 0 0 65 0 -2 cm BI /IM true/W 42/H 65/BPC 1/F/CCF/DP<> ID & D#g|?ѡ= ?o ?ۅilWX`)|>px d5  EI endstream endobj 577 0 obj <> stream 0 0 0 2 34 63 d1 34 0 0 61 0 2 cm BI /IM true/W 34/H 61/BPC 1/F/CCF/DP<> ID &MBBOѣo?(5^ >j  EI endstream endobj 578 0 obj <> stream 0 0 0 20 38 63 d1 38 0 0 43 0 20 cm BI /IM true/W 38/H 43/BPC 1/F/CCF/DP<> ID &Ma ExD}5j +  ( EI endstream endobj 579 0 obj <> stream 0 0 0 30 18 95 d1 18 0 0 65 0 30 cm BI /IM true/W 18/H 65/BPC 1/F/CCF/DP<> ID &_oop~&~0'T a EI endstream endobj 580 0 obj <> stream 0 0 0 0 27 58 d1 27 0 0 58 0 0 cm BI /IM true/W 27/H 58/BPC 1/F/CCF/DP<> ID &!wrk7~. ޿  EI endstream endobj 581 0 obj <> stream 0 0 0 8 41 59 d1 41 0 0 51 0 8 cm BI /IM true/W 41/H 51/BPC 1/F/CCF/DP<> ID &-`XAh,K a@K\ . =`a ?x{ EI endstream endobj 582 0 obj <> stream 0 0 0 20 14 63 d1 14 0 0 43 0 20 cm BI /IM true/W 14/H 43/BPC 1/F/CCF/DP<> ID &_-'&l,5 EI endstream endobj 586 0 obj <> stream 0 0 0 0 50 63 d1 50 0 0 63 0 0 cm BI /IM true/W 50/H 63/BPC 1/F/CCF/DP<> ID &χ>i8k_/_^{@8& EI endstream endobj 587 0 obj <> stream 0 0 0 0 48 61 d1 48 0 0 61 0 0 cm BI /IM true/W 48/H 61/BPC 1/F/CCF/DP<> ID &ZMRadCDa'!+AɪL( EI endstream endobj 588 0 obj <> stream 0 0 0 50 20 78 d1 20 0 0 28 0 50 cm BI /IM true/W 20/H 28/BPC 1/F/CCF/DP<> ID &q]>{p^@ EI endstream endobj 589 0 obj <> stream 0 0 0 50 14 63 d1 14 0 0 13 0 50 cm BI /IM true/W 14/H 13/BPC 1/F/CCF/DP<> ID &<'ɪkj  EI endstream endobj 600 0 obj <> stream 0 0 0 -3 70 69 d1 70 0 0 72 0 -3 cm BI /IM true/W 70/H 72/BPC 1/F/CCF/DP<> ID &*?*5o}C_P߿鿿~o ~}C=4IpK  EI endstream endobj 601 0 obj <> stream 0 0 0 18 67 87 d1 67 0 0 69 0 18 cm BI /IM true/W 67/H 69/BPC 1/F/CCF/DP<> ID ܩɨ~_^w >77?[M.  EI endstream endobj 602 0 obj <> stream 0 0 0 2 48 63 d1 48 0 0 61 0 2 cm BI /IM true/W 48/H 61/BPC 1/F/CCF/DP<> ID &k>MVÓ{,0׺-n[_ OA?X}>Մj8Pxp@ EI endstream endobj 603 0 obj <> stream 0 0 0 0 43 65 d1 43 0 0 65 0 0 cm BI /IM true/W 43/H 65/BPC 1/F/CCF/DP<> ID & 1o00Apax5џc\x}kN@ EI endstream endobj 604 0 obj <> stream 0 0 0 0 60 69 d1 60 0 0 69 0 0 cm BI /IM true/W 60/H 69/BPC 1/F/CCF/DP<> ID &N @~i0? EI endstream endobj 605 0 obj <> stream 0 0 0 -2 43 63 d1 43 0 0 65 0 -2 cm BI /IM true/W 43/H 65/BPC 1/F/CCF/DP<> ID &>,  zѝwӾw۾0þoOc>d9`? > |?ᬆ@ EI endstream endobj 606 0 obj <> stream 0 0 0 0 53 83 d1 53 0 0 83 0 0 cm BI /IM true/W 53/H 83/BPC 1/F/CCF/DP<> ID &hЁ?ӎ{&xy pY ;O @ EI endstream endobj 607 0 obj <> stream 0 0 0 18 47 61 d1 47 0 0 43 0 18 cm BI /IM true/W 47/H 43/BPC 1/F/CCF/DP<> ID &O0OA/ 42{w~ ?{߿~U=>   EI endstream endobj 608 0 obj <> stream 0 0 0 0 67 96 d1 67 0 0 96 0 0 cm BI /IM true/W 67/H 96/BPC 1/F/CCF/DP<> ID &\_!Cx"TNaoI߻ /K\%lhp 5oa oD"Oz׼/]r/:Xb$GeU EI endstream endobj 609 0 obj <> stream 0 0 0 -5 111 96 d1 111 0 0 101 0 -5 cm BI /IM true/W 111/H 101/BPC 1/F/CCF/DP<> ID &Hf O????ȅ׫}~/[ M+[V_^++JWO|/o׭|/"ĉY  EI endstream endobj 610 0 obj <> stream 0 0 0 25 79 127 d1 79 0 0 102 0 25 cm BI /IM true/W 79/H 102/BPC 1/F/CCF/DP<> ID &t @} @FDA!7  \0Apa.j1 >?>  EI endstream endobj 611 0 obj <> stream 0 0 0 59 53 127 d1 53 0 0 68 0 59 cm BI /IM true/W 53/H 68/BPC 1/F/CCF/DP<> ID &.t?%¾k |Cx,I%, --r . 94྿{] .|%3|@ EI endstream endobj 612 0 obj <> stream 0 0 0 -12 52 108 d1 52 0 0 120 0 -12 cm BI /IM true/W 52/H 120/BPC 1/F/CCF/DP<> ID &2 j{߇{x߿~aڀ EI endstream endobj 616 0 obj <> stream 0 0 0 12 54 113 d1 54 0 0 101 0 12 cm BI /IM true/W 54/H 101/BPC 1/F/CCF/DP<> ID 0 ~5A߿}~߽}~o߿~o߿x~o@ EI endstream endobj 620 0 obj <> stream 0 0 0 -4 70 78 d1 70 0 0 82 0 -4 cm BI /IM true/W 70/H 82/BPC 1/F/CCF/DP<> ID &w Q ?AQg@ EI endstream endobj 621 0 obj <> stream 0 0 0 -1 32 78 d1 32 0 0 79 0 -1 cm BI /IM true/W 32/H 79/BPC 1/F/CCF/DP<> ID &/Ț뜿BA@BX=w EI endstream endobj 625 0 obj <> stream 0 0 0 -3 96 66 d1 96 0 0 69 0 -3 cm BI /IM true/W 96/H 69/BPC 1/F/CCF/DP<> ID *]_MHHl -ڿ?MM}[y \2 7} EI endstream endobj 626 0 obj <> stream 0 0 0 41 55 109 d1 55 0 0 68 0 41 cm BI /IM true/W 55/H 68/BPC 1/F/CCF/DP<> ID &@̂ D>fx3&0➟o5_^Xa <1_rdj؜0 oۢ$v=0>ታ B@ EI endstream endobj 627 0 obj <> stream 0 0 0 22 48 89 d1 48 0 0 67 0 22 cm BI /IM true/W 48/H 67/BPC 1/F/CCF/DP<> ID & Ϗ#Xh0z] n~&6ۻvNg1W oX0` a`j  EI endstream endobj 628 0 obj <> stream 0 0 0 24 61 104 d1 61 0 0 80 0 24 cm BI /IM true/W 61/H 80/BPC 1/F/CCF/DP<> ID &!<E8a7z_]d .-E>N ȡq{:@azMڗߧvv G)`h  EI endstream endobj 629 0 obj <> stream 0 0 0 -1 61 80 d1 61 0 0 81 0 -1 cm BI /IM true/W 61/H 81/BPC 1/F/CCF/DP<> ID &@i|A 0E8p }?a ]AqLZ ? _],6.= @q4e8eXx}{ l( EI endstream endobj 630 0 obj <> stream 0 0 0 63 41 71 d1 41 0 0 8 0 63 cm BI /IM true/W 41/H 8/BPC 1/F/CCF/DP<> ID &j  EI endstream endobj 635 0 obj <> stream 0 0 0 0 45 69 d1 45 0 0 69 0 0 cm BI /IM true/W 45/H 69/BPC 1/F/CCF/DP<> ID &I4| xP7? Ṙh+{ɪ^?dX^}a.P?0^ `{N  EI endstream endobj 639 0 obj <> stream 0 0 0 0 46 69 d1 46 0 0 69 0 0 cm BI /IM true/W 46/H 69/BPC 1/F/CCF/DP<> ID &xF[o =Uۯ_ iq p ^E4vh>߾ 7``x5 !x EI endstream endobj 640 0 obj <> stream 0 0 0 -7 8 72 d1 8 0 0 79 0 -7 cm BI /IM true/W 8/H 79/BPC 1/F/CCF/DP<> ID &P EI endstream endobj 641 0 obj <> stream 0 0 0 0 102 69 d1 102 0 0 69 0 0 cm BI /IM true/W 102/H 69/BPC 1/F/CCF/DP<> ID )`Ɵ jHk? 0AM?[ 7Io-O ? EI endstream endobj 642 0 obj <> stream 0 0 0 -1 75 71 d1 75 0 0 72 0 -1 cm BI /IM true/W 75/H 72/BPC 1/F/CCF/DP<> ID &j ߐ0O!K<"0 |} = oI& >[ _zak-K  xXb `* EI endstream endobj 643 0 obj <> stream 0 0 0 94 69 101 d1 69 0 0 7 0 94 cm BI /IM true/W 69/H 7/BPC 1/F/CCF/DP<> ID &Mu EI endstream endobj 644 0 obj <> stream 0 0 0 -1 52 71 d1 52 0 0 72 0 -1 cm BI /IM true/W 52/H 72/BPC 1/F/CCF/DP<> ID &.t?@`| 4xO7 ` 3X.K, Z2dfWK^u_p!l{#K> 't@ EI endstream endobj 645 0 obj <> stream 0 0 0 2 72 69 d1 72 0 0 67 0 2 cm BI /IM true/W 72/H 67/BPC 1/F/CCF/DP<> ID &Z !Rk_<\G EI endstream endobj 646 0 obj <> stream 0 0 0 -4 72 65 d1 72 0 0 69 0 -4 cm BI /IM true/W 72/H 69/BPC 1/F/CCF/DP<> ID $AJ:~~_~z^ . @_g5/ ,ET()T  EI endstream endobj 647 0 obj <> stream 0 0 0 0 83 69 d1 83 0 0 69 0 0 cm BI /IM true/W 83/H 69/BPC 1/F/CCF/DP<> ID ":I/I1o@ EI endstream endobj 648 0 obj <> stream 0 0 0 1 83 70 d1 83 0 0 69 0 1 cm BI /IM true/W 83/H 69/BPC 1/F/CCF/DP<> ID )\_ɨC0U/__ : __~%_/ /_ KN(X_ EI endstream endobj 652 0 obj <> stream 0 0 0 0 70 95 d1 70 0 0 95 0 0 cm BI /IM true/W 70/H 95/BPC 1/F/CCF/DP<> ID &C^σQ?߰?oo~?x EI endstream endobj 653 0 obj <> stream 0 0 0 -4 59 80 d1 59 0 0 84 0 -4 cm BI /IM true/W 59/H 84/BPC 1/F/CCF/DP<> ID &Pf|W6߇.&_^?Ar@ EI endstream endobj 654 0 obj <> stream 0 0 0 24 66 101 d1 66 0 0 77 0 24 cm BI /IM true/W 66/H 77/BPC 1/F/CCF/DP<> ID & Cb? A ~Pw}_O_߿xkm' x` ܇ EI endstream endobj 658 0 obj <> stream 0 0 0 20 40 108 d1 40 0 0 88 0 20 cm BI /IM true/W 40/H 88/BPC 1/F/CCF/DP<> ID &4A=6 W3'AA |P EI endstream endobj 659 0 obj <> stream 0 0 0 22 46 89 d1 46 0 0 67 0 22 cm BI /IM true/W 46/H 67/BPC 1/F/CCF/DP<> ID & <,<$>o߯ > _~\0ia 0`~ ?>`{P EI endstream endobj 660 0 obj <> stream 0 0 0 -5 92 78 d1 92 0 0 83 0 -5 cm BI /IM true/W 92/H 83/BPC 1/F/CCF/DP<> ID &B̂Xua߽v Wz/kkp]]t .? kkkk / EI endstream endobj 664 0 obj <> stream 0 0 0 -3 33 32 d1 33 0 0 35 0 -3 cm BI /IM true/W 33/H 35/BPC 1/F/CCF/DP<> ID &XGa aOUp4  EI endstream endobj 668 0 obj <> stream 0 0 0 -5 62 66 d1 62 0 0 71 0 -5 cm BI /IM true/W 62/H 71/BPC 1/F/CCF/DP<> ID &"OFri$`&0# a0&<0. 8 EI endstream endobj 672 0 obj <> stream 0 0 0 0 64 96 d1 64 0 0 96 0 0 cm BI /IM true/W 64/H 96/BPC 1/F/CCF/DP<> ID & @La`<|@ $?wjpapX^/}x4|?^/^ G2 |>_3φ`6 EI endstream endobj 673 0 obj <> stream 0 0 0 -5 89 94 d1 89 0 0 99 0 -5 cm BI /IM true/W 89/H 99/BPC 1/F/CCF/DP<> ID &.3 >  ^?_/}}}|/ 3el_ EI endstream endobj 674 0 obj <> stream 0 0 0 60 123 125 d1 123 0 0 65 0 60 cm BI /IM true/W 123/H 65/BPC 1/F/CCF/DP<> ID & E Y eAú kar X5L4=xbh5 A AC EI endstream endobj 675 0 obj <> stream 0 0 0 25 50 78 d1 50 0 0 53 0 25 cm BI /IM true/W 50/H 53/BPC 1/F/CCF/DP<> ID MsPc ?~7~}}ko{x}~߷ow~t~_ EI endstream endobj 676 0 obj <> stream 0 0 0 25 66 102 d1 66 0 0 77 0 25 cm BI /IM true/W 66/H 77/BPC 1/F/CCF/DP<> ID &$xA<' rj{ uoX~_^}o Mרo+.   EI endstream endobj 677 0 obj <> stream 0 0 0 -4 47 68 d1 47 0 0 72 0 -4 cm BI /IM true/W 47/H 72/BPC 1/F/CCF/DP<> ID &0p'a?wr~?Xgx1 J|@ EI endstream endobj 681 0 obj <> stream 0 0 0 22 45 89 d1 45 0 0 67 0 22 cm BI /IM true/W 45/H 67/BPC 1/F/CCF/DP<> ID &I3FuPFcwX}gB {oӌMU'?߃`j  EI endstream endobj 682 0 obj <> stream 0 0 0 -4 45 68 d1 45 0 0 72 0 -4 cm BI /IM true/W 45/H 72/BPC 1/F/CCF/DP<> ID &x/>ޟ·~߿߻a^\0 lW5|Zov!h> J|@ EI endstream endobj 683 0 obj <> stream 0 0 0 0 43 68 d1 43 0 0 68 0 0 cm BI /IM true/W 43/H 68/BPC 1/F/CCF/DP<> ID & :# M7?oo]  )g|?a<>?<0 EI endstream endobj 684 0 obj <> stream 0 0 0 -4 96 78 d1 96 0 0 82 0 -4 cm BI /IM true/W 96/H 82/BPC 1/F/CCF/DP<> ID &)𾾿____ 1}A__/~/__/KA~K__/K_Bd` EI endstream endobj 685 0 obj <> stream 0 0 0 -1 67 80 d1 67 0 0 81 0 -1 cm BI /IM true/W 67/H 81/BPC 1/F/CCF/DP<> ID &/ a AD~?P=5rp.F#ACz:V`} @@ EI endstream endobj 690 0 obj <> stream 0 0 0 44 57 108 d1 57 0 0 64 0 44 cm BI /IM true/W 57/H 64/BPC 1/F/CCF/DP<> ID &x~;}5Vg~oVMoyF EI endstream endobj 694 0 obj <> stream 0 0 0 -21 67 66 d1 67 0 0 87 0 -21 cm BI /IM true/W 67/H 87/BPC 1/F/CCF/DP<> ID %"zoo_߽z_=vv_=ǵk>C*8>P  2_ EI endstream endobj 698 0 obj <> stream 0 0 0 22 34 87 d1 34 0 0 65 0 22 cm BI /IM true/W 34/H 65/BPC 1/F/CCF/DP<> ID MFhC<_c{ᇰ<75 EI endstream endobj 702 0 obj <> stream 0 0 0 -16 31 32 d1 31 0 0 48 0 -16 cm BI /IM true/W 31/H 48/BPC 1/F/CCF/DP<> ID & xG~wo]?Y^Py{͗0K!~8P EI endstream endobj 703 0 obj <> stream 0 0 0 -21 81 80 d1 81 0 0 101 0 -21 cm BI /IM true/W 81/H 101/BPC 1/F/CCF/DP<> ID &p74zAo_?7A'}>M}oaxwP|5={~a{€ EI endstream endobj 704 0 obj <> stream 0 0 0 -3 43 69 d1 43 0 0 72 0 -3 cm BI /IM true/W 43/H 72/BPC 1/F/CCF/DP<> ID &ova@ EI endstream endobj 705 0 obj <> stream 0 0 0 21 56 68 d1 56 0 0 47 0 21 cm BI /IM true/W 56/H 47/BPC 1/F/CCF/DP<> ID &a'3!Xk" oH?߄ Pwf?]k0`xY a EI endstream endobj 706 0 obj <> stream 0 0 0 20 38 68 d1 38 0 0 48 0 20 cm BI /IM true/W 38/H 48/BPC 1/F/CCF/DP<> ID &8joHxA7}&_}u!ɮ#=|0ݬ0N@ EI endstream endobj 707 0 obj <> stream 0 0 0 20 45 68 d1 45 0 0 48 0 20 cm BI /IM true/W 45/H 48/BPC 1/F/CCF/DP<> ID &@13PzMAXz Ow&_K_ m.ް !~( EI endstream endobj 708 0 obj <> stream 0 0 0 20 32 68 d1 32 0 0 48 0 20 cm BI /IM true/W 32/H 48/BPC 1/F/CCF/DP<> ID 0!_ m8 7_ PU/BX%Z8PD3kkapboN<@ EI endstream endobj 709 0 obj <> stream 0 0 0 55 12 66 d1 12 0 0 11 0 55 cm BI /IM true/W 12/H 11/BPC 1/F/CCF/DP<> ID &ۂ!MPX0 EI endstream endobj 710 0 obj <> stream 0 0 0 -1 41 69 d1 41 0 0 70 0 -1 cm BI /IM true/W 41/H 70/BPC 1/F/CCF/DP<> ID &|W@ ?WCaq]K^a/ / W<@ EI endstream endobj 711 0 obj <> stream 0 0 0 -5 92 80 d1 92 0 0 85 0 -5 cm BI /IM true/W 92/H 85/BPC 1/F/CCF/DP<> ID &S5"2pA5X  AK^ X xS_& k\6]5 / !||'Q7kj EI endstream endobj 713 0 obj <> stream 0 0 0 -3 69 66 d1 69 0 0 69 0 -3 cm BI /IM true/W 69/H 69/BPC 1/F/CCF/DP<> ID aj! 2Ei_Kz__/A}.ׇ]k0^ׇo@K EI endstream endobj 717 0 obj <> stream 0 0 0 0 114 71 d1 114 0 0 71 0 0 cm BI /IM true/W 114/H 71/BPC 1/F/CCF/DP<> ID &p5o[[u gU'z~յko޾=_a烈 ¿['׿?P!* EI endstream endobj 718 0 obj <> stream 0 0 0 1 81 70 d1 81 0 0 69 0 1 cm BI /IM true/W 81/H 69/BPC 1/F/CCF/DP<> ID "&Nkׅׯׯ//Av5ivR?{ ~ ~߆~߆7ῃ&ʅ EI endstream endobj 719 0 obj <> stream 0 0 0 0 58 69 d1 58 0 0 69 0 0 cm BI /IM true/W 58/H 69/BPC 1/F/CCF/DP<> ID &;dk|6mo|?d{?|߰~ߑ|_ EI endstream endobj 726 0 obj <> stream 0 0 0 -2 32 83 d1 32 0 0 85 0 -2 cm BI /IM true/W 32/H 85/BPC 1/F/CCF/DP<> ID &!"'}O@0  EI endstream endobj 727 0 obj <> stream 0 0 0 -18 48 43 d1 48 0 0 61 0 -18 cm BI /IM true/W 48/H 61/BPC 1/F/CCF/DP<> ID &Q &&D~^Aviq o~_?( EI endstream endobj 737 0 obj <> stream 0 0 0 0 46 69 d1 46 0 0 69 0 0 cm BI /IM true/W 46/H 69/BPC 1/F/CCF/DP<> ID &B ށAނ5k᰻a.K kKMOo}}?ޟ}Aa q0T EI endstream endobj 738 0 obj <> stream 0 0 0 -3 68 66 d1 68 0 0 69 0 -3 cm BI /IM true/W 68/H 69/BPC 1/F/CCF/DP<> ID aMD!5?|E8g0}߰a.1Bp.  EI endstream endobj 739 0 obj <> stream 0 0 0 0 55 80 d1 55 0 0 80 0 0 cm BI /IM true/W 55/H 80/BPC 1/F/CCF/DP<> ID &>C OC  ? }_\0Kp. `!`%iaoA7a~~_^Av *؅`a`΁@ EI endstream endobj 740 0 obj <> stream 0 0 0 -4 81 78 d1 81 0 0 82 0 -4 cm BI /IM true/W 81/H 82/BPC 1/F/CCF/DP<> ID %PsP)BFUC|Geῇ_ }z ^AAx(Rhe( EI endstream endobj 747 0 obj <> stream 0 0 0 0 45 69 d1 45 0 0 69 0 0 cm BI /IM true/W 45/H 69/BPC 1/F/CCF/DP<> ID &$T ?7arj '߽/O H0,^gIW}? o 0K ,5'  EI endstream endobj 748 0 obj <> stream 0 0 0 0 55 80 d1 55 0 0 80 0 0 cm BI /IM true/W 55/H 80/BPC 1/F/CCF/DP<> ID & 2CzO0Ӿi׆ ty '>A'$}u^ïkl%l0aa٤@ EI endstream endobj 749 0 obj <> stream 0 0 0 -4 97 80 d1 97 0 0 84 0 -4 cm BI /IM true/W 97/H 84/BPC 1/F/CCF/DP<> ID &xCK(<zDa>y55B[s_}//_5~ 0?~/!EAB&A EI endstream endobj 765 0 obj <> stream 0 0 0 44 49 89 d1 49 0 0 45 0 44 cm BI /IM true/W 49/H 45/BPC 1/F/CCF/DP<> ID &޽޿L??ޓP߿ ·P0A<@ EI endstream endobj 790 0 obj <> stream 0 0 0 -1 43 32 d1 43 0 0 33 0 -1 cm BI /IM true/W 43/H 33/BPC 1/F/CCF/DP<> ID &l4?pw>ɯl?߷a~ k+i( EI endstream endobj 791 0 obj <> stream 0 0 0 -18 25 100 d1 25 0 0 118 0 -18 cm BI /IM true/W 25/H 118/BPC 1/F/CCF/DP<> ID &ZZ_\%k ~+M~={~ EI endstream endobj 792 0 obj <> stream 0 0 0 -16 33 32 d1 33 0 0 48 0 -16 cm BI /IM true/W 33/H 48/BPC 1/F/CCF/DP<> ID &XGzL?-U=vAo[ 3@ EI endstream endobj 793 0 obj <> stream 0 0 0 -16 27 30 d1 27 0 0 46 0 -16 cm BI /IM true/W 27/H 46/BPC 1/F/CCF/DP<> ID &Mʿ|< EI endstream endobj 794 0 obj <> stream 0 0 0 -16 31 30 d1 31 0 0 46 0 -16 cm BI /IM true/W 31/H 46/BPC 1/F/CCF/DP<> ID {7v߷`=?bII^ml0K+€ EI endstream endobj 795 0 obj <> stream 0 0 0 -18 25 100 d1 25 0 0 118 0 -18 cm BI /IM true/W 25/H 118/BPC 1/F/CCF/DP<> ID &l{{7ooZ_ Z^KK EI endstream endobj 799 0 obj <> stream 0 0 0 42 45 107 d1 45 0 0 65 0 42 cm BI /IM true/W 45/H 65/BPC 1/F/CCF/DP<> ID &/R0A(#1w~|'A?ÓU_/mvPb  EI endstream endobj 800 0 obj <> stream 0 0 0 -4 84 78 d1 84 0 0 82 0 -4 cm BI /IM true/W 84/H 82/BPC 1/F/CCF/DP<> ID &|0jC,~  Br P4aC`~C-?~~%r>\ EI endstream endobj 801 0 obj <> stream 0 0 0 0 45 69 d1 45 0 0 69 0 0 cm BI /IM true/W 45/H 69/BPC 1/F/CCF/DP<> ID & #Pl f(=oH7 6M~ ~Z]i膁o 0W a a ,0` EI endstream endobj 817 0 obj <> stream 0 0 0 17 51 87 d1 51 0 0 70 0 17 cm BI /IM true/W 51/H 70/BPC 1/F/CCF/DP<> ID Cɨ9wwf4@; ?B@ EI endstream endobj 818 0 obj <> stream 0 0 0 -5 67 78 d1 67 0 0 83 0 -5 cm BI /IM true/W 67/H 83/BPC 1/F/CCF/DP<> ID &"hAyh_ W`^?P?"  EI endstream endobj 819 0 obj <> stream 0 0 0 -7 45 72 d1 45 0 0 79 0 -7 cm BI /IM true/W 45/H 79/BPC 1/F/CCF/DP<> ID & ?ov{5{K7N=;'  EI endstream endobj 829 0 obj <> stream 0 0 0 0 39 101 d1 39 0 0 101 0 0 cm BI /IM true/W 39/H 101/BPC 1/F/CCF/DP<> ID &kkk~x__X_~~Z_ֿ~ZZZ_ EI endstream endobj 830 0 obj <> stream 0 0 0 12 37 29 d1 37 0 0 17 0 12 cm BI /IM true/W 37/H 17/BPC 1/F/CCF/DP<> ID &4\5` `[ - v1 amm` EI endstream endobj 837 0 obj <> stream 0 0 0 -23 67 66 d1 67 0 0 89 0 -23 cm BI /IM true/W 67/H 89/BPC 1/F/CCF/DP<> ID !Jjd0k{^_/BK~K_/ _/ _ KƟAA>M@r?L#/{%f EI endstream endobj 838 0 obj <> stream 0 0 0 -5 60 87 d1 60 0 0 92 0 -5 cm BI /IM true/W 60/H 92/BPC 1/F/CCF/DP<> ID &\ 224a< Co@}& IW:w[k~0᭰ #&'N  EI endstream endobj 842 0 obj <> stream 0 0 0 -2 43 63 d1 43 0 0 65 0 -2 cm BI /IM true/W 43/H 65/BPC 1/F/CCF/DP<> ID & 1<x@E z>o}oOiv0K %_ X=|?o EI endstream endobj 849 0 obj <> stream 0 0 0 12 32 111 d1 32 0 0 99 0 12 cm BI /IM true/W 32/H 99/BPC 1/F/CCF/DP<> ID &z륄K~/MW{?߿{|7={{| EI endstream endobj 850 0 obj <> stream 0 0 0 18 98 90 d1 98 0 0 72 0 18 cm BI /IM true/W 98/H 72/BPC 1/F/CCF/DP<> ID &Ak0 pӿ./(A>__|&kmo}ov+%pz 8o  EI endstream endobj 851 0 obj <> stream 0 0 0 -9 32 90 d1 32 0 0 99 0 -9 cm BI /IM true/W 32/H 99/BPC 1/F/CCF/DP<> ID 0MS7?_^-. EI endstream endobj 852 0 obj <> stream 0 0 0 21 43 87 d1 43 0 0 66 0 21 cm BI /IM true/W 43/H 66/BPC 1/F/CCF/DP<> ID &3 G@/}xX}06 }?l~z{ @ EI endstream endobj 853 0 obj <> stream 0 0 0 -12 34 108 d1 34 0 0 120 0 -12 cm BI /IM true/W 34/H 120/BPC 1/F/CCF/DP<> ID &-, \%]tp/z/Z/߼0o}7ۇ EI endstream endobj 854 0 obj <> stream 121 0 0 0 0 0 d1 endstream endobj 855 0 obj <> stream 0 0 0 -4 134 80 d1 134 0 0 84 0 -4 cm BI /IM true/W 134/H 84/BPC 1/F/CCF/DP<> ID &pg4AAauS.mo<'}~>i յO >O o? [Hr`7@ EI endstream endobj 856 0 obj <> stream 0 0 0 -12 33 108 d1 33 0 0 120 0 -12 cm BI /IM true/W 33/H 120/BPC 1/F/CCF/DP<> ID 8ÓTo߇__-_ ^atK  EI endstream endobj 863 0 obj <> stream 0 0 0 -5 86 80 d1 86 0 0 85 0 -5 cm BI /IM true/W 86/H 85/BPC 1/F/CCF/DP<> ID &j ?10+Ȁ" ް7MA[ }?O5x_Kzw zKzKa `,2 Xx,3Ld4 EI endstream endobj 873 0 obj <> stream 0 0 0 0 109 101 d1 109 0 0 101 0 0 cm BI /IM true/W 109/H 101/BPC 1/F/CCF/DP<> ID &g S {z_^?޽{؅kjtk%~_K׿vz\5޽{޻]z_k  EI endstream endobj 874 0 obj <> stream 0 0 0 2 112 103 d1 112 0 0 101 0 2 cm BI /IM true/W 112/H 101/BPC 1/F/CCF/DP<> ID &Fm5e@?"}ޯzOo~ yAD3 EI endstream endobj 875 0 obj <> stream 0 0 0 60 79 153 d1 79 0 0 93 0 60 cm BI /IM true/W 79/H 93/BPC 1/F/CCF/DP<> ID "! "DqA o uK50 a~RjA EI endstream endobj 876 0 obj <> stream 0 0 0 30 38 125 d1 38 0 0 95 0 30 cm BI /IM true/W 38/H 95/BPC 1/F/CCF/DP<> ID &%_RBG6a{{{kk` EI endstream endobj 877 0 obj <> stream 0 0 0 -4 95 78 d1 95 0 0 82 0 -4 cm BI /IM true/W 95/H 82/BPC 1/F/CCF/DP<> ID "@ tk[a/l4^[v 4w터_]]maiuKO"17z ozޗ|'ս+W}o9I EI endstream endobj 878 0 obj <> stream 0 0 0 2 46 63 d1 46 0 0 61 0 2 cm BI /IM true/W 46/H 61/BPC 1/F/CCF/DP<> ID &(3XN3j}>߇?b-K]j  EI endstream endobj 882 0 obj <> stream 0 0 0 0 79 69 d1 79 0 0 69 0 0 cm BI /IM true/W 79/H 69/BPC 1/F/CCF/DP<> ID aPk zï vl%Kzۭk [ }. Ax]>SWo 7z}o-yC@ EI endstream endobj 883 0 obj <> stream 0 0 0 -4 94 80 d1 94 0 0 84 0 -4 cm BI /IM true/W 94/H 84/BPC 1/F/CCF/DP<> ID &Si@̂=NzOzO߯n5 EI endstream endobj 887 0 obj <> stream 0 0 0 0 43 65 d1 43 0 0 65 0 0 cm BI /IM true/W 43/H 65/BPC 1/F/CCF/DP<> ID &c(= Np7.?륮xY .(!~x}>^Ar=5, EI endstream endobj 891 0 obj <> stream 0 0 0 2 45 63 d1 45 0 0 61 0 2 cm BI /IM true/W 45/H 61/BPC 1/F/CCF/DP<> ID &6?)&<&ɬO@ EI endstream endobj 892 0 obj <> stream 0 0 0 -2 48 63 d1 48 0 0 65 0 -2 cm BI /IM true/W 48/H 65/BPC 1/F/CCF/DP<> ID &" a@P # :'cG4'4GpAix_kj!{2  EI endstream endobj 893 0 obj <> stream 0 0 0 -1 79 71 d1 79 0 0 72 0 -1 cm BI /IM true/W 79/H 72/BPC 1/F/CCF/DP<> ID &j&C .C@. K5~ O~z1 ߿߶o\?kK?>@AW EI endstream endobj 903 0 obj <> stream 0 0 0 26 140 125 d1 140 0 0 99 0 26 cm BI /IM true/W 140/H 99/BPC 1/F/CCF/DP<> ID &s_td5ᄟ? O 7M [ 7 O8OP EI endstream endobj xref 0 912 0000000000 65535 f 0000302555 00000 n 0000301838 00000 n 0000302693 00000 n 0000297902 00000 n 0000303930 00000 n 0000000015 00000 n 0000000333 00000 n 0000304211 00000 n 0000304491 00000 n 0000304554 00000 n 0000304816 00000 n 0000304880 00000 n 0000305120 00000 n 0000305184 00000 n 0000305468 00000 n 0000305532 00000 n 0000305909 00000 n 0000306219 00000 n 0000306284 00000 n 0000306348 00000 n 0000306621 00000 n 0000306685 00000 n 0000306749 00000 n 0000306992 00000 n 0000307315 00000 n 0000307380 00000 n 0000307444 00000 n 0000307793 00000 n 0000307858 00000 n 0000307923 00000 n 0000308188 00000 n 0000308252 00000 n 0000308316 00000 n 0000308561 00000 n 0000308625 00000 n 0000308689 00000 n 0000308970 00000 n 0000309034 00000 n 0000309275 00000 n 0000309522 00000 n 0000309586 00000 n 0000309836 00000 n 0000309900 00000 n 0000310164 00000 n 0000310228 00000 n 0000310462 00000 n 0000310526 00000 n 0000310766 00000 n 0000310982 00000 n 0000311046 00000 n 0000311110 00000 n 0000311401 00000 n 0000311465 00000 n 0000311708 00000 n 0000311772 00000 n 0000312039 00000 n 0000312103 00000 n 0000312323 00000 n 0000312387 00000 n 0000312675 00000 n 0000312739 00000 n 0000312971 00000 n 0000313222 00000 n 0000313287 00000 n 0000313555 00000 n 0000313619 00000 n 0000313921 00000 n 0000314184 00000 n 0000314450 00000 n 0000314681 00000 n 0000314745 00000 n 0000315008 00000 n 0000315072 00000 n 0000315335 00000 n 0000315606 00000 n 0000315670 00000 n 0000315937 00000 n 0000316001 00000 n 0000316066 00000 n 0000316248 00000 n 0000316312 00000 n 0000316552 00000 n 0000316616 00000 n 0000000352 00000 n 0000316826 00000 n 0000000508 00000 n 0000002752 00000 n 0000317067 00000 n 0000317342 00000 n 0000317406 00000 n 0000317663 00000 n 0000317727 00000 n 0000317946 00000 n 0000318010 00000 n 0000318289 00000 n 0000318353 00000 n 0000318609 00000 n 0000318896 00000 n 0000318961 00000 n 0000319025 00000 n 0000319300 00000 n 0000319553 00000 n 0000319618 00000 n 0000319850 00000 n 0000319916 00000 n 0000319981 00000 n 0000320236 00000 n 0000320487 00000 n 0000320784 00000 n 0000320849 00000 n 0000321084 00000 n 0000321149 00000 n 0000321413 00000 n 0000321478 00000 n 0000321746 00000 n 0000322081 00000 n 0000322147 00000 n 0000322379 00000 n 0000322674 00000 n 0000322905 00000 n 0000322970 00000 n 0000323181 00000 n 0000323389 00000 n 0000323455 00000 n 0000323678 00000 n 0000323903 00000 n 0000324118 00000 n 0000324352 00000 n 0000324604 00000 n 0000324830 00000 n 0000324895 00000 n 0000325129 00000 n 0000325194 00000 n 0000325410 00000 n 0000325670 00000 n 0000325735 00000 n 0000325968 00000 n 0000326151 00000 n 0000326391 00000 n 0000326700 00000 n 0000326933 00000 n 0000327186 00000 n 0000327251 00000 n 0000327487 00000 n 0000327552 00000 n 0000327792 00000 n 0000328028 00000 n 0000328093 00000 n 0000328317 00000 n 0000328528 00000 n 0000328761 00000 n 0000328826 00000 n 0000329067 00000 n 0000329133 00000 n 0000329372 00000 n 0000329621 00000 n 0000329686 00000 n 0000329974 00000 n 0000330040 00000 n 0000330273 00000 n 0000330338 00000 n 0000330576 00000 n 0000330792 00000 n 0000331045 00000 n 0000331110 00000 n 0000331360 00000 n 0000331425 00000 n 0000331490 00000 n 0000331723 00000 n 0000331946 00000 n 0000332011 00000 n 0000332076 00000 n 0000332324 00000 n 0000332389 00000 n 0000332599 00000 n 0000332855 00000 n 0000332920 00000 n 0000333130 00000 n 0000333195 00000 n 0000333446 00000 n 0000333705 00000 n 0000333967 00000 n 0000334240 00000 n 0000334305 00000 n 0000334370 00000 n 0000334624 00000 n 0000334853 00000 n 0000334918 00000 n 0000334983 00000 n 0000335048 00000 n 0000335114 00000 n 0000335371 00000 n 0000335436 00000 n 0000335685 00000 n 0000335917 00000 n 0000335983 00000 n 0000336246 00000 n 0000336494 00000 n 0000336560 00000 n 0000336625 00000 n 0000336690 00000 n 0000336917 00000 n 0000337173 00000 n 0000337238 00000 n 0000337304 00000 n 0000337370 00000 n 0000337619 00000 n 0000337884 00000 n 0000338121 00000 n 0000338353 00000 n 0000338597 00000 n 0000338807 00000 n 0000339088 00000 n 0000339326 00000 n 0000339560 00000 n 0000339809 00000 n 0000339875 00000 n 0000340107 00000 n 0000340367 00000 n 0000340432 00000 n 0000340498 00000 n 0000340784 00000 n 0000341046 00000 n 0000341299 00000 n 0000341548 00000 n 0000341785 00000 n 0000342032 00000 n 0000342098 00000 n 0000342344 00000 n 0000342410 00000 n 0000342475 00000 n 0000342541 00000 n 0000342763 00000 n 0000342829 00000 n 0000343044 00000 n 0000343109 00000 n 0000343389 00000 n 0000343660 00000 n 0000343726 00000 n 0000343792 00000 n 0000344055 00000 n 0000344289 00000 n 0000344537 00000 n 0000344603 00000 n 0000344854 00000 n 0000345114 00000 n 0000345348 00000 n 0000345600 00000 n 0000345665 00000 n 0000345889 00000 n 0000346138 00000 n 0000346406 00000 n 0000346657 00000 n 0000346723 00000 n 0000347007 00000 n 0000347073 00000 n 0000347350 00000 n 0000347589 00000 n 0000347857 00000 n 0000347922 00000 n 0000347988 00000 n 0000348054 00000 n 0000348120 00000 n 0000348186 00000 n 0000348442 00000 n 0000293945 00000 n 0000348679 00000 n 0000348916 00000 n 0000349217 00000 n 0000002773 00000 n 0000002942 00000 n 0000003684 00000 n 0000349458 00000 n 0000349736 00000 n 0000349801 00000 n 0000350048 00000 n 0000350299 00000 n 0000350545 00000 n 0000350769 00000 n 0000351040 00000 n 0000351295 00000 n 0000351361 00000 n 0000003705 00000 n 0000351427 00000 n 0000003875 00000 n 0000008525 00000 n 0000351647 00000 n 0000351886 00000 n 0000352164 00000 n 0000352425 00000 n 0000352726 00000 n 0000352960 00000 n 0000353184 00000 n 0000353434 00000 n 0000353704 00000 n 0000353963 00000 n 0000354269 00000 n 0000354490 00000 n 0000354677 00000 n 0000354933 00000 n 0000355271 00000 n 0000355514 00000 n 0000355792 00000 n 0000356043 00000 n 0000356109 00000 n 0000356371 00000 n 0000356621 00000 n 0000356855 00000 n 0000357080 00000 n 0000357325 00000 n 0000357580 00000 n 0000357750 00000 n 0000357948 00000 n 0000358201 00000 n 0000358441 00000 n 0000358700 00000 n 0000358928 00000 n 0000359164 00000 n 0000359394 00000 n 0000359459 00000 n 0000359702 00000 n 0000359948 00000 n 0000360013 00000 n 0000360278 00000 n 0000360596 00000 n 0000360851 00000 n 0000361103 00000 n 0000361325 00000 n 0000361592 00000 n 0000361852 00000 n 0000362102 00000 n 0000362337 00000 n 0000362403 00000 n 0000362677 00000 n 0000362743 00000 n 0000362958 00000 n 0000363226 00000 n 0000363445 00000 n 0000363716 00000 n 0000363991 00000 n 0000293795 00000 n 0000364196 00000 n 0000008547 00000 n 0000008731 00000 n 0000012206 00000 n 0000364440 00000 n 0000364621 00000 n 0000364886 00000 n 0000365126 00000 n 0000365358 00000 n 0000365603 00000 n 0000365821 00000 n 0000366084 00000 n 0000366322 00000 n 0000366545 00000 n 0000366806 00000 n 0000367040 00000 n 0000367301 00000 n 0000367521 00000 n 0000367754 00000 n 0000367992 00000 n 0000368223 00000 n 0000368467 00000 n 0000368705 00000 n 0000368903 00000 n 0000369185 00000 n 0000369479 00000 n 0000369746 00000 n 0000369987 00000 n 0000370254 00000 n 0000370503 00000 n 0000370754 00000 n 0000371015 00000 n 0000371252 00000 n 0000012228 00000 n 0000012412 00000 n 0000016496 00000 n 0000371457 00000 n 0000371703 00000 n 0000371965 00000 n 0000372221 00000 n 0000372460 00000 n 0000372704 00000 n 0000372969 00000 n 0000373035 00000 n 0000293887 00000 n 0000373281 00000 n 0000373559 00000 n 0000373823 00000 n 0000374056 00000 n 0000374338 00000 n 0000374593 00000 n 0000374804 00000 n 0000375085 00000 n 0000016518 00000 n 0000375151 00000 n 0000016702 00000 n 0000020141 00000 n 0000375407 00000 n 0000375648 00000 n 0000375935 00000 n 0000376254 00000 n 0000376508 00000 n 0000376839 00000 n 0000377105 00000 n 0000377366 00000 n 0000377604 00000 n 0000377917 00000 n 0000378179 00000 n 0000378403 00000 n 0000378643 00000 n 0000378861 00000 n 0000379079 00000 n 0000379316 00000 n 0000379550 00000 n 0000379797 00000 n 0000380051 00000 n 0000380335 00000 n 0000380510 00000 n 0000020163 00000 n 0000020347 00000 n 0000024248 00000 n 0000380739 00000 n 0000380996 00000 n 0000381234 00000 n 0000381482 00000 n 0000024270 00000 n 0000024440 00000 n 0000028366 00000 n 0000381750 00000 n 0000382008 00000 n 0000293640 00000 n 0000382251 00000 n 0000382503 00000 n 0000382745 00000 n 0000383013 00000 n 0000293737 00000 n 0000028388 00000 n 0000028586 00000 n 0000031808 00000 n 0000383280 00000 n 0000383495 00000 n 0000383762 00000 n 0000383976 00000 n 0000384224 00000 n 0000384463 00000 n 0000384708 00000 n 0000384949 00000 n 0000385181 00000 n 0000385428 00000 n 0000385663 00000 n 0000385892 00000 n 0000386125 00000 n 0000386356 00000 n 0000386592 00000 n 0000386827 00000 n 0000387051 00000 n 0000387266 00000 n 0000387448 00000 n 0000387674 00000 n 0000387925 00000 n 0000388161 00000 n 0000388399 00000 n 0000388632 00000 n 0000388855 00000 n 0000389099 00000 n 0000289665 00000 n 0000389333 00000 n 0000389547 00000 n 0000389771 00000 n 0000389989 00000 n 0000390226 00000 n 0000390424 00000 n 0000390675 00000 n 0000390952 00000 n 0000391168 00000 n 0000391412 00000 n 0000391658 00000 n 0000391890 00000 n 0000392109 00000 n 0000392315 00000 n 0000392535 00000 n 0000392720 00000 n 0000392896 00000 n 0000393138 00000 n 0000393352 00000 n 0000393594 00000 n 0000393843 00000 n 0000394085 00000 n 0000394333 00000 n 0000394569 00000 n 0000394772 00000 n 0000394958 00000 n 0000395244 00000 n 0000395478 00000 n 0000395708 00000 n 0000395934 00000 n 0000031830 00000 n 0000032039 00000 n 0000034451 00000 n 0000396174 00000 n 0000396409 00000 n 0000396620 00000 n 0000396871 00000 n 0000397115 00000 n 0000397351 00000 n 0000397577 00000 n 0000397828 00000 n 0000398079 00000 n 0000398310 00000 n 0000398545 00000 n 0000398778 00000 n 0000399092 00000 n 0000399299 00000 n 0000399536 00000 n 0000034473 00000 n 0000034668 00000 n 0000037866 00000 n 0000399806 00000 n 0000400008 00000 n 0000400220 00000 n 0000400466 00000 n 0000400663 00000 n 0000400872 00000 n 0000401109 00000 n 0000401345 00000 n 0000401598 00000 n 0000401832 00000 n 0000402080 00000 n 0000402338 00000 n 0000402404 00000 n 0000037888 00000 n 0000038069 00000 n 0000041540 00000 n 0000402640 00000 n 0000402876 00000 n 0000403077 00000 n 0000289504 00000 n 0000403282 00000 n 0000403536 00000 n 0000403748 00000 n 0000041562 00000 n 0000041785 00000 n 0000045810 00000 n 0000403961 00000 n 0000404212 00000 n 0000404454 00000 n 0000404720 00000 n 0000404959 00000 n 0000405200 00000 n 0000405386 00000 n 0000405626 00000 n 0000405889 00000 n 0000406065 00000 n 0000406330 00000 n 0000045832 00000 n 0000046041 00000 n 0000049810 00000 n 0000406582 00000 n 0000406833 00000 n 0000407000 00000 n 0000407330 00000 n 0000407540 00000 n 0000407736 00000 n 0000408011 00000 n 0000049832 00000 n 0000050013 00000 n 0000053007 00000 n 0000408262 00000 n 0000408547 00000 n 0000408850 00000 n 0000409072 00000 n 0000409138 00000 n 0000409390 00000 n 0000409643 00000 n 0000409884 00000 n 0000410138 00000 n 0000410367 00000 n 0000410593 00000 n 0000410814 00000 n 0000411028 00000 n 0000411262 00000 n 0000053029 00000 n 0000053238 00000 n 0000056151 00000 n 0000411461 00000 n 0000411716 00000 n 0000411948 00000 n 0000412146 00000 n 0000056173 00000 n 0000056382 00000 n 0000059786 00000 n 0000059808 00000 n 0000060017 00000 n 0000064058 00000 n 0000289604 00000 n 0000064080 00000 n 0000064303 00000 n 0000068031 00000 n 0000412330 00000 n 0000412586 00000 n 0000412849 00000 n 0000413098 00000 n 0000413358 00000 n 0000413580 00000 n 0000413840 00000 n 0000414085 00000 n 0000414326 00000 n 0000414633 00000 n 0000414929 00000 n 0000415221 00000 n 0000415502 00000 n 0000068053 00000 n 0000068262 00000 n 0000071861 00000 n 0000415769 00000 n 0000071883 00000 n 0000072092 00000 n 0000075714 00000 n 0000416023 00000 n 0000416260 00000 n 0000075736 00000 n 0000075945 00000 n 0000079946 00000 n 0000416491 00000 n 0000416797 00000 n 0000417082 00000 n 0000417363 00000 n 0000417662 00000 n 0000417959 00000 n 0000289287 00000 n 0000079968 00000 n 0000080205 00000 n 0000083839 00000 n 0000418134 00000 n 0000083861 00000 n 0000084098 00000 n 0000088877 00000 n 0000418399 00000 n 0000418670 00000 n 0000418870 00000 n 0000419160 00000 n 0000419438 00000 n 0000419614 00000 n 0000419902 00000 n 0000420132 00000 n 0000420388 00000 n 0000420619 00000 n 0000088899 00000 n 0000089108 00000 n 0000092900 00000 n 0000420883 00000 n 0000421141 00000 n 0000421381 00000 n 0000092922 00000 n 0000093131 00000 n 0000096103 00000 n 0000421647 00000 n 0000421894 00000 n 0000422155 00000 n 0000096125 00000 n 0000096334 00000 n 0000100248 00000 n 0000422419 00000 n 0000100270 00000 n 0000100479 00000 n 0000104257 00000 n 0000422639 00000 n 0000104279 00000 n 0000104488 00000 n 0000108058 00000 n 0000422903 00000 n 0000423205 00000 n 0000423469 00000 n 0000423760 00000 n 0000423997 00000 n 0000424261 00000 n 0000108080 00000 n 0000108303 00000 n 0000112355 00000 n 0000424522 00000 n 0000424781 00000 n 0000425055 00000 n 0000425313 00000 n 0000425600 00000 n 0000289391 00000 n 0000112377 00000 n 0000112600 00000 n 0000115365 00000 n 0000425871 00000 n 0000115387 00000 n 0000115610 00000 n 0000118869 00000 n 0000426124 00000 n 0000118891 00000 n 0000119114 00000 n 0000122984 00000 n 0000426397 00000 n 0000123006 00000 n 0000123229 00000 n 0000125778 00000 n 0000426623 00000 n 0000426861 00000 n 0000427144 00000 n 0000427377 00000 n 0000427638 00000 n 0000427871 00000 n 0000428109 00000 n 0000428349 00000 n 0000428532 00000 n 0000428792 00000 n 0000287666 00000 n 0000429095 00000 n 0000125800 00000 n 0000126034 00000 n 0000129694 00000 n 0000429360 00000 n 0000429660 00000 n 0000429924 00000 n 0000129716 00000 n 0000129950 00000 n 0000133181 00000 n 0000133203 00000 n 0000133426 00000 n 0000137293 00000 n 0000430176 00000 n 0000430405 00000 n 0000137315 00000 n 0000137549 00000 n 0000141622 00000 n 0000141644 00000 n 0000141878 00000 n 0000144934 00000 n 0000144956 00000 n 0000145179 00000 n 0000149049 00000 n 0000430651 00000 n 0000430927 00000 n 0000431175 00000 n 0000431468 00000 n 0000149071 00000 n 0000149305 00000 n 0000152087 00000 n 0000152109 00000 n 0000152343 00000 n 0000155386 00000 n 0000431721 00000 n 0000431985 00000 n 0000432263 00000 n 0000155408 00000 n 0000155642 00000 n 0000158121 00000 n 0000158143 00000 n 0000158366 00000 n 0000161709 00000 n 0000161731 00000 n 0000161954 00000 n 0000164731 00000 n 0000164753 00000 n 0000164976 00000 n 0000168534 00000 n 0000168556 00000 n 0000168779 00000 n 0000171479 00000 n 0000432546 00000 n 0000171501 00000 n 0000171735 00000 n 0000174492 00000 n 0000174514 00000 n 0000174748 00000 n 0000178233 00000 n 0000178255 00000 n 0000178489 00000 n 0000181743 00000 n 0000181765 00000 n 0000181999 00000 n 0000185005 00000 n 0000185027 00000 n 0000185250 00000 n 0000188382 00000 n 0000188404 00000 n 0000188627 00000 n 0000192666 00000 n 0000192688 00000 n 0000192911 00000 n 0000195841 00000 n 0000195863 00000 n 0000196086 00000 n 0000199852 00000 n 0000432774 00000 n 0000433004 00000 n 0000433257 00000 n 0000433486 00000 n 0000433691 00000 n 0000433919 00000 n 0000199874 00000 n 0000200108 00000 n 0000203709 00000 n 0000434175 00000 n 0000434430 00000 n 0000434711 00000 n 0000203731 00000 n 0000203965 00000 n 0000207907 00000 n 0000207929 00000 n 0000208163 00000 n 0000211464 00000 n 0000211486 00000 n 0000211720 00000 n 0000214653 00000 n 0000214675 00000 n 0000214909 00000 n 0000218724 00000 n 0000218746 00000 n 0000218980 00000 n 0000222780 00000 n 0000434982 00000 n 0000435231 00000 n 0000435479 00000 n 0000222802 00000 n 0000223022 00000 n 0000226436 00000 n 0000226458 00000 n 0000226692 00000 n 0000229662 00000 n 0000229684 00000 n 0000229918 00000 n 0000232904 00000 n 0000435749 00000 n 0000435993 00000 n 0000232926 00000 n 0000233160 00000 n 0000235740 00000 n 0000235762 00000 n 0000235985 00000 n 0000238596 00000 n 0000436196 00000 n 0000436497 00000 n 0000238618 00000 n 0000238852 00000 n 0000241834 00000 n 0000436794 00000 n 0000241856 00000 n 0000242090 00000 n 0000245977 00000 n 0000245999 00000 n 0000246222 00000 n 0000249341 00000 n 0000437047 00000 n 0000437289 00000 n 0000437590 00000 n 0000437831 00000 n 0000438096 00000 n 0000438361 00000 n 0000438427 00000 n 0000438750 00000 n 0000249363 00000 n 0000249597 00000 n 0000252923 00000 n 0000252945 00000 n 0000253179 00000 n 0000256315 00000 n 0000439013 00000 n 0000256337 00000 n 0000256571 00000 n 0000259423 00000 n 0000259445 00000 n 0000259679 00000 n 0000261971 00000 n 0000261993 00000 n 0000262202 00000 n 0000266247 00000 n 0000439308 00000 n 0000439596 00000 n 0000439889 00000 n 0000440171 00000 n 0000440414 00000 n 0000440699 00000 n 0000266269 00000 n 0000266475 00000 n 0000269819 00000 n 0000440943 00000 n 0000441208 00000 n 0000269841 00000 n 0000270033 00000 n 0000272900 00000 n 0000441475 00000 n 0000272922 00000 n 0000273114 00000 n 0000277051 00000 n 0000441729 00000 n 0000441965 00000 n 0000442229 00000 n 0000277073 00000 n 0000277279 00000 n 0000280268 00000 n 0000280290 00000 n 0000280482 00000 n 0000281924 00000 n 0000281946 00000 n 0000282138 00000 n 0000283990 00000 n 0000442514 00000 n 0000284012 00000 n 0000284204 00000 n 0000286281 00000 n 0000286303 00000 n 0000286495 00000 n 0000287464 00000 n 0000287485 00000 n 0000302604 00000 n trailer << /Size 912 /Root 1 0 R /Info 911 0 R >> startxref 442857 %%EOF Fenix/ChangeLog0000644000000000000000000000000010607526656012402 0ustar rootrootFenix/common/0000755000000000000000000000000010607526702012122 5ustar rootrootFenix/common/CVS/0000755000000000000000000000000010607526702012555 5ustar rootrootFenix/common/CVS/Repository0000644000000000000000000000001510601620470014642 0ustar rootrootFenix/common Fenix/common/CVS/Root0000644000000000000000000000007410601620470013413 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/common/CVS/Entries0000644000000000000000000000024210607526702014107 0ustar rootroot/dirs.c/1.7/Thu Apr 12 22:07:58 2007// /files.c/1.5/Thu Apr 12 22:07:58 2007// /regex.c/1.6/Thu Apr 12 22:08:02 2007// /xctype.c/1.2/Thu Apr 12 22:08:03 2007// D Fenix/common/xctype.c0000644000000000000000000001474110607526702013611 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #include #include "xctype.h" /* Tabla de conversin de caracteres MS-DOS a Windows */ int dos_chars = 0 ; unsigned char dos_to_win[256] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197, 201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 248, 163, 216, 215, 131, 225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187, 166, 166, 166, 166, 166, 193, 194, 192, 169, 166, 166, 43, 43, 162, 165, 43, 43, 45, 45, 43, 45, 43, 227, 195, 43, 43, 45, 45, 166, 45, 43, 164, 240, 208, 202, 203, 200, 105, 205, 206, 207, 43, 43, 166, 95, 166, 204, 175, 211, 223, 212, 210, 245, 213, 181, 254, 222, 218, 219, 217, 253, 221, 175, 180, 173, 177, 61, 190, 182, 167, 247, 184, 176, 168, 183, 185, 179, 178, 166, 160 } ; /* Tabla de conversin de caracteres Windows a MS-DOS */ unsigned char win_to_dos[256] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 159, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 255, 173, 189, 156, 207, 190, 254, 245, 249, 184, 166, 174, 170, 240, 169, 238, 248, 241, 253, 252, 239, 230, 244, 250, 247, 251, 167, 175, 172, 171, 243, 168, 183, 181, 182, 199, 142, 143, 146, 128, 212, 144, 210, 211, 222, 214, 215, 216, 209, 165, 227, 224, 226, 229, 153, 158, 157, 235, 233, 234, 154, 237, 232, 225, 133, 160, 131, 198, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139, 208, 164, 149, 162, 147, 228, 148, 246, 155, 151, 163, 150, 129, 236, 231, 152 } ; /* Tipos de caracter */ char c_type[256] ; unsigned char c_upper[256] ; unsigned char c_lower[256] ; int c_type_initialized = 0 ; unsigned char convert (unsigned char c) { return dos_chars ? c:win_to_dos[c] ; } static void set_c_range (int first, int last, int type) { while (first <= last) c_type[first++] |= type ; } static void set_c_from (const unsigned char * chars, int type) { if (dos_chars) while (*chars) c_type[win_to_dos[*chars++]] |= type ; else while (*chars) c_type[*chars++] |= type ; } static void set_c_as (int prev_type, int type) { int n ; for (n = 0 ; n < 256 ; n++) { if (c_type[n] & prev_type) c_type[n] |= type ; } } static void set_c_upper (const unsigned char * from, const unsigned char * to) { if (dos_chars) while (*from) c_upper[win_to_dos[*from++]] = win_to_dos[*to++] ; else while (*from) c_upper[*from++] = *to++ ; } static void set_c_lower (const unsigned char * from, const unsigned char * to) { if (dos_chars) while (*from) c_lower[win_to_dos[*from++]] = win_to_dos[*to++] ; else while (*from) c_lower[*from++] = *to++ ; } void init_c_type () { int c ; memset (c_type, 0, sizeof(c_type)) ; if (dos_chars) for (c = 0 ; c < 256 ; c++) c_lower[c] = c_upper[c] = win_to_dos[c] ; else for (c = 0 ; c < 256 ; c++) c_lower[c] = c_upper[c] = c ; set_c_upper ("abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ") ; set_c_lower ("ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz") ; #ifdef RESPETAR_ACENTOS set_c_upper ("", "") ; set_c_lower ("", "") ; #else set_c_upper ("", "AEIOUNNCCAEIOUAEIOUYAEIOUAAOAEIOU") ; set_c_lower ("", "aeiounnccaeiouaeiouyaeiouaaoaeiou") ; #endif set_c_from (" \t\n\r", CTYPE_SPACE) ; set_c_range ('0', '9', CTYPE_NUM) ; set_c_range ('0', '9', CTYPE_ALNUM) ; set_c_range ('A', 'F', CTYPE_ALNUM) ; set_c_range ('a', 'f', CTYPE_ALNUM) ; set_c_range ('A', 'Z', CTYPE_ALPHA) ; set_c_range ('a', 'z', CTYPE_ALPHA) ; set_c_from ("" "", CTYPE_ALPHA) ; set_c_as (CTYPE_ALPHA, CTYPE_WORDCHAR) ; set_c_from ("_", CTYPE_WORDCHAR) ; set_c_as (CTYPE_WORDCHAR, CTYPE_WORDFIRST) ; set_c_range ('0', '9', CTYPE_WORDCHAR) ; c_type_initialized = 1 ; } Fenix/common/dirs.c0000644000000000000000000000716610607526674013251 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : dirs.c * DESCRIPTION : directory functions * * HISTORY: * */ #include "fxi.h" #include "dirs.h" #include "xstrings.h" #include #include #ifdef WIN32 int base_drive ; #endif char * base_dir ; /* * FUNCTION : dir_path_convert * * Convert a path to the valid OS format * * PARAMS : * char * path: path to convert * * RETURN VALUE : * char *: converted path * */ char * dir_path_convert(const char * dir) { char *c,*p ; p = strdup(dir) ; c = p ; // Convert characters while (*p) { #ifdef WIN32 if (*p=='/') *p='\\' ; #else if (*p=='\\') *p='/' ; #endif p++ ; } return c; } /* * FUNCTION : dir_current * * Retrieve current directory * * PARAMS : * * RETURN VALUE : * STRING ID pointing to a system string with the current dir * */ char * dir_current(void) { char dir[1024] ; /* buffer to the directory */ char * c = getcwd(dir,sizeof(dir)) ; return c ? strdup(c) : NULL ; } /* * FUNCTION : dir_change * * Retrieve current directory * * PARAMS : * char * dir: the new current directory * * RETURN VALUE : * 0 - FAILURE * NON_ZERO - SUCCESS * */ int dir_change(const char * dir) { char *c = dir_path_convert(dir) ; int r = chdir(c) ; free(c) ; return r ; } /* * FUNCTION : dir_create * * Retrieve current directory * * PARAMS : * char * dir: the directory to create * * RETURN VALUE : * 0 - FAILURE * NON_ZERO - SUCCESS * */ int dir_create(const char * dir) { char *c = dir_path_convert(dir) ; int r ; #ifdef WIN32 r = mkdir(c) ; #else r = mkdir(c,0777) ; #endif free(c) ; return r ; } /* * FUNCTION : dir_delete * * Retrieve current directory * * PARAMS : * char * dir: the directory to delete * * RETURN VALUE : * 0 - FAILURE * NON_ZERO - SUCCESS * */ int dir_delete(const char * dir) { char *c = dir_path_convert(dir) ; int r = rmdir(c) ; free(c) ; return r ; } /* * FUNCTION : dir_deletefile * * Remove a given file * * PARAMS : * char * filename: the file to delete * * RETURN VALUE : * 0 - FAILURE * NON_ZERO - SUCCESS * */ int dir_deletefile(const char * filename) { char *c = dir_path_convert(filename) ; int r = unlink(c) ; free(c) ; return (r==-1) ? 0 : 1 ; } Fenix/common/files.c0000644000000000000000000002706710607526674013414 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* SDL_BYTEORDER */ #ifdef TARGET_MAC #include #else #include #endif #include #include #include #ifdef TARGET_BEOS #include #else #include #endif #include "files.h" char * possible_paths[32] = { "", 0 } ; int opened_files = 0; #define MAX_X_FILES 2048 typedef struct { char name[40] ; int offset ; int size ; FILE * fp ; } XFILE ; XFILE x_file[MAX_X_FILES] ; int x_files_count = 0 ; /* Aade un nuevo archivo al PATH */ void file_add_xfile (file * fp, long offset, char * name, int size) { assert (x_files_count < MAX_X_FILES) ; assert (fp->type == F_FILE) ; x_file[x_files_count].fp = fp->fp ; x_file[x_files_count].offset = offset ; x_file[x_files_count].size = size ; /* x_file[x_files_count].pos = offset ; x_file[x_files_count].eof = 0 ; */ strncpy (x_file[x_files_count].name, name, 39) ; x_file[x_files_count].name[39] = 0 ; x_files_count++ ; } /* Lee un bloque de datos del fichero */ int file_read (file * fp, void * buffer, int len) { assert (len != 0); if (fp->type == F_XFILE) { XFILE * xf ; int result ; xf = &x_file[fp->n] ; if ((len + fp->pos) > (xf->offset + xf->size)) { fp->eof = 1 ; len = xf->size + xf->offset - fp->pos ; } fseek (xf->fp, fp->pos, SEEK_SET) ; result = fread (buffer, 1, len, xf->fp) ; fp->pos = ftell (xf->fp) ; return result ; } if (fp->type == F_GZFILE) { int result = gzread (fp->gz, buffer, len) ; if ((fp->error = (result < 0)) != 0) result = 0 ; return result ; } return fread (buffer, 1, len, fp->fp) ; } /* Guarda una cadena "cuoteada" al disco */ int file_puts (file * fp, const char * buffer) { char dest[1024], * optr ; const char * ptr ; ptr = buffer ; optr = dest ; while (*ptr) { if (optr > dest+1000) { *optr++ = '\\' ; *optr++ = '\n' ; *optr = 0 ; file_write (fp, dest, optr-dest) ; optr = dest ; } if (*ptr == '\n') { *optr++ = '\\' ; *optr++ = 'n' ; ptr++ ; continue ; } if (*ptr == '\\') { *optr++ = '\\' ; *optr++ = *ptr++ ; continue ; } *optr++ = *ptr++ ; } *optr++ = '\n' ; return file_write (fp, dest, optr-dest) ; } /* Recupera una cadena de un fichero y la "descuotea" */ int file_gets (file * fp, char * buffer, int len) { char * ptr, * result = NULL ; if (fp->type == F_XFILE) { XFILE * xf ; int l = 0; char * ptr = result = buffer ; xf = &x_file[fp->n] ; fseek (xf->fp, fp->pos, SEEK_SET) ; while (l < len) { if (fp->pos >= xf->offset + xf->size) { fp->eof = 1 ; break ; } fread (ptr, 1, 1, xf->fp) ; l++ ; fp->pos++ ; if (*ptr++ == '\n') break ; } *ptr = 0 ; fp->pos = ftell(xf->fp) ; if (l == 0) return 0 ; } else if (fp->type == F_GZFILE) { result = gzgets (fp->gz, buffer, len) ; } else { result = fgets(buffer, len, fp->fp); } if (result == NULL) { buffer[0] = 0 ; return 0 ; } ptr = buffer ; while (*ptr) { if (*ptr == '\\') { if (ptr[1] == 'n') ptr[1] = '\n' ; strcpy (ptr, ptr+1) ; ptr++ ; continue ; } if (*ptr == '\n') { *ptr = 0 ; break ; } ptr++ ; } return strlen(buffer) ; } /* Escribe en un fichero binario un dato de tipo entero */ int file_writeSint8 (file * fp, Sint8 * buffer) { return file_write (fp, buffer, 1); } int file_writeUint8 (file * fp, Uint8 * buffer) { return file_write (fp, buffer, 1); } int file_writeSint16 (file * fp, Sint16 * buffer) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN return file_write (fp, buffer, 2); #else file_write (fp, (Uint8 *)buffer + 1, 1); return file_write (fp, (Uint8 *)buffer + 0, 1); #endif } int file_writeUint16 (file * fp, Uint16 * buffer) { return file_writeSint16 (fp, buffer); } int file_writeSint32 (file * fp, Sint32 * buffer) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN return file_write (fp, buffer, 4); #else file_write (fp, (Uint8 *)buffer + 3, 1); file_write (fp, (Uint8 *)buffer + 2, 1); file_write (fp, (Uint8 *)buffer + 1, 1); return file_write (fp, (Uint8 *)buffer + 0, 1); #endif } int file_writeUint32 (file * fp, Uint32 * buffer) { return file_writeSint32 (fp, (Sint32 *)buffer); } /* Lee de un fichero binario un dato de tipo entero */ int file_readSint8 (file * fp, Sint8 * buffer) { return file_read (fp, buffer, 1); } int file_readUint8 (file * fp, Uint8 * buffer) { return file_read (fp, buffer, 1); } int file_readSint16 (file * fp, Sint16 * buffer) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN return file_read (fp, buffer, 2); #else file_read (fp, (Uint8 *)buffer + 1, 1); return file_read (fp, (Uint8 *)buffer + 0, 1); #endif } int file_readUint16 (file * fp, Uint16 * buffer) { return file_readSint16 (fp, buffer); } int file_readSint32 (file * fp, Sint32 * buffer) { #if SDL_BYTEORDER == SDL_LIL_ENDIAN return file_read (fp, buffer, 4); #else file_read (fp, (Uint8 *)buffer + 3, 1); file_read (fp, (Uint8 *)buffer + 2, 1); file_read (fp, (Uint8 *)buffer + 1, 1); return file_read (fp, (Uint8 *)buffer + 0, 1); #endif } int file_readUint32 (file * fp, Uint32 * buffer) { return file_readSint32 (fp, (Sint32 *)buffer); } /* Escribe un bloque de datos en el fichero */ int file_write (file * fp, void * buffer, int len) { if (fp->type == F_XFILE) { XFILE * xf ; int result ; xf = &x_file[fp->n] ; if ((len + fp->pos) > (xf->offset + xf->size)) { fp->eof = 1 ; len = xf->size + xf->offset - fp->pos ; } fseek (xf->fp, fp->pos, SEEK_SET) ; result = fwrite (buffer, 1, len, xf->fp) ; fp->pos = ftell (xf->fp) ; return result ; } if (fp->type == F_GZFILE) { int result = gzwrite (fp->gz, buffer, len) ; if ((fp->error = (result < 0)) != 0) result = 0 ; return ( result < len ) ? 0 : len ; } return fwrite (buffer, 1, len, fp->fp) ; } /* Devuelve el tamao de un fichero */ int file_size (file * fp) { long pos, size ; if (fp->type == F_XFILE) return x_file[fp->n].size ; if (fp->type == F_GZFILE) { fprintf (stderr, "file_size: invlida en ficheros comprimidos\n") ; return 0 ; } pos = ftell(fp->fp) ; fseek (fp->fp, 0, SEEK_END) ; size = ftell(fp->fp) ; fseek (fp->fp, pos, SEEK_SET) ; return size ; } /* Devuelve la posicin actual de un fichero */ int file_pos (file * fp) { if (fp->type == F_XFILE) return fp->pos - x_file[fp->n].offset ; if (fp->type == F_GZFILE) return gztell(fp->gz) ; return ftell (fp->fp) ; } /* Posiciona el puntero de lectura/escritura dentro de un fichero */ int file_seek (file * fp, int pos, int where) { assert(fp); if (fp->type == F_XFILE) { if (where == SEEK_END) pos = x_file[fp->n].size - pos + 1 ; else if (where == SEEK_CUR) pos += ( fp->pos - x_file[fp->n].offset ); if (x_file[fp->n].size < pos) pos = x_file[fp->n].size ; if (pos < 0) pos = 0 ; fp->pos = pos + x_file[fp->n].offset ; return pos ; } if (fp->type == F_GZFILE) { assert(fp->gz); return gzseek (fp->gz, pos, where) ; } assert(fp->fp); return fseek (fp->fp, pos, where) ; } /* Abre un fichero */ static int open_raw (file * f, const char * filename, const char * mode) { char _mode[5]; char *p; if (!strchr(mode,'0')) { f->type = F_GZFILE ; f->gz = gzopen (filename, mode) ; f->eof = 0 ; if (f->gz) return 1 ; } p=_mode; while(*mode){ if(*mode!='0'){ *p=*mode; p++; } mode++; } *p='\0'; f->eof = 0 ; f->type = F_FILE ; f->fp = fopen (filename, _mode) ; if (f->fp) return 1 ; return 0 ; } file * file_open (const char * filename, char * mode) { char name [2048] ; char path [2048] ; char here [2048] ; const char * c, * n ; int i ; #ifdef PATH_SLASH int j ; #endif file * f ; f = (file *) malloc(sizeof(file)) ; assert (f) ; memset (f, 0, sizeof(file)) ; strncpy (f->name, filename, MAX_PATH); c = filename ; for (n = c+strlen(c) ; n >= c ; n--) { if (*n == '/' || *n == '\\') { c = n+1 ; break ; } } strncpy (name, c, 2047) ; name[2047] = 0; strcpy (path, filename) ; path[c-filename] = 0 ; #ifdef PATH_SLASH for (j = 0 ; path[j] ; j++) if (path[j] == '\\') path[j] = '/' ; #endif strcpy (here, path) ; strcat (here, name) ; if (open_raw (f, here, mode)) { opened_files++; return f ; } /* Si archivo real no existe en disco */ if (strchr(mode,'r') && strchr(mode,'b') && !strchr(mode,'+') && !strchr(mode,'w')) { for (i = 0 ; i < x_files_count ; i++) { if (strcmp(name, x_file[i].name) == 0) { f->eof = 0 ; f->pos = x_file[i].offset ; f->type = F_XFILE ; f->n = i ; opened_files++; return f ; } } } /* Busca por el directorio de la extensin (directorio FPG para FPG) */ if (strchr(name,'.')) { strcpy (here, strchr(name,'.') + 1) ; strcat (here, PATH_SEP) ; strcat (here, path) ; strcat (here, name) ; if (open_raw (f, here, mode)) { opened_files++; return f ; } } for (i = 0 ; possible_paths[i] ; i++) { strcpy (here, possible_paths[i]) ; strcat (here, name) ; #ifdef PASH_SLASH for (j = 0 ; here[j] ; j++) if (here[j] == '\\') here[j] = '/' ; #endif if (open_raw (f, here, mode)) { opened_files++; return f ; } } free (f) ; return 0 ; } /* Cierra un fichero */ void file_close (file * fp) { if (fp == NULL) return; /* if (fp->type == F_XFILE) fp->pos = x_file[fp->n].offset ; */ if (fp->type == F_FILE) fclose(fp->fp) ; if (fp->type == F_GZFILE) gzclose(fp->gz) ; opened_files--; free(fp) ; } /* Aade un nuevo directorio al PATH */ void file_addp (const char * path) { char truepath[256]; int n ; strcpy (truepath, path) ; for (n = 0 ; truepath[n] ; n++) if (truepath[n] == '/') truepath[n] = '\\' ; if (truepath[strlen(truepath)-1] != '\\') strcat (truepath, "\\") ; for (n = 0 ; n < 31 && possible_paths[n] ; n++) ; possible_paths[n] = strdup (truepath) ; possible_paths[n+1] = 0 ; } /* Devuelve cierto si existe el fichero */ int file_exists (const char * filename) { file * fp ; fp = file_open (filename, "rb") ; if (fp) { file_close (fp) ; return 1 ; } return 0 ; } /* Devuelve cierto si se ley ms all del fin del fichero */ int file_eof (file * fp) { if (fp->type == F_XFILE) { return fp->eof ? 1:0; } if (fp->type == F_GZFILE) { if (fp->error) return 1 ; return gzeof(fp->gz) ? 1:0; } return feof(fp->fp) ? 1:0; } /* Devuelve el FILE * correspondiente al fichero */ FILE * file_fp (file * f) { if (f->type == F_XFILE) { XFILE * xf = &x_file[f->n] ; fseek (xf->fp, f->pos, SEEK_SET) ; return xf->fp ; } return f->fp ; } Fenix/common/regex.c0000644000000000000000000051715410607526702013415 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #undef DEBUG /* AIX requires this to be the first thing in the file. */ #if defined(_MSC_VER) #pragma warning(disable:4090) #pragma warning(disable:4022) #pragma warning(disable:4018) #pragma warning(disable:4101) #endif #if defined (_AIX) && !defined (REGEX_MALLOC) #pragma alloca #endif #define _GNU_SOURCE /* We need this for `regex.h', and perhaps for the Emacs include files. */ #include #ifdef HAVE_CONFIG_H #include "config.h" #endif /* The `emacs' switch turns on certain matching commands that make sense only in Emacs. */ #ifdef emacs #include "lisp.h" #include "buffer.h" #include "syntax.h" /* Emacs uses `NULL' as a predicate. */ #undef NULL #else /* not emacs */ /* We used to test for `BSTRING' here, but only GCC and Emacs define `BSTRING', as far as I know, and neither of them use this code. */ #if HAVE_STRING_H || STDC_HEADERS #include #ifndef bcmp #define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) #endif #ifndef bcopy #define bcopy(s, d, n) memcpy ((d), (s), (n)) #endif #ifndef bzero #define bzero(s, n) memset ((s), 0, (n)) #endif #else #include #endif #ifdef STDC_HEADERS #include #else char *malloc (); char *realloc (); #endif /* Define the syntax stuff for \<, \>, etc. */ /* This must be nonzero for the wordchar and notwordchar pattern commands in re_match_2. */ #ifndef Sword #define Sword 1 #endif #ifdef SYNTAX_TABLE extern char *re_syntax_table; #else /* not SYNTAX_TABLE */ /* How many characters in the character set. */ #define CHAR_SET_SIZE 256 static char re_syntax_table[CHAR_SET_SIZE]; static void init_syntax_once () { register int c; static int done = 0; if (done) return; bzero (re_syntax_table, sizeof re_syntax_table); for (c = 'a'; c <= 'z'; c++) re_syntax_table[c] = Sword; for (c = 'A'; c <= 'Z'; c++) re_syntax_table[c] = Sword; for (c = '0'; c <= '9'; c++) re_syntax_table[c] = Sword; re_syntax_table['_'] = Sword; done = 1; } #endif /* not SYNTAX_TABLE */ #define SYNTAX(c) re_syntax_table[c] #endif /* not emacs */ /* Get the interface, including the syntax bits. */ #include "regex.h" /* isalpha etc. are used for the character classes. */ #include #ifndef isascii #define isascii(c) 1 #endif #ifdef isblank #define ISBLANK(c) (isascii (c) && isblank (c)) #else #define ISBLANK(c) ((c) == ' ' || (c) == '\t') #endif #ifdef isgraph #define ISGRAPH(c) (isascii (c) && isgraph (c)) #else #define ISGRAPH(c) (isascii (c) && isprint (c) && !isspace (c)) #endif #define ISPRINT(c) (isascii (c) && isprint (c)) #define ISDIGIT(c) (isascii (c) && isdigit (c)) #define ISALNUM(c) (isascii (c) && isalnum (c)) #define ISALPHA(c) (isascii (c) && isalpha (c)) #define ISCNTRL(c) (isascii (c) && iscntrl (c)) #define ISLOWER(c) (isascii (c) && islower (c)) #define ISPUNCT(c) (isascii (c) && ispunct (c)) #define ISSPACE(c) (isascii (c) && isspace (c)) #define ISUPPER(c) (isascii (c) && isupper (c)) #define ISXDIGIT(c) (isascii (c) && isxdigit (c)) #ifndef NULL #define NULL 0 #endif /* We remove any previous definition of `SIGN_EXTEND_CHAR', since ours (we hope) works properly with all combinations of machines, compilers, `char' and `unsigned char' argument types. (Per Bothner suggested the basic approach.) */ #undef SIGN_EXTEND_CHAR #if __STDC__ #define SIGN_EXTEND_CHAR(c) ((signed char) (c)) #else /* not __STDC__ */ /* As in Harbison and Steele. */ #define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128) #endif /* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we use `alloca' instead of `malloc'. This is because using malloc in re_search* or re_match* could cause memory leaks when C-g is used in Emacs; also, malloc is slower and causes storage fragmentation. On the other hand, malloc is more portable, and easier to debug. Because we sometimes use alloca, some routines have to be macros, not functions -- `alloca'-allocated space disappears at the end of the function it is called in. */ #ifdef REGEX_MALLOC #define REGEX_ALLOCATE malloc #define REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize) #else /* not REGEX_MALLOC */ /* Emacs already defines alloca, sometimes. */ #ifndef alloca /* Make alloca work the best possible way. */ #ifdef __GNUC__ #define alloca __builtin_alloca #else /* not __GNUC__ */ #if HAVE_ALLOCA_H #include #else /* not __GNUC__ or HAVE_ALLOCA_H */ #ifndef _AIX /* Already did AIX, up at the top. */ char *alloca (); #endif /* not _AIX */ #endif /* not HAVE_ALLOCA_H */ #endif /* not __GNUC__ */ #endif /* not alloca */ #define REGEX_ALLOCATE alloca /* Assumes a `char *destination' variable. */ #define REGEX_REALLOCATE(source, osize, nsize) \ (destination = (char *) alloca (nsize), \ bcopy (source, destination, osize), \ destination) #endif /* not REGEX_MALLOC */ /* True if `size1' is non-NULL and PTR is pointing anywhere inside `string1' or just past its end. This works if PTR is NULL, which is a good thing. */ #define FIRST_STRING_P(ptr) \ (size1 && string1 <= (ptr) && (ptr) <= string1 + size1) /* (Re)Allocate N items of type T using malloc, or fail. */ #define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t))) #define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t))) #define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t))) #define BYTEWIDTH 8 /* In bits. */ #define STREQ(s1, s2) ((strcmp (s1, s2) == 0)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) typedef char boolean; #define false 0 #define true (!false) /* These are the command codes that appear in compiled regular expressions. Some opcodes are followed by argument bytes. A command code can specify any interpretation whatsoever for its arguments. Zero bytes may appear in the compiled regular expression. The value of `exactn' is needed in search.c (search_buffer) in Emacs. So regex.h defines a symbol `RE_EXACTN_VALUE' to be 1; the value of `exactn' we use here must also be 1. */ typedef enum { no_op = 0, /* Followed by one byte giving n, then by n literal bytes. */ exactn = 1, /* Matches any (more or less) character. */ anychar, /* Matches any one char belonging to specified set. First following byte is number of bitmap bytes. Then come bytes for a bitmap saying which chars are in. Bits in each byte are ordered low-bit-first. A character is in the set if its bit is 1. A character too large to have a bit in the map is automatically not in the set. */ charset, /* Same parameters as charset, but match any character that is not one of those specified. */ charset_not, /* Start remembering the text that is matched, for storing in a register. Followed by one byte with the register number, in the range 0 to one less than the pattern buffer's re_nsub field. Then followed by one byte with the number of groups inner to this one. (This last has to be part of the start_memory only because we need it in the on_failure_jump of re_match_2.) */ start_memory, /* Stop remembering the text that is matched and store it in a memory register. Followed by one byte with the register number, in the range 0 to one less than `re_nsub' in the pattern buffer, and one byte with the number of inner groups, just like `start_memory'. (We need the number of inner groups here because we don't have any easy way of finding the corresponding start_memory when we're at a stop_memory.) */ stop_memory, /* Match a duplicate of something remembered. Followed by one byte containing the register number. */ duplicate, /* Fail unless at beginning of line. */ begline, /* Fail unless at end of line. */ endline, /* Succeeds if at beginning of buffer (if emacs) or at beginning of string to be matched (if not). */ begbuf, /* Analogously, for end of buffer/string. */ endbuf, /* Followed by two byte relative address to which to jump. */ jump, /* Same as jump, but marks the end of an alternative. */ jump_past_alt, /* Followed by two-byte relative address of place to resume at in case of failure. */ on_failure_jump, /* Like on_failure_jump, but pushes a placeholder instead of the current string position when executed. */ on_failure_keep_string_jump, /* Throw away latest failure point and then jump to following two-byte relative address. */ pop_failure_jump, /* Change to pop_failure_jump if know won't have to backtrack to match; otherwise change to jump. This is used to jump back to the beginning of a repeat. If what follows this jump clearly won't match what the repeat does, such that we can be sure that there is no use backtracking out of repetitions already matched, then we change it to a pop_failure_jump. Followed by two-byte address. */ maybe_pop_jump, /* Jump to following two-byte address, and push a dummy failure point. This failure point will be thrown away if an attempt is made to use it for a failure. A `+' construct makes this before the first repeat. Also used as an intermediary kind of jump when compiling an alternative. */ dummy_failure_jump, /* Push a dummy failure point and continue. Used at the end of alternatives. */ push_dummy_failure, /* Followed by two-byte relative address and two-byte number n. After matching N times, jump to the address upon failure. */ succeed_n, /* Followed by two-byte relative address, and two-byte number n. Jump to the address N times, then fail. */ jump_n, /* Set the following two-byte relative address to the subsequent two-byte number. The address *includes* the two bytes of number. */ set_number_at, wordchar, /* Matches any word-constituent character. */ notwordchar, /* Matches any char that is not a word-constituent. */ wordbeg, /* Succeeds if at word beginning. */ wordend, /* Succeeds if at word end. */ wordbound, /* Succeeds if at a word boundary. */ notwordbound /* Succeeds if not at a word boundary. */ #ifdef emacs ,before_dot, /* Succeeds if before point. */ at_dot, /* Succeeds if at point. */ after_dot, /* Succeeds if after point. */ /* Matches any character whose syntax is specified. Followed by a byte which contains a syntax code, e.g., Sword. */ syntaxspec, /* Matches any character whose syntax is not that specified. */ notsyntaxspec #endif /* emacs */ } re_opcode_t; /* Common operations on the compiled pattern. */ /* Store NUMBER in two contiguous bytes starting at DESTINATION. */ #define STORE_NUMBER(destination, number) \ do { \ (destination)[0] = (number) & 0377; \ (destination)[1] = (number) >> 8; \ } while (0) /* Same as STORE_NUMBER, except increment DESTINATION to the byte after where the number is stored. Therefore, DESTINATION must be an lvalue. */ #define STORE_NUMBER_AND_INCR(destination, number) \ do { \ STORE_NUMBER (destination, number); \ (destination) += 2; \ } while (0) /* Put into DESTINATION a number stored in two contiguous bytes starting at SOURCE. */ #define EXTRACT_NUMBER(destination, source) \ do { \ (destination) = *(source) & 0377; \ (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \ } while (0) #ifdef DEBUG static void extract_number (dest, source) int *dest; unsigned char *source; { int temp = SIGN_EXTEND_CHAR (*(source + 1)); *dest = *source & 0377; *dest += temp << 8; } #ifndef EXTRACT_MACROS /* To debug the macros. */ #undef EXTRACT_NUMBER #define EXTRACT_NUMBER(dest, src) extract_number (&dest, src) #endif /* not EXTRACT_MACROS */ #endif /* DEBUG */ /* Same as EXTRACT_NUMBER, except increment SOURCE to after the number. SOURCE must be an lvalue. */ #define EXTRACT_NUMBER_AND_INCR(destination, source) \ do { \ EXTRACT_NUMBER (destination, source); \ (source) += 2; \ } while (0) #ifdef DEBUG static void extract_number_and_incr (destination, source) int *destination; unsigned char **source; { extract_number (destination, *source); *source += 2; } #ifndef EXTRACT_MACROS #undef EXTRACT_NUMBER_AND_INCR #define EXTRACT_NUMBER_AND_INCR(dest, src) \ extract_number_and_incr (&dest, &src) #endif /* not EXTRACT_MACROS */ #endif /* DEBUG */ /* If DEBUG is defined, Regex prints many voluminous messages about what it is doing (if the variable `debug' is nonzero). If linked with the main program in `iregex.c', you can enter patterns and strings interactively. And if linked with the main program in `main.c' and the other test files, you can run the already-written tests. */ #ifdef DEBUG /* We use standard I/O for debugging. */ #include /* It is useful to test things that ``must'' be true when debugging. */ #include static int debug = 0; #define DEBUG_STATEMENT(e) e #define DEBUG_PRINT1(x) if (debug) printf (x) #define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2) #define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3) #define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4) #define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) \ if (debug) print_partial_compiled_pattern (s, e) #define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \ if (debug) print_double_string (w, s1, sz1, s2, sz2) extern void printchar (); /* Print the fastmap in human-readable form. */ void print_fastmap (fastmap) char *fastmap; { unsigned was_a_range = 0; unsigned i = 0; while (i < (1 << BYTEWIDTH)) { if (fastmap[i++]) { was_a_range = 0; printchar (i - 1); while (i < (1 << BYTEWIDTH) && fastmap[i]) { was_a_range = 1; i++; } if (was_a_range) { printf ("-"); printchar (i - 1); } } } putchar ('\n'); } /* Print a compiled pattern string in human-readable form, starting at the START pointer into it and ending just before the pointer END. */ void print_partial_compiled_pattern (start, end) unsigned char *start; unsigned char *end; { int mcnt, mcnt2; unsigned char *p = start; unsigned char *pend = end; if (start == NULL) { printf ("(null)\n"); return; } /* Loop over pattern commands. */ while (p < pend) { switch ((re_opcode_t) *p++) { case no_op: printf ("/no_op"); break; case exactn: mcnt = *p++; printf ("/exactn/%d", mcnt); do { putchar ('/'); printchar (*p++); } while (--mcnt); break; case start_memory: mcnt = *p++; printf ("/start_memory/%d/%d", mcnt, *p++); break; case stop_memory: mcnt = *p++; printf ("/stop_memory/%d/%d", mcnt, *p++); break; case duplicate: printf ("/duplicate/%d", *p++); break; case anychar: printf ("/anychar"); break; case charset: case charset_not: { register int c; printf ("/charset%s", (re_opcode_t) *(p - 1) == charset_not ? "_not" : ""); assert (p + *p < pend); for (c = 0; c < *p; c++) { unsigned bit; unsigned char map_byte = p[1 + c]; putchar ('/'); for (bit = 0; bit < BYTEWIDTH; bit++) if (map_byte & (1 << bit)) printchar (c * BYTEWIDTH + bit); } p += 1 + *p; break; } case begline: printf ("/begline"); break; case endline: printf ("/endline"); break; case on_failure_jump: extract_number_and_incr (&mcnt, &p); printf ("/on_failure_jump/0/%d", mcnt); break; case on_failure_keep_string_jump: extract_number_and_incr (&mcnt, &p); printf ("/on_failure_keep_string_jump/0/%d", mcnt); break; case dummy_failure_jump: extract_number_and_incr (&mcnt, &p); printf ("/dummy_failure_jump/0/%d", mcnt); break; case push_dummy_failure: printf ("/push_dummy_failure"); break; case maybe_pop_jump: extract_number_and_incr (&mcnt, &p); printf ("/maybe_pop_jump/0/%d", mcnt); break; case pop_failure_jump: extract_number_and_incr (&mcnt, &p); printf ("/pop_failure_jump/0/%d", mcnt); break; case jump_past_alt: extract_number_and_incr (&mcnt, &p); printf ("/jump_past_alt/0/%d", mcnt); break; case jump: extract_number_and_incr (&mcnt, &p); printf ("/jump/0/%d", mcnt); break; case succeed_n: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/succeed_n/0/%d/0/%d", mcnt, mcnt2); break; case jump_n: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/jump_n/0/%d/0/%d", mcnt, mcnt2); break; case set_number_at: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/set_number_at/0/%d/0/%d", mcnt, mcnt2); break; case wordbound: printf ("/wordbound"); break; case notwordbound: printf ("/notwordbound"); break; case wordbeg: printf ("/wordbeg"); break; case wordend: printf ("/wordend"); #ifdef emacs case before_dot: printf ("/before_dot"); break; case at_dot: printf ("/at_dot"); break; case after_dot: printf ("/after_dot"); break; case syntaxspec: printf ("/syntaxspec"); mcnt = *p++; printf ("/%d", mcnt); break; case notsyntaxspec: printf ("/notsyntaxspec"); mcnt = *p++; printf ("/%d", mcnt); break; #endif /* emacs */ case wordchar: printf ("/wordchar"); break; case notwordchar: printf ("/notwordchar"); break; case begbuf: printf ("/begbuf"); break; case endbuf: printf ("/endbuf"); break; default: printf ("?%d", *(p-1)); } } printf ("/\n"); } void print_compiled_pattern (bufp) struct re_pattern_buffer *bufp; { unsigned char *buffer = bufp->buffer; print_partial_compiled_pattern (buffer, buffer + bufp->used); printf ("%d bytes used/%d bytes allocated.\n", bufp->used, bufp->allocated); if (bufp->fastmap_accurate && bufp->fastmap) { printf ("fastmap: "); print_fastmap (bufp->fastmap); } printf ("re_nsub: %d\t", bufp->re_nsub); printf ("regs_alloc: %d\t", bufp->regs_allocated); printf ("can_be_null: %d\t", bufp->can_be_null); printf ("newline_anchor: %d\n", bufp->newline_anchor); printf ("no_sub: %d\t", bufp->no_sub); printf ("not_bol: %d\t", bufp->not_bol); printf ("not_eol: %d\t", bufp->not_eol); printf ("syntax: %d\n", bufp->syntax); /* Perhaps we should print the translate table? */ } void print_double_string (where, string1, size1, string2, size2) const char *where; const char *string1; const char *string2; int size1; int size2; { unsigned this_char; if (where == NULL) printf ("(null)"); else { if (FIRST_STRING_P (where)) { for (this_char = where - string1; this_char < size1; this_char++) printchar (string1[this_char]); where = string2; } for (this_char = where - string2; this_char < size2; this_char++) printchar (string2[this_char]); } } #else /* not DEBUG */ #undef assert #define assert(e) #define DEBUG_STATEMENT(e) #define DEBUG_PRINT1(x) #define DEBUG_PRINT2(x1, x2) #define DEBUG_PRINT3(x1, x2, x3) #define DEBUG_PRINT4(x1, x2, x3, x4) #define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) #define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) #endif /* not DEBUG */ /* Set by `re_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own syntax, so it can be changed between regex compilations. */ reg_syntax_t re_syntax_options = RE_SYNTAX_EMACS; /* Specify the precise syntax of regexps for compilation. This provides for compatibility for various utilities which historically have different, incompatible syntaxes. The argument SYNTAX is a bit mask comprised of the various bits defined in regex.h. We return the old syntax. */ reg_syntax_t re_set_syntax (syntax) reg_syntax_t syntax; { reg_syntax_t ret = re_syntax_options; re_syntax_options = syntax; return ret; } /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. */ static const char *re_error_msg[] = { NULL, /* REG_NOERROR */ "No match", /* REG_NOMATCH */ "Invalid regular expression", /* REG_BADPAT */ "Invalid collation character", /* REG_ECOLLATE */ "Invalid character class name", /* REG_ECTYPE */ "Trailing backslash", /* REG_EESCAPE */ "Invalid back reference", /* REG_ESUBREG */ "Unmatched [ or [^", /* REG_EBRACK */ "Unmatched ( or \\(", /* REG_EPAREN */ "Unmatched \\{", /* REG_EBRACE */ "Invalid content of \\{\\}", /* REG_BADBR */ "Invalid range end", /* REG_ERANGE */ "Memory exhausted", /* REG_ESPACE */ "Invalid preceding regular expression", /* REG_BADRPT */ "Premature end of regular expression", /* REG_EEND */ "Regular expression too big", /* REG_ESIZE */ "Unmatched ) or \\)", /* REG_ERPAREN */ }; /* Subroutine declarations and macros for regex_compile. */ static void store_op1 (), store_op2 (); static void insert_op1 (), insert_op2 (); static boolean at_begline_loc_p (), at_endline_loc_p (); static boolean group_in_compile_stack (); static reg_errcode_t compile_range (); /* Fetch the next character in the uncompiled pattern---translating it if necessary. Also cast from a signed character in the constant string passed to us by the user to an unsigned char that we can use as an array index (in, e.g., `translate'). */ #define PATFETCH(c) \ do {if (p == pend) return REG_EEND; \ c = (unsigned char) *p++; \ if (translate) c = translate[c]; \ } while (0) /* Fetch the next character in the uncompiled pattern, with no translation. */ #define PATFETCH_RAW(c) \ do {if (p == pend) return REG_EEND; \ c = (unsigned char) *p++; \ } while (0) /* Go backwards one character in the pattern. */ #define PATUNFETCH p-- /* If `translate' is non-null, return translate[D], else just D. We cast the subscript to translate because some data is declared as `char *', to avoid warnings when a string constant is passed. But when we use a character as a subscript we must make it unsigned. */ #define TRANSLATE(d) (translate ? translate[(unsigned char) (d)] : (d)) /* Macros for outputting the compiled pattern into `buffer'. */ /* If the buffer isn't allocated when it comes in, use this. */ #define INIT_BUF_SIZE 32 /* Make sure we have at least N more bytes of space in buffer. */ #define GET_BUFFER_SPACE(n) \ while (b - bufp->buffer + (n) > bufp->allocated) \ EXTEND_BUFFER () /* Make sure we have one more byte of buffer space and then add C to it. */ #define BUF_PUSH(c) \ do { \ GET_BUFFER_SPACE (1); \ *b++ = (unsigned char) (c); \ } while (0) /* Ensure we have two more bytes of buffer space and then append C1 and C2. */ #define BUF_PUSH_2(c1, c2) \ do { \ GET_BUFFER_SPACE (2); \ *b++ = (unsigned char) (c1); \ *b++ = (unsigned char) (c2); \ } while (0) /* As with BUF_PUSH_2, except for three bytes. */ #define BUF_PUSH_3(c1, c2, c3) \ do { \ GET_BUFFER_SPACE (3); \ *b++ = (unsigned char) (c1); \ *b++ = (unsigned char) (c2); \ *b++ = (unsigned char) (c3); \ } while (0) /* Store a jump with opcode OP at LOC to location TO. We store a relative address offset by the three bytes the jump itself occupies. */ #define STORE_JUMP(op, loc, to) \ store_op1 (op, loc, (to) - (loc) - 3) /* Likewise, for a two-argument jump. */ #define STORE_JUMP2(op, loc, to, arg) \ store_op2 (op, loc, (to) - (loc) - 3, arg) /* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */ #define INSERT_JUMP(op, loc, to) \ insert_op1 (op, loc, (to) - (loc) - 3, b) /* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */ #define INSERT_JUMP2(op, loc, to, arg) \ insert_op2 (op, loc, (to) - (loc) - 3, arg, b) /* This is not an arbitrary limit: the arguments which represent offsets into the pattern are two bytes long. So if 2^16 bytes turns out to be too small, many things would have to change. */ #define MAX_BUF_SIZE (1L << 16) /* Extend the buffer by twice its current size via realloc and reset the pointers that pointed into the old block to point to the correct places in the new one. If extending the buffer results in it being larger than MAX_BUF_SIZE, then flag memory exhausted. */ #define EXTEND_BUFFER() \ do { \ unsigned char *old_buffer = bufp->buffer; \ if (bufp->allocated == MAX_BUF_SIZE) \ return REG_ESIZE; \ bufp->allocated <<= 1; \ if (bufp->allocated > MAX_BUF_SIZE) \ bufp->allocated = MAX_BUF_SIZE; \ bufp->buffer = (unsigned char *) realloc (bufp->buffer, bufp->allocated);\ if (bufp->buffer == NULL) \ return REG_ESPACE; \ /* If the buffer moved, move all the pointers into it. */ \ if (old_buffer != bufp->buffer) \ { \ b = (b - old_buffer) + bufp->buffer; \ begalt = (begalt - old_buffer) + bufp->buffer; \ if (fixup_alt_jump) \ fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer;\ if (laststart) \ laststart = (laststart - old_buffer) + bufp->buffer; \ if (pending_exact) \ pending_exact = (pending_exact - old_buffer) + bufp->buffer; \ } \ } while (0) /* Since we have one byte reserved for the register number argument to {start,stop}_memory, the maximum number of groups we can report things about is what fits in that byte. */ #define MAX_REGNUM 255 /* But patterns can have more than `MAX_REGNUM' registers. We just ignore the excess. */ typedef unsigned regnum_t; /* Macros for the compile stack. */ /* Since offsets can go either forwards or backwards, this type needs to be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1. */ typedef int pattern_offset_t; typedef struct { pattern_offset_t begalt_offset; pattern_offset_t fixup_alt_jump; pattern_offset_t inner_group_offset; pattern_offset_t laststart_offset; regnum_t regnum; } compile_stack_elt_t; typedef struct { compile_stack_elt_t *stack; unsigned size; unsigned avail; /* Offset of next open position. */ } compile_stack_type; #define INIT_COMPILE_STACK_SIZE 32 #define COMPILE_STACK_EMPTY (compile_stack.avail == 0) #define COMPILE_STACK_FULL (compile_stack.avail == compile_stack.size) /* The next available element. */ #define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) /* Set the bit for character C in a list. */ #define SET_LIST_BIT(c) \ (b[((unsigned char) (c)) / BYTEWIDTH] \ |= 1 << (((unsigned char) c) % BYTEWIDTH)) /* Get the next unsigned number in the uncompiled pattern. */ #define GET_UNSIGNED_NUMBER(num) \ { if (p != pend) \ { \ PATFETCH (c); \ while (ISDIGIT (c)) \ { \ if (num < 0) \ num = 0; \ num = num * 10 + c - '0'; \ if (p == pend) \ break; \ PATFETCH (c); \ } \ } \ } #define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ #define IS_CHAR_CLASS(string) \ (STREQ (string, "alpha") || STREQ (string, "upper") \ || STREQ (string, "lower") || STREQ (string, "digit") \ || STREQ (string, "alnum") || STREQ (string, "xdigit") \ || STREQ (string, "space") || STREQ (string, "print") \ || STREQ (string, "punct") || STREQ (string, "graph") \ || STREQ (string, "cntrl") || STREQ (string, "blank")) /* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX. Returns one of error codes defined in `regex.h', or zero for success. Assumes the `allocated' (and perhaps `buffer') and `translate' fields are set in BUFP on entry. If it succeeds, results are put in BUFP (if it returns an error, the contents of BUFP are undefined): `buffer' is the compiled pattern; `syntax' is set to SYNTAX; `used' is set to the length of the compiled pattern; `fastmap_accurate' is zero; `re_nsub' is the number of subexpressions in PATTERN; `not_bol' and `not_eol' are zero; The `fastmap' and `newline_anchor' fields are neither examined nor set. */ static reg_errcode_t regex_compile (pattern, size, syntax, bufp) const char *pattern; int size; reg_syntax_t syntax; struct re_pattern_buffer *bufp; { /* We fetch characters from PATTERN here. Even though PATTERN is `char *' (i.e., signed), we declare these variables as unsigned, so they can be reliably used as array indices. */ register unsigned char c, c1; /* A random tempory spot in PATTERN. */ const char *p1; /* Points to the end of the buffer, where we should append. */ register unsigned char *b; /* Keeps track of unclosed groups. */ compile_stack_type compile_stack; /* Points to the current (ending) position in the pattern. */ const char *p = pattern; const char *pend = pattern + size; /* How to translate the characters in the pattern. */ char *translate = bufp->translate; /* Address of the count-byte of the most recently inserted `exactn' command. This makes it possible to tell if a new exact-match character can be added to that command or if the character requires a new `exactn' command. */ unsigned char *pending_exact = 0; /* Address of start of the most recently finished expression. This tells, e.g., postfix * where to find the start of its operand. Reset at the beginning of groups and alternatives. */ unsigned char *laststart = 0; /* Address of beginning of regexp, or inside of last group. */ unsigned char *begalt; /* Place in the uncompiled pattern (i.e., the {) to which to go back if the interval is invalid. */ const char *beg_interval; /* Address of the place where a forward jump should go to the end of the containing expression. Each alternative of an `or' -- except the last -- ends with a forward jump of this sort. */ unsigned char *fixup_alt_jump = 0; /* Counts open-groups as they are encountered. Remembered for the matching close-group on the compile stack, so the same register number is put in the stop_memory as the start_memory. */ regnum_t regnum = 0; #ifdef DEBUG DEBUG_PRINT1 ("\nCompiling pattern: "); if (debug) { unsigned debug_count; for (debug_count = 0; debug_count < size; debug_count++) printchar (pattern[debug_count]); putchar ('\n'); } #endif /* DEBUG */ /* Initialize the compile stack. */ compile_stack.stack = TALLOC (INIT_COMPILE_STACK_SIZE, compile_stack_elt_t); if (compile_stack.stack == NULL) return REG_ESPACE; compile_stack.size = INIT_COMPILE_STACK_SIZE; compile_stack.avail = 0; /* Initialize the pattern buffer. */ bufp->syntax = syntax; bufp->fastmap_accurate = 0; bufp->not_bol = bufp->not_eol = 0; /* Set `used' to zero, so that if we return an error, the pattern printer (for debugging) will think there's no pattern. We reset it at the end. */ bufp->used = 0; /* Always count groups, whether or not bufp->no_sub is set. */ bufp->re_nsub = 0; #if !defined (emacs) && !defined (SYNTAX_TABLE) /* Initialize the syntax table. */ init_syntax_once (); #endif if (bufp->allocated == 0) { if (bufp->buffer) { /* If zero allocated, but buffer is non-null, try to realloc enough space. This loses if buffer's address is bogus, but that is the user's responsibility. */ RETALLOC (bufp->buffer, INIT_BUF_SIZE, unsigned char); } else { /* Caller did not allocate a buffer. Do it for them. */ bufp->buffer = TALLOC (INIT_BUF_SIZE, unsigned char); } if (!bufp->buffer) return REG_ESPACE; bufp->allocated = INIT_BUF_SIZE; } begalt = b = bufp->buffer; /* Loop through the uncompiled pattern until we're at the end. */ while (p != pend) { PATFETCH (c); switch (c) { case '^': { if ( /* If at start of pattern, it's an operator. */ p == pattern + 1 /* If context independent, it's an operator. */ || syntax & RE_CONTEXT_INDEP_ANCHORS /* Otherwise, depends on what's come before. */ || at_begline_loc_p (pattern, p, syntax)) BUF_PUSH (begline); else goto normal_char; } break; case '$': { if ( /* If at end of pattern, it's an operator. */ p == pend /* If context independent, it's an operator. */ || syntax & RE_CONTEXT_INDEP_ANCHORS /* Otherwise, depends on what's next. */ || at_endline_loc_p (p, pend, syntax)) BUF_PUSH (endline); else goto normal_char; } break; case '+': case '?': if ((syntax & RE_BK_PLUS_QM) || (syntax & RE_LIMITED_OPS)) goto normal_char; handle_plus: case '*': /* If there is no previous pattern... */ if (!laststart) { if (syntax & RE_CONTEXT_INVALID_OPS) return REG_BADRPT; else if (!(syntax & RE_CONTEXT_INDEP_OPS)) goto normal_char; } { /* Are we optimizing this jump? */ boolean keep_string_p = false; /* 1 means zero (many) matches is allowed. */ char zero_times_ok = 0, many_times_ok = 0; /* If there is a sequence of repetition chars, collapse it down to just one (the right one). We can't combine interval operators with these because of, e.g., `a{2}*', which should only match an even number of `a's. */ for (;;) { zero_times_ok |= c != '+'; many_times_ok |= c != '?'; if (p == pend) break; PATFETCH (c); if (c == '*' || (!(syntax & RE_BK_PLUS_QM) && (c == '+' || c == '?'))) ; else if (syntax & RE_BK_PLUS_QM && c == '\\') { if (p == pend) return REG_EESCAPE; PATFETCH (c1); if (!(c1 == '+' || c1 == '?')) { PATUNFETCH; PATUNFETCH; break; } c = c1; } else { PATUNFETCH; break; } /* If we get here, we found another repeat character. */ } /* Star, etc. applied to an empty pattern is equivalent to an empty pattern. */ if (!laststart) break; /* Now we know whether or not zero matches is allowed and also whether or not two or more matches is allowed. */ if (many_times_ok) { /* More than one repetition is allowed, so put in at the end a backward relative jump from `b' to before the next jump we're going to put in below (which jumps from laststart to after this jump). But if we are at the `*' in the exact sequence `.*\n', insert an unconditional jump backwards to the ., instead of the beginning of the loop. This way we only push a failure point once, instead of every time through the loop. */ assert (p - 1 > pattern); /* Allocate the space for the jump. */ GET_BUFFER_SPACE (3); /* We know we are not at the first character of the pattern, because laststart was nonzero. And we've already incremented `p', by the way, to be the character after the `*'. Do we have to do something analogous here for null bytes, because of RE_DOT_NOT_NULL? */ if (TRANSLATE (*(p - 2)) == TRANSLATE ('.') && zero_times_ok && p < pend && TRANSLATE (*p) == TRANSLATE ('\n') && !(syntax & RE_DOT_NEWLINE)) { /* We have .*\n. */ STORE_JUMP (jump, b, laststart); keep_string_p = true; } else /* Anything else. */ STORE_JUMP (maybe_pop_jump, b, laststart - 3); /* We've added more stuff to the buffer. */ b += 3; } /* On failure, jump from laststart to b + 3, which will be the end of the buffer after this jump is inserted. */ GET_BUFFER_SPACE (3); INSERT_JUMP (keep_string_p ? on_failure_keep_string_jump : on_failure_jump, laststart, b + 3); pending_exact = 0; b += 3; if (!zero_times_ok) { /* At least one repetition is required, so insert a `dummy_failure_jump' before the initial `on_failure_jump' instruction of the loop. This effects a skip over that instruction the first time we hit that loop. */ GET_BUFFER_SPACE (3); INSERT_JUMP (dummy_failure_jump, laststart, laststart + 6); b += 3; } } break; case '.': laststart = b; BUF_PUSH (anychar); break; case '[': { boolean had_char_class = false; if (p == pend) return REG_EBRACK; /* Ensure that we have enough space to push a charset: the opcode, the length count, and the bitset; 34 bytes in all. */ GET_BUFFER_SPACE (34); laststart = b; /* We test `*p == '^' twice, instead of using an if statement, so we only need one BUF_PUSH. */ BUF_PUSH (*p == '^' ? charset_not : charset); if (*p == '^') p++; /* Remember the first position in the bracket expression. */ p1 = p; /* Push the number of bytes in the bitmap. */ BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH); /* Clear the whole map. */ bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH); /* charset_not matches newline according to a syntax bit. */ if ((re_opcode_t) b[-2] == charset_not && (syntax & RE_HAT_LISTS_NOT_NEWLINE)) SET_LIST_BIT ('\n'); /* Read in characters and ranges, setting map bits. */ for (;;) { if (p == pend) return REG_EBRACK; PATFETCH (c); /* \ might escape characters inside [...] and [^...]. */ if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\') { if (p == pend) return REG_EESCAPE; PATFETCH (c1); SET_LIST_BIT (c1); continue; } /* Could be the end of the bracket expression. If it's not (i.e., when the bracket expression is `[]' so far), the ']' character bit gets set way below. */ if (c == ']' && p != p1 + 1) break; /* Look ahead to see if it's a range when the last thing was a character class. */ if (had_char_class && c == '-' && *p != ']') return REG_ERANGE; /* Look ahead to see if it's a range when the last thing was a character: if this is a hyphen not at the beginning or the end of a list, then it's the range operator. */ if (c == '-' && !(p - 2 >= pattern && p[-2] == '[') && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^') && *p != ']') { reg_errcode_t ret = compile_range (&p, pend, translate, syntax, b); if (ret != REG_NOERROR) return ret; } else if (p[0] == '-' && p[1] != ']') { /* This handles ranges made up of characters only. */ reg_errcode_t ret; /* Move past the `-'. */ PATFETCH (c1); ret = compile_range (&p, pend, translate, syntax, b); if (ret != REG_NOERROR) return ret; } /* See if we're at the beginning of a possible character class. */ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':') { /* Leave room for the null. */ char str[CHAR_CLASS_MAX_LENGTH + 1]; PATFETCH (c); c1 = 0; /* If pattern is `[[:'. */ if (p == pend) return REG_EBRACK; for (;;) { PATFETCH (c); if (c == ':' || c == ']' || p == pend || c1 == CHAR_CLASS_MAX_LENGTH) break; str[c1++] = c; } str[c1] = '\0'; /* If isn't a word bracketed by `[:' and:`]': undo the ending character, the letters, and leave the leading `:' and `[' (but set bits for them). */ if (c == ':' && *p == ']') { int ch; boolean is_alnum = STREQ (str, "alnum"); boolean is_alpha = STREQ (str, "alpha"); boolean is_blank = STREQ (str, "blank"); boolean is_cntrl = STREQ (str, "cntrl"); boolean is_digit = STREQ (str, "digit"); boolean is_graph = STREQ (str, "graph"); boolean is_lower = STREQ (str, "lower"); boolean is_print = STREQ (str, "print"); boolean is_punct = STREQ (str, "punct"); boolean is_space = STREQ (str, "space"); boolean is_upper = STREQ (str, "upper"); boolean is_xdigit = STREQ (str, "xdigit"); if (!IS_CHAR_CLASS (str)) return REG_ECTYPE; /* Throw away the ] at the end of the character class. */ PATFETCH (c); if (p == pend) return REG_EBRACK; for (ch = 0; ch < 1 << BYTEWIDTH; ch++) { if ( (is_alnum && ISALNUM (ch)) || (is_alpha && ISALPHA (ch)) || (is_blank && ISBLANK (ch)) || (is_cntrl && ISCNTRL (ch)) || (is_digit && ISDIGIT (ch)) || (is_graph && ISGRAPH (ch)) || (is_lower && ISLOWER (ch)) || (is_print && ISPRINT (ch)) || (is_punct && ISPUNCT (ch)) || (is_space && ISSPACE (ch)) || (is_upper && ISUPPER (ch)) || (is_xdigit && ISXDIGIT (ch))) SET_LIST_BIT (ch); } had_char_class = true; } else { c1++; while (c1--) PATUNFETCH; SET_LIST_BIT ('['); SET_LIST_BIT (':'); had_char_class = false; } } else { had_char_class = false; SET_LIST_BIT (c); } } /* Discard any (non)matching list bytes that are all 0 at the end of the map. Decrease the map-length byte too. */ while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) b[-1]--; b += b[-1]; } break; case '(': if (syntax & RE_NO_BK_PARENS) goto handle_open; else goto normal_char; case ')': if (syntax & RE_NO_BK_PARENS) goto handle_close; else goto normal_char; case '\n': if (syntax & RE_NEWLINE_ALT) goto handle_alt; else goto normal_char; case '|': if (syntax & RE_NO_BK_VBAR) goto handle_alt; else goto normal_char; case '{': if (syntax & RE_INTERVALS && syntax & RE_NO_BK_BRACES) goto handle_interval; else goto normal_char; case '\\': if (p == pend) return REG_EESCAPE; /* Do not translate the character after the \, so that we can distinguish, e.g., \B from \b, even if we normally would translate, e.g., B to b. */ PATFETCH_RAW (c); switch (c) { case '(': if (syntax & RE_NO_BK_PARENS) goto normal_backslash; handle_open: bufp->re_nsub++; regnum++; if (COMPILE_STACK_FULL) { RETALLOC (compile_stack.stack, compile_stack.size << 1, compile_stack_elt_t); if (compile_stack.stack == NULL) return REG_ESPACE; compile_stack.size <<= 1; } /* These are the values to restore when we hit end of this group. They are all relative offsets, so that if the whole pattern moves because of realloc, they will still be valid. */ COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer; COMPILE_STACK_TOP.fixup_alt_jump = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0; COMPILE_STACK_TOP.laststart_offset = b - bufp->buffer; COMPILE_STACK_TOP.regnum = regnum; /* We will eventually replace the 0 with the number of groups inner to this one. But do not push a start_memory for groups beyond the last one we can represent in the compiled pattern. */ if (regnum <= MAX_REGNUM) { COMPILE_STACK_TOP.inner_group_offset = b - bufp->buffer + 2; BUF_PUSH_3 (start_memory, regnum, 0); } compile_stack.avail++; fixup_alt_jump = 0; laststart = 0; begalt = b; /* If we've reached MAX_REGNUM groups, then this open won't actually generate any code, so we'll have to clear pending_exact explicitly. */ pending_exact = 0; break; case ')': if (syntax & RE_NO_BK_PARENS) goto normal_backslash; if (COMPILE_STACK_EMPTY) { if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) { goto normal_backslash; } else { return REG_ERPAREN; } } handle_close: if (fixup_alt_jump) { /* Push a dummy failure point at the end of the alternative for a possible future `pop_failure_jump' to pop. See comments at `push_dummy_failure' in `re_match_2'. */ BUF_PUSH (push_dummy_failure); /* We allocated space for this jump when we assigned to `fixup_alt_jump', in the `handle_alt' case below. */ STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1); } /* See similar code for backslashed left paren above. */ if (COMPILE_STACK_EMPTY) { if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) { goto normal_char; } else { return REG_ERPAREN; } } /* Since we just checked for an empty stack above, this ``can't happen''. */ assert (compile_stack.avail != 0); { /* We don't just want to restore into `regnum', because later groups should continue to be numbered higher, as in `(ab)c(de)' -- the second group is #2. */ regnum_t this_group_regnum; compile_stack.avail--; begalt = bufp->buffer + COMPILE_STACK_TOP.begalt_offset; fixup_alt_jump = COMPILE_STACK_TOP.fixup_alt_jump ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1 : 0; laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset; this_group_regnum = COMPILE_STACK_TOP.regnum; /* If we've reached MAX_REGNUM groups, then this open won't actually generate any code, so we'll have to clear pending_exact explicitly. */ pending_exact = 0; /* We're at the end of the group, so now we know how many groups were inside this one. */ if (this_group_regnum <= MAX_REGNUM) { unsigned char *inner_group_loc = bufp->buffer + COMPILE_STACK_TOP.inner_group_offset; *inner_group_loc = regnum - this_group_regnum; BUF_PUSH_3 (stop_memory, this_group_regnum, regnum - this_group_regnum); } } break; case '|': /* `\|'. */ if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR) goto normal_backslash; handle_alt: if (syntax & RE_LIMITED_OPS) goto normal_char; /* Insert before the previous alternative a jump which jumps to this alternative if the former fails. */ GET_BUFFER_SPACE (3); INSERT_JUMP (on_failure_jump, begalt, b + 6); pending_exact = 0; b += 3; /* The alternative before this one has a jump after it which gets executed if it gets matched. Adjust that jump so it will jump to this alternative's analogous jump (put in below, which in turn will jump to the next (if any) alternative's such jump, etc.). The last such jump jumps to the correct final destination. A picture: _____ _____ | | | | | v | v a | b | c If we are at `b', then fixup_alt_jump right now points to a three-byte space after `a'. We'll put in the jump, set fixup_alt_jump to right after `b', and leave behind three bytes which we'll fill in when we get to after `c'. */ if (fixup_alt_jump) STORE_JUMP (jump_past_alt, fixup_alt_jump, b); /* Mark and leave space for a jump after this alternative, to be filled in later either by next alternative or when know we're at the end of a series of alternatives. */ fixup_alt_jump = b; GET_BUFFER_SPACE (3); b += 3; laststart = 0; begalt = b; break; case '{': /* If \{ is a literal. */ if (!(syntax & RE_INTERVALS) /* If we're at `\{' and it's not the open-interval operator. */ || ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) || (p - 2 == pattern && p == pend)) goto normal_backslash; handle_interval: { /* If got here, then the syntax allows intervals. */ /* At least (most) this many matches must be made. */ int lower_bound = -1, upper_bound = -1; beg_interval = p - 1; if (p == pend) { if (syntax & RE_NO_BK_BRACES) goto unfetch_interval; else return REG_EBRACE; } GET_UNSIGNED_NUMBER (lower_bound); if (c == ',') { GET_UNSIGNED_NUMBER (upper_bound); if (upper_bound < 0) upper_bound = RE_DUP_MAX; } else /* Interval such as `{1}' => match exactly once. */ upper_bound = lower_bound; if (lower_bound < 0 || upper_bound > RE_DUP_MAX || lower_bound > upper_bound) { if (syntax & RE_NO_BK_BRACES) goto unfetch_interval; else return REG_BADBR; } if (!(syntax & RE_NO_BK_BRACES)) { if (c != '\\') return REG_EBRACE; PATFETCH (c); } if (c != '}') { if (syntax & RE_NO_BK_BRACES) goto unfetch_interval; else return REG_BADBR; } /* We just parsed a valid interval. */ /* If it's invalid to have no preceding re. */ if (!laststart) { if (syntax & RE_CONTEXT_INVALID_OPS) return REG_BADRPT; else if (syntax & RE_CONTEXT_INDEP_OPS) laststart = b; else goto unfetch_interval; } /* If the upper bound is zero, don't want to succeed at all; jump from `laststart' to `b + 3', which will be the end of the buffer after we insert the jump. */ if (upper_bound == 0) { GET_BUFFER_SPACE (3); INSERT_JUMP (jump, laststart, b + 3); b += 3; } /* Otherwise, we have a nontrivial interval. When we're all done, the pattern will look like: set_number_at set_number_at succeed_n jump_n (The upper bound and `jump_n' are omitted if `upper_bound' is 1, though.) */ else { /* If the upper bound is > 1, we need to insert more at the end of the loop. */ unsigned nbytes = 10 + (upper_bound > 1) * 10; GET_BUFFER_SPACE (nbytes); /* Initialize lower bound of the `succeed_n', even though it will be set during matching by its attendant `set_number_at' (inserted next), because `re_compile_fastmap' needs to know. Jump to the `jump_n' we might insert below. */ INSERT_JUMP2 (succeed_n, laststart, b + 5 + (upper_bound > 1) * 5, lower_bound); b += 5; /* Code to initialize the lower bound. Insert before the `succeed_n'. The `5' is the last two bytes of this `set_number_at', plus 3 bytes of the following `succeed_n'. */ insert_op2 (set_number_at, laststart, 5, lower_bound, b); b += 5; if (upper_bound > 1) { /* More than one repetition is allowed, so append a backward jump to the `succeed_n' that starts this interval. When we've reached this during matching, we'll have matched the interval once, so jump back only `upper_bound - 1' times. */ STORE_JUMP2 (jump_n, b, laststart + 5, upper_bound - 1); b += 5; /* The location we want to set is the second parameter of the `jump_n'; that is `b-2' as an absolute address. `laststart' will be the `set_number_at' we're about to insert; `laststart+3' the number to set, the source for the relative address. But we are inserting into the middle of the pattern -- so everything is getting moved up by 5. Conclusion: (b - 2) - (laststart + 3) + 5, i.e., b - laststart. We insert this at the beginning of the loop so that if we fail during matching, we'll reinitialize the bounds. */ insert_op2 (set_number_at, laststart, b - laststart, upper_bound - 1, b); b += 5; } } pending_exact = 0; beg_interval = NULL; } break; unfetch_interval: /* If an invalid interval, match the characters as literals. */ assert (beg_interval); p = beg_interval; beg_interval = NULL; /* normal_char and normal_backslash need `c'. */ PATFETCH (c); if (!(syntax & RE_NO_BK_BRACES)) { if (p > pattern && p[-1] == '\\') goto normal_backslash; } goto normal_char; #ifdef emacs /* There is no way to specify the before_dot and after_dot operators. rms says this is ok. --karl */ case '=': BUF_PUSH (at_dot); break; case 's': laststart = b; PATFETCH (c); BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]); break; case 'S': laststart = b; PATFETCH (c); BUF_PUSH_2 (notsyntaxspec, syntax_spec_code[c]); break; #endif /* emacs */ case 'w': laststart = b; BUF_PUSH (wordchar); break; case 'W': laststart = b; BUF_PUSH (notwordchar); break; case '<': BUF_PUSH (wordbeg); break; case '>': BUF_PUSH (wordend); break; case 'b': BUF_PUSH (wordbound); break; case 'B': BUF_PUSH (notwordbound); break; case '`': BUF_PUSH (begbuf); break; case '\'': BUF_PUSH (endbuf); break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (syntax & RE_NO_BK_REFS) goto normal_char; c1 = c - '0'; if (c1 > regnum) return REG_ESUBREG; /* Can't back reference to a subexpression if inside of it. */ if (group_in_compile_stack (compile_stack, c1)) goto normal_char; laststart = b; BUF_PUSH_2 (duplicate, c1); break; case '+': case '?': if (syntax & RE_BK_PLUS_QM) goto handle_plus; else goto normal_backslash; default: normal_backslash: /* You might think it would be useful for \ to mean not to translate; but if we don't translate it it will never match anything. */ c = TRANSLATE (c); goto normal_char; } break; default: /* Expects the character in `c'. */ normal_char: /* If no exactn currently being built. */ if (!pending_exact /* If last exactn not at current position. */ || pending_exact + *pending_exact + 1 != b /* We have only one byte following the exactn for the count. */ || *pending_exact == (1 << BYTEWIDTH) - 1 /* If followed by a repetition operator. */ || *p == '*' || *p == '^' || ((syntax & RE_BK_PLUS_QM) ? *p == '\\' && (p[1] == '+' || p[1] == '?') : (*p == '+' || *p == '?')) || ((syntax & RE_INTERVALS) && ((syntax & RE_NO_BK_BRACES) ? *p == '{' : (p[0] == '\\' && p[1] == '{')))) { /* Start building a new exactn. */ laststart = b; BUF_PUSH_2 (exactn, 0); pending_exact = b - 1; } BUF_PUSH (c); (*pending_exact)++; break; } /* switch (c) */ } /* while p != pend */ /* Through the pattern now. */ if (fixup_alt_jump) STORE_JUMP (jump_past_alt, fixup_alt_jump, b); if (!COMPILE_STACK_EMPTY) return REG_EPAREN; free (compile_stack.stack); /* We have succeeded; set the length of the buffer. */ bufp->used = b - bufp->buffer; #ifdef DEBUG if (debug) { DEBUG_PRINT1 ("\nCompiled pattern: "); print_compiled_pattern (bufp); } #endif /* DEBUG */ return REG_NOERROR; } /* regex_compile */ /* Subroutines for `regex_compile'. */ /* Store OP at LOC followed by two-byte integer parameter ARG. */ static void store_op1 (op, loc, arg) re_opcode_t op; unsigned char *loc; int arg; { *loc = (unsigned char) op; STORE_NUMBER (loc + 1, arg); } /* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */ static void store_op2 (op, loc, arg1, arg2) re_opcode_t op; unsigned char *loc; int arg1, arg2; { *loc = (unsigned char) op; STORE_NUMBER (loc + 1, arg1); STORE_NUMBER (loc + 3, arg2); } /* Copy the bytes from LOC to END to open up three bytes of space at LOC for OP followed by two-byte integer parameter ARG. */ static void insert_op1 (op, loc, arg, end) re_opcode_t op; unsigned char *loc; int arg; unsigned char *end; { register unsigned char *pfrom = end; register unsigned char *pto = end + 3; while (pfrom != loc) *--pto = *--pfrom; store_op1 (op, loc, arg); } /* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */ static void insert_op2 (op, loc, arg1, arg2, end) re_opcode_t op; unsigned char *loc; int arg1, arg2; unsigned char *end; { register unsigned char *pfrom = end; register unsigned char *pto = end + 5; while (pfrom != loc) *--pto = *--pfrom; store_op2 (op, loc, arg1, arg2); } /* P points to just after a ^ in PATTERN. Return true if that ^ comes after an alternative or a begin-subexpression. We assume there is at least one character before the ^. */ static boolean at_begline_loc_p (pattern, p, syntax) const char *pattern, *p; reg_syntax_t syntax; { const char *prev = p - 2; boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\'; return /* After a subexpression? */ (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash)) /* After an alternative? */ || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash)); } /* The dual of at_begline_loc_p. This one is for $. We assume there is at least one character after the $, i.e., `P < PEND'. */ static boolean at_endline_loc_p (p, pend, syntax) const char *p, *pend; int syntax; { const char *next = p; boolean next_backslash = *next == '\\'; const char *next_next = p + 1 < pend ? p + 1 : NULL; return /* Before a subexpression? */ (syntax & RE_NO_BK_PARENS ? *next == ')' : next_backslash && next_next && *next_next == ')') /* Before an alternative? */ || (syntax & RE_NO_BK_VBAR ? *next == '|' : next_backslash && next_next && *next_next == '|'); } /* Returns true if REGNUM is in one of COMPILE_STACK's elements and false if it's not. */ static boolean group_in_compile_stack (compile_stack, regnum) compile_stack_type compile_stack; regnum_t regnum; { int this_element; for (this_element = compile_stack.avail - 1; this_element >= 0; this_element--) if (compile_stack.stack[this_element].regnum == regnum) return true; return false; } /* Read the ending character of a range (in a bracket expression) from the uncompiled pattern *P_PTR (which ends at PEND). We assume the starting character is in `P[-2]'. (`P[-1]' is the character `-'.) Then we set the translation of all bits between the starting and ending characters (inclusive) in the compiled pattern B. Return an error code. We use these short variable names so we can use the same macros as `regex_compile' itself. */ static reg_errcode_t compile_range (p_ptr, pend, translate, syntax, b) const char **p_ptr, *pend; char *translate; reg_syntax_t syntax; unsigned char *b; { unsigned this_char; const char *p = *p_ptr; int range_start, range_end; if (p == pend) return REG_ERANGE; /* Even though the pattern is a signed `char *', we need to fetch with unsigned char *'s; if the high bit of the pattern character is set, the range endpoints will be negative if we fetch using a signed char *. We also want to fetch the endpoints without translating them; the appropriate translation is done in the bit-setting loop below. */ range_start = ((unsigned char *) p)[-2]; range_end = ((unsigned char *) p)[0]; /* Have to increment the pointer into the pattern string, so the caller isn't still at the ending character. */ (*p_ptr)++; /* If the start is after the end, the range is empty. */ if (range_start > range_end) return syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR; /* Here we see why `this_char' has to be larger than an `unsigned char' -- the range is inclusive, so if `range_end' == 0xff (assuming 8-bit characters), we would otherwise go into an infinite loop, since all characters <= 0xff. */ for (this_char = range_start; this_char <= range_end; this_char++) { SET_LIST_BIT (TRANSLATE (this_char)); } return REG_NOERROR; } /* Failure stack declarations and macros; both re_compile_fastmap and re_match_2 use a failure stack. These have to be macros because of REGEX_ALLOCATE. */ /* Number of failure points for which to initially allocate space when matching. If this number is exceeded, we allocate more space, so it is not a hard limit. */ #ifndef INIT_FAILURE_ALLOC #define INIT_FAILURE_ALLOC 5 #endif /* Roughly the maximum number of failure points on the stack. Would be exactly that if always used MAX_FAILURE_SPACE each time we failed. This is a variable only so users of regex can assign to it; we never change it ourselves. */ int re_max_failures = 2000; typedef const unsigned char *fail_stack_elt_t; typedef struct { fail_stack_elt_t *stack; unsigned size; unsigned avail; /* Offset of next open position. */ } fail_stack_type; #define FAIL_STACK_EMPTY() (fail_stack.avail == 0) #define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0) #define FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size) #define FAIL_STACK_TOP() (fail_stack.stack[fail_stack.avail]) /* Initialize `fail_stack'. Do `return -2' if the alloc fails. */ #define INIT_FAIL_STACK() \ do { \ fail_stack.stack = (fail_stack_elt_t *) \ REGEX_ALLOCATE (INIT_FAILURE_ALLOC * sizeof (fail_stack_elt_t)); \ \ if (fail_stack.stack == NULL) \ return -2; \ \ fail_stack.size = INIT_FAILURE_ALLOC; \ fail_stack.avail = 0; \ } while (0) /* Double the size of FAIL_STACK, up to approximately `re_max_failures' items. Return 1 if succeeds, and 0 if either ran out of memory allocating space for it or it was already too large. REGEX_REALLOCATE requires `destination' be declared. */ #define DOUBLE_FAIL_STACK(fail_stack) \ ((fail_stack).size > re_max_failures * MAX_FAILURE_ITEMS \ ? 0 \ : ((fail_stack).stack = (fail_stack_elt_t *) \ REGEX_REALLOCATE ((fail_stack).stack, \ (fail_stack).size * sizeof (fail_stack_elt_t), \ ((fail_stack).size << 1) * sizeof (fail_stack_elt_t)), \ \ (fail_stack).stack == NULL \ ? 0 \ : ((fail_stack).size <<= 1, \ 1))) /* Push PATTERN_OP on FAIL_STACK. Return 1 if was able to do so and 0 if ran out of memory allocating space to do so. */ #define PUSH_PATTERN_OP(pattern_op, fail_stack) \ ((FAIL_STACK_FULL () \ && !DOUBLE_FAIL_STACK (fail_stack)) \ ? 0 \ : ((fail_stack).stack[(fail_stack).avail++] = pattern_op, \ 1)) /* This pushes an item onto the failure stack. Must be a four-byte value. Assumes the variable `fail_stack'. Probably should only be called from within `PUSH_FAILURE_POINT'. */ #define PUSH_FAILURE_ITEM(item) \ fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item /* The complement operation. Assumes `fail_stack' is nonempty. */ #define POP_FAILURE_ITEM() fail_stack.stack[--fail_stack.avail] /* Used to omit pushing failure point id's when we're not debugging. */ #ifdef DEBUG #define DEBUG_PUSH PUSH_FAILURE_ITEM #define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_ITEM () #else #define DEBUG_PUSH(item) #define DEBUG_POP(item_addr) #endif /* Push the information about the state we will need if we ever fail back to it. Requires variables fail_stack, regstart, regend, reg_info, and num_regs be declared. DOUBLE_FAIL_STACK requires `destination' be declared. Does `return FAILURE_CODE' if runs out of memory. */ #define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \ do { \ char *destination; \ /* Must be int, so when we don't save any registers, the arithmetic \ of 0 + -1 isn't done as unsigned. */ \ int this_reg; \ \ DEBUG_STATEMENT (failure_id++); \ DEBUG_STATEMENT (nfailure_points_pushed++); \ DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \ DEBUG_PRINT2 (" Before push, next avail: %d\n", (fail_stack).avail);\ DEBUG_PRINT2 (" size: %d\n", (fail_stack).size);\ \ DEBUG_PRINT2 (" slots needed: %d\n", NUM_FAILURE_ITEMS); \ DEBUG_PRINT2 (" available: %d\n", REMAINING_AVAIL_SLOTS); \ \ /* Ensure we have enough space allocated for what we will push. */ \ while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \ { \ if (!DOUBLE_FAIL_STACK (fail_stack)) \ return failure_code; \ \ DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \ (fail_stack).size); \ DEBUG_PRINT2 (" slots available: %d\n", REMAINING_AVAIL_SLOTS);\ } \ \ /* Push the info, starting with the registers. */ \ DEBUG_PRINT1 ("\n"); \ \ for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \ this_reg++) \ { \ DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \ DEBUG_STATEMENT (num_regs_pushed++); \ \ DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ PUSH_FAILURE_ITEM (regstart[this_reg]); \ \ DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ PUSH_FAILURE_ITEM (regend[this_reg]); \ \ DEBUG_PRINT2 (" info: 0x%x\n ", reg_info[this_reg]); \ DEBUG_PRINT2 (" match_null=%d", \ REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \ DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \ DEBUG_PRINT2 (" matched_something=%d", \ MATCHED_SOMETHING (reg_info[this_reg])); \ DEBUG_PRINT2 (" ever_matched=%d", \ EVER_MATCHED_SOMETHING (reg_info[this_reg])); \ DEBUG_PRINT1 ("\n"); \ PUSH_FAILURE_ITEM (reg_info[this_reg].word); \ } \ \ DEBUG_PRINT2 (" Pushing low active reg: %d\n", lowest_active_reg);\ PUSH_FAILURE_ITEM (lowest_active_reg); \ \ DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg);\ PUSH_FAILURE_ITEM (highest_active_reg); \ \ DEBUG_PRINT2 (" Pushing pattern 0x%x: ", pattern_place); \ DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ PUSH_FAILURE_ITEM (pattern_place); \ \ DEBUG_PRINT2 (" Pushing string 0x%x: `", string_place); \ DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \ size2); \ DEBUG_PRINT1 ("'\n"); \ PUSH_FAILURE_ITEM (string_place); \ \ DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \ DEBUG_PUSH (failure_id); \ } while (0) /* This is the number of items that are pushed and popped on the stack for each register. */ #define NUM_REG_ITEMS 3 /* Individual items aside from the registers. */ #ifdef DEBUG #define NUM_NONREG_ITEMS 5 /* Includes failure point id. */ #else #define NUM_NONREG_ITEMS 4 #endif /* We push at most this many items on the stack. */ #define MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS) /* We actually push this many items. */ #define NUM_FAILURE_ITEMS \ ((highest_active_reg - lowest_active_reg + 1) * NUM_REG_ITEMS \ + NUM_NONREG_ITEMS) /* How many items can still be added to the stack without overflowing it. */ #define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail) /* Pops what PUSH_FAIL_STACK pushes. We restore into the parameters, all of which should be lvalues: STR -- the saved data position. PAT -- the saved pattern position. LOW_REG, HIGH_REG -- the highest and lowest active registers. REGSTART, REGEND -- arrays of string positions. REG_INFO -- array of information about each subexpression. Also assumes the variables `fail_stack' and (if debugging), `bufp', `pend', `string1', `size1', `string2', and `size2'. */ #define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\ { \ DEBUG_STATEMENT (fail_stack_elt_t failure_id;) \ int this_reg; \ const unsigned char *string_temp; \ \ assert (!FAIL_STACK_EMPTY ()); \ \ /* Remove failure points and point to how many regs pushed. */ \ DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \ DEBUG_PRINT2 (" Before pop, next avail: %d\n", fail_stack.avail); \ DEBUG_PRINT2 (" size: %d\n", fail_stack.size); \ \ assert (fail_stack.avail >= NUM_NONREG_ITEMS); \ \ DEBUG_POP (&failure_id); \ DEBUG_PRINT2 (" Popping failure id: %u\n", failure_id); \ \ /* If the saved string location is NULL, it came from an \ on_failure_keep_string_jump opcode, and we want to throw away the \ saved NULL, thus retaining our current position in the string. */ \ string_temp = POP_FAILURE_ITEM (); \ if (string_temp != NULL) \ str = (const char *) string_temp; \ \ DEBUG_PRINT2 (" Popping string 0x%x: `", str); \ DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \ DEBUG_PRINT1 ("'\n"); \ \ pat = (unsigned char *) POP_FAILURE_ITEM (); \ DEBUG_PRINT2 (" Popping pattern 0x%x: ", pat); \ DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \ \ /* Restore register info. */ \ high_reg = (unsigned) POP_FAILURE_ITEM (); \ DEBUG_PRINT2 (" Popping high active reg: %d\n", high_reg); \ \ low_reg = (unsigned) POP_FAILURE_ITEM (); \ DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \ \ for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \ { \ DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \ \ reg_info[this_reg].word = POP_FAILURE_ITEM (); \ DEBUG_PRINT2 (" info: 0x%x\n", reg_info[this_reg]); \ \ regend[this_reg] = (const char *) POP_FAILURE_ITEM (); \ DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ \ regstart[this_reg] = (const char *) POP_FAILURE_ITEM (); \ DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ } \ \ DEBUG_STATEMENT (nfailure_points_popped++); \ } /* POP_FAILURE_POINT */ /* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible characters can start a string that matches the pattern. This fastmap is used by re_search to skip quickly over impossible starting points. The caller must supply the address of a (1 << BYTEWIDTH)-byte data area as BUFP->fastmap. We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in the pattern buffer. Returns 0 if we succeed, -2 if an internal error. */ int re_compile_fastmap (bufp) struct re_pattern_buffer *bufp; { int j, k; fail_stack_type fail_stack; #ifndef REGEX_MALLOC char *destination; #endif /* We don't push any register information onto the failure stack. */ unsigned num_regs = 0; register char *fastmap = bufp->fastmap; unsigned char *pattern = bufp->buffer; unsigned long size = bufp->used; const unsigned char *p = pattern; register unsigned char *pend = pattern + size; /* Assume that each path through the pattern can be null until proven otherwise. We set this false at the bottom of switch statement, to which we get only if a particular path doesn't match the empty string. */ boolean path_can_be_null = true; /* We aren't doing a `succeed_n' to begin with. */ boolean succeed_n_p = false; assert (fastmap != NULL && p != NULL); INIT_FAIL_STACK (); bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */ bufp->fastmap_accurate = 1; /* It will be when we're done. */ bufp->can_be_null = 0; while (p != pend || !FAIL_STACK_EMPTY ()) { if (p == pend) { bufp->can_be_null |= path_can_be_null; /* Reset for next path. */ path_can_be_null = true; p = fail_stack.stack[--fail_stack.avail]; } /* We should never be about to go beyond the end of the pattern. */ assert (p < pend); #ifdef SWITCH_ENUM_BUG switch ((int) ((re_opcode_t) *p++)) #else switch ((re_opcode_t) *p++) #endif { /* I guess the idea here is to simply not bother with a fastmap if a backreference is used, since it's too hard to figure out the fastmap for the corresponding group. Setting `can_be_null' stops `re_search_2' from using the fastmap, so that is all we do. */ case duplicate: bufp->can_be_null = 1; return 0; /* Following are the cases which match a character. These end with `break'. */ case exactn: fastmap[p[1]] = 1; break; case charset: for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--) if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))) fastmap[j] = 1; break; case charset_not: /* Chars beyond end of map must be allowed. */ for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++) fastmap[j] = 1; for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--) if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))) fastmap[j] = 1; break; case wordchar: for (j = 0; j < (1 << BYTEWIDTH); j++) if (SYNTAX (j) == Sword) fastmap[j] = 1; break; case notwordchar: for (j = 0; j < (1 << BYTEWIDTH); j++) if (SYNTAX (j) != Sword) fastmap[j] = 1; break; case anychar: /* `.' matches anything ... */ for (j = 0; j < (1 << BYTEWIDTH); j++) fastmap[j] = 1; /* ... except perhaps newline. */ if (!(bufp->syntax & RE_DOT_NEWLINE)) fastmap['\n'] = 0; /* Return if we have already set `can_be_null'; if we have, then the fastmap is irrelevant. Something's wrong here. */ else if (bufp->can_be_null) return 0; /* Otherwise, have to check alternative paths. */ break; #ifdef emacs case syntaxspec: k = *p++; for (j = 0; j < (1 << BYTEWIDTH); j++) if (SYNTAX (j) == (enum syntaxcode) k) fastmap[j] = 1; break; case notsyntaxspec: k = *p++; for (j = 0; j < (1 << BYTEWIDTH); j++) if (SYNTAX (j) != (enum syntaxcode) k) fastmap[j] = 1; break; /* All cases after this match the empty string. These end with `continue'. */ case before_dot: case at_dot: case after_dot: continue; #endif /* not emacs */ case no_op: case begline: case endline: case begbuf: case endbuf: case wordbound: case notwordbound: case wordbeg: case wordend: case push_dummy_failure: continue; case jump_n: case pop_failure_jump: case maybe_pop_jump: case jump: case jump_past_alt: case dummy_failure_jump: EXTRACT_NUMBER_AND_INCR (j, p); p += j; if (j > 0) continue; /* Jump backward implies we just went through the body of a loop and matched nothing. Opcode jumped to should be `on_failure_jump' or `succeed_n'. Just treat it like an ordinary jump. For a * loop, it has pushed its failure point already; if so, discard that as redundant. */ if ((re_opcode_t) *p != on_failure_jump && (re_opcode_t) *p != succeed_n) continue; p++; EXTRACT_NUMBER_AND_INCR (j, p); p += j; /* If what's on the stack is where we are now, pop it. */ if (!FAIL_STACK_EMPTY () && fail_stack.stack[fail_stack.avail - 1] == p) fail_stack.avail--; continue; case on_failure_jump: case on_failure_keep_string_jump: handle_on_failure_jump: EXTRACT_NUMBER_AND_INCR (j, p); /* For some patterns, e.g., `(a?)?', `p+j' here points to the end of the pattern. We don't want to push such a point, since when we restore it above, entering the switch will increment `p' past the end of the pattern. We don't need to push such a point since we obviously won't find any more fastmap entries beyond `pend'. Such a pattern can match the null string, though. */ if (p + j < pend) { if (!PUSH_PATTERN_OP (p + j, fail_stack)) return -2; } else bufp->can_be_null = 1; if (succeed_n_p) { EXTRACT_NUMBER_AND_INCR (k, p); /* Skip the n. */ succeed_n_p = false; } continue; case succeed_n: /* Get to the number of times to succeed. */ p += 2; /* Increment p past the n for when k != 0. */ EXTRACT_NUMBER_AND_INCR (k, p); if (k == 0) { p -= 4; succeed_n_p = true; /* Spaghetti code alert. */ goto handle_on_failure_jump; } continue; case set_number_at: p += 4; continue; case start_memory: case stop_memory: p += 2; continue; default: abort (); /* We have listed all the cases. */ } /* switch *p++ */ /* Getting here means we have found the possible starting characters for one path of the pattern -- and that the empty string does not match. We need not follow this path further. Instead, look at the next alternative (remembered on the stack), or quit if no more. The test at the top of the loop does these things. */ path_can_be_null = false; p = pend; } /* while p */ /* Set `can_be_null' for the last path (also the first path, if the pattern is empty). */ bufp->can_be_null |= path_can_be_null; return 0; } /* re_compile_fastmap */ /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated using the malloc library routine, and must each be at least NUM_REGS * sizeof (regoff_t) bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ void re_set_registers (bufp, regs, num_regs, starts, ends) struct re_pattern_buffer *bufp; struct re_registers *regs; unsigned num_regs; regoff_t *starts, *ends; { if (num_regs) { bufp->regs_allocated = REGS_REALLOCATE; regs->num_regs = num_regs; regs->start = starts; regs->end = ends; } else { bufp->regs_allocated = REGS_UNALLOCATED; regs->num_regs = 0; regs->start = regs->end = (regoff_t) 0; } } /* Searching routines. */ /* Like re_search_2, below, but only one string is specified, and doesn't let you say where to stop matching. */ int re_search (bufp, string, size, startpos, range, regs) struct re_pattern_buffer *bufp; const char *string; int size, startpos, range; struct re_registers *regs; { return re_search_2 (bufp, NULL, 0, string, size, startpos, range, regs, size); } /* Using the compiled pattern in BUFP->buffer, first tries to match the virtual concatenation of STRING1 and STRING2, starting first at index STARTPOS, then at STARTPOS + 1, and so on. STRING1 and STRING2 have length SIZE1 and SIZE2, respectively. RANGE is how far to scan while trying to match. RANGE = 0 means try only at STARTPOS; in general, the last start tried is STARTPOS + RANGE. In REGS, return the indices of the virtual concatenation of STRING1 and STRING2 that matched the entire BUFP->buffer and its contained subexpressions. Do not consider matching one past the index STOP in the virtual concatenation of STRING1 and STRING2. We return either the position in the strings at which the match was found, -1 if no match, or -2 if error (such as failure stack overflow). */ int re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; int size1, size2; int startpos; int range; struct re_registers *regs; int stop; { int val; register char *fastmap = bufp->fastmap; register char *translate = bufp->translate; int total_size = size1 + size2; int endpos = startpos + range; /* Check for out-of-range STARTPOS. */ if (startpos < 0 || startpos > total_size) return -1; /* Fix up RANGE if it might eventually take us outside the virtual concatenation of STRING1 and STRING2. */ if (endpos < -1) range = -1 - startpos; else if (endpos > total_size) range = total_size - startpos; /* If the search isn't to be a backwards one, don't waste time in a search for a pattern that must be anchored. */ if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == begbuf && range > 0) { if (startpos > 0) return -1; else range = 1; } /* Update the fastmap now if not correct already. */ if (fastmap && !bufp->fastmap_accurate) if (re_compile_fastmap (bufp) == -2) return -2; /* Loop through the string, looking for a place to start matching. */ for (;;) { /* If a fastmap is supplied, skip quickly over characters that cannot be the start of a match. If the pattern can match the null string, however, we don't need to skip characters; we want the first null string. */ if (fastmap && startpos < total_size && !bufp->can_be_null) { if (range > 0) /* Searching forwards. */ { register const char *d; register int lim = 0; int irange = range; if (startpos < size1 && startpos + range >= size1) lim = range - (size1 - startpos); d = (startpos >= size1 ? string2 - size1 : string1) + startpos; /* Written out as an if-else to avoid testing `translate' inside the loop. */ if (translate) while (range > lim && !fastmap[(unsigned char) translate[(unsigned char) *d++]]) range--; else while (range > lim && !fastmap[(unsigned char) *d++]) range--; startpos += irange - range; } else /* Searching backwards. */ { register char c = (size1 == 0 || startpos >= size1 ? string2[startpos - size1] : string1[startpos]); if (!fastmap[(unsigned char) TRANSLATE (c)]) goto advance; } } /* If can't match the null string, and that's all we have left, fail. */ if (range >= 0 && startpos == total_size && fastmap && !bufp->can_be_null) return -1; val = re_match_2 (bufp, string1, size1, string2, size2, startpos, regs, stop); if (val >= 0) return startpos; if (val == -2) return -2; advance: if (!range) break; else if (range > 0) { range--; startpos++; } else { range++; startpos--; } } return -1; } /* re_search_2 */ /* Declarations and macros for re_match_2. */ static int bcmp_translate (); static boolean alt_match_null_string_p (), common_op_match_null_string_p (), group_match_null_string_p (); /* Structure for per-register (a.k.a. per-group) information. This must not be longer than one word, because we push this value onto the failure stack. Other register information, such as the starting and ending positions (which are addresses), and the list of inner groups (which is a bits list) are maintained in separate variables. We are making a (strictly speaking) nonportable assumption here: that the compiler will pack our bit fields into something that fits into the type of `word', i.e., is something that fits into one item on the failure stack. */ typedef union { fail_stack_elt_t word; struct { /* This field is one if this group can match the empty string, zero if not. If not yet determined, `MATCH_NULL_UNSET_VALUE'. */ #define MATCH_NULL_UNSET_VALUE 3 unsigned match_null_string_p : 2; unsigned is_active : 1; unsigned matched_something : 1; unsigned ever_matched_something : 1; } bits; } register_info_type; #define REG_MATCH_NULL_STRING_P(R) ((R).bits.match_null_string_p) #define IS_ACTIVE(R) ((R).bits.is_active) #define MATCHED_SOMETHING(R) ((R).bits.matched_something) #define EVER_MATCHED_SOMETHING(R) ((R).bits.ever_matched_something) /* Call this when have matched a real character; it sets `matched' flags for the subexpressions which we are currently inside. Also records that those subexprs have matched. */ #define SET_REGS_MATCHED() \ do \ { \ unsigned r; \ for (r = lowest_active_reg; r <= highest_active_reg; r++) \ { \ MATCHED_SOMETHING (reg_info[r]) \ = EVER_MATCHED_SOMETHING (reg_info[r]) \ = 1; \ } \ } \ while (0) /* This converts PTR, a pointer into one of the search strings `string1' and `string2' into an offset from the beginning of that string. */ #define POINTER_TO_OFFSET(ptr) \ (FIRST_STRING_P (ptr) ? (ptr) - string1 : (ptr) - string2 + size1) /* Registers are set to a sentinel when they haven't yet matched. */ #define REG_UNSET_VALUE ((char *) -1) #define REG_UNSET(e) ((e) == REG_UNSET_VALUE) /* Macros for dealing with the split strings in re_match_2. */ #define MATCHING_IN_FIRST_STRING (dend == end_match_1) /* Call before fetching a character with *d. This switches over to string2 if necessary. */ #define PREFETCH() \ while (d == dend) \ { \ /* End of string2 => fail. */ \ if (dend == end_match_2) \ goto fail; \ /* End of string1 => advance to string2. */ \ d = string2; \ dend = end_match_2; \ } /* Test if at very beginning or at very end of the virtual concatenation of `string1' and `string2'. If only one string, it's `string2'. */ #define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2) #define AT_STRINGS_END(d) ((d) == end2) /* Test if D points to a character which is word-constituent. We have two special cases to check for: if past the end of string1, look at the first character in string2; and if before the beginning of string2, look at the last character in string1. */ #define WORDCHAR_P(d) \ (SYNTAX ((d) == end1 ? *string2 \ : (d) == string2 - 1 ? *(end1 - 1) : *(d)) \ == Sword) /* Test if the character before D and the one at D differ with respect to being word-constituent. */ #define AT_WORD_BOUNDARY(d) \ (AT_STRINGS_BEG (d) || AT_STRINGS_END (d) \ || WORDCHAR_P (d - 1) != WORDCHAR_P (d)) /* Free everything we malloc. */ #ifdef REGEX_MALLOC #define FREE_VAR(var) if (var) free (var); var = NULL #define FREE_VARIABLES() \ do { \ FREE_VAR (fail_stack.stack); \ FREE_VAR (regstart); \ FREE_VAR (regend); \ FREE_VAR (old_regstart); \ FREE_VAR (old_regend); \ FREE_VAR (best_regstart); \ FREE_VAR (best_regend); \ FREE_VAR (reg_info); \ FREE_VAR (reg_dummy); \ FREE_VAR (reg_info_dummy); \ } while (0) #else /* not REGEX_MALLOC */ /* Some MIPS systems (at least) want this to free alloca'd storage. */ #define FREE_VARIABLES() alloca (0) #endif /* not REGEX_MALLOC */ /* These values must meet several constraints. They must not be valid register values; since we have a limit of 255 registers (because we use only one byte in the pattern for the register number), we can use numbers larger than 255. They must differ by 1, because of NUM_FAILURE_ITEMS above. And the value for the lowest register must be larger than the value for the highest register, so we do not try to actually save any registers when none are active. */ #define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH) #define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1) /* Matching routines. */ #ifndef emacs /* Emacs never uses this. */ /* re_match is like re_match_2 except it takes only a single string. */ int re_match (bufp, string, size, pos, regs) struct re_pattern_buffer *bufp; const char *string; int size, pos; struct re_registers *regs; { return re_match_2 (bufp, NULL, 0, string, size, pos, regs, size); } #endif /* not emacs */ /* re_match_2 matches the compiled pattern in BUFP against the the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1 and SIZE2, respectively). We start matching at POS, and stop matching at STOP. If REGS is non-null and the `no_sub' field of BUFP is nonzero, we store offsets for the substring each group matched in REGS. See the documentation for exactly how many groups we fill. We return -1 if no match, -2 if an internal error (such as the failure stack overflowing). Otherwise, we return the length of the matched substring. */ int re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; int size1, size2; int pos; struct re_registers *regs; int stop; { /* General temporaries. */ int mcnt; unsigned char *p1; /* Just past the end of the corresponding string. */ const char *end1, *end2; /* Pointers into string1 and string2, just past the last characters in each to consider matching. */ const char *end_match_1, *end_match_2; /* Where we are in the data, and the end of the current string. */ const char *d, *dend; /* Where we are in the pattern, and the end of the pattern. */ unsigned char *p = bufp->buffer; register unsigned char *pend = p + bufp->used; /* We use this to map every character in the string. */ char *translate = bufp->translate; /* Failure point stack. Each place that can handle a failure further down the line pushes a failure point on this stack. It consists of restart, regend, and reg_info for all registers corresponding to the subexpressions we're currently inside, plus the number of such registers, and, finally, two char *'s. The first char * is where to resume scanning the pattern; the second one is where to resume scanning the strings. If the latter is zero, the failure point is a ``dummy''; if a failure happens and the failure point is a dummy, it gets discarded and the next next one is tried. */ fail_stack_type fail_stack; #ifdef DEBUG static unsigned failure_id = 0; unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0; #endif /* We fill all the registers internally, independent of what we return, for use in backreferences. The number here includes an element for register zero. */ unsigned num_regs = bufp->re_nsub + 1; /* The currently active registers. */ unsigned lowest_active_reg = NO_LOWEST_ACTIVE_REG; unsigned highest_active_reg = NO_HIGHEST_ACTIVE_REG; /* Information on the contents of registers. These are pointers into the input strings; they record just what was matched (on this attempt) by a subexpression part of the pattern, that is, the regnum-th regstart pointer points to where in the pattern we began matching and the regnum-th regend points to right after where we stopped matching the regnum-th subexpression. (The zeroth register keeps track of what the whole pattern matches.) */ const char **regstart=NULL, **regend=NULL; /* If a group that's operated upon by a repetition operator fails to match anything, then the register for its start will need to be restored because it will have been set to wherever in the string we are when we last see its open-group operator. Similarly for a register's end. */ const char **old_regstart=NULL, **old_regend=NULL; /* The is_active field of reg_info helps us keep track of which (possibly nested) subexpressions we are currently in. The matched_something field of reg_info[reg_num] helps us tell whether or not we have matched any of the pattern so far this time through the reg_num-th subexpression. These two fields get reset each time through any loop their register is in. */ register_info_type *reg_info=NULL; /* The following record the register info as found in the above variables when we find a match better than any we've seen before. This happens as we backtrack through the failure points, which in turn happens only if we have not yet matched the entire string. */ unsigned best_regs_set = false; const char **best_regstart=NULL, **best_regend=NULL; /* Logically, this is `best_regend[0]'. But we don't want to have to allocate space for that if we're not allocating space for anything else (see below). Also, we never need info about register 0 for any of the other register vectors, and it seems rather a kludge to treat `best_regend' differently than the rest. So we keep track of the end of the best match so far in a separate variable. We initialize this to NULL so that when we backtrack the first time and need to test it, it's not garbage. */ const char *match_end = NULL; /* Used when we pop values we don't care about. */ const char **reg_dummy=NULL; register_info_type *reg_info_dummy=NULL; #ifdef DEBUG /* Counts the total number of registers pushed. */ unsigned num_regs_pushed = 0; #endif DEBUG_PRINT1 ("\n\nEntering re_match_2.\n"); INIT_FAIL_STACK (); /* Do not bother to initialize all the register variables if there are no groups in the pattern, as it takes a fair amount of time. If there are groups, we include space for register 0 (the whole pattern), even though we never use it, since it simplifies the array indexing. We should fix this. */ if (bufp->re_nsub) { regstart = REGEX_TALLOC (num_regs, const char *); regend = REGEX_TALLOC (num_regs, const char *); old_regstart = REGEX_TALLOC (num_regs, const char *); old_regend = REGEX_TALLOC (num_regs, const char *); best_regstart = REGEX_TALLOC (num_regs, const char *); best_regend = REGEX_TALLOC (num_regs, const char *); reg_info = REGEX_TALLOC (num_regs, register_info_type); reg_dummy = REGEX_TALLOC (num_regs, const char *); reg_info_dummy = REGEX_TALLOC (num_regs, register_info_type); if (!(regstart && regend && old_regstart && old_regend && reg_info && best_regstart && best_regend && reg_dummy && reg_info_dummy)) { FREE_VARIABLES (); return -2; } } #ifdef REGEX_MALLOC else { /* We must initialize all our variables to NULL, so that `FREE_VARIABLES' doesn't try to free them. */ regstart = regend = old_regstart = old_regend = best_regstart = best_regend = reg_dummy = NULL; reg_info = reg_info_dummy = (register_info_type *) NULL; } #endif /* REGEX_MALLOC */ /* The starting position is bogus. */ if (pos < 0 || pos > size1 + size2) { FREE_VARIABLES (); return -1; } /* Initialize subexpression text positions to -1 to mark ones that no start_memory/stop_memory has been seen for. Also initialize the register information struct. */ for (mcnt = 1; mcnt < num_regs; mcnt++) { regstart[mcnt] = regend[mcnt] = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE; REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE; IS_ACTIVE (reg_info[mcnt]) = 0; MATCHED_SOMETHING (reg_info[mcnt]) = 0; EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0; } /* We move `string1' into `string2' if the latter's empty -- but not if `string1' is null. */ if (size2 == 0 && string1 != NULL) { string2 = string1; size2 = size1; string1 = 0; size1 = 0; } end1 = string1 + size1; end2 = string2 + size2; /* Compute where to stop matching, within the two strings. */ if (stop <= size1) { end_match_1 = string1 + stop; end_match_2 = string2; } else { end_match_1 = end1; end_match_2 = string2 + stop - size1; } /* `p' scans through the pattern as `d' scans through the data. `dend' is the end of the input string that `d' points within. `d' is advanced into the following input string whenever necessary, but this happens before fetching; therefore, at the beginning of the loop, `d' can be pointing at the end of a string, but it cannot equal `string2'. */ if (size1 > 0 && pos <= size1) { d = string1 + pos; dend = end_match_1; } else { d = string2 + pos - size1; dend = end_match_2; } DEBUG_PRINT1 ("The compiled pattern is: "); DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend); DEBUG_PRINT1 ("The string to match is: `"); DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2); DEBUG_PRINT1 ("'\n"); /* This loops over pattern commands. It exits by returning from the function if the match is complete, or it drops through if the match fails at this starting point in the input data. */ for (;;) { DEBUG_PRINT2 ("\n0x%x: ", p); if (p == pend) { /* End of pattern means we might have succeeded. */ DEBUG_PRINT1 ("end of pattern ... "); /* If we haven't matched the entire string, and we want the longest match, try backtracking. */ if (d != end_match_2) { DEBUG_PRINT1 ("backtracking.\n"); if (!FAIL_STACK_EMPTY ()) { /* More failure points to try. */ boolean same_str_p = (FIRST_STRING_P (match_end) == MATCHING_IN_FIRST_STRING); /* If exceeds best match so far, save it. */ if (!best_regs_set || (same_str_p && d > match_end) || (!same_str_p && !MATCHING_IN_FIRST_STRING)) { best_regs_set = true; match_end = d; DEBUG_PRINT1 ("\nSAVING match as best so far.\n"); for (mcnt = 1; mcnt < num_regs; mcnt++) { best_regstart[mcnt] = regstart[mcnt]; best_regend[mcnt] = regend[mcnt]; } } goto fail; } /* If no failure points, don't restore garbage. */ else if (best_regs_set) { restore_best_regs: /* Restore best match. It may happen that `dend == end_match_1' while the restored d is in string2. For example, the pattern `x.*y.*z' against the strings `x-' and `y-z-', if the two strings are not consecutive in memory. */ DEBUG_PRINT1 ("Restoring best registers.\n"); d = match_end; dend = ((d >= string1 && d <= end1) ? end_match_1 : end_match_2); for (mcnt = 1; mcnt < num_regs; mcnt++) { regstart[mcnt] = best_regstart[mcnt]; regend[mcnt] = best_regend[mcnt]; } } } /* d != end_match_2 */ DEBUG_PRINT1 ("Accepting match.\n"); /* If caller wants register contents data back, do it. */ if (regs && !bufp->no_sub) { /* Have the register data arrays been allocated? */ if (bufp->regs_allocated == REGS_UNALLOCATED) { /* No. So allocate them with malloc. We need one extra element beyond `num_regs' for the `-1' marker GNU code uses. */ regs->num_regs = MAX (RE_NREGS, num_regs + 1); regs->start = TALLOC (regs->num_regs, regoff_t); regs->end = TALLOC (regs->num_regs, regoff_t); if (regs->start == NULL || regs->end == NULL) return -2; bufp->regs_allocated = REGS_REALLOCATE; } else if (bufp->regs_allocated == REGS_REALLOCATE) { /* Yes. If we need more elements than were already allocated, reallocate them. If we need fewer, just leave it alone. */ if (regs->num_regs < num_regs + 1) { regs->num_regs = num_regs + 1; RETALLOC (regs->start, regs->num_regs, regoff_t); RETALLOC (regs->end, regs->num_regs, regoff_t); if (regs->start == NULL || regs->end == NULL) return -2; } } else assert (bufp->regs_allocated == REGS_FIXED); /* Convert the pointer data in `regstart' and `regend' to indices. Register zero has to be set differently, since we haven't kept track of any info for it. */ if (regs->num_regs > 0) { regs->start[0] = pos; regs->end[0] = (MATCHING_IN_FIRST_STRING ? d - string1 : d - string2 + size1); } /* Go through the first `min (num_regs, regs->num_regs)' registers, since that is all we initialized. */ for (mcnt = 1; mcnt < MIN (num_regs, regs->num_regs); mcnt++) { if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt])) regs->start[mcnt] = regs->end[mcnt] = -1; else { regs->start[mcnt] = POINTER_TO_OFFSET (regstart[mcnt]); regs->end[mcnt] = POINTER_TO_OFFSET (regend[mcnt]); } } /* If the regs structure we return has more elements than were in the pattern, set the extra elements to -1. If we (re)allocated the registers, this is the case, because we always allocate enough to have at least one -1 at the end. */ for (mcnt = num_regs; mcnt < regs->num_regs; mcnt++) regs->start[mcnt] = regs->end[mcnt] = -1; } /* regs && !bufp->no_sub */ FREE_VARIABLES (); DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n", nfailure_points_pushed, nfailure_points_popped, nfailure_points_pushed - nfailure_points_popped); DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed); mcnt = d - pos - (MATCHING_IN_FIRST_STRING ? string1 : string2 - size1); DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt); return mcnt; } /* Otherwise match next pattern command. */ #ifdef SWITCH_ENUM_BUG switch ((int) ((re_opcode_t) *p++)) #else switch ((re_opcode_t) *p++) #endif { /* Ignore these. Used to ignore the n of succeed_n's which currently have n == 0. */ case no_op: DEBUG_PRINT1 ("EXECUTING no_op.\n"); break; /* Match the next n pattern characters exactly. The following byte in the pattern defines n, and the n bytes after that are the characters to match. */ case exactn: mcnt = *p++; DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt); /* This is written out as an if-else so we don't waste time testing `translate' inside the loop. */ if (translate) { do { PREFETCH (); if (translate[(unsigned char) *d++] != (char) *p++) goto fail; } while (--mcnt); } else { do { PREFETCH (); if (*d++ != (char) *p++) goto fail; } while (--mcnt); } SET_REGS_MATCHED (); break; /* Match any character except possibly a newline or a null. */ case anychar: DEBUG_PRINT1 ("EXECUTING anychar.\n"); PREFETCH (); if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n') || (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000')) goto fail; SET_REGS_MATCHED (); DEBUG_PRINT2 (" Matched `%d'.\n", *d); d++; break; case charset: case charset_not: { register unsigned char c; boolean not = (re_opcode_t) *(p - 1) == charset_not; DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : ""); PREFETCH (); c = TRANSLATE (*d); /* The character to match. */ /* Cast to `unsigned' instead of `unsigned char' in case the bit list is a full 32 bytes long. */ if (c < (unsigned) (*p * BYTEWIDTH) && p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH))) not = !not; p += 1 + *p; if (!not) goto fail; SET_REGS_MATCHED (); d++; break; } /* The beginning of a group is represented by start_memory. The arguments are the register number in the next byte, and the number of groups inner to this one in the next. The text matched within the group is recorded (in the internal registers data structure) under the register number. */ case start_memory: DEBUG_PRINT3 ("EXECUTING start_memory %d (%d):\n", *p, p[1]); /* Find out if this group can match the empty string. */ p1 = p; /* To send to group_match_null_string_p. */ if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE) REG_MATCH_NULL_STRING_P (reg_info[*p]) = group_match_null_string_p (&p1, pend, reg_info); /* Save the position in the string where we were the last time we were at this open-group operator in case the group is operated upon by a repetition operator, e.g., with `(a*)*b' against `ab'; then we want to ignore where we are now in the string in case this attempt to match fails. */ old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p]) ? REG_UNSET (regstart[*p]) ? d : regstart[*p] : regstart[*p]; DEBUG_PRINT2 (" old_regstart: %d\n", POINTER_TO_OFFSET (old_regstart[*p])); regstart[*p] = d; DEBUG_PRINT2 (" regstart: %d\n", POINTER_TO_OFFSET (regstart[*p])); IS_ACTIVE (reg_info[*p]) = 1; MATCHED_SOMETHING (reg_info[*p]) = 0; /* This is the new highest active register. */ highest_active_reg = *p; /* If nothing was active before, this is the new lowest active register. */ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG) lowest_active_reg = *p; /* Move past the register number and inner group count. */ p += 2; break; /* The stop_memory opcode represents the end of a group. Its arguments are the same as start_memory's: the register number, and the number of inner groups. */ case stop_memory: DEBUG_PRINT3 ("EXECUTING stop_memory %d (%d):\n", *p, p[1]); /* We need to save the string position the last time we were at this close-group operator in case the group is operated upon by a repetition operator, e.g., with `((a*)*(b*)*)*' against `aba'; then we want to ignore where we are now in the string in case this attempt to match fails. */ old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p]) ? REG_UNSET (regend[*p]) ? d : regend[*p] : regend[*p]; DEBUG_PRINT2 (" old_regend: %d\n", POINTER_TO_OFFSET (old_regend[*p])); regend[*p] = d; DEBUG_PRINT2 (" regend: %d\n", POINTER_TO_OFFSET (regend[*p])); /* This register isn't active anymore. */ IS_ACTIVE (reg_info[*p]) = 0; /* If this was the only register active, nothing is active anymore. */ if (lowest_active_reg == highest_active_reg) { lowest_active_reg = NO_LOWEST_ACTIVE_REG; highest_active_reg = NO_HIGHEST_ACTIVE_REG; } else { /* We must scan for the new highest active register, since it isn't necessarily one less than now: consider (a(b)c(d(e)f)g). When group 3 ends, after the f), the new highest active register is 1. */ unsigned char r = *p - 1; while (r > 0 && !IS_ACTIVE (reg_info[r])) r--; /* If we end up at register zero, that means that we saved the registers as the result of an `on_failure_jump', not a `start_memory', and we jumped to past the innermost `stop_memory'. For example, in ((.)*) we save registers 1 and 2 as a result of the *, but when we pop back to the second ), we are at the stop_memory 1. Thus, nothing is active. */ if (r == 0) { lowest_active_reg = NO_LOWEST_ACTIVE_REG; highest_active_reg = NO_HIGHEST_ACTIVE_REG; } else highest_active_reg = r; } /* If just failed to match something this time around with a group that's operated on by a repetition operator, try to force exit from the ``loop'', and restore the register information for this group that we had before trying this last match. */ if ((!MATCHED_SOMETHING (reg_info[*p]) || (re_opcode_t) p[-3] == start_memory) && (p + 2) < pend) { boolean is_a_jump_n = false; p1 = p + 2; mcnt = 0; switch ((re_opcode_t) *p1++) { case jump_n: is_a_jump_n = true; case pop_failure_jump: case maybe_pop_jump: case jump: case dummy_failure_jump: EXTRACT_NUMBER_AND_INCR (mcnt, p1); if (is_a_jump_n) p1 += 2; break; default: /* do nothing */ ; } p1 += mcnt; /* If the next operation is a jump backwards in the pattern to an on_failure_jump right before the start_memory corresponding to this stop_memory, exit from the loop by forcing a failure after pushing on the stack the on_failure_jump's jump in the pattern, and d. */ if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump && (re_opcode_t) p1[3] == start_memory && p1[4] == *p) { /* If this group ever matched anything, then restore what its registers were before trying this last failed match, e.g., with `(a*)*b' against `ab' for regstart[1], and, e.g., with `((a*)*(b*)*)*' against `aba' for regend[3]. Also restore the registers for inner groups for, e.g., `((a*)(b*))*' against `aba' (register 3 would otherwise get trashed). */ if (EVER_MATCHED_SOMETHING (reg_info[*p])) { unsigned r; EVER_MATCHED_SOMETHING (reg_info[*p]) = 0; /* Restore this and inner groups' (if any) registers. */ for (r = *p; r < *p + *(p + 1); r++) { regstart[r] = old_regstart[r]; /* xx why this test? */ if ((int) old_regend[r] >= (int) regstart[r]) regend[r] = old_regend[r]; } } p1++; EXTRACT_NUMBER_AND_INCR (mcnt, p1); PUSH_FAILURE_POINT (p1 + mcnt, d, -2); goto fail; } } /* Move past the register number and the inner group count. */ p += 2; break; /* \ has been turned into a `duplicate' command which is followed by the numeric value of as the register number. */ case duplicate: { register const char *d2, *dend2; int regno = *p++; /* Get which register to match against. */ DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno); /* Can't back reference a group which we've never matched. */ if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno])) goto fail; /* Where in input to try to start matching. */ d2 = regstart[regno]; /* Where to stop matching; if both the place to start and the place to stop matching are in the same string, then set to the place to stop, otherwise, for now have to use the end of the first string. */ dend2 = ((FIRST_STRING_P (regstart[regno]) == FIRST_STRING_P (regend[regno])) ? regend[regno] : end_match_1); for (;;) { /* If necessary, advance to next segment in register contents. */ while (d2 == dend2) { if (dend2 == end_match_2) break; if (dend2 == regend[regno]) break; /* End of string1 => advance to string2. */ d2 = string2; dend2 = regend[regno]; } /* At end of register contents => success */ if (d2 == dend2) break; /* If necessary, advance to next segment in data. */ PREFETCH (); /* How many characters left in this segment to match. */ mcnt = dend - d; /* Want how many consecutive characters we can match in one shot, so, if necessary, adjust the count. */ if (mcnt > dend2 - d2) mcnt = dend2 - d2; /* Compare that many; failure if mismatch, else move past them. */ if (translate ? bcmp_translate (d, d2, mcnt, translate) : bcmp (d, d2, mcnt)) goto fail; d += mcnt, d2 += mcnt; } } break; /* begline matches the empty string at the beginning of the string (unless `not_bol' is set in `bufp'), and, if `newline_anchor' is set, after newlines. */ case begline: DEBUG_PRINT1 ("EXECUTING begline.\n"); if (AT_STRINGS_BEG (d)) { if (!bufp->not_bol) break; } else if (d[-1] == '\n' && bufp->newline_anchor) { break; } /* In all other cases, we fail. */ goto fail; /* endline is the dual of begline. */ case endline: DEBUG_PRINT1 ("EXECUTING endline.\n"); if (AT_STRINGS_END (d)) { if (!bufp->not_eol) break; } /* We have to ``prefetch'' the next character. */ else if ((d == end1 ? *string2 : *d) == '\n' && bufp->newline_anchor) { break; } goto fail; /* Match at the very beginning of the data. */ case begbuf: DEBUG_PRINT1 ("EXECUTING begbuf.\n"); if (AT_STRINGS_BEG (d)) break; goto fail; /* Match at the very end of the data. */ case endbuf: DEBUG_PRINT1 ("EXECUTING endbuf.\n"); if (AT_STRINGS_END (d)) break; goto fail; /* on_failure_keep_string_jump is used to optimize `.*\n'. It pushes NULL as the value for the string on the stack. Then `pop_failure_point' will keep the current value for the string, instead of restoring it. To see why, consider matching `foo\nbar' against `.*\n'. The .* matches the foo; then the . fails against the \n. But the next thing we want to do is match the \n against the \n; if we restored the string value, we would be back at the foo. Because this is used only in specific cases, we don't need to check all the things that `on_failure_jump' does, to make sure the right things get saved on the stack. Hence we don't share its code. The only reason to push anything on the stack at all is that otherwise we would have to change `anychar's code to do something besides goto fail in this case; that seems worse than this. */ case on_failure_keep_string_jump: DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump"); EXTRACT_NUMBER_AND_INCR (mcnt, p); DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt); PUSH_FAILURE_POINT (p + mcnt, NULL, -2); break; /* Uses of on_failure_jump: Each alternative starts with an on_failure_jump that points to the beginning of the next alternative. Each alternative except the last ends with a jump that in effect jumps past the rest of the alternatives. (They really jump to the ending jump of the following alternative, because tensioning these jumps is a hassle.) Repeats start with an on_failure_jump that points past both the repetition text and either the following jump or pop_failure_jump back to this on_failure_jump. */ case on_failure_jump: on_failure: DEBUG_PRINT1 ("EXECUTING on_failure_jump"); EXTRACT_NUMBER_AND_INCR (mcnt, p); DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt); /* If this on_failure_jump comes right before a group (i.e., the original * applied to a group), save the information for that group and all inner ones, so that if we fail back to this point, the group's information will be correct. For example, in \(a*\)*\1, we need the preceding group, and in \(\(a*\)b*\)\2, we need the inner group. */ /* We can't use `p' to check ahead because we push a failure point to `p + mcnt' after we do this. */ p1 = p; /* We need to skip no_op's before we look for the start_memory in case this on_failure_jump is happening as the result of a completed succeed_n, as in \(a\)\{1,3\}b\1 against aba. */ while (p1 < pend && (re_opcode_t) *p1 == no_op) p1++; if (p1 < pend && (re_opcode_t) *p1 == start_memory) { /* We have a new highest active register now. This will get reset at the start_memory we are about to get to, but we will have saved all the registers relevant to this repetition op, as described above. */ highest_active_reg = *(p1 + 1) + *(p1 + 2); if (lowest_active_reg == NO_LOWEST_ACTIVE_REG) lowest_active_reg = *(p1 + 1); } DEBUG_PRINT1 (":\n"); PUSH_FAILURE_POINT (p + mcnt, d, -2); break; /* A smart repeat ends with `maybe_pop_jump'. We change it to either `pop_failure_jump' or `jump'. */ case maybe_pop_jump: EXTRACT_NUMBER_AND_INCR (mcnt, p); DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt); { register unsigned char *p2 = p; /* Compare the beginning of the repeat with what in the pattern follows its end. If we can establish that there is nothing that they would both match, i.e., that we would have to backtrack because of (as in, e.g., `a*a') then we can change to pop_failure_jump, because we'll never have to backtrack. This is not true in the case of alternatives: in `(a|ab)*' we do need to backtrack to the `ab' alternative (e.g., if the string was `ab'). But instead of trying to detect that here, the alternative has put on a dummy failure point which is what we will end up popping. */ /* Skip over open/close-group commands. */ while (p2 + 2 < pend && ((re_opcode_t) *p2 == stop_memory || (re_opcode_t) *p2 == start_memory)) p2 += 3; /* Skip over args, too. */ /* If we're at the end of the pattern, we can change. */ if (p2 == pend) { /* Consider what happens when matching ":\(.*\)" against ":/". I don't really understand this code yet. */ p[-3] = (unsigned char) pop_failure_jump; DEBUG_PRINT1 (" End of pattern: change to `pop_failure_jump'.\n"); } else if ((re_opcode_t) *p2 == exactn || (bufp->newline_anchor && (re_opcode_t) *p2 == endline)) { register unsigned char c = *p2 == (unsigned char) endline ? '\n' : p2[2]; p1 = p + mcnt; /* p1[0] ... p1[2] are the `on_failure_jump' corresponding to the `maybe_finalize_jump' of this case. Examine what follows. */ if ((re_opcode_t) p1[3] == exactn && p1[5] != c) { p[-3] = (unsigned char) pop_failure_jump; DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n", c, p1[5]); } else if ((re_opcode_t) p1[3] == charset || (re_opcode_t) p1[3] == charset_not) { int not = (re_opcode_t) p1[3] == charset_not; if (c < (unsigned char) (p1[4] * BYTEWIDTH) && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH))) not = !not; /* `not' is equal to 1 if c would match, which means that we can't change to pop_failure_jump. */ if (!not) { p[-3] = (unsigned char) pop_failure_jump; DEBUG_PRINT1 (" No match => pop_failure_jump.\n"); } } } } p -= 2; /* Point at relative address again. */ if ((re_opcode_t) p[-1] != pop_failure_jump) { p[-1] = (unsigned char) jump; DEBUG_PRINT1 (" Match => jump.\n"); goto unconditional_jump; } /* Note fall through. */ /* The end of a simple repeat has a pop_failure_jump back to its matching on_failure_jump, where the latter will push a failure point. The pop_failure_jump takes off failure points put on by this pop_failure_jump's matching on_failure_jump; we got through the pattern to here from the matching on_failure_jump, so didn't fail. */ case pop_failure_jump: { /* We need to pass separate storage for the lowest and highest registers, even though we don't care about the actual values. Otherwise, we will restore only one register from the stack, since lowest will == highest in `pop_failure_point'. */ unsigned dummy_low_reg, dummy_high_reg; unsigned char *pdummy; const char *sdummy; DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n"); POP_FAILURE_POINT (sdummy, pdummy, dummy_low_reg, dummy_high_reg, reg_dummy, reg_dummy, reg_info_dummy); } /* Note fall through. */ /* Unconditionally jump (without popping any failure points). */ case jump: unconditional_jump: EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */ DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt); p += mcnt; /* Do the jump. */ DEBUG_PRINT2 ("(to 0x%x).\n", p); break; /* We need this opcode so we can detect where alternatives end in `group_match_null_string_p' et al. */ case jump_past_alt: DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n"); goto unconditional_jump; /* Normally, the on_failure_jump pushes a failure point, which then gets popped at pop_failure_jump. We will end up at pop_failure_jump, also, and with a pattern of, say, `a+', we are skipping over the on_failure_jump, so we have to push something meaningless for pop_failure_jump to pop. */ case dummy_failure_jump: DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n"); /* It doesn't matter what we push for the string here. What the code at `fail' tests is the value for the pattern. */ PUSH_FAILURE_POINT (0, 0, -2); goto unconditional_jump; /* At the end of an alternative, we need to push a dummy failure point in case we are followed by a `pop_failure_jump', because we don't want the failure point for the alternative to be popped. For example, matching `(a|ab)*' against `aab' requires that we match the `ab' alternative. */ case push_dummy_failure: DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n"); /* See comments just above at `dummy_failure_jump' about the two zeroes. */ PUSH_FAILURE_POINT (0, 0, -2); break; /* Have to succeed matching what follows at least n times. After that, handle like `on_failure_jump'. */ case succeed_n: EXTRACT_NUMBER (mcnt, p + 2); DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt); assert (mcnt >= 0); /* Originally, this is how many times we HAVE to succeed. */ if (mcnt > 0) { mcnt--; p += 2; STORE_NUMBER_AND_INCR (p, mcnt); DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p, mcnt); } else if (mcnt == 0) { DEBUG_PRINT2 (" Setting two bytes from 0x%x to no_op.\n", p+2); p[2] = (unsigned char) no_op; p[3] = (unsigned char) no_op; goto on_failure; } break; case jump_n: EXTRACT_NUMBER (mcnt, p + 2); DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt); /* Originally, this is how many times we CAN jump. */ if (mcnt) { mcnt--; STORE_NUMBER (p + 2, mcnt); goto unconditional_jump; } /* If don't have to jump any more, skip over the rest of command. */ else p += 4; break; case set_number_at: { DEBUG_PRINT1 ("EXECUTING set_number_at.\n"); EXTRACT_NUMBER_AND_INCR (mcnt, p); p1 = p + mcnt; EXTRACT_NUMBER_AND_INCR (mcnt, p); DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt); STORE_NUMBER (p1, mcnt); break; } case wordbound: DEBUG_PRINT1 ("EXECUTING wordbound.\n"); if (AT_WORD_BOUNDARY (d)) break; goto fail; case notwordbound: DEBUG_PRINT1 ("EXECUTING notwordbound.\n"); if (AT_WORD_BOUNDARY (d)) goto fail; break; case wordbeg: DEBUG_PRINT1 ("EXECUTING wordbeg.\n"); if (WORDCHAR_P (d) && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1))) break; goto fail; case wordend: DEBUG_PRINT1 ("EXECUTING wordend.\n"); if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1) && (!WORDCHAR_P (d) || AT_STRINGS_END (d))) break; goto fail; #ifdef emacs #ifdef emacs19 case before_dot: DEBUG_PRINT1 ("EXECUTING before_dot.\n"); if (PTR_CHAR_POS ((unsigned char *) d) >= point) goto fail; break; case at_dot: DEBUG_PRINT1 ("EXECUTING at_dot.\n"); if (PTR_CHAR_POS ((unsigned char *) d) != point) goto fail; break; case after_dot: DEBUG_PRINT1 ("EXECUTING after_dot.\n"); if (PTR_CHAR_POS ((unsigned char *) d) <= point) goto fail; break; #else /* not emacs19 */ case at_dot: DEBUG_PRINT1 ("EXECUTING at_dot.\n"); if (PTR_CHAR_POS ((unsigned char *) d) + 1 != point) goto fail; break; #endif /* not emacs19 */ case syntaxspec: DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt); mcnt = *p++; goto matchsyntax; case wordchar: DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n"); mcnt = (int) Sword; matchsyntax: PREFETCH (); if (SYNTAX (*d++) != (enum syntaxcode) mcnt) goto fail; SET_REGS_MATCHED (); break; case notsyntaxspec: DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt); mcnt = *p++; goto matchnotsyntax; case notwordchar: DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n"); mcnt = (int) Sword; matchnotsyntax: PREFETCH (); if (SYNTAX (*d++) == (enum syntaxcode) mcnt) goto fail; SET_REGS_MATCHED (); break; #else /* not emacs */ case wordchar: DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n"); PREFETCH (); if (!WORDCHAR_P (d)) goto fail; SET_REGS_MATCHED (); d++; break; case notwordchar: DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n"); PREFETCH (); if (WORDCHAR_P (d)) goto fail; SET_REGS_MATCHED (); d++; break; #endif /* not emacs */ default: abort (); } continue; /* Successfully executed one pattern command; keep going. */ /* We goto here if a matching operation fails. */ fail: if (!FAIL_STACK_EMPTY ()) { /* A restart point is known. Restore to that state. */ DEBUG_PRINT1 ("\nFAIL:\n"); POP_FAILURE_POINT (d, p, lowest_active_reg, highest_active_reg, regstart, regend, reg_info); /* If this failure point is a dummy, try the next one. */ if (!p) goto fail; /* If we failed to the end of the pattern, don't examine *p. */ assert (p <= pend); if (p < pend) { boolean is_a_jump_n = false; /* If failed to a backwards jump that's part of a repetition loop, need to pop this failure point and use the next one. */ switch ((re_opcode_t) *p) { case jump_n: is_a_jump_n = true; case maybe_pop_jump: case pop_failure_jump: case jump: p1 = p + 1; EXTRACT_NUMBER_AND_INCR (mcnt, p1); p1 += mcnt; if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n) || (!is_a_jump_n && (re_opcode_t) *p1 == on_failure_jump)) goto fail; break; default: /* do nothing */ ; } } if (d >= string1 && d <= end1) dend = end_match_1; } else break; /* Matching at this starting point really fails. */ } /* for (;;) */ if (best_regs_set) goto restore_best_regs; FREE_VARIABLES (); return -1; /* Failure to match. */ } /* re_match_2 */ /* Subroutine definitions for re_match_2. */ /* We are passed P pointing to a register number after a start_memory. Return true if the pattern up to the corresponding stop_memory can match the empty string, and false otherwise. If we find the matching stop_memory, sets P to point to one past its number. Otherwise, sets P to an undefined byte less than or equal to END. We don't handle duplicates properly (yet). */ static boolean group_match_null_string_p (p, end, reg_info) unsigned char **p, *end; register_info_type *reg_info; { int mcnt; /* Point to after the args to the start_memory. */ unsigned char *p1 = *p + 2; while (p1 < end) { /* Skip over opcodes that can match nothing, and return true or false, as appropriate, when we get to one that can't, or to the matching stop_memory. */ switch ((re_opcode_t) *p1) { /* Could be either a loop or a series of alternatives. */ case on_failure_jump: p1++; EXTRACT_NUMBER_AND_INCR (mcnt, p1); /* If the next operation is not a jump backwards in the pattern. */ if (mcnt >= 0) { /* Go through the on_failure_jumps of the alternatives, seeing if any of the alternatives cannot match nothing. The last alternative starts with only a jump, whereas the rest start with on_failure_jump and end with a jump, e.g., here is the pattern for `a|b|c': /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6 /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3 /exactn/1/c So, we have to first go through the first (n-1) alternatives and then deal with the last one separately. */ /* Deal with the first (n-1) alternatives, which start with an on_failure_jump (see above) that jumps to right past a jump_past_alt. */ while ((re_opcode_t) p1[mcnt-3] == jump_past_alt) { /* `mcnt' holds how many bytes long the alternative is, including the ending `jump_past_alt' and its number. */ if (!alt_match_null_string_p (p1, p1 + mcnt - 3, reg_info)) return false; /* Move to right after this alternative, including the jump_past_alt. */ p1 += mcnt; /* Break if it's the beginning of an n-th alternative that doesn't begin with an on_failure_jump. */ if ((re_opcode_t) *p1 != on_failure_jump) break; /* Still have to check that it's not an n-th alternative that starts with an on_failure_jump. */ p1++; EXTRACT_NUMBER_AND_INCR (mcnt, p1); if ((re_opcode_t) p1[mcnt-3] != jump_past_alt) { /* Get to the beginning of the n-th alternative. */ p1 -= 3; break; } } /* Deal with the last alternative: go back and get number of the `jump_past_alt' just before it. `mcnt' contains the length of the alternative. */ EXTRACT_NUMBER (mcnt, p1 - 2); if (!alt_match_null_string_p (p1, p1 + mcnt, reg_info)) return false; p1 += mcnt; /* Get past the n-th alternative. */ } /* if mcnt > 0 */ break; case stop_memory: assert (p1[1] == **p); *p = p1 + 2; return true; default: if (!common_op_match_null_string_p (&p1, end, reg_info)) return false; } } /* while p1 < end */ return false; } /* group_match_null_string_p */ /* Similar to group_match_null_string_p, but doesn't deal with alternatives: It expects P to be the first byte of a single alternative and END one byte past the last. The alternative can contain groups. */ static boolean alt_match_null_string_p (p, end, reg_info) unsigned char *p, *end; register_info_type *reg_info; { int mcnt; unsigned char *p1 = p; while (p1 < end) { /* Skip over opcodes that can match nothing, and break when we get to one that can't. */ switch ((re_opcode_t) *p1) { /* It's a loop. */ case on_failure_jump: p1++; EXTRACT_NUMBER_AND_INCR (mcnt, p1); p1 += mcnt; break; default: if (!common_op_match_null_string_p (&p1, end, reg_info)) return false; } } /* while p1 < end */ return true; } /* alt_match_null_string_p */ /* Deals with the ops common to group_match_null_string_p and alt_match_null_string_p. Sets P to one after the op and its arguments, if any. */ static boolean common_op_match_null_string_p (p, end, reg_info) unsigned char **p, *end; register_info_type *reg_info; { int mcnt; boolean ret; int reg_no; unsigned char *p1 = *p; switch ((re_opcode_t) *p1++) { case no_op: case begline: case endline: case begbuf: case endbuf: case wordbeg: case wordend: case wordbound: case notwordbound: #ifdef emacs case before_dot: case at_dot: case after_dot: #endif break; case start_memory: reg_no = *p1; assert (reg_no > 0 && reg_no <= MAX_REGNUM); ret = group_match_null_string_p (&p1, end, reg_info); /* Have to set this here in case we're checking a group which contains a group and a back reference to it. */ if (REG_MATCH_NULL_STRING_P (reg_info[reg_no]) == MATCH_NULL_UNSET_VALUE) REG_MATCH_NULL_STRING_P (reg_info[reg_no]) = ret; if (!ret) return false; break; /* If this is an optimized succeed_n for zero times, make the jump. */ case jump: EXTRACT_NUMBER_AND_INCR (mcnt, p1); if (mcnt >= 0) p1 += mcnt; else return false; break; case succeed_n: /* Get to the number of times to succeed. */ p1 += 2; EXTRACT_NUMBER_AND_INCR (mcnt, p1); if (mcnt == 0) { p1 -= 4; EXTRACT_NUMBER_AND_INCR (mcnt, p1); p1 += mcnt; } else return false; break; case duplicate: if (!REG_MATCH_NULL_STRING_P (reg_info[*p1])) return false; break; case set_number_at: p1 += 4; default: /* All other opcodes mean we cannot match the empty string. */ return false; } *p = p1; return true; } /* common_op_match_null_string_p */ /* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN bytes; nonzero otherwise. */ static int bcmp_translate (s1, s2, len, translate) unsigned char *s1, *s2; register int len; char *translate; { register unsigned char *p1 = s1, *p2 = s2; while (len) { if (translate[*p1++] != translate[*p2++]) return 1; len--; } return 0; } /* Entry points for GNU code. */ /* re_compile_pattern is the GNU regular expression compiler: it compiles PATTERN (of length SIZE) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. Assumes the `allocated' (and perhaps `buffer') and `translate' fields are set in BUFP on entry. We call regex_compile to do the actual compilation. */ const char * re_compile_pattern (pattern, length, bufp) const char *pattern; int length; struct re_pattern_buffer *bufp; { reg_errcode_t ret; /* GNU code is written to assume at least RE_NREGS registers will be set (and at least one extra will be -1). */ bufp->regs_allocated = REGS_UNALLOCATED; /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub. */ bufp->no_sub = 0; /* Match anchors at newline. */ bufp->newline_anchor = 1; ret = regex_compile (pattern, length, re_syntax_options, bufp); return re_error_msg[(int) ret]; } /* Entry points compatible with 4.2 BSD regex library. We don't define them if this is an Emacs or POSIX compilation. */ #if !defined (emacs) && !defined (_POSIX_SOURCE) /* BSD has one and only one pattern buffer. */ static struct re_pattern_buffer re_comp_buf; char * re_comp (s) const char *s; { reg_errcode_t ret; if (!s) { if (!re_comp_buf.buffer) return "No previous regular expression"; return 0; } if (!re_comp_buf.buffer) { re_comp_buf.buffer = (unsigned char *) malloc (200); if (re_comp_buf.buffer == NULL) return "Memory exhausted"; re_comp_buf.allocated = 200; re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH); if (re_comp_buf.fastmap == NULL) return "Memory exhausted"; } /* Since `re_exec' always passes NULL for the `regs' argument, we don't need to initialize the pattern buffer fields which affect it. */ /* Match anchors at newlines. */ re_comp_buf.newline_anchor = 1; ret = regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf); /* Yes, we're discarding `const' here. */ return (char *) re_error_msg[(int) ret]; } int re_exec (s) const char *s; { const int len = strlen (s); return 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0); } #endif /* not emacs and not _POSIX_SOURCE */ /* POSIX.2 functions. Don't define these for Emacs. */ #ifndef emacs /* regcomp takes a regular expression as a string and compiles it. PREG is a regex_t *. We do not expect any fields to be initialized, since POSIX says we shouldn't. Thus, we set `buffer' to the compiled pattern; `used' to the length of the compiled pattern; `syntax' to RE_SYNTAX_POSIX_EXTENDED if the REG_EXTENDED bit in CFLAGS is set; otherwise, to RE_SYNTAX_POSIX_BASIC; `newline_anchor' to REG_NEWLINE being set in CFLAGS; `fastmap' and `fastmap_accurate' to zero; `re_nsub' to the number of subexpressions in PATTERN. PATTERN is the address of the pattern string. CFLAGS is a series of bits which affect compilation. If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we use POSIX basic syntax. If REG_NEWLINE is set, then . and [^...] don't match newline. Also, regexec will try a match beginning after every newline. If REG_ICASE is set, then we considers upper- and lowercase versions of letters to be equivalent when matching. If REG_NOSUB is set, then when PREG is passed to regexec, that routine will report only success or failure, and nothing about the registers. It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for the return codes and their meanings.) */ int regcomp (preg, pattern, cflags) regex_t *preg; const char *pattern; int cflags; { reg_errcode_t ret; unsigned syntax = (cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC; /* regex_compile will allocate the space for the compiled pattern. */ preg->buffer = 0; preg->allocated = 0; /* Don't bother to use a fastmap when searching. This simplifies the REG_NEWLINE case: if we used a fastmap, we'd have to put all the characters after newlines into the fastmap. This way, we just try every character. */ preg->fastmap = 0; if (cflags & REG_ICASE) { unsigned i; preg->translate = (char *) malloc (CHAR_SET_SIZE); if (preg->translate == NULL) return (int) REG_ESPACE; /* Map uppercase characters to corresponding lowercase ones. */ for (i = 0; i < CHAR_SET_SIZE; i++) preg->translate[i] = ISUPPER (i) ? tolower (i) : i; } else preg->translate = NULL; /* If REG_NEWLINE is set, newlines are treated differently. */ if (cflags & REG_NEWLINE) { /* REG_NEWLINE implies neither . nor [^...] match newline. */ syntax &= ~RE_DOT_NEWLINE; syntax |= RE_HAT_LISTS_NOT_NEWLINE; /* It also changes the matching behavior. */ preg->newline_anchor = 1; } else preg->newline_anchor = 0; preg->no_sub = !!(cflags & REG_NOSUB); /* POSIX says a null character in the pattern terminates it, so we can use strlen here in compiling the pattern. */ ret = regex_compile (pattern, strlen (pattern), syntax, preg); /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ if (ret == REG_ERPAREN) ret = REG_EPAREN; return (int) ret; } /* regexec searches for a given pattern, specified by PREG, in the string STRING. If NMATCH is zero or REG_NOSUB was set in the cflags argument to `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at least NMATCH elements, and we set them to the offsets of the corresponding matched substrings. EFLAGS specifies `execution flags' which affect matching: if REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. We return 0 if we find a match and REG_NOMATCH if not. */ int regexec (preg, string, nmatch, pmatch, eflags) const regex_t *preg; const char *string; size_t nmatch; regmatch_t pmatch[]; int eflags; { int ret; struct re_registers regs; regex_t private_preg; int len = strlen (string); boolean want_reg_info = !preg->no_sub && nmatch > 0; private_preg = *preg; private_preg.not_bol = !!(eflags & REG_NOTBOL); private_preg.not_eol = !!(eflags & REG_NOTEOL); /* The user has told us exactly how many registers to return information about, via `nmatch'. We have to pass that on to the matching routines. */ private_preg.regs_allocated = REGS_FIXED; if (want_reg_info) { regs.num_regs = nmatch; regs.start = TALLOC (nmatch, regoff_t); regs.end = TALLOC (nmatch, regoff_t); if (regs.start == NULL || regs.end == NULL) return (int) REG_NOMATCH; } /* Perform the searching operation. */ ret = re_search (&private_preg, string, len, /* start: */ 0, /* range: */ len, want_reg_info ? ®s : (struct re_registers *) 0); /* Copy the register information to the POSIX structure. */ if (want_reg_info) { if (ret >= 0) { unsigned r; for (r = 0; r < nmatch; r++) { pmatch[r].rm_so = regs.start[r]; pmatch[r].rm_eo = regs.end[r]; } } /* If we needed the temporary register info, free the space now. */ free (regs.start); free (regs.end); } /* We want zero return to mean success, unlike `re_search'. */ return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH; } /* Returns a message corresponding to an error code, ERRCODE, returned from either regcomp or regexec. We don't use PREG here. */ size_t regerror (errcode, preg, errbuf, errbuf_size) int errcode; const regex_t *preg; char *errbuf; size_t errbuf_size; { const char *msg; size_t msg_size; if (errcode < 0 || errcode >= (sizeof (re_error_msg) / sizeof (re_error_msg[0]))) /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ abort (); msg = re_error_msg[errcode]; /* POSIX doesn't require that we do anything in this case, but why not be nice. */ if (! msg) msg = "Success"; msg_size = strlen (msg) + 1; /* Includes the null. */ if (errbuf_size != 0) { if (msg_size > errbuf_size) { strncpy (errbuf, msg, errbuf_size - 1); errbuf[errbuf_size - 1] = 0; } else strcpy (errbuf, msg); } return msg_size; } /* Free dynamically allocated space used by PREG. */ void regfree (preg) regex_t *preg; { if (preg->buffer != NULL) free (preg->buffer); preg->buffer = NULL; preg->allocated = 0; preg->used = 0; if (preg->fastmap != NULL) free (preg->fastmap); preg->fastmap = NULL; preg->fastmap_accurate = 0; if (preg->translate != NULL) free (preg->translate); preg->translate = NULL; } #endif /* not emacs */ /* Local variables: make-backup-files: t version-control: t trim-versions-without-asking: nil End: */ Fenix/config.guess0000644000000000000000000012650510607526662013165 0ustar rootroot#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-12-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown if [ "${UNAME_SYSTEM}" = "Linux" ] ; then eval $set_cc_for_build cat << EOF > $dummy.c #include #ifdef __UCLIBC__ # ifdef __UCLIBC_CONFIG_VERSION__ LIBC=uclibc __UCLIBC_CONFIG_VERSION__ # else LIBC=uclibc # endif #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` fi # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; x86:Interix*:[345]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo cris-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo frv-unknown-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld" exit ;; esac # This should get integrated into the C code below, but now we hack if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: Fenix/config.sub0000644000000000000000000007754610607526662012642 0ustar rootroot#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-12-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx | dvp \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m32c) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; nios2 | nios2-* | nios2 | nios2-*) basic_machine=nios2-altera os=-none ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; m32c-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mipsEE* | ee | ps2) basic_machine=mips64r5900el-scei case $os in -linux*) ;; *) os=-elf ;; esac ;; iop) basic_machine=mipsel-scei os=-irx ;; dvp) basic_machine=dvp-scei os=-elf ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -irx*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: Fenix/configure0000644000000000000000000051670310607744626012561 0ustar rootroot#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.56 for fenix 0.92a. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='fenix' PACKAGE_TARNAME='fenix' PACKAGE_VERSION='0.92a' PACKAGE_STRING='fenix 0.92a' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT DO_FXC_TRUE DO_FXC_FALSE DO_FXI_TRUE DO_FXI_FALSE DO_MAP_TRUE DO_MAP_FALSE DO_FPG_TRUE DO_FPG_FALSE WINDRES ac_ct_WINDRES HAVE_WINDRES_TRUE HAVE_WINDRES_FALSE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP SDL_CONFIG SDL_CFLAGS SDL_LIBS DO_FXC DO_FXI DO_MAP DO_FPG COMMON_LIBS COMMON_CFLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures fenix 0.92a to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of fenix 0.92a:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-debug enable use of Debug (default: no) --disable-mmx disable MMX assembly routines --disable-fxc build fxc (compilador) (default: yes) --disable-fxi build fxi (interprete) (default: yes) --enable-map build map (default: no) --enable-fpg build fpg (default: no) --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors --disable-sdltest Do not try to compile and run a test SDL program Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-sdl-prefix=PFX Prefix where SDL is installed (optional) --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF fenix configure 0.92a generated by GNU Autoconf 2.56 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by fenix $as_me 0.92a, which was generated by GNU Autoconf 2.56. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_target_alias=$target_alias test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi; echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE echo "Your machine: ${target_cpu} ${target_os}" # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" enable_debug=$enableval else enable_debug=no fi; # Check whether --enable-mmx or --disable-mmx was given. if test "${enable_mmx+set}" = set; then enableval="$enable_mmx" mmx=$enableval else mmx=yes fi; # Check whether --enable-fxc or --disable-fxc was given. if test "${enable_fxc+set}" = set; then enableval="$enable_fxc" fxc=$enableval else fxc=yes fi; # Check whether --enable-fxi or --disable-fxi was given. if test "${enable_fxi+set}" = set; then enableval="$enable_fxi" fxi=$enableval else fxi=yes fi; # Check whether --enable-map or --disable-map was given. if test "${enable_map+set}" = set; then enableval="$enable_map" map=$enableval else map=yes fi; # Check whether --enable-fpg or --disable-fpg was given. if test "${enable_fpg+set}" = set; then enableval="$enable_fpg" fpg=$enableval else fpg=yes fi; if test "x$fxc" = "xyes"; then DO_FXC_TRUE= DO_FXC_FALSE='#' else DO_FXC_TRUE='#' DO_FXC_FALSE= fi if test "x$fxi" = "xyes"; then DO_FXI_TRUE= DO_FXI_FALSE='#' else DO_FXI_TRUE='#' DO_FXI_FALSE= fi if test "x$map" = "xyes"; then DO_MAP_TRUE= DO_MAP_FALSE='#' else DO_MAP_TRUE='#' DO_MAP_FALSE= fi if test "x$fpg" = "xyes"; then DO_FPG_TRUE= DO_FPG_FALSE='#' else DO_FPG_TRUE='#' DO_FPG_FALSE= fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_WINDRES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$WINDRES"; then ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_WINDRES="${ac_tool_prefix}windres" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi WINDRES=$ac_cv_prog_WINDRES if test -n "$WINDRES"; then echo "$as_me:$LINENO: result: $WINDRES" >&5 echo "${ECHO_T}$WINDRES" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_WINDRES"; then ac_ct_WINDRES=$WINDRES # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_WINDRES"; then ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_WINDRES="windres" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES if test -n "$ac_ct_WINDRES"; then echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5 echo "${ECHO_T}$ac_ct_WINDRES" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi WINDRES=$ac_ct_WINDRES else WINDRES="$ac_cv_prog_WINDRES" fi if test "$WINDRES" != ""; then HAVE_WINDRES_TRUE= HAVE_WINDRES_FALSE='#' else HAVE_WINDRES_TRUE='#' HAVE_WINDRES_FALSE= fi case "$target_os" in linux-gnu) case "$target_cpu" in powerpc*) COMMON_CFLAGS="-Wall -DTARGET_LinuxPPC -DTARGET_Linux" ;; *) COMMON_CFLAGS="-Wall -DTARGET_Linux" COMMON_LIBS="$COMMON_LIBS -Wl,-Bdynamic -lc -Wl,--dynamic-linker /lib/ld-linux.so.2" ;; esac ;; mingw32) INCLUDES="-I/usr/local/include" LIBS="-L/usr/local/lib" COMMON_CFLAGS="$INCLUDES -DTARGET_Win32 -DWIN32 -D_WIN32" COMMON_LIBS="$LIBS -lz -lshlwapi" ;; dragonfly*) INCLUDES="-I/usr/local/include" LIBS="-pthread -L/usr/local/lib" COMMON_CFLAGS="-Wall -DTARGET_BSD" ;; darwin*) INCLUDES="-I/usr/local/include" LIBS="-L/usr/local/lib" COMMON_CFLAGS="-Wall -DTARGET_MAC" ;; esac am__api_version="1.7" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=fenix VERSION=0.92a cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. #AM_INIT_AUTOMAKE(no-dependencies) # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f .deps 2>/dev/null mkdir .deps 2>/dev/null if test -d .deps; then DEPDIR=.deps else # MS-DOS does not allow filenames that begin with a dot. DEPDIR=_deps fi rmdir .deps 2>/dev/null ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_CC_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking for fabs in -lm" >&5 echo $ECHO_N "checking for fabs in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_fabs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char fabs (); int main () { fabs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_fabs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_fabs=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_fabs" >&5 echo "${ECHO_T}$ac_cv_lib_m_fabs" >&6 if test $ac_cv_lib_m_fabs = yes; then LIBS="$LIBS" else echo "$as_me:$LINENO: result: math library not found" >&5 echo "${ECHO_T}math library not found" >&6 fi if test "x$enable_debug" = "xyes"; then CFLAGS="-g $INCLUDES" else CFLAGS="-O3 -finline-functions -ffast-math $INCLUDES" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for png_read_info in -lpng" >&5 echo $ECHO_N "checking for png_read_info in -lpng... $ECHO_C" >&6 if test "${ac_cv_lib_png_png_read_info+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpng -lz -lm $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char png_read_info (); int main () { png_read_info (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_png_png_read_info=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_png_png_read_info=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_read_info" >&5 echo "${ECHO_T}$ac_cv_lib_png_png_read_info" >&6 if test $ac_cv_lib_png_png_read_info = yes; then if test "${ac_cv_header_png_h+set}" = set; then echo "$as_me:$LINENO: checking for png.h" >&5 echo $ECHO_N "checking for png.h... $ECHO_C" >&6 if test "${ac_cv_header_png_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 echo "${ECHO_T}$ac_cv_header_png_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking png.h usability" >&5 echo $ECHO_N "checking png.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking png.h presence" >&5 echo $ECHO_N "checking png.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: png.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: png.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for png.h" >&5 echo $ECHO_N "checking for png.h... $ECHO_C" >&6 if test "${ac_cv_header_png_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_png_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 echo "${ECHO_T}$ac_cv_header_png_h" >&6 fi if test $ac_cv_header_png_h = yes; then LIBS="$LIBS" fi else { { echo "$as_me:$LINENO: error: *** PNG library not found ***" >&5 echo "$as_me: error: *** PNG library not found ***" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for gzsetparams in -lz" >&5 echo $ECHO_N "checking for gzsetparams in -lz... $ECHO_C" >&6 if test "${ac_cv_lib_z_gzsetparams+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gzsetparams (); int main () { gzsetparams (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_z_gzsetparams=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_gzsetparams=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzsetparams" >&5 echo "${ECHO_T}$ac_cv_lib_z_gzsetparams" >&6 if test $ac_cv_lib_z_gzsetparams = yes; then if test "${ac_cv_header_zlib_h+set}" = set; then echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking zlib.h usability" >&5 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking zlib.h presence" >&5 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 fi if test $ac_cv_header_zlib_h = yes; then LIBS="$LIBS" fi else { { echo "$as_me:$LINENO: error: zlib library not found" >&5 echo "$as_me: error: zlib library not found" >&2;} { (exit 1); exit 1; }; } fi if test "$fxc" = yes || test "$fxi" = yes; then SDL_VERSION=1.2.0 # Check whether --with-sdl-prefix or --without-sdl-prefix was given. if test "${with_sdl_prefix+set}" = set; then withval="$with_sdl_prefix" sdl_prefix="$withval" else sdl_prefix="" fi; # Check whether --with-sdl-exec-prefix or --without-sdl-exec-prefix was given. if test "${with_sdl_exec_prefix+set}" = set; then withval="$with_sdl_exec_prefix" sdl_exec_prefix="$withval" else sdl_exec_prefix="" fi; # Check whether --enable-sdltest or --disable-sdltest was given. if test "${enable_sdltest+set}" = set; then enableval="$enable_sdltest" else enable_sdltest=yes fi; if test x$sdl_exec_prefix != x ; then sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config fi fi if test x$sdl_prefix != x ; then sdl_args="$sdl_args --prefix=$sdl_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_prefix/bin/sdl-config fi fi if test "x$prefix" != xNONE; then PATH="$prefix/bin:$prefix/usr/bin:$PATH" fi # Extract the first word of "sdl-config", so it can be a program name with args. set dummy sdl-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SDL_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SDL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no" ;; esac fi SDL_CONFIG=$ac_cv_path_SDL_CONFIG if test -n "$SDL_CONFIG"; then echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5 echo "${ECHO_T}$SDL_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi min_sdl_version=$SDL_VERSION echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5 echo $ECHO_N "checking for SDL - version >= $min_sdl_version... $ECHO_C" >&6 no_sdl="" if test "$SDL_CONFIG" = "no" ; then no_sdl=yes else SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_sdltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_CXXFLAGS="$CXXFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" rm -f conf.sdltest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include "SDL.h" char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (int argc, char *argv[]) { int major, minor, micro; char *tmp_version; /* This hangs on some systems (?) system ("touch conf.sdltest"); */ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_sdl_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_sdl_version"); exit(1); } if (($sdl_major_version > major) || (($sdl_major_version == major) && ($sdl_minor_version > minor)) || (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) { return 0; } else { printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); printf("*** to point to the correct copy of sdl-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_sdl=yes fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_sdl" = x ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 : else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 if test "$SDL_CONFIG" = "no" ; then echo "*** The sdl-config script installed by SDL could not be found" echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the SDL_CONFIG environment variable to the" echo "*** full path to sdl-config." else if test -f conf.sdltest ; then : else echo "*** Could not run SDL test program, checking why..." CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include "SDL.h" int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main int main () { return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means SDL was incorrectly installed" echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl-config script: $SDL_CONFIG" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi SDL_CFLAGS="" SDL_LIBS="" { { echo "$as_me:$LINENO: error: *** SDL version $SDL_VERSION not found!" >&5 echo "$as_me: error: *** SDL version $SDL_VERSION not found!" >&2;} { (exit 1); exit 1; }; } fi rm -f conf.sdltest fi if test "$fxi" = yes; then echo "$as_me:$LINENO: checking for main in -lSDL_mixer" >&5 echo $ECHO_N "checking for main in -lSDL_mixer... $ECHO_C" >&6 if test "${ac_cv_lib_SDL_mixer_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lSDL_mixer $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_SDL_mixer_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_SDL_mixer_main=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_mixer_main" >&5 echo "${ECHO_T}$ac_cv_lib_SDL_mixer_main" >&6 if test $ac_cv_lib_SDL_mixer_main = yes; then LIBS="$LIBS" else { { echo "$as_me:$LINENO: error: *** SDL_mixer library not found!" >&5 echo "$as_me: error: *** SDL_mixer library not found!" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for XQueryTree,XMoveWindow in -lX11" >&5 echo $ECHO_N "checking for XQueryTree,XMoveWindow in -lX11... $ECHO_C" >&6 if test "${ac_cv_lib_X11_XQueryTree+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XQueryTree,XMoveWindow (); int main () { XQueryTree,XMoveWindow (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_X11_XQueryTree=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_X11_XQueryTree=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XQueryTree" >&5 echo "${ECHO_T}$ac_cv_lib_X11_XQueryTree" >&6 if test $ac_cv_lib_X11_XQueryTree = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBX11 1 _ACEOF LIBS="-lX11 $LIBS" fi fi if test "$map" = yes; then echo "$as_me:$LINENO: checking for DGifOpenFileName in -lungif" >&5 echo $ECHO_N "checking for DGifOpenFileName in -lungif... $ECHO_C" >&6 if test "${ac_cv_lib_ungif_DGifOpenFileName+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lungif $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char DGifOpenFileName (); int main () { DGifOpenFileName (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ungif_DGifOpenFileName=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ungif_DGifOpenFileName=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_DGifOpenFileName" >&5 echo "${ECHO_T}$ac_cv_lib_ungif_DGifOpenFileName" >&6 if test $ac_cv_lib_ungif_DGifOpenFileName = yes; then LIBS="$LIBS" else { { echo "$as_me:$LINENO: error: lungif library not found" >&5 echo "$as_me: error: lungif library not found" >&2;} { (exit 1); exit 1; }; } fi fi ac_config_files="$ac_config_files Makefile fxc/Makefile fxc/src/Makefile fxi/Makefile fxi/src/Makefile map/Makefile fpg/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. cat >confdef2opt.sed <<\_ACEOF t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote d : quote s,[ `~#$^&*(){}\\|;'"<>?],\\&,g s,\[,\\&,g s,\],\\&,g s,\$,$$,g p _ACEOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing # line-breaks from the sub-command output. A line-break within # single-quotes doesn't work because, if this script is created in a # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DO_FXC_TRUE}" && test -z "${DO_FXC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DO_FXC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DO_FXC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DO_FXI_TRUE}" && test -z "${DO_FXI_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DO_FXI\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DO_FXI\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DO_MAP_TRUE}" && test -z "${DO_MAP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DO_MAP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DO_MAP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DO_FPG_TRUE}" && test -z "${DO_FPG_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DO_FPG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DO_FPG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_WINDRES_TRUE}" && test -z "${HAVE_WINDRES_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_WINDRES\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_WINDRES\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by fenix $as_me 0.92a, which was generated by GNU Autoconf 2.56. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ fenix config.status 0.92a configured by $0, generated by GNU Autoconf 2.56, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "fxc/Makefile" ) CONFIG_FILES="$CONFIG_FILES fxc/Makefile" ;; "fxc/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES fxc/src/Makefile" ;; "fxi/Makefile" ) CONFIG_FILES="$CONFIG_FILES fxi/Makefile" ;; "fxi/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES fxi/src/Makefile" ;; "map/Makefile" ) CONFIG_FILES="$CONFIG_FILES map/Makefile" ;; "fpg/Makefile" ) CONFIG_FILES="$CONFIG_FILES fpg/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@target@,$target,;t t s,@target_cpu@,$target_cpu,;t t s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t s,@MAINT@,$MAINT,;t t s,@DO_FXC_TRUE@,$DO_FXC_TRUE,;t t s,@DO_FXC_FALSE@,$DO_FXC_FALSE,;t t s,@DO_FXI_TRUE@,$DO_FXI_TRUE,;t t s,@DO_FXI_FALSE@,$DO_FXI_FALSE,;t t s,@DO_MAP_TRUE@,$DO_MAP_TRUE,;t t s,@DO_MAP_FALSE@,$DO_MAP_FALSE,;t t s,@DO_FPG_TRUE@,$DO_FPG_TRUE,;t t s,@DO_FPG_FALSE@,$DO_FPG_FALSE,;t t s,@WINDRES@,$WINDRES,;t t s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t s,@HAVE_WINDRES_TRUE@,$HAVE_WINDRES_TRUE,;t t s,@HAVE_WINDRES_FALSE@,$HAVE_WINDRES_FALSE,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@SDL_CONFIG@,$SDL_CONFIG,;t t s,@SDL_CFLAGS@,$SDL_CFLAGS,;t t s,@SDL_LIBS@,$SDL_LIBS,;t t s,@DO_FXC@,$DO_FXC,;t t s,@DO_FXI@,$DO_FXI,;t t s,@DO_MAP@,$DO_MAP,;t t s,@DO_FPG@,$DO_FPG,;t t s,@COMMON_LIBS@,$COMMON_LIBS,;t t s,@COMMON_CFLAGS@,$COMMON_CFLAGS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi echo echo Fenix $VERSION echo echo Debug Mode .... : $enable_debug echo Building fxc .... : $fxc echo Building fxi .... : $fxi echo Building map .... : $map echo Building fpg .... : $fpg echo echo The binary will be installed in $prefix/bin echo echo configure complete, now type \'make\' and pray. echo Fenix/configure.in0000644000000000000000000000720310607744626013154 0ustar rootrootAC_INIT(fenix,0.92a) AC_CANONICAL_SYSTEM AC_ARG_PROGRAM AM_MAINTAINER_MODE echo "Your machine: ${target_cpu} ${target_os}" AC_ARG_ENABLE(debug, [ --enable-debug enable use of Debug (default: no)], enable_debug=$enableval, enable_debug=no) AC_ARG_ENABLE(mmx, [ --disable-mmx disable MMX assembly routines], mmx=$enableval, mmx=yes) AC_ARG_ENABLE(fxc, [ --disable-fxc build fxc (compilador) (default: yes)], fxc=$enableval, fxc=yes) AC_ARG_ENABLE(fxi, [ --disable-fxi build fxi (interprete) (default: yes)], fxi=$enableval, fxi=yes) AC_ARG_ENABLE(map, [ --enable-map build map (default: no)], map=$enableval, map=yes) AC_ARG_ENABLE(fpg, [ --enable-fpg build fpg (default: no)], fpg=$enableval, fpg=yes) AM_CONDITIONAL(DO_FXC, test "x$fxc" = "xyes") AM_CONDITIONAL(DO_FXI, test "x$fxi" = "xyes") AM_CONDITIONAL(DO_MAP, test "x$map" = "xyes") AM_CONDITIONAL(DO_FPG, test "x$fpg" = "xyes") AC_CHECK_TOOL(WINDRES, windres, ) AM_CONDITIONAL(HAVE_WINDRES, test "$WINDRES" != "") dnl Aqui es donde se chequeara el SO, pero solo hay una opcion xD case "$target_os" in linux-gnu) case "$target_cpu" in powerpc*) COMMON_CFLAGS="-Wall -DTARGET_LinuxPPC -DTARGET_Linux" ;; *) COMMON_CFLAGS="-Wall -DTARGET_Linux" COMMON_LIBS="$COMMON_LIBS -Wl,-Bdynamic -lc -Wl,--dynamic-linker /lib/ld-linux.so.2" ;; esac ;; mingw32) INCLUDES="-I/usr/local/include" LIBS="-L/usr/local/lib" COMMON_CFLAGS="$INCLUDES -DTARGET_Win32 -DWIN32 -D_WIN32" COMMON_LIBS="$LIBS -lz -lshlwapi" ;; dragonfly*) INCLUDES="-I/usr/local/include" LIBS="-pthread -L/usr/local/lib" COMMON_CFLAGS="-Wall -DTARGET_BSD" ;; darwin*) INCLUDES="-I/usr/local/include" LIBS="-L/usr/local/lib" COMMON_CFLAGS="-Wall -DTARGET_MAC" ;; esac AM_INIT_AUTOMAKE(1.6) #AM_INIT_AUTOMAKE(no-dependencies) AC_PROG_INSTALL dnl Check for compilers AC_PROG_CC AC_CHECK_LIB(m,fabs,LIBS="$LIBS",AC_MSG_RESULT(math library not found)) if test "x$enable_debug" = "xyes"; then CFLAGS="-g $INCLUDES" else CFLAGS="-O3 -finline-functions -ffast-math $INCLUDES" fi dnl librerias para todos AC_CHECK_LIB(png, png_read_info,[AC_CHECK_HEADER(png.h,LIBS="$LIBS",)], AC_MSG_ERROR(*** PNG library not found ***), -lz -lm) AC_CHECK_LIB(z, gzsetparams, [AC_CHECK_HEADER(zlib.h,LIBS="$LIBS",)], [AC_MSG_ERROR(zlib library not found)]) dnl fxc o fxi (las SDL) if test "$fxc" = yes || test "$fxi" = yes; then dnl Check for SDL library SDL_VERSION=1.2.0 AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) ) fi if test "$fxi" = yes; then AC_CHECK_LIB(SDL_mixer, main, LIBS="$LIBS", AC_MSG_ERROR([*** SDL_mixer library not found!])) AC_CHECK_LIB(X11, [XQueryTree,XMoveWindow],,) fi dnl para map if test "$map" = yes; then AC_CHECK_LIB(ungif,DGifOpenFileName,LIBS="$LIBS",AC_MSG_ERROR(lungif library not found)) fi dnl make these visible to all Makefiles AC_SUBST(DO_FXC) AC_SUBST(DO_FXI) AC_SUBST(DO_MAP) AC_SUBST(DO_FPG) AC_SUBST(COMMON_LIBS) AC_SUBST(COMMON_CFLAGS) AC_OUTPUT([ Makefile fxc/Makefile fxc/src/Makefile fxi/Makefile fxi/src/Makefile map/Makefile fpg/Makefile ]) echo echo Fenix $VERSION echo echo Debug Mode .... : $enable_debug echo Building fxc .... : $fxc echo Building fxi .... : $fxi echo Building map .... : $map echo Building fpg .... : $fpg echo echo The binary will be installed in $prefix/bin echo echo configure complete, now type \'make\' and pray. echo Fenix/COPYING0000644000000000000000000004436010607526656011704 0ustar rootroot GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. Fenix/CVS/0000755000000000000000000000000010607745100011260 5ustar rootrootFenix/CVS/Repository0000644000000000000000000000000610601620410013344 0ustar rootrootFenix Fenix/CVS/Root0000644000000000000000000000007410601620410012115 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/CVS/Entries0000644000000000000000000000170410607745100012616 0ustar rootrootD/bin//// D/common//// D/fpg//// D/fxc//// D/fxi//// D/include//// D/map//// /AUTHORS/1.1/Thu Apr 12 22:07:42 2007// /COPYING/1.2/Thu Apr 12 22:07:43 2007// /ChangeLog/1.1/Thu Apr 12 22:07:43 2007// /Fenix.dsw/1.2/Thu Apr 12 22:07:43 2007// /INSTALL/1.2/Thu Apr 12 22:07:44 2007// /Makefile.am/1.2/Thu Apr 12 22:07:44 2007// /Makefile.in/1.5/Thu Apr 12 22:07:44 2007// /README/1.3/Thu Apr 12 22:07:45 2007// /aclocal.m4/1.2/Thu Apr 12 22:07:46 2007// /config.guess/1.2/Thu Apr 12 22:07:47 2007// /config.sub/1.2/Thu Apr 12 22:07:48 2007// /depcomp/1.1/Thu Apr 12 22:07:57 2007// /fenix.spec/1.2/Thu Apr 12 22:07:57 2007// /info.html/1.1/Thu Apr 12 22:07:57 2007// /install-sh/1.1/Thu Apr 12 22:07:57 2007// /missing/1.1/Thu Apr 12 22:07:57 2007// /mkinstalldirs/1.1/Thu Apr 12 22:07:57 2007// /readme.html/1.1/Thu Apr 12 22:07:58 2007// /configure/1.33/Fri Apr 13 18:19:03 2007// /configure.in/1.31/Fri Apr 13 18:19:03 2007// /NEWS/1.41/Fri Apr 13 18:21:53 2007// Fenix/depcomp0000644000000000000000000002753310607526674012226 0ustar rootroot#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; -*) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 Fenix/fenix.spec0000644000000000000000000000315610607526674012634 0ustar rootrootSummary: Fenix programming language compiler and interpreter Summary(es): Compilador e intrprete para el lenguaje de programacin Fenix Name: fenix Version: 0.85CVS Release: 1 License: GPL Group: X11/Development/Tools Source0: %{name}-%{version}.tar.bz2 URL: http://fenix.divsite.net BuildRequires: SDL-devel >= 1.2.8 BuildRequires: SDL_mixer-devel >= 1.2.6 BuildRequires: libungif-devel >= 4.0 Requires: SDL >= 1.2.8 Requires: SDL_mixer >= 1.2.6 Requires: libungif BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(id -u -n) %description Fenix is a programming language aimed at games/multimedia which greatly simplifies the task of accesing media content. %description -l es Fenix es un lenguage de programacin orientado al mundo de los videojuegos y del multimedia que simplifica en gran manera el acceso a los contenidos multimedia. %prep %setup -q %build cd fxc/ %{__make} target=linux debug=false cd ../fxi %{__make} target=linux debug=false cd ../map %{__make} target=linux debug=false cd ../fpg %{__make} target=linux debug=false %install rm -rf $RPM_BUILD_ROOT cd fxc/ %{__make} install \ DESTDIR=$RPM_BUILD_ROOT cd ../fxi/ %{__make} install \ DESTDIR=$RPM_BUILD_ROOT cd ../fpg/ %{__make} install \ DESTDIR=$RPM_BUILD_ROOT cd ../map/ %{__make} install \ DESTDIR=$RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root, 0755) %attr(0644,root,root) %doc COPYING %{_bindir}/* %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog * %{date} Fenix Team First attempt of creating a Fenix RPM for Fedora 4. Fenix/fpg/0000755000000000000000000000000010631334454011404 5ustar rootrootFenix/fpg/Makefile.in0000644000000000000000000003103710607526704013461 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_CFLAGS = @COMMON_CFLAGS@ COMMON_LIBS = @COMMON_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DO_FPG = @DO_FPG@ DO_FPG_FALSE = @DO_FPG_FALSE@ DO_FPG_TRUE = @DO_FPG_TRUE@ DO_FXC = @DO_FXC@ DO_FXC_FALSE = @DO_FXC_FALSE@ DO_FXC_TRUE = @DO_FXC_TRUE@ DO_FXI = @DO_FXI@ DO_FXI_FALSE = @DO_FXI_FALSE@ DO_FXI_TRUE = @DO_FXI_TRUE@ DO_MAP = @DO_MAP@ DO_MAP_FALSE = @DO_MAP_FALSE@ DO_MAP_TRUE = @DO_MAP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ HAVE_WINDRES_FALSE = @HAVE_WINDRES_FALSE@ HAVE_WINDRES_TRUE = @HAVE_WINDRES_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_WINDRES = @ac_ct_WINDRES@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ bin_PROGRAMS = fpg INCLUDES = $(COMMON_CFLAGS) fpg_LDADD = $(COMMON_LIBS) -lz -lungif -lpng SOURCE_FILES = fpg.c @HAVE_WINDRES_TRUE@fpg_SOURCES = $(SOURCE_FILES) fpg_resource.rc @HAVE_WINDRES_FALSE@fpg_SOURCES = $(SOURCE_FILES) subdir = fpg mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = bin_PROGRAMS = fpg$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__fpg_SOURCES_DIST = fpg.c fpg_resource.rc am__objects_1 = fpg.$(OBJEXT) @HAVE_WINDRES_TRUE@am_fpg_OBJECTS = $(am__objects_1) \ @HAVE_WINDRES_TRUE@ fpg_resource.$(OBJEXT) @HAVE_WINDRES_FALSE@am_fpg_OBJECTS = $(am__objects_1) fpg_OBJECTS = $(am_fpg_OBJECTS) fpg_DEPENDENCIES = fpg_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/fpg.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(am__fpg_SOURCES_DIST) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(fpg_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj .rc $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu fpg/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) fpg$(EXEEXT): $(fpg_OBJECTS) $(fpg_DEPENDENCIES) @rm -f fpg$(EXEEXT) $(LINK) $(fpg_LDFLAGS) $(fpg_OBJECTS) $(fpg_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpg.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'` uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(PROGRAMS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-depend distclean-generic distclean-tags distdir dvi \ dvi-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am .rc.o: $(WINDRES) $< -I../../include -o $@ # 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: Fenix/fpg/FPG.plg0000644000000000000000000000500710607526702012530 0ustar rootroot

Build Log

--------------------Configuration: FPG - Win32 Debug--------------------

Command Lines

Creating command line "rc.exe /l 0xc0a /fo"Debug/fpg.res" /d "_DEBUG" "C:\Fenix\Fenix\fpg\fpg.rc"" Creating temporary file "C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSP17.tmp" with contents [ /nologo /MLd /W3 /Gm /GX /ZI /Od /I "..\..\zlib\include" /I "..\..\libpng" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\Fenix\Fenix\fpg\fpg.c" "C:\Fenix\libpng\pngwutil.c" "C:\Fenix\libpng\png.c" "C:\Fenix\libpng\pngerror.c" "C:\Fenix\libpng\pnggccrd.c" "C:\Fenix\libpng\pngget.c" "C:\Fenix\libpng\pngmem.c" "C:\Fenix\libpng\pngpread.c" "C:\Fenix\libpng\pngread.c" "C:\Fenix\libpng\pngrio.c" "C:\Fenix\libpng\pngrtran.c" "C:\Fenix\libpng\pngrutil.c" "C:\Fenix\libpng\pngset.c" "C:\Fenix\libpng\pngtrans.c" "C:\Fenix\libpng\pngvcrd.c" "C:\Fenix\libpng\pngwio.c" "C:\Fenix\libpng\pngwrite.c" "C:\Fenix\libpng\pngwtran.c" ] Creating command line "cl.exe @C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSP17.tmp" Creating temporary file "C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSP18.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"..\bin\Debug/FPG.pdb" /debug /machine:I386 /out:"..\bin\Debug/FPG.exe" /pdbtype:sept .\Debug\fpg.obj .\Debug\fpg.res .\Debug\pngwutil.obj .\Debug\png.obj .\Debug\pngerror.obj .\Debug\pnggccrd.obj .\Debug\pngget.obj .\Debug\pngmem.obj .\Debug\pngpread.obj .\Debug\pngread.obj .\Debug\pngrio.obj .\Debug\pngrtran.obj .\Debug\pngrutil.obj .\Debug\pngset.obj .\Debug\pngtrans.obj .\Debug\pngvcrd.obj .\Debug\pngwio.obj .\Debug\pngwrite.obj .\Debug\pngwtran.obj ..\..\zlib\lib\zdll.lib ] Creating command line "link.exe @C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSP18.tmp"

Output Window

Compiling resources... Compiling... fpg.c c:\fenix\fenix\fpg\fpg.c(242) : warning C4018: '<' : signed/unsigned mismatch pngwutil.c png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c pngvcrd.c pngwio.c pngwrite.c pngwtran.c Generating Code... Linking...

Results

FPG.exe - 0 error(s), 1 warning(s)
Fenix/fpg/CVS/0000755000000000000000000000000010607744626012050 5ustar rootrootFenix/fpg/CVS/Repository0000644000000000000000000000001210601620474014127 0ustar rootrootFenix/fpg Fenix/fpg/CVS/Root0000644000000000000000000000007410601620474012703 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/fpg/CVS/Entries0000644000000000000000000000065610607744626013413 0ustar rootroot/FPG.APS/1.3/Thu Apr 12 22:08:03 2007/-kb/ /FPG.dsp/1.2/Thu Apr 12 22:08:04 2007// /FPG.plg/1.2/Thu Apr 12 22:08:04 2007// /Makefile.am/1.2/Thu Apr 12 22:08:04 2007// /Makefile.in/1.4/Thu Apr 12 22:08:04 2007// /fpg.c/1.2/Thu Apr 12 22:08:05 2007// /fpg.ico/1.3/Thu Apr 12 22:08:05 2007/-kb/ /fpg_resource.rc/1.1/Thu Apr 12 22:08:05 2007/-kb/ /resource.h/1.2/Thu Apr 12 22:08:05 2007// /Makefile/1.27/Fri Apr 13 18:19:03 2007// D Fenix/fpg/Makefile.am0000644000000000000000000000040510607526702013441 0ustar rootrootbin_PROGRAMS=fpg .rc.o: $(WINDRES) $< -I../../include -o $@ INCLUDES = $(COMMON_CFLAGS) fpg_LDADD=$(COMMON_LIBS) -lz -lungif -lpng SOURCE_FILES=fpg.c if HAVE_WINDRES fpg_SOURCES = $(SOURCE_FILES) fpg_resource.rc else fpg_SOURCES = $(SOURCE_FILES) endif Fenix/fpg/fpg.ico0000644000000000000000000000627610607526704012673 0ustar rootroot ( @ DDDDDDDDDDDDEFI MRV[]][VR MIFEDDDDDDDDD֪m77DD(*DDց DD(*DDyDDwiy1DDv&~qC{,V|DDVRHVv7a DDrW< N4[#DDT~j,P?DD}oxv#ATDD vwkd_ ly0PF zDD?|rg_VOW!t9VF(DD|zoe\SK GY$t8}PT?# ?DDSyod[QH@@b!k0}@P^uȿDD yyod\RICA O_h#z+4LDG zrh_WOJHR_ _j* }DDa}vk_UONQT]^e zx q9ѺDHѹpzuLzqCZ] kkt|" o|D%pkkvbb`Rl)|!||1D Nu]MzlokHL ~S/2DGt2`}wu'͏k4h^ڝ꾾DUt}<yhޱDEd3c!~DEDDDDE QD uFDDDDD OTDDDDIDDDDDDDDDDDDDDFenix/fpg/fpg.c0000644000000000000000000007037110607526704012340 0ustar rootroot/* Fenix - Compilador/intrprete de videojuegos * Copyright (C) 1999 Jos Luis Cebrin Page * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #ifndef WIN32 #include #endif #include #define MAXPATH 1024 #define MAXFILES 256 #define MAXPARAMS 64 char files[MAXFILES][MAXPATH] ; int n_files = 0 ; char * palette_file = 0 ; char * policy = "wb" ; #define AC_LIST 1 #define AC_PALETTE 2 #define AC_ADD 3 #define AC_DELETE 4 #define AC_EXTRACT 5 #define AC_16BITS 6 #define AC_CREATE 7 int action = AC_LIST ; int preserve = 1 ; int show_cpoints = 0 ; int create_16bits = 1 ; typedef unsigned int Uint32 ; typedef signed int Sint32 ; typedef unsigned short Uint16 ; typedef signed short Sint16 ; typedef unsigned char Uint8 ; typedef signed char Sint8 ; #define PALETTE_SIZE (768+576) typedef struct { Uint32 code ; Uint32 regsize ; Uint8 name[32] ; Uint8 filename[12] ; Sint32 width ; Sint32 height ; Sint32 n_flags ; } FPG_MAPHEADER ; #define F_NCPOINTS 0x0FFF #define F_ANIMATION 0x1000 typedef struct { Uint8 magic[8] ; Sint16 width ; Sint16 height ; Uint32 code ; Sint8 name[32] ; } MAP_HEADER ; typedef struct { MAP_HEADER header ; Uint8 * palette ; void * data ; int * cpoints ; Sint16 * animation ; Sint16 n_flags ; char filename[12] ; int depth ; Uint16 frames ; Uint16 animation_length ; Uint16 animation_speed ; } MAP ; void fatal_error (char * fmt, ...) { va_list ap ; va_start (ap, fmt) ; vfprintf (stderr, fmt, ap) ; va_end (ap) ; printf ("\n") ; exit (1) ; } /* Rutina de utilidad para crear un nombre de fichero a partir de otro, * cambindole la extensin en el proceso */ void set_extension (const char * filename, const char * ext, char * buffer) { char * ptr ; const char * fptr ; /* Concatena la extensin al nombre de fichero */ strcpy (buffer, filename) ; ptr = strchr (buffer, '.') ; if (ptr) strcpy (ptr, ext) ; else strcat (buffer, ext) ; /* Pone la extensin en maysculas si el nombre lo est */ for (fptr = filename ; *fptr ; fptr++) if (*fptr >= 'a' && *fptr <= 'z') break ; if (!*fptr) { for (ptr = buffer ; *ptr ; ptr++) *ptr = toupper(*ptr) ; } } /* Rutina de carga de ficheros PNG */ int png_code = 1 ; MAP * png_load (const char * filename) { MAP * bitmap ; unsigned int n, x ; Uint16 * ptr ; Uint32 * orig ; Uint32 *row ; FILE * png ; png_bytep *rowpointers ; png_structp png_ptr ; png_infop info_ptr, end_info ; png_uint_32 width, height, rowbytes; int depth, color ; /* Opcin de especificar un nmero de cdigo */ if (strchr(filename, ':') && isdigit(*filename)) { png_code = atoi(filename) ; filename = strchr(filename, ':')+1 ; } /* Abre el fichero y se asegura de que screen est inicializada */ png = fopen (filename, "rb") ; if (!png) fatal_error ("No existe %s\n", filename) ; /* Prepara las estructuras internas */ png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0) ; if (!png_ptr) fatal_error ("Error al cargar PNG") ; info_ptr = png_create_info_struct (png_ptr) ; end_info = png_create_info_struct (png_ptr) ; if (!info_ptr || !end_info) fatal_error ("Error al cargar PNG") ; /* Rutina de error */ if (setjmp (png_ptr->jmpbuf)) { png_destroy_read_struct (&png_ptr, &info_ptr, &end_info) ; fclose (png) ; return 0 ; } /* Recupera informacin sobre el PNG */ png_init_io (png_ptr, png) ; png_read_info (png_ptr, info_ptr) ; png_get_IHDR (png_ptr, info_ptr, &width, &height, &depth, &color, 0, 0 , 0) ; row = malloc( sizeof(Uint32) * width ); if ( !row ) { fclose (png) ; return 0 ; } rowpointers = malloc( sizeof(png_bytep) * height ); if ( !rowpointers ) { fclose (png) ; free ( row ) ; return 0 ; } if (color == PNG_COLOR_TYPE_GRAY || color == PNG_COLOR_TYPE_GRAY_ALPHA) fatal_error ("No se soportan PNG en escala de grises") ; /* Configura los distintos modos disponibles */ if (depth < 8) png_set_expand(png_ptr) ; if (depth == 16) png_set_strip_16(png_ptr) ; if (color == PNG_COLOR_TYPE_RGB) png_set_filler (png_ptr, 0xFF, PNG_FILLER_AFTER) ; png_set_bgr(png_ptr) ; /* Recupera el fichero, convirtiendo a 16 bits si es preciso */ rowbytes = png_get_rowbytes (png_ptr, info_ptr) ; //bitmap = bitmap_new (0, width, height, color == PNG_COLOR_TYPE_PALETTE ? 8 : 16) ; bitmap = (MAP *) malloc(sizeof(MAP)) ; if (!bitmap) { fclose (png) ; free ( rowpointers ) ; free ( row ) ; return 0 ; } bitmap->palette = (void *)malloc(PALETTE_SIZE) ; bitmap->data = malloc(width*height*(color == PNG_COLOR_TYPE_PALETTE ? 1:2)) ; bitmap->cpoints = 0 ; bitmap->frames = 1 ; bitmap->header.width = (short)width ; bitmap->header.height = (short)height ; bitmap->header.code = png_code++ ; bitmap->n_flags = 0 ; strncpy (bitmap->header.name, filename, 32) ; bitmap->header.name[31] = 0 ; if (strchr(bitmap->header.name, '.')) *(strchr(bitmap->header.name, '.')) = 0 ; strncpy (bitmap->filename, bitmap->header.name, 12) ; if (color == PNG_COLOR_TYPE_PALETTE) { png_colorp pal ; int numcolors ; memcpy (bitmap->header.magic, "map\x1A\x0D\x0A", 8) ; bitmap->depth = 8 ; png_get_PLTE (png_ptr, info_ptr, &pal, &numcolors) ; for (n = 0 ; n < numcolors ; n++) { bitmap->palette[n*3+0] = pal[n].red / 4 ; bitmap->palette[n*3+1] = pal[n].green / 4 ; bitmap->palette[n*3+2] = pal[n].blue / 4 ; } for (n = 0 ; n < height ; n++) rowpointers[n] = ((Uint8*)bitmap->data) + n*width ; png_read_image (png_ptr, rowpointers) ; } else { memcpy (bitmap->header.magic, "m16\x1A\x0D\x0A", 8) ; bitmap->depth = 16 ; ptr = (Uint16*) bitmap->data ; for (n = 0 ; n < height ; n++) { rowpointers[0] = (void *)row ; png_read_rows (png_ptr, rowpointers, 0, 1) ; orig = row ; for (x = 0 ; x < width ; x++) { if ((*orig) & 0x80000000) { *ptr = ((*orig & 0x0000F8) >> 3)| ((*orig & 0x00FC00) >> 5)| ((*orig & 0xF80000) >> 8) ; if (!*ptr) (*ptr)++ ; } else *ptr = 0 ; ptr++, orig++ ; } } } /* Fin */ png_read_end (png_ptr, 0) ; fclose (png) ; free ( rowpointers ) ; free ( row ) ; return bitmap ; } /* Rutina de carga de ficheros MAP */ MAP * load_map (const char * filename) { gzFile * file ; MAP * map ; int error = 0, len, clen, force_code = -1 ; if (strstr(filename, ".png") || strstr(filename, ".PNG")) { map = png_load (filename) ; if (map) return map ; } if (strchr(filename, ':') && isdigit(*filename)) { force_code = atoi(filename) ; filename = strchr(filename, ':')+1 ; } file = gzopen (filename, "rb") ; if (!file) fatal_error ("%s: fichero no encontrado\n", filename) ; map = (MAP *) malloc(sizeof(MAP)) ; gzread (file, &map->header, sizeof(map->header)) ; strncpy (map->filename, filename, 12) ; /* Extensin: ficheros MAP de 16 bits */ if (strcmp (map->header.magic, "m16\x1A\x0D\x0A") == 0) { len = map->header.width * map->header.height * 2 ; map->depth = 16 ; map->palette = 0 ; } else { if (strcmp (map->header.magic, "map\x1A\x0D\x0A") != 0) { free (map) ; gzclose (file) ; return map ; } len = map->header.width * map->header.height ; map->depth = 8 ; map->palette = (void *)malloc(PALETTE_SIZE) ; if (gzread (file, map->palette, PALETTE_SIZE) < PALETTE_SIZE) error = 1 ; } gzread (file, &map->n_flags, 2) ; if (map->n_flags & F_NCPOINTS) { clen = (map->n_flags & F_NCPOINTS) * 4 ; map->cpoints = (int *)malloc(clen+4) ; if (gzread (file, map->cpoints, clen) < clen ) error = 1 ; } map->frames = 1 ; if (map->n_flags & F_ANIMATION) { if (gzread (file, &map->frames, 2) < 2) error = 1 ; if (gzread (file, &map->animation_length, 2) < 2) error = 1 ; if (gzread (file, &map->animation_speed, 2) < 2) error = 1 ; clen = 2 * map->animation_length ; map->animation = (Sint16 *)malloc(clen+2) ; if (gzread (file, map->animation, clen) < clen) error = 1 ; } len = map->header.width * map->header.height * map->frames ; if (map->depth == 16) len *= 2 ; map->data = malloc(len) ; if (gzread (file, map->data , len ) < len ) error = 1 ; gzclose (file) ; if (error) fatal_error ("%s: fichero truncado\n", filename) ; if (force_code >= 0) map->header.code = force_code ; return map ; } /* Rutina para convertir un MAP de 8 a 16 bits */ Uint16 * data_8to16 (Uint8 * palette, Uint8 * data, int len) { Uint16 convert[256] ; Uint16 * buffer, * ptr ; int n, r, g, b ; buffer = (Uint16 *) malloc (len * 2) ; if (!buffer) fatal_error ("Error: out of memory\n") ; for (n = 0 ; n < 256 ; n++) { r = palette[n*3] ; g = palette[n*3+1] ; b = palette[n*3+2] ; convert[n] = ((r&~1) << 10) | (g << 5) | (b >> 1) ; if (convert[n] == 0) convert[n]++ ; if (n == 0) convert[n] = 0 ; } for (n = 0, ptr = buffer ; n < len ; n++) { *ptr++ = convert[*data++] ; } return buffer ; } void map_8to16 (MAP * map) { Uint16 * data ; int len ; len = map->header.width * map->header.height * map->frames ; data = data_8to16 (map->palette, map->data, len) ; free (map->data) ; map->depth = 16 ; map->data = data ; } /* Rutina para abrir un FPG */ gzFile * fpg_open (const char * filename, int * is_16bits) { gzFile * file = gzopen (filename, "rb") ; char buffer[8] ; if (!file) fatal_error ("%s: fichero no encontrado\n", filename) ; gzread (file, buffer, 8) ; if (strcmp (buffer, "f16\x1A\x0D\x0A") == 0) { *is_16bits = 1 ; return file ; } if (strcmp (buffer, "fpg\x1A\x0D\x0A") == 0) { *is_16bits = 0 ; return file ; } fatal_error ("%s: no es un fichero fpg\n", filename) ; return file ; } /* Rutina para listar el contenido de un FPG */ void fpg_list (const char * filename) { gzFile * file ; FPG_MAPHEADER map ; char name[128], fname[128], buffer[128] ; int n, is_16bits ; Uint16 x, y, frames ; file = fpg_open (filename, &is_16bits) ; if (!file) { printf ("\n") ; return ; } /* Salta la paleta de colores */ if (!is_16bits) gzseek (file, PALETTE_SIZE, SEEK_CUR) ; printf ("# Contenido del fichero %s (%d bits):\n\n", filename, is_16bits ? 16 : 8) ; while (!gzeof(file)) { n = gzread (file, &map, sizeof(FPG_MAPHEADER)) ; if (n < (int)sizeof(FPG_MAPHEADER)) break ; strncpy (name, map.name, 32) ; strncpy (fname, map.filename, 12) ; name[32] = 0 ; fname[12] = 0 ; frames = 1 ; if (strchr(fname, ' ')) { sprintf (buffer, "\"%s\"", fname) ; strcpy (fname, buffer) ; } if (strchr(name, ' ')) { sprintf (buffer, "\"%s\"", name) ; strcpy (name, buffer) ; } printf ("%3d: %-14s %-32s # %4dx%-4d bitmap\n", map.code, fname, name, map.width, map.height) ; if (map.n_flags & F_NCPOINTS) { for (n = 0 ; n < (map.n_flags & F_NCPOINTS) ; n++) { gzread (file, &x, 2) ; gzread (file, &y, 2) ; if (x == 65535 && y == 65535) continue ; if (show_cpoints) printf (" CPOINT %d: %d, %d\n", n, x, y) ; } } frames = 1 ; if (map.n_flags & F_ANIMATION) { gzread (file, &frames, 2) ; gzread (file, &x, 2) ; gzread (file, &y, 2) ; if (show_cpoints) { printf (" FRAMES: %d\n", frames) ; printf (" SPEED: %d\n", y) ; printf (" SCRIPT: ") ; } for (n = 0 ; n < x ; n++) { gzread (file, &y, 2) ; if (show_cpoints) { if (n > 0) printf (", ") ; printf ("%d", y) ; } } if (show_cpoints) printf ("\n") ; } gzseek (file, (is_16bits ? 2:1) * frames * map.width * map.height, SEEK_CUR) ; } printf ("\n") ; gzclose (file) ; } /* Rutina que comprueba si un cdigo de grfico entra dentro de los * especificados en la lnea de comandos */ int matches (FPG_MAPHEADER * map, char * param) { unsigned int base, count = 1 ; char * ptr ; base = atoi(param) ; ptr = strchr(param, '-') ; if (ptr) { count = atoi(ptr+1)-base+1 ; if (count < 0) count = 1 ; } if (map->code >= base && map->code < base+count) return 1 ; ptr = strchr(param,',') ; if (ptr) return matches (map, ptr+1) ; return 0 ; } /* Creacin de un nuevo FPG */ void load_pal (void * here, const char * filename) { gzFile * file = gzopen (filename, "rb") ; char header[8] ; const char *ptr ; if (!file) { ptr = filename ; while (isdigit(*ptr)) ptr++ ; if (*ptr == ':') file = gzopen (ptr+1, "rb") ; if (!file) fatal_error ("%s: fichero no existente", filename) ; } gzread (file, header, 8) ; if (strcmp (header, "map\x1A\x0D\x0A") == 0) gzseek (file, 48, SEEK_SET) ; else if (strcmp (header, "fpg\x1A\x0D\x0A") != 0 && strcmp (header, "fnt\x1A\x0D\x0A") != 0 && strcmp (header, "pal\x1A\x0D\x0A") != 0) fatal_error ("%s: no es un fichero de paleta vlido", filename) ; gzread (file, here, PALETTE_SIZE) ; gzclose (file) ; } void fpg_new (const char * filename, const char * palfile, int depth) { FILE * file ; char palette[PALETTE_SIZE] ; if (palfile && depth == 8) load_pal (palette, palfile) ; file = fopen (filename, "wb") ; if (!file) fatal_error ("%s: error al escribir", filename) ; if (depth == 8) { fwrite ("fpg\x1A\x0D\x0A", 1, 8, file) ; if (!palfile) fatal_error ("Necesita una paleta de colores para crear un FPG de 8 bits"); fwrite (palette, 1, PALETTE_SIZE, file) ; } else fwrite ("f16\x1A\x0D\x0A", 1, 8, file) ; fclose (file) ; } /* Estados de los 1000 cdigos de MAP disponibles */ #define ST_PRESENT 1 #define ST_TO_ADD 2 #define ST_DELETE 2 /* Funcin principal, que procesa un FPG creando una copia del mismo * que va alterando en funcin de la accin a realizar */ void fpg_process(const char * filename, int * nfile) { gzFile * file ; gzFile * ofile ; FILE * ofile2 ; FPG_MAPHEADER map ; char name[128], fname[MAXPATH], fname2[MAXPATH] ; char output_filename[MAXPATH] ; int len, n, i, is_16bits ; Uint16 frames ; MAP * maps[128] ; int status[1000] ; int n_maps = 0 ; static char * buffer = 0, * ptr ; static int buffer_len = 0 ; static char * palette ; /* Abre o crea el fichero */ if (action == AC_CREATE) { fpg_new (filename, palette_file ? palette_file : 0, create_16bits ? 16 : 8) ; action = AC_ADD ; if(!create_16bits)n_files--; } file = fpg_open (filename, &is_16bits) ; if (!file) fatal_error ("%s: no es un FPG\n", file) ; /* Carga los .MAP */ if (action == AC_ADD || action == AC_CREATE) { for (n = (*nfile)+1 ; n < n_files ; n++) { maps[n_maps] = load_map (files[n]) ; if (maps[n_maps]) { if (!palette_file) palette_file = files[n] ; if (maps[n_maps]->header.code > 0 && maps[n_maps]->header.code < 1000) { while (status[maps[n_maps]->header.code] == ST_TO_ADD) { maps[n_maps]->header.code++ ; if (maps[n_maps]->header.code == 1000) fatal_error ("No quedan identificadores disponibles") ; } status[maps[n_maps]->header.code] = ST_TO_ADD ; } if (is_16bits && maps[n_maps]->depth == 8) map_8to16 (maps[n_maps]) ; if (!is_16bits && maps[n_maps]->depth == 16) fatal_error ("Error: intento de aadir un grfico de 16 bits a un FPG de 8\n") ; n_maps++ ; } } *nfile = n_files ; if (n_maps == 0 && action == AC_ADD) printf ("Aviso: el fichero FPG se crear vaco\n") ; } /* Recupera la paleta de colores */ if (!is_16bits) { palette = (char *) malloc (PALETTE_SIZE) ; if (gzread (file, palette, PALETTE_SIZE) < (int)PALETTE_SIZE) { fatal_error ("%s: fichero truncado\n", filename) ; gzclose (file) ; return ; } } /* Graba la paleta y acaba si es eso lo que se solicit */ if (action == AC_PALETTE) { if (is_16bits) fatal_error ("Error: intento de extraer la paleta a un FPG de 16 bits\n") ; set_extension (filename, ".pal", fname2) ; ofile2 = fopen (fname2, "wb") ; if (ofile2) { fwrite ("pal\x1A\x0D\x0A", 1, 8, ofile2) ; fwrite (palette, 1, PALETTE_SIZE, ofile2) ; fclose (ofile2) ; printf ("%s -> %s\n", filename, fname2) ; gzclose (file) ; return ; } else { fatal_error ("%s: error al crear\n", fname2) ; return ; } } /* Crea un nuevo FPG a partir de ste */ set_extension (filename, ".$$$", output_filename) ; ofile = gzopen (output_filename, policy) ; if (!ofile) { fatal_error ("%s: error al crear\n", output_filename) ; gzclose (file) ; return ; } if (!is_16bits && action != AC_16BITS) { gzwrite (ofile, "fpg\x1A\x0D\x0A", 8) ; if (gzwrite (ofile, palette, PALETTE_SIZE) < PALETTE_SIZE) { fatal_error ("%s: error de escritura\n", output_filename) ; gzclose (file) ; gzclose (ofile) ; return ; } } else { gzwrite (ofile, "f16\x1A\x0D\x0A", 8) ; } /* Grficos includos */ printf ("%s:\n\n", filename) ; mainloop: if (action != AC_CREATE) while (!gzeof(file)) { if (gzread (file, &map, sizeof(FPG_MAPHEADER)) < (int)sizeof(FPG_MAPHEADER)) break ; if (map.code < 0 || map.code >= 1000) { fatal_error ("Aviso: cdigo %d errneo\n", map.code) ; map.code = 0 ; } strncpy (name, map.name, 32) ; strncpy (fname, map.filename, 12) ; name[32] = 0 ; fname[12] = 0 ; /* Extrae grficos */ if (action == AC_EXTRACT) for (n = (*nfile)+1 ; n_files < 2 || n < n_files ; n++) { MAP_HEADER h ; if (n_files > 1 && !matches(&map, files[n])) continue ; set_extension (fname, ".map", fname2) ; ofile2 = gzopen (fname2, policy) ; if (ofile2) { if (is_16bits) strcpy (h.magic, "m16\x1A\x0D\x0A") ; else strcpy (h.magic, "map\x1A\x0D\x0A") ; h.width = map.width ; h.height = map.height ; h.code = map.code ; strncpy (h.name, map.name, 32) ; /* Palette */ gzwrite (ofile2, &h, sizeof(h)) ; if (!is_16bits) gzwrite (ofile2, palette, PALETTE_SIZE) ; gzwrite (ofile2, &map.n_flags, 2) ; /* Control points */ len = (map.n_flags & F_NCPOINTS) * 4 ; if (len > 0) { if (buffer_len < len) { buffer = (char *)realloc(buffer, len) ; buffer_len = len ; } if (gzread (file, buffer, len) < len) { fatal_error ("%s: fichero truncado\n", filename) ; break ; } gzwrite (ofile2, buffer, len) ; } len = map.width * map.height * (is_16bits? 2:1); /* Animation */ if (map.n_flags & F_ANIMATION) { Uint16 frames, speed, length ; gzread (file, &frames, 2) ; gzread (file, &length, 2) ; gzread (file, &speed, 2) ; if (buffer_len < length * 2) { buffer = (char *)realloc(buffer, length * 2) ; buffer_len = length * 2 ; } gzwrite (ofile2, &frames, 2) ; gzwrite (ofile2, &length, 2) ; gzwrite (ofile2, &speed, 2) ; gzread (file, buffer, length * 2) ; gzwrite (ofile2, buffer, length * 2) ; len *= frames ; } /* Pixel Data */ if (buffer_len < len) { buffer = (char *)realloc(buffer, len) ; buffer_len = len ; } if (gzread (file, buffer, len) < len) { fatal_error ("%s: fichero truncado\n", filename) ; break ; } if (gzwrite (ofile2, buffer, len) < len) { fatal_error ("%s: error de escritura\n", output_filename) ; break ; } gzclose (ofile2) ; printf (" %03d: %-32s -> %s\n", map.code, map.name, fname2) ; goto mainloop ; } else fatal_error ("%s: error al abrir", fname2) ; if (n_files < 2) break ; } /* Borra grficos */ if (action == AC_DELETE) { for (n = (*nfile)+1 ; n < n_files ; n++) { if (matches(&map, files[n])) { status[map.code] = ST_DELETE ; break ; } } } if (status[map.code] == ST_TO_ADD || status[map.code] == ST_DELETE) { gzseek (file, 4 * (map.n_flags & F_NCPOINTS), SEEK_CUR) ; if (map.n_flags & F_ANIMATION) { Uint16 frames, length ; gzread (file, &frames, 2) ; gzread (file, &length, 2) ; gzseek (file, 2 + length*2, SEEK_CUR) ; gzseek (file, (is_16bits?2:1)*frames*map.width*map.height, SEEK_CUR) ; } else gzseek (file, (is_16bits?2:1)*map.width*map.height, SEEK_CUR) ; printf (" %03d: %-32s ELIMINADO\n", map.code, name) ; continue ; } else status[map.code] = ST_PRESENT ; /* Pasa los grficos al nuevo fichero */ if (gzwrite (ofile, &map, sizeof(map)) < (int)sizeof(map)) { fatal_error ("%s: error de escritura\n", output_filename) ; break ; } /* Puntos de control */ len = (map.n_flags & F_NCPOINTS) * 4 ; if (len) { if (buffer_len < len) { buffer = (char *)realloc(buffer, len) ; buffer_len = len ; } if (gzread (file, buffer, len) < len) { fatal_error ("%s: fichero truncado %d\n", filename, len) ; break ; } if (gzwrite (ofile, buffer, len) < len) { fatal_error ("%s: error de escritura\n", output_filename) ; break ; } } /* Animacin */ frames = 1 ; if (map.n_flags & F_ANIMATION) { Uint16 length, speed ; gzread (file, &frames, 2) ; gzread (file, &length, 2) ; gzread (file, &speed, 2) ; gzwrite (ofile, &frames, 2) ; gzwrite (ofile, &length, 2) ; gzwrite (ofile, &speed, 2) ; len = 2 * length ; if (buffer_len < len) { buffer = (char *)realloc(buffer, len) ; buffer_len = len ; } gzread (file, buffer, len) ; gzwrite (ofile, buffer, len) ; } /* Datos del grfico */ len = map.width * map.height * frames ; if (is_16bits) len *= 2 ; if (buffer_len < len) { buffer = (char *)realloc(buffer, len) ; buffer_len = len ; } if (gzread (file, buffer, len) < len) { fatal_error ("%s: fichero truncado\n", filename) ; break ; } if (!is_16bits && action == AC_16BITS) { ptr = (char *) data_8to16 (palette, buffer, len) ; len *= 2 ; if (buffer_len < len) { free (buffer) ; buffer = ptr ; buffer_len = len ; } else { memcpy (buffer, ptr, len) ; free (ptr) ; } printf (" %03d: %-32s CONVERTIDO\n", map.code, map.name) ; } if (gzwrite (ofile, buffer, len) < len) { fatal_error ("%s: error de escritura\n", output_filename) ; break ; } } /* Aade grficos al fpg */ if (action == AC_ADD) { for (n = 0 ; n < n_maps ; n++) { MAP * bitmap = maps[n] ; if (bitmap->header.code < 1 || bitmap->header.code > 999) { for (i = 1 ; i < 1000 ; i++) { if (status[i] == 0) break ; } status[i] = ST_PRESENT ; bitmap->header.code = i ; } map.code = bitmap->header.code ; map.width = bitmap->header.width ; map.height = bitmap->header.height ; map.n_flags = bitmap->n_flags ; strncpy (map.filename, bitmap->filename, 12) ; strncpy (map.name, bitmap->header.name, 32) ; map.regsize = map.width + map.height + 4*(map.n_flags & F_NCPOINTS) + sizeof(map) ; gzwrite (ofile, &map, sizeof(map)) ; gzwrite (ofile, bitmap->cpoints, 4 * (map.n_flags & F_NCPOINTS)) ; if (!bitmap->frames) bitmap->frames = 1 ; if (bitmap->n_flags & F_ANIMATION) { gzwrite (ofile, &bitmap->frames, 2) ; gzwrite (ofile, &bitmap->animation_length, 2) ; gzwrite (ofile, &bitmap->animation_speed, 2) ; gzwrite (ofile, bitmap->animation, bitmap->animation_length * 2) ; } len = map.width * map.height * bitmap->frames * (is_16bits ? 2:1) ; gzwrite (ofile, bitmap->data, len) ; printf (" %03d: %-32s AADIDO\n", map.code, map.name) ; } *nfile = n_files ; } printf ("\n") ; gzclose (ofile) ; gzclose (file) ; if (action == AC_ADD || action == AC_DELETE || action == AC_16BITS || (action == AC_EXTRACT && !preserve)) { unlink (filename) ; rename (output_filename, filename) ; } else unlink (output_filename) ; if (action == AC_DELETE || action == AC_EXTRACT) *nfile = n_files ; } void help () { printf ("FPG Utility - Copyright (C) 1999 Jos Luis Cebrin Page\n" "This utility comes with ABSOLUTELY NO WARRANTY; fpg -h for details\n\n") ; printf ("Uso: fpg [opcion] fichero [grfico ...]\n" "\n" " -l Describe el FPG (opcin por defecto): -v ms extenso\n" " -n Crea un nuevo FPG, opcionalmente aadiendo MAPs\n" " -o Crea un nuevo FPG de 8 bits, opcionalmente aadiendo MAPs\n" " -d Elimina los grficos indicados del FPG\n" " -p Extrae la paleta (.PAL) del fichero\n" " -e Extrae grficos (.MAP) del FPG y los borra del mismo\n" " -x Extrae grficos (.MAP) del FPG\n" " -a Aade grficos (.MAP) al FPG\n" " -c Convierte el .FPG a 16 bits\n" " -# Nivel de compresin (0 a 9)\n" "\n" "Las opciones -x y -e admiten indicar los grficos mediante su cdigo.\n" "Se pueden utilizar rangos a-b y varios grficos separados por comas.\n" "Las opciones -p y -l admiten mltiples ficheros fpg\n\n") ; } int main (int argc, char ** argv) { int i ; char * ptr ; for (i = 1 ; i < argc ; i++) { if (argv[i][0] == '-' || argv[i][0] == '/') { ptr = argv[i] + 1 ; while (*ptr) { if (isdigit(*ptr)) { policy = strdup ("wb ") ; policy[2] = *ptr ; } else switch (tolower(*ptr)) { case 'n': action = AC_CREATE ; break ; case 'o': action = AC_CREATE ; create_16bits = 0 ; if (argc <= i+2) fatal_error ("Especifique nombre de paleta tras -o") ; palette_file = argv[i+2] ; break ; case 'a': action = AC_ADD ; break ; case 'd': action = AC_DELETE ; break ; case 'l': action = AC_LIST ; break ; case 'x': action = AC_EXTRACT ; break ; case 'e': action = AC_EXTRACT ; preserve = 0 ; break ; case 'p': if (action == AC_CREATE) { if (argc == i+1) fatal_error ("Especifique nombre de paleta tras -p") ; palette_file = argv[i+1] ; memcpy (&argv[i+1], &argv[i+2], sizeof(char *)*(argc-i)) ; argc-- ; } else action = AC_PALETTE ; break ; case 'v': show_cpoints = 1 ; break ; case 'c': action = AC_16BITS ; break ; case 'h': help() ; return -1 ; default: fatal_error ("Error: opcin -%c no reconocida\n", *ptr) ; } ptr++ ; } } else { if (n_files == MAXFILES) fatal_error ("Error: demasiados ficheros\n") ; strcpy (files[n_files++], argv[i]) ; } } if (n_files == 0) { help() ; return -1 ; } for (i = 0 ; i < n_files ; i++) { switch (action) { case AC_LIST: fpg_list (files[i]) ; break ; case AC_CREATE: case AC_DELETE: case AC_PALETTE: case AC_ADD: case AC_EXTRACT: case AC_16BITS: fpg_process (files[i], &i) ; break ; default: fatal_error ("Error: Accin no disponible\n") ; } } exit(0); } Fenix/fpg/Makefile0000644000000000000000000003005310607744626013056 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # fpg/Makefile. Generated from Makefile.in by configure. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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. srcdir = . top_srcdir = .. pkgdatadir = $(datadir)/fenix pkglibdir = $(libdir)/fenix pkgincludedir = $(includedir)/fenix top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /bin/install -c 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 = i686-pc-mingw32 host_triplet = i686-pc-mingw32 target_triplet = i686-pc-mingw32 ACLOCAL = ${SHELL} /c/Fenix/missing --run aclocal-1.7 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /c/Fenix/missing --run tar AUTOCONF = ${SHELL} /c/Fenix/missing --run autoconf AUTOHEADER = ${SHELL} /c/Fenix/missing --run autoheader AUTOMAKE = ${SHELL} /c/Fenix/missing --run automake-1.7 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -O3 -finline-functions -ffast-math -I/usr/local/include COMMON_CFLAGS = -I/usr/local/include -DTARGET_Win32 -DWIN32 -D_WIN32 COMMON_LIBS = -L/usr/local/lib -lz -lshlwapi CPP = gcc -E CPPFLAGS = CYGPATH_W = echo DEFS = -DPACKAGE_NAME=\"fenix\" -DPACKAGE_TARNAME=\"fenix\" -DPACKAGE_VERSION=\"0.92a\" -DPACKAGE_STRING=\"fenix\ 0.92a\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"fenix\" -DVERSION=\"0.92a\" -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 DEPDIR = .deps DO_FPG = DO_FPG_FALSE = # DO_FPG_TRUE = DO_FXC = DO_FXC_FALSE = # DO_FXC_TRUE = DO_FXI = DO_FXI_FALSE = # DO_FXI_TRUE = DO_MAP = DO_MAP_FALSE = # DO_MAP_TRUE = ECHO_C = ECHO_N = -n ECHO_T = EGREP = grep -E EXEEXT = .exe HAVE_WINDRES_FALSE = # HAVE_WINDRES_TRUE = INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = LIBOBJS = LIBS = -L/usr/local/lib LTLIBOBJS = MAINT = # MAINTAINER_MODE_FALSE = MAINTAINER_MODE_TRUE = # MAKEINFO = ${SHELL} /c/Fenix/missing --run makeinfo OBJEXT = o PACKAGE = fenix PACKAGE_BUGREPORT = PACKAGE_NAME = fenix PACKAGE_STRING = fenix 0.92a PACKAGE_TARNAME = fenix PACKAGE_VERSION = 0.92a PATH_SEPARATOR = : SDL_CFLAGS = -I/usr/local/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main SDL_CONFIG = /usr/local/bin/sdl-config SDL_LIBS = -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows SET_MAKE = SHELL = /bin/sh STRIP = VERSION = 0.92a WINDRES = windres ac_ct_CC = gcc ac_ct_STRIP = ac_ct_WINDRES = windres am__fastdepCC_FALSE = # am__fastdepCC_TRUE = am__include = include am__quote = bindir = ${exec_prefix}/bin build = i686-pc-mingw32 build_alias = build_cpu = i686 build_os = mingw32 build_vendor = pc datadir = ${prefix}/share exec_prefix = ${prefix} host = i686-pc-mingw32 host_alias = host_cpu = i686 host_os = mingw32 host_vendor = pc includedir = ${prefix}/include infodir = ${prefix}/info install_sh = /c/Fenix/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localstatedir = ${prefix}/var mandir = ${prefix}/man oldincludedir = /usr/include prefix = /usr/local program_transform_name = s,x,x, sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com sysconfdir = ${prefix}/etc target = i686-pc-mingw32 target_alias = target_cpu = i686 target_os = mingw32 target_vendor = pc bin_PROGRAMS = fpg INCLUDES = $(COMMON_CFLAGS) fpg_LDADD = $(COMMON_LIBS) -lz -lungif -lpng SOURCE_FILES = fpg.c fpg_SOURCES = $(SOURCE_FILES) fpg_resource.rc #fpg_SOURCES = $(SOURCE_FILES) subdir = fpg mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = bin_PROGRAMS = fpg$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__fpg_SOURCES_DIST = fpg.c fpg_resource.rc am__objects_1 = fpg.$(OBJEXT) am_fpg_OBJECTS = $(am__objects_1) \ fpg_resource.$(OBJEXT) #am_fpg_OBJECTS = $(am__objects_1) fpg_OBJECTS = $(am_fpg_OBJECTS) fpg_DEPENDENCIES = fpg_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles DEP_FILES = ./$(DEPDIR)/fpg.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(am__fpg_SOURCES_DIST) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(fpg_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj .rc $(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu fpg/Makefile Makefile: # $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) fpg$(EXEEXT): $(fpg_OBJECTS) $(fpg_DEPENDENCIES) @rm -f fpg$(EXEEXT) $(LINK) $(fpg_LDFLAGS) $(fpg_OBJECTS) $(fpg_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c include ./$(DEPDIR)/fpg.Po distclean-depend: -rm -rf ./$(DEPDIR) .c.o: if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ fi # source='$<' object='$@' libtool=no \ # depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ fi # source='$<' object='$@' libtool=no \ # depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'` uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(PROGRAMS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-depend distclean-generic distclean-tags distdir dvi \ dvi-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am .rc.o: $(WINDRES) $< -I../../include -o $@ # 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: Fenix/fpg/FPG.APS0000644000000000000000000004737410607526702012406 0ustar rootroot 0$HWB lMD:\Carlos\fenix075b-full-release\FPG\FPG.rc 0 ( @ DDDDDDDDDDDDEFI MRV[]][VR MIFEDDDDDDDDD֪m77DD(*DDց DD(*DDyDDwiy1DDv&~qC{,V|DDVRHVv7a DDrW< N4[#DDT~j,P?DD}oxv#ATDD vwkd_ ly0PF zDD?|rg_VOW!t9VF(DD|zoe\SK GY$t8}PT?# ?DDSyod[QH@@b!k0}@P^uȿDD yyod\RICA O_h#z+4LDG zrh_WOJHR_ _j* }DDa}vk_UONQT]^e zx q9ѺDHѹpzuLzqCZ] kkt|" o|D%pkkvbb`Rl)|!||1D Nu]MzlokHL ~S/2DGt2`}wu'͏k4h^ڝ꾾DUt}<yhޱDEd3c!~DEDDDDE QD uFDDDDD OTDDDDIDDDDDDDDDDDDDD e0    4TEXTINCLUDE0 resource.h4TEXTINCLUDE0 #include "afxres.h" 4TEXTINCLUDE0 <$HWB0 !!resource.hIDI_ICON1101_APS_NEXT_RESOURCE_VALUE102 _APS_NEXT_COMMAND_VALUE40001 _APS_NEXT_CONTROL_VALUE1000 _APS_NEXT_SYMED_VALUE101!!afxres.h!winres.hVS_VERSION_INFO1IDC_STATIC(-1))!CBRS_ALIGN_LEFT0x1000L/CBRS_ALIGN_TOP0x2000L0CBRS_ALIGN_RIGHT0x4000L1CBRS_ALIGN_BOTTOM0x8000L2CBRS_ALIGN_ANY0xF000L3CBRS_BORDER_LEFT0x0100L5CBRS_BORDER_TOP0x0200L6CBRS_BORDER_RIGHT0x0400L7CBRS_BORDER_BOTTOM0x0800L8CBRS_BORDER_ANY0x0F00L9CBRS_TOOLTIPS0x0010L;CBRS_FLYBY0x0020L<CBRS_FLOAT_MULTI0x0040L=CBRS_BORDER_3D0x0080L>CBRS_HIDE_INPLACE0x0008L?CBRS_SIZE_DYNAMIC0x0004L@CBRS_SIZE_FIXED0x0002LACBRS_FLOATING0x0001LBCBRS_GRIPPER0x00400000LDCBRS_ORIENT_HORZ(CBRS_ALIGN_TOP|CBRS_ALIGN_BOTTOM)FCBRS_ORIENT_VERT(CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT)GCBRS_ORIENT_ANY(CBRS_ORIENT_HORZ|CBRS_ORIENT_VERT)HCBRS_ALL0x0040FFFFLJCBRS_NOALIGN0x00000000LOCBRS_LEFT(CBRS_ALIGN_LEFT|CBRS_BORDER_RIGHT)PCBRS_TOP(CBRS_ALIGN_TOP|CBRS_BORDER_BOTTOM)QCBRS_RIGHT(CBRS_ALIGN_RIGHT|CBRS_BORDER_LEFT)RCBRS_BOTTOM(CBRS_ALIGN_BOTTOM|CBRS_BORDER_TOP)SID_INDICATOR_EXT0xE700YID_INDICATOR_CAPS0xE701ZID_INDICATOR_NUM0xE702[ID_INDICATOR_SCRL0xE703\ID_INDICATOR_OVR0xE704]ID_INDICATOR_REC0xE705^ID_INDICATOR_KANA0xE706_ID_SEPARATOR0aAFX_IDS_APP_TITLE0xE000AFX_IDS_IDLEMESSAGE0xE001AFX_IDS_HELPMODEMESSAGE0xE002AFX_IDS_APP_TITLE_EMBEDDING0xE003AFX_IDS_COMPANY_NAME0xE004AFX_IDS_OBJ_TITLE_INPLACE0xE005ID_FILE_NEW0xE100ID_FILE_OPEN0xE101ID_FILE_CLOSE0xE102ID_FILE_SAVE0xE103ID_FILE_SAVE_AS0xE104ID_FILE_PAGE_SETUP0xE105ID_FILE_PRINT_SETUP0xE106ID_FILE_PRINT0xE107ID_FILE_PRINT_DIRECT0xE108ID_FILE_PRINT_PREVIEW0xE109ID_FILE_UPDATE0xE10AID_FILE_SAVE_COPY_AS0xE10BID_FILE_SEND_MAIL0xE10CID_FILE_MRU_FIRST0xE110ID_FILE_MRU_FILE10xE110ID_FILE_MRU_FILE20xE111ID_FILE_MRU_FILE30xE112ID_FILE_MRU_FILE40xE113ID_FILE_MRU_FILE50xE114ID_FILE_MRU_FILE60xE115ID_FILE_MRU_FILE70xE116ID_FILE_MRU_FILE80xE117ID_FILE_MRU_FILE90xE118ID_FILE_MRU_FILE100xE119ID_FILE_MRU_FILE110xE11AID_FILE_MRU_FILE120xE11BID_FILE_MRU_FILE130xE11CID_FILE_MRU_FILE140xE11DID_FILE_MRU_FILE150xE11EID_FILE_MRU_FILE160xE11FID_FILE_MRU_LAST0xE11FID_EDIT_CLEAR0xE120ID_EDIT_CLEAR_ALL0xE121ID_EDIT_COPY0xE122ID_EDIT_CUT0xE123ID_EDIT_FIND0xE124ID_EDIT_PASTE0xE125ID_EDIT_PASTE_LINK0xE126ID_EDIT_PASTE_SPECIAL0xE127ID_EDIT_REPEAT0xE128ID_EDIT_REPLACE0xE129ID_EDIT_SELECT_ALL0xE12AID_EDIT_UNDO0xE12BID_EDIT_REDO0xE12CID_WINDOW_NEW0xE130ID_WINDOW_ARRANGE0xE131ID_WINDOW_CASCADE0xE132ID_WINDOW_TILE_HORZ0xE133ID_WINDOW_TILE_VERT0xE134ID_WINDOW_SPLIT0xE135ID_APP_ABOUT0xE140ID_APP_EXIT0xE141ID_HELP_INDEX0xE142ID_HELP_FINDER0xE143ID_HELP_USING0xE144ID_CONTEXT_HELP0xE145ID_HELP0xE146ID_DEFAULT_HELP0xE147ID_NEXT_PANE0xE150ID_PREV_PANE0xE151ID_FORMAT_FONT0xE160ID_OLE_INSERT_NEW0xE200ID_OLE_EDIT_LINKS0xE201ID_OLE_EDIT_CONVERT0xE202ID_OLE_EDIT_CHANGE_ICON0xE203ID_OLE_EDIT_PROPERTIES0xE204ID_OLE_VERB_FIRST0xE210AFX_ID_PREVIEW_CLOSE0xE300AFX_ID_PREVIEW_NUMPAGE0xE301AFX_ID_PREVIEW_NEXT0xE302AFX_ID_PREVIEW_PREV0xE303AFX_ID_PREVIEW_PRINT0xE304AFX_ID_PREVIEW_ZOOMIN0xE305AFX_ID_PREVIEW_ZOOMOUT0xE306ID_VIEW_TOOLBAR0xE800ID_VIEW_STATUS_BAR0xE801ID_VIEW_REBAR0xE804 ID_VIEW_AUTOARRANGE0xE805 ID_VIEW_SMALLICON0xE810 ID_VIEW_LARGEICON0xE811 ID_VIEW_LIST0xE812ID_VIEW_DETAILS0xE813ID_VIEW_LINEUP0xE814ID_VIEW_BYNAME0xE815AFX_ID_VIEW_MINIMUMID_VIEW_SMALLICONAFX_ID_VIEW_MAXIMUMID_VIEW_BYNAMEID_RECORD_FIRST0xE900ID_RECORD_LAST0xE901ID_RECORD_NEXT0xE902ID_RECORD_PREV0xE903IDC_STATIC(-1)"AFX_IDS_SCSIZE0xEF00+AFX_IDS_SCMOVE0xEF01,AFX_IDS_SCMINIMIZE0xEF02-AFX_IDS_SCMAXIMIZE0xEF03.AFX_IDS_SCNEXTWINDOW0xEF04/AFX_IDS_SCPREVWINDOW0xEF050AFX_IDS_SCCLOSE0xEF061AFX_IDS_SCRESTORE0xEF122AFX_IDS_SCTASKLIST0xEF133AFX_IDS_MDICHILD0xEF1F5AFX_IDS_DESKACCESSORY0xEFDA7AFX_IDS_OPENFILE0xF000:AFX_IDS_SAVEFILE0xF001;AFX_IDS_ALLFILTER0xF002<AFX_IDS_UNTITLED0xF003=AFX_IDS_SAVEFILECOPY0xF004>AFX_IDS_PREVIEW_CLOSE0xF005?AFX_IDS_UNNAMED_FILE0xF006@AFX_IDS_HIDE0xF011AAFX_IDP_NO_ERROR_AVAILABLE0xF020DAFX_IDS_NOT_SUPPORTED_EXCEPTION0xF021EAFX_IDS_RESOURCE_EXCEPTION0xF022FAFX_IDS_MEMORY_EXCEPTION0xF023GAFX_IDS_USER_EXCEPTION0xF024HAFX_IDS_PRINTONPORT0xF040KAFX_IDS_ONEPAGE0xF041LAFX_IDS_TWOPAGE0xF042MAFX_IDS_PRINTPAGENUM0xF043NAFX_IDS_PREVIEWPAGEDESC0xF044OAFX_IDS_PRINTDEFAULTEXT0xF045PAFX_IDS_PRINTDEFAULT0xF046QAFX_IDS_PRINTFILTER0xF047RAFX_IDS_PRINTCAPTION0xF048SAFX_IDS_PRINTTOFILE0xF049TAFX_IDS_OBJECT_MENUITEM0xF080XAFX_IDS_EDIT_VERB0xF081YAFX_IDS_ACTIVATE_VERB0xF082ZAFX_IDS_CHANGE_LINK0xF083[AFX_IDS_AUTO0xF084\AFX_IDS_MANUAL0xF085]AFX_IDS_FROZEN0xF086^AFX_IDS_ALL_FILES0xF087_AFX_IDS_SAVE_MENU0xF088aAFX_IDS_UPDATE_MENU0xF089bAFX_IDS_SAVE_AS_MENU0xF08AcAFX_IDS_SAVE_COPY_AS_MENU0xF08BdAFX_IDS_EXIT_MENU0xF08CeAFX_IDS_UPDATING_ITEMS0xF08DfAFX_IDS_METAFILE_FORMAT0xF08EhAFX_IDS_DIB_FORMAT0xF08FiAFX_IDS_BITMAP_FORMAT0xF090jAFX_IDS_LINKSOURCE_FORMAT0xF091kAFX_IDS_EMBED_FORMAT0xF092lAFX_IDS_PASTELINKEDTYPE0xF094nAFX_IDS_UNKNOWNTYPE0xF095oAFX_IDS_RTF_FORMAT0xF096pAFX_IDS_TEXT_FORMAT0xF097qAFX_IDS_INVALID_CURRENCY0xF098sAFX_IDS_INVALID_DATETIME0xF099tAFX_IDS_INVALID_DATETIMESPAN0xF09AuAFX_IDP_INVALID_FILENAME0xF100xAFX_IDP_FAILED_TO_OPEN_DOC0xF101yAFX_IDP_FAILED_TO_SAVE_DOC0xF102zAFX_IDP_ASK_TO_SAVE0xF103{AFX_IDP_FAILED_TO_CREATE_DOC0xF104|AFX_IDP_FILE_TOO_LARGE0xF105}AFX_IDP_FAILED_TO_START_PRINT0xF106~AFX_IDP_FAILED_TO_LAUNCH_HELP0xF107AFX_IDP_INTERNAL_FAILURE0xF108AFX_IDP_COMMAND_FAILURE0xF109AFX_IDP_FAILED_MEMORY_ALLOC0xF10AAFX_IDP_UNREG_DONE0xF10BAFX_IDP_UNREG_FAILURE0xF10CAFX_IDP_DLL_LOAD_FAILED0xF10DAFX_IDP_DLL_BAD_VERSION0xF10EAFX_IDP_PARSE_INT0xF110AFX_IDP_PARSE_REAL0xF111AFX_IDP_PARSE_INT_RANGE0xF112AFX_IDP_PARSE_REAL_RANGE0xF113AFX_IDP_PARSE_STRING_SIZE0xF114AFX_IDP_PARSE_RADIO_BUTTON0xF115AFX_IDP_PARSE_BYTE0xF116AFX_IDP_PARSE_UINT0xF117AFX_IDP_PARSE_DATETIME0xF118AFX_IDP_PARSE_CURRENCY0xF119AFX_IDP_FAILED_INVALID_FORMAT0xF120AFX_IDP_FAILED_INVALID_PATH0xF121AFX_IDP_FAILED_DISK_FULL0xF122AFX_IDP_FAILED_ACCESS_READ0xF123AFX_IDP_FAILED_ACCESS_WRITE0xF124AFX_IDP_FAILED_IO_ERROR_READ0xF125AFX_IDP_FAILED_IO_ERROR_WRITE0xF126AFX_IDP_STATIC_OBJECT0xF180AFX_IDP_FAILED_TO_CONNECT0xF181AFX_IDP_SERVER_BUSY0xF182AFX_IDP_BAD_VERB0xF183AFX_IDS_NOT_DOCOBJECT0xF184AFX_IDP_FAILED_TO_NOTIFY0xF185AFX_IDP_FAILED_TO_LAUNCH0xF186AFX_IDP_ASK_TO_UPDATE0xF187AFX_IDP_FAILED_TO_UPDATE0xF188AFX_IDP_FAILED_TO_REGISTER0xF189AFX_IDP_FAILED_TO_AUTO_REGISTER0xF18AAFX_IDP_FAILED_TO_CONVERT0xF18BAFX_IDP_GET_NOT_SUPPORTED0xF18CAFX_IDP_SET_NOT_SUPPORTED0xF18DAFX_IDP_ASK_TO_DISCARD0xF18EAFX_IDP_FAILED_TO_CREATE0xF18FAFX_IDP_FAILED_MAPI_LOAD0xF190AFX_IDP_INVALID_MAPI_DLL0xF191AFX_IDP_FAILED_MAPI_SEND0xF192AFX_IDP_FILE_NONE0xF1A0AFX_IDP_FILE_GENERIC0xF1A1AFX_IDP_FILE_NOT_FOUND0xF1A2AFX_IDP_FILE_BAD_PATH0xF1A3AFX_IDP_FILE_TOO_MANY_OPEN0xF1A4AFX_IDP_FILE_ACCESS_DENIED0xF1A5AFX_IDP_FILE_INVALID_FILE0xF1A6AFX_IDP_FILE_REMOVE_CURRENT0xF1A7AFX_IDP_FILE_DIR_FULL0xF1A8AFX_IDP_FILE_BAD_SEEK0xF1A9AFX_IDP_FILE_HARD_IO0xF1AAAFX_IDP_FILE_SHARING0xF1ABAFX_IDP_FILE_LOCKING0xF1ACAFX_IDP_FILE_DISKFULL0xF1ADAFX_IDP_FILE_EOF0xF1AEAFX_IDP_ARCH_NONE0xF1B0AFX_IDP_ARCH_GENERIC0xF1B1AFX_IDP_ARCH_READONLY0xF1B2AFX_IDP_ARCH_ENDOFFILE0xF1B3AFX_IDP_ARCH_WRITEONLY0xF1B4AFX_IDP_ARCH_BADINDEX0xF1B5AFX_IDP_ARCH_BADCLASS0xF1B6AFX_IDP_ARCH_BADSCHEMA0xF1B7AFX_IDS_OCC_SCALEUNITS_PIXELS0xF1C0AFX_IDS_STATUS_FONT0xF230AFX_IDS_TOOLTIP_FONT0xF231AFX_IDS_UNICODE_FONT0xF232AFX_IDS_MINI_FONT0xF233AFX_IDP_SQL_CONNECT_FAIL0xF281AFX_IDP_SQL_RECORDSET_FORWARD_ONLY0xF282AFX_IDP_SQL_EMPTY_COLUMN_LIST0xF283AFX_IDP_SQL_FIELD_SCHEMA_MISMATCH0xF284AFX_IDP_SQL_ILLEGAL_MODE0xF285AFX_IDP_SQL_MULTIPLE_ROWS_AFFECTED0xF286AFX_IDP_SQL_NO_CURRENT_RECORD0xF287AFX_IDP_SQL_NO_ROWS_AFFECTED0xF288AFX_IDP_SQL_RECORDSET_READONLY0xF289AFX_IDP_SQL_SQL_NO_TOTAL0xF28AAFX_IDP_SQL_ODBC_LOAD_FAILED0xF28BAFX_IDP_SQL_DYNASET_NOT_SUPPORTED0xF28CAFX_IDP_SQL_SNAPSHOT_NOT_SUPPORTED0xF28DAFX_IDP_SQL_API_CONFORMANCE0xF28EAFX_IDP_SQL_SQL_CONFORMANCE0xF28FAFX_IDP_SQL_NO_DATA_FOUND0xF290AFX_IDP_SQL_ROW_UPDATE_NOT_SUPPORTED0xF291AFX_IDP_SQL_ODBC_V2_REQUIRED0xF292AFX_IDP_SQL_NO_POSITIONED_UPDATES0xF293AFX_IDP_SQL_LOCK_MODE_NOT_SUPPORTED0xF294AFX_IDP_SQL_DATA_TRUNCATED0xF295AFX_IDP_SQL_ROW_FETCH0xF296AFX_IDP_SQL_INCORRECT_ODBC0xF297AFX_IDP_SQL_UPDATE_DELETE_FAILED0xF298AFX_IDP_SQL_DYNAMIC_CURSOR_NOT_SUPPORTED0xF299AFX_IDP_SQL_FIELD_NOT_FOUND0xF29AAFX_IDP_SQL_BOOKMARKS_NOT_SUPPORTED0xF29BAFX_IDP_SQL_BOOKMARKS_NOT_ENABLED0xF29CAFX_IDS_DELETED0xF29DAFX_IDP_DAO_ENGINE_INITIALIZATION0xF2B0AFX_IDP_DAO_DFX_BIND0xF2B1AFX_IDP_DAO_OBJECT_NOT_OPEN0xF2B2AFX_IDP_DAO_ROWTOOSHORT0xF2B3AFX_IDP_DAO_BADBINDINFO0xF2B4AFX_IDP_DAO_COLUMNUNAVAILABLE0xF2B5AFX_IDS_HTTP_TITLE0xF2D1 AFX_IDS_HTTP_NO_TEXT0xF2D2AFX_IDS_HTTP_BAD_REQUEST0xF2D3AFX_IDS_HTTP_AUTH_REQUIRED0xF2D4AFX_IDS_HTTP_FORBIDDEN0xF2D5AFX_IDS_HTTP_NOT_FOUND0xF2D6AFX_IDS_HTTP_SERVER_ERROR0xF2D7AFX_IDS_HTTP_NOT_IMPLEMENTED0xF2D8AFX_IDC_LISTBOX100AFX_IDC_CHANGE101AFX_IDC_PRINT_DOCNAME201AFX_IDC_PRINT_PRINTERNAME202AFX_IDC_PRINT_PORTNAME203 AFX_IDC_PRINT_PAGENUM204!ID_APPLY_NOW0x3021$ID_WIZBACK0x3023%ID_WIZNEXT0x3024&ID_WIZFINISH0x3025'AFX_IDC_TAB_CONTROL0x3020(AFX_IDD_NEWTYPEDLG30721;AFX_IDD_PRINTDLG30722<AFX_IDD_PREVIEW_TOOLBAR30723=AFX_IDD_INSERTOBJECT30724@AFX_IDD_CHANGEICON30725AAFX_IDD_CONVERT30726BAFX_IDD_PASTESPECIAL30727CAFX_IDD_EDITLINKS30728DAFX_IDD_FILEBROWSE30729EAFX_IDD_BUSY30730FAFX_IDD_OBJECTPROPERTIES30732HAFX_IDD_CHANGESOURCE30733IAFX_IDC_CONTEXTHELP30977MAFX_IDC_MAGNIFY30978NAFX_IDC_SMALLARROWS30979OAFX_IDC_HSPLITBAR30980PAFX_IDC_VSPLITBAR30981QAFX_IDC_NODROPCRSR30982RAFX_IDC_TRACKNWSE30983SAFX_IDC_TRACKNESW30984TAFX_IDC_TRACKNS30985UAFX_IDC_TRACKWE30986VAFX_IDC_TRACK4WAY30987WAFX_IDC_MOVE4WAY30988XAFX_IDB_MINIFRAME_MENU30994[AFX_IDB_CHECKLISTBOX_NT30995^AFX_IDB_CHECKLISTBOX_9530996_AFX_IDR_PREVIEW_ACCEL30997bAFX_IDI_STD_MDIFRAME31233eAFX_IDI_STD_FRAME31234fAFX_IDC_FONTPROP1000lAFX_IDC_FONTNAMES1001mAFX_IDC_FONTSTYLES1002nAFX_IDC_FONTSIZES1003oAFX_IDC_STRIKEOUT1004pAFX_IDC_UNDERLINE1005qAFX_IDC_SAMPLEBOX1006rAFX_IDC_COLOR_BLACK1100uAFX_IDC_COLOR_WHITE1101vAFX_IDC_COLOR_RED1102wAFX_IDC_COLOR_GREEN1103xAFX_IDC_COLOR_BLUE1104yAFX_IDC_COLOR_YELLOW1105zAFX_IDC_COLOR_MAGENTA1106{AFX_IDC_COLOR_CYAN1107|AFX_IDC_COLOR_GRAY1108}AFX_IDC_COLOR_LIGHTGRAY1109~AFX_IDC_COLOR_DARKRED1110AFX_IDC_COLOR_DARKGREEN1111AFX_IDC_COLOR_DARKBLUE1112AFX_IDC_COLOR_LIGHTBROWN1113AFX_IDC_COLOR_DARKMAGENTA1114AFX_IDC_COLOR_DARKCYAN1115AFX_IDC_COLORPROP1116AFX_IDC_SYSTEMCOLORS1117AFX_IDC_PROPNAME1201AFX_IDC_PICTURE1202AFX_IDC_BROWSE1203AFX_IDC_CLEAR1204AFX_IDD_PROPPAGE_COLOR32257AFX_IDD_PROPPAGE_FONT32258AFX_IDD_PROPPAGE_PICTURE32259AFX_IDB_TRUETYPE32384AFX_IDS_PROPPAGE_UNKNOWN0xFE01AFX_IDS_COLOR_DESKTOP0xFE04AFX_IDS_COLOR_APPWORKSPACE0xFE05AFX_IDS_COLOR_WNDBACKGND0xFE06AFX_IDS_COLOR_WNDTEXT0xFE07AFX_IDS_COLOR_MENUBAR0xFE08AFX_IDS_COLOR_MENUTEXT0xFE09AFX_IDS_COLOR_ACTIVEBAR0xFE0AAFX_IDS_COLOR_INACTIVEBAR0xFE0BAFX_IDS_COLOR_ACTIVETEXT0xFE0CAFX_IDS_COLOR_INACTIVETEXT0xFE0DAFX_IDS_COLOR_ACTIVEBORDER0xFE0EAFX_IDS_COLOR_INACTIVEBORDER0xFE0FAFX_IDS_COLOR_WNDFRAME0xFE10AFX_IDS_COLOR_SCROLLBARS0xFE11AFX_IDS_COLOR_BTNFACE0xFE12AFX_IDS_COLOR_BTNSHADOW0xFE13AFX_IDS_COLOR_BTNTEXT0xFE14AFX_IDS_COLOR_BTNHIGHLIGHT0xFE15AFX_IDS_COLOR_DISABLEDTEXT0xFE16AFX_IDS_COLOR_HIGHLIGHT0xFE17AFX_IDS_COLOR_HIGHLIGHTTEXT0xFE18AFX_IDS_REGULAR0xFE19AFX_IDS_BOLD0xFE1AAFX_IDS_ITALIC0xFE1BAFX_IDS_BOLDITALIC0xFE1CAFX_IDS_SAMPLETEXT0xFE1DAFX_IDS_DISPLAYSTRING_FONT0xFE1EAFX_IDS_DISPLAYSTRING_COLOR0xFE1FAFX_IDS_DISPLAYSTRING_PICTURE0xFE20AFX_IDS_PICTUREFILTER0xFE21AFX_IDS_PICTYPE_UNKNOWN0xFE22AFX_IDS_PICTYPE_NONE0xFE23AFX_IDS_PICTYPE_BITMAP0xFE24AFX_IDS_PICTYPE_METAFILE0xFE25AFX_IDS_PICTYPE_ICON0xFE26AFX_IDS_COLOR_PPG0xFE28AFX_IDS_COLOR_PPG_CAPTION0xFE29AFX_IDS_FONT_PPG0xFE2AAFX_IDS_FONT_PPG_CAPTION0xFE2BAFX_IDS_PICTURE_PPG0xFE2CAFX_IDS_PICTURE_PPG_CAPTION0xFE2DAFX_IDS_PICTUREBROWSETITLE0xFE30AFX_IDS_BORDERSTYLE_00xFE31AFX_IDS_BORDERSTYLE_10xFE32AFX_IDS_VERB_EDIT0xFE40AFX_IDS_VERB_PROPERTIES0xFE41AFX_IDP_PICTURECANTOPEN0xFE83AFX_IDP_PICTURECANTLOAD0xFE84AFX_IDP_PICTURETOOLARGE0xFE85AFX_IDP_PICTUREREADFAILED0xFE86AFX_IDP_E_ILLEGALFUNCTIONCALL0xFEA0AFX_IDP_E_OVERFLOW0xFEA1AFX_IDP_E_OUTOFMEMORY0xFEA2AFX_IDP_E_DIVISIONBYZERO0xFEA3AFX_IDP_E_OUTOFSTRINGSPACE0xFEA4AFX_IDP_E_OUTOFSTACKSPACE0xFEA5AFX_IDP_E_BADFILENAMEORNUMBER0xFEA6AFX_IDP_E_FILENOTFOUND0xFEA7AFX_IDP_E_BADFILEMODE0xFEA8AFX_IDP_E_FILEALREADYOPEN0xFEA9AFX_IDP_E_DEVICEIOERROR0xFEAAAFX_IDP_E_FILEALREADYEXISTS0xFEABAFX_IDP_E_BADRECORDLENGTH0xFEACAFX_IDP_E_DISKFULL0xFEADAFX_IDP_E_BADRECORDNUMBER0xFEAEAFX_IDP_E_BADFILENAME0xFEAFAFX_IDP_E_TOOMANYFILES0xFEB0AFX_IDP_E_DEVICEUNAVAILABLE0xFEB1AFX_IDP_E_PERMISSIONDENIED0xFEB2AFX_IDP_E_DISKNOTREADY0xFEB3AFX_IDP_E_PATHFILEACCESSERROR0xFEB4AFX_IDP_E_PATHNOTFOUND0xFEB5AFX_IDP_E_INVALIDPATTERNSTRING0xFEB6AFX_IDP_E_INVALIDUSEOFNULL0xFEB7AFX_IDP_E_INVALIDFILEFORMAT0xFEB8AFX_IDP_E_INVALIDPROPERTYVALUE0xFEB9AFX_IDP_E_INVALIDPROPERTYARRAYINDEX0xFEBAAFX_IDP_E_SETNOTSUPPORTEDATRUNTIME0xFEBBAFX_IDP_E_SETNOTSUPPORTED0xFEBCAFX_IDP_E_NEEDPROPERTYARRAYINDEX0xFEBDAFX_IDP_E_SETNOTPERMITTED0xFEBEAFX_IDP_E_GETNOTSUPPORTEDATRUNTIME0xFEBFAFX_IDP_E_GETNOTSUPPORTED0xFEC0AFX_IDP_E_PROPERTYNOTFOUND0xFEC1AFX_IDP_E_INVALIDCLIPBOARDFORMAT0xFEC2AFX_IDP_E_INVALIDPICTURE0xFEC3AFX_IDP_E_PRINTERERROR0xFEC4AFX_IDP_E_CANTSAVEFILETOTEMP0xFEC5AFX_IDP_E_SEARCHTEXTNOTFOUND0xFEC6AFX_IDP_E_REPLACEMENTSTOOLONG0xFEC7!!$HWB0  D:\Carlos\fenix075b-full-release\FPG\resource.h C:\Archivos de programa\Microsoft Visual Studio\VC98\MFC\INCLUDE/afxres.h C:\Archivos de programa\Microsoft Visual Studio\VC98\MFC\INCLUDE/winres.he fpg.ico$HWB0 14101IDI_ICON1D:\Carlos\fenix075b-full-release\FPG\FPG.rc$TEXTINCLUDE1$TEXTINCLUDE2$TEXTINCLUDE3$$l$HWB0 0DHWB 0 \ e0 TEXTINCLUDE0  TEXTINCLUDE0 0TEXTINCLUDE0 <XHWB0 JHWB0 LHWB0 Fenix/fxc/0000755000000000000000000000000010631334454011410 5ustar rootrootFenix/fxc/Makefile.in0000644000000000000000000003035010607526710013457 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_CFLAGS = @COMMON_CFLAGS@ COMMON_LIBS = @COMMON_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DO_FPG = @DO_FPG@ DO_FPG_FALSE = @DO_FPG_FALSE@ DO_FPG_TRUE = @DO_FPG_TRUE@ DO_FXC = @DO_FXC@ DO_FXC_FALSE = @DO_FXC_FALSE@ DO_FXC_TRUE = @DO_FXC_TRUE@ DO_FXI = @DO_FXI@ DO_FXI_FALSE = @DO_FXI_FALSE@ DO_FXI_TRUE = @DO_FXI_TRUE@ DO_MAP = @DO_MAP@ DO_MAP_FALSE = @DO_MAP_FALSE@ DO_MAP_TRUE = @DO_MAP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ HAVE_WINDRES_FALSE = @HAVE_WINDRES_FALSE@ HAVE_WINDRES_TRUE = @HAVE_WINDRES_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_WINDRES = @ac_ct_WINDRES@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ SUBDIRS = src subdir = fxc mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive DIST_COMMON = Makefile.am Makefile.in DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu fxc/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (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): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ clean-generic clean-recursive ctags ctags-recursive distclean \ distclean-generic distclean-recursive distclean-tags distdir \ dvi dvi-am dvi-recursive info info-am info-recursive install \ install-am install-data install-data-am install-data-recursive \ install-exec install-exec-am install-exec-recursive \ install-info install-info-am install-info-recursive install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \ ps-recursive tags tags-recursive uninstall uninstall-am \ uninstall-info-am uninstall-info-recursive uninstall-recursive # 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: Fenix/fxc/CVS/0000755000000000000000000000000010607744626012054 5ustar rootrootFenix/fxc/CVS/Repository0000644000000000000000000000001210601620476014135 0ustar rootrootFenix/fxc Fenix/fxc/CVS/Root0000644000000000000000000000007410601620476012711 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/fxc/CVS/Entries0000644000000000000000000000055410607744626013414 0ustar rootrootD/inc//// D/res//// D/src//// /FXC.dep/1.2/Thu Apr 12 22:08:05 2007// /FXC.dsp/1.2/Thu Apr 12 22:08:05 2007// /FXC.mak/1.2/Thu Apr 12 22:08:05 2007// /FXC.plg/1.2/Thu Apr 12 22:08:06 2007// /FXC.proj/1.3/Thu Apr 12 22:08:06 2007/-kb/ /Makefile.am/1.1/Thu Apr 12 22:08:08 2007// /Makefile.in/1.5/Thu Apr 12 22:08:08 2007// /Makefile/1.28/Fri Apr 13 18:19:03 2007// Fenix/fxc/src/0000755000000000000000000000000010631334454012177 5ustar rootrootFenix/fxc/src/identifier.c0000644000000000000000000001203110607526724014470 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #ifdef TARGET_BEOS #include #else #include #endif #include "token.h" #include "identifiers.h" #include "compiler.h" /* ---------------------------------------------------------------------- */ /* Gestor de identificadores */ /* ---------------------------------------------------------------------- */ static identifier * identifier_hash[64] ; static int identifier_code = 1 ; int identifier_count = 0 ; int identifier_hash_value (const char * string) { int t = 0 ; const char * ptr = string ; /* while (*ptr) t = (t << 1) | *ptr++ ; */ while (*ptr) t = (t << 3) | ( (*ptr++) & 0x07 ) ; /* Mejor dispersion en el hashing */ return (t & 63) ; } identifier * identifier_first() { int n ; for (n = 0 ; n < 64 ; n++) { if (identifier_hash[n]) return identifier_hash[n] ; } return 0 ; } identifier * identifier_next (identifier * id) { int n ; if (id->next) return id->next ; n = identifier_hash_value (id->name) ; for (n++ ; n < 64 ; n++) { if (identifier_hash[n]) return identifier_hash[n] ; } return 0 ; } void identifier_init () { int i ; for (i = 0 ; i < 64 ; i++) identifier_hash[i] = 0 ; identifier_count = 0 ; identifier_code = 1 ; } void identifier_dump () { int i, ii ; identifier * ptr ; printf ("---- %d identifiers ----\n", identifier_count) ; for (i = 0 ; i < 64 ; i++) { ptr = identifier_hash[i] ; ii = 0; while (ptr) { ii++; printf ("%4d: %-32s [%04d] [%3d]\n", ptr->code, ptr->name, i, ii) ; ptr = ptr->next ; } } } int identifier_add_as (const char * string, int code) { int hash = identifier_hash_value(string) ; identifier * w = (identifier *)malloc(sizeof(identifier)) ; if (!w) { fprintf (stdout, "identifier_add: sin memoria\n") ; exit(1); } w->name = strdup(string) ; if (!w->name) { fprintf (stdout, "identifier_add: sin memoria\n") ; exit(1); } w->line = line_count ; // Save First appearance w->f = current_file ; // Save File info w->code = code ; w->next = identifier_hash[hash] ; identifier_hash[hash] = w ; identifier_count++ ; return 1 ; } int identifier_add (const char * string) { int code = identifier_code++ ; if (!identifier_add_as (string, code)) return 0 ; return code ; } int identifier_search (const char * string) { int hash = identifier_hash_value (string) ; identifier * ptr = identifier_hash[hash] ; while (ptr) { assert (ptr->name) ; if (ptr->name[0] == *string) { if (strcmp (string, ptr->name) == 0) break ; } ptr = ptr->next ; } return ptr ? ptr->code : 0 ; } // Return line for the identifier int identifier_line (int code) { int i ; identifier * ptr ; for (i = 0 ; i < 64 ; i++) { ptr = identifier_hash[i] ; while (ptr) { if (ptr->code == code) { return ptr->line ; } ptr = ptr->next ; } } return 0 ; } // Return file for the identifier int identifier_file (int code) { int i ; identifier * ptr ; for (i = 0 ; i < 64 ; i++) { ptr = identifier_hash[i] ; while (ptr) { if (ptr->code == code) { return ptr->f ; } ptr = ptr->next ; } } return 0 ; } const char * identifier_name (int code) { int i ; identifier * ptr ; for (i = 0 ; i < 64 ; i++) { ptr = identifier_hash[i] ; while (ptr) { if (ptr->code == code) { return ptr->name ; } ptr = ptr->next ; } } return 0 ; } int identifier_search_or_add (const char * string) { int result ; result = identifier_search (string) ; return result ? result : identifier_add (string) ; } int identifier_next_code () { return identifier_code ; } int identifier_is_basic_type (int id) { return ( id == identifier_int || id == identifier_short || id == identifier_char || id == identifier_dword || id == identifier_word || id == identifier_byte || id == identifier_signed || id == identifier_unsigned || id == identifier_float || id == identifier_string ); } int identifier_is_type (int id) { return identifier_is_basic_type(id) || segment_by_name(id) != NULL; } Fenix/fxc/src/c_code.c0000644000000000000000000034677210607526716013611 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifdef TARGET_BEOS #include #else #include #endif #include #include #include #include "fxc.h" #include "messages.c" extern int compile_fixed_expresion (); /* Static utility function for compile_bestproc */ static void strdelchars (char * str, char * chars); int reduce_arrays = 1; /* ---------------------------------------------------------------------- */ /* Compilador de expresiones y sentencias. En este mdulo estn todas las */ /* funciones de compilado que generan cdigo efectivo. */ /* ---------------------------------------------------------------------- */ PROCDEF * proc ; CODEBLOCK * code ; /* Comprueba que los parmetros de una expresin binaria sean datos * numricos. Devuelve el tipo de operacin (MN_FLOAT o MN_DWORD) */ static int check_integer_type (expresion_result *exp) { if (typedef_is_pointer(exp->type)) { codeblock_add (code, MN_POINTER2BOL, 0) ; exp->type = typedef_new(TYPE_DWORD) ; } if (typedef_is_integer(exp->type)) { if (typedef_base(exp->type) == TYPE_BYTE) return MN_BYTE ; if (typedef_base(exp->type) == TYPE_WORD) return MN_WORD ; return MN_DWORD ; } compile_error (MSG_INTEGER_REQUIRED) ; return 0; } static int check_integer_types (expresion_result *left, expresion_result *right) { if (typedef_is_pointer(left->type)) { codeblock_add (code, MN_POINTER2BOL, 1) ; left->type = typedef_new(TYPE_DWORD) ; } if (typedef_is_pointer(right->type)) { codeblock_add (code, MN_POINTER2BOL, 0) ; right->type = typedef_new(TYPE_DWORD) ; } if (typedef_is_integer(left->type)) { if (typedef_is_integer(right->type)) { if (typedef_base(left->type) == typedef_base(right->type)) { if (typedef_base(left->type) == TYPE_BYTE) return MN_BYTE ; if (typedef_base(left->type) == TYPE_WORD) return MN_WORD ; } return MN_DWORD ; } } compile_error (MSG_INTEGER_REQUIRED) ; return 0; } static int check_numeric_types (expresion_result *left, expresion_result *right) { if (typedef_base(left->type) == TYPE_FLOAT) { if (typedef_base(right->type) == TYPE_FLOAT) return MN_FLOAT ; if (typedef_is_integer(right->type)) { codeblock_add (code, MN_INT2FLOAT | mntype(right->type, 0), 0) ; right->fvalue = (float)right->value ; return MN_FLOAT ; } } if (typedef_is_integer(left->type)) { if (typedef_is_integer(right->type)) { if (typedef_base(left->type) == typedef_base(right->type)) return mntype(left->type, 0); if (typedef_base(left->type) < typedef_base(right->type)) return mntype(left->type, 0) ; return mntype(right->type, 0) ; } if (typedef_base(right->type) == TYPE_FLOAT) { codeblock_add (code, MN_INT2FLOAT, 1) ; left->fvalue = (float)left->value ; return MN_FLOAT ; } } if (left->type.chunk[0].type == TYPE_CHAR || right->type.chunk[0].type == TYPE_CHAR) { if (typedef_base(right->type) == TYPE_STRING) { codeblock_add (code, MN_STR2CHR, 0); if (right->constant == 1) right->value = (unsigned char)*(string_get(right->value)); right->type = typedef_new(TYPE_CHAR); return MN_BYTE; } if (typedef_base(left->type) == TYPE_STRING) { codeblock_add (code, MN_STR2CHR, 1); if (left->constant == 1) left->value = (unsigned char)*(string_get(left->value)); left->type = typedef_new(TYPE_CHAR); return MN_BYTE; } if (typedef_is_integer(right->type) || typedef_is_integer(right->type)) return MN_BYTE; if (left->type.chunk[0].type == TYPE_CHAR && right->type.chunk[0].type == TYPE_CHAR) return MN_BYTE; } compile_error (MSG_INCOMP_TYPES) ; return 0 ; } /* Comprueba que los parmetros de una expresin binaria sean cadenas * o datos numricos. Devuelve MN_STRING o el tipo de dato numrico */ static int check_numeric_or_string_types (expresion_result * left, expresion_result * right) { if (typedef_is_array(left->type) && left->type.chunk[1].type == TYPE_CHAR && typedef_is_string(right->type)) { left->type = typedef_new(TYPE_STRING); left->lvalue = 0; codeblock_add (code, MN_A2STR, 1) ; return MN_STRING; } if (typedef_is_array(right->type) && right->type.chunk[1].type == TYPE_CHAR && typedef_is_string(left->type)) { right->type = typedef_new(TYPE_STRING); right->lvalue = 0; codeblock_add (code, MN_A2STR, 0) ; return MN_STRING; } if (typedef_is_array(right->type) && right->type.chunk[1].type == TYPE_CHAR && typedef_is_array(left->type) && left->type.chunk[1].type == TYPE_CHAR) { left->type = typedef_new(TYPE_STRING); right->type = typedef_new(TYPE_STRING); left->lvalue = 0; right->lvalue = 0; codeblock_add (code, MN_A2STR, 0) ; codeblock_add (code, MN_A2STR, 1) ; return MN_STRING; } if (typedef_is_string(left->type) && typedef_is_string(right->type)) return MN_STRING ; if (typedef_is_string(left->type) || typedef_is_string(right->type)) compile_error (MSG_INCOMP_TYPES) ; return check_numeric_types (left, right) ; } /* Devuelve el cdigo que hay que adjuntar a un mnemnico para producir * una variante del mismo, adecuada al tipo de dato concreto */ int mntype(TYPEDEF type, int accept_structs) { BASETYPE t ; while (typedef_is_array(type)) type = typedef_reduce(type) ; t = typedef_base(type) ; if (t == TYPE_DWORD) return MN_DWORD | MN_UNSIGNED; if (t == TYPE_INT) return MN_DWORD; if (t == TYPE_WORD) return MN_WORD | MN_UNSIGNED; if (t == TYPE_SHORT) return MN_WORD ; if (t == TYPE_BYTE) return MN_BYTE | MN_UNSIGNED; if (t == TYPE_SBYTE) return MN_BYTE ; if (t == TYPE_CHAR) return MN_BYTE ; if (t == TYPE_FLOAT) return MN_FLOAT ; if (t == TYPE_STRING) return MN_STRING; if (t == TYPE_POINTER) return MN_DWORD ; if (t == TYPE_STRUCT && accept_structs) return 0; compile_error (MSG_INCOMP_TYPE) ; return 0; } /* Compila el tamao de una VARIABLE o estructura local, global o privada Se agrega local al proceso, (Splinter) */ int compile_sizeof (VARSPACE * here) { VARIABLE * var = NULL ; expresion_result ind ; int offset, sub = 0, base = 0 ; TYPEDEF type, * usertype ; token_next() ; if (token.type == IDENTIFIER && (token.code == identifier_unsigned || token.code == identifier_signed)) { /* "UNSIGNED" or "SIGNED" */ token_next(); } if (token.type != IDENTIFIER) { compile_error (MSG_INCOMP_TYPE) ; } /* Base datatypes */ if (token.code == identifier_pointer || token.code == identifier_multiply) base = 4 ; else if (token.code == identifier_dword) base = 4 ; else if (token.code == identifier_int) base = 4 ; else if (token.code == identifier_string) base = 4 ; else if (token.code == identifier_float) base = 4 ; else if (token.code == identifier_short) base = 2 ; else if (token.code == identifier_word) base = 2 ; else if (token.code == identifier_char) base = 1 ; else if (token.code == identifier_byte) base = 1 ; else { usertype = typedef_by_name(token.code) ; if (usertype) base = typedef_size(*usertype) ; } if (base) { for (;;) { token_next() ; if (token.type == IDENTIFIER && (token.code == identifier_pointer || token.code == identifier_multiply)) /* "POINTER" */ { base = 4 ; continue ; } token_back() ; break ; } return base ; } if (!here) { // Splinter, se agrega localidad... here = proc->privars ; var = varspace_search (here, token.code) ; if (!var) { here = proc->pubvars ; var = varspace_search (here, token.code) ; } if (!var) { here = &local ; var = varspace_search (here, token.code) ; } if (!var) { here = &global ; var = varspace_search (here, token.code) ; } } else { var = varspace_search (here, token.code) ; } if (!var) compile_error (MSG_UNKNOWN_IDENTIFIER) ; token_next() ; /* Indexado de punteros ptr[0] */ if (token.type == IDENTIFIER && token.code == identifier_leftb && typedef_is_pointer(var->type)) { /* "[" */ CODEBLOCK_POS p = codeblock_pos(code); offset = code->current ; ind = compile_subexpresion() ; if (!typedef_is_integer(ind.type)) { compile_error (MSG_INTEGER_REQUIRED) ; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightb) { /* "]" */ compile_error (MSG_EXPECTED, "]") ; } codeblock_setpos(code, p); return typedef_size(typedef_reduce(var->type)) ; } /* Indexado de cadenas */ if (token.type == IDENTIFIER && token.code == identifier_leftb && typedef_is_string(var->type)) { /* "[" */ CODEBLOCK_POS p = codeblock_pos(code); ind = compile_subexpresion() ; if (!typedef_is_integer(ind.type)) { compile_error (MSG_INTEGER_REQUIRED) ; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightb) { /* "]" */ compile_error (MSG_EXPECTED, "]") ; } codeblock_setpos(code, p); return 1 ; } /* Indexado de arrays */ type = var->type ; while (token.type == IDENTIFIER && token.code == identifier_leftb) /* "[" */ { if (typedef_is_struct(type) && typedef_count(type) == 1) { compile_error (MSG_NOT_AN_ARRAY) ; } if (!typedef_is_struct(type) && !typedef_is_array (type)) { compile_error (MSG_NOT_AN_ARRAY) ; } if (code) { CODEBLOCK_POS p = codeblock_pos(code); ind = compile_expresion (0,0,TYPE_DWORD) ; codeblock_setpos(code, p); } else { ind = compile_expresion (0,0,TYPE_DWORD) ; } if (ind.constant && (ind.value < 0 || ind.value >= typedef_count(type))) { compile_error (MSG_BOUND) ; } type = typedef_reduce(type) ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightb) { /* "]" */ compile_error (MSG_EXPECTED, "]") ; } sub = 1 ; token_next() ; } if (token.type == IDENTIFIER && token.code == identifier_point) { /* "." */ if (typedef_is_struct(type) || typedef_base(type) == TYPE_DWORD || typedef_base(type) == TYPE_INT) { return compile_sizeof (typedef_members(type)) ; } return compile_sizeof (&local) ; } token_back() ; return typedef_size (type) ; } /* Compila el acceso a una VARIABLE global, local, privada o publica */ expresion_result compile_sublvalue (VARSPACE * from, int base_offset, VARSPACE * remote) { VARIABLE * var = NULL ; VARSPACE * here = from ; VARSPACE * privars = proc ? proc->privars : 0 ; VARSPACE * pubvars = proc ? proc->pubvars : 0 ; expresion_result res, ind ; if (here) token_next() ; if (token.type != IDENTIFIER) { compile_error (MSG_IDENTIFIER_EXP) ; } if (!here && !remote) { // Splinter, se agrega localidad... if (proc) { here = privars ; var = varspace_search (here, token.code) ; if (!var) { here = pubvars ; var = varspace_search (here, token.code) ; } } if (!var) { here = &local ; var = varspace_search (here, token.code) ; } if (!var) { here = &global ; var = varspace_search (here, token.code) ; } } else { if (remote) { here = remote ; var = varspace_search (here, token.code) ; } if (!var) { here = from; var = varspace_search (here, token.code) ; } } if (!var) compile_error (MSG_UNKNOWN_IDENTIFIER) ; if (var->offset - base_offset != 0 || here == &global || here == &local || (here == privars && privars) || (here == pubvars && pubvars) || (remote && here == remote) ) { codeblock_add (code, ( (remote && here == remote) ? MN_REMOTE_PUBLIC : here == &global ? MN_GLOBAL : (here == &local && from == here) ? MN_REMOTE : here == &local ? MN_LOCAL : (here == privars && privars) ? MN_PRIVATE : (here == pubvars && pubvars) ? MN_PUBLIC : MN_INDEX ) | mntype(var->type, 1), var->offset - base_offset ) ; if ((here == pubvars && pubvars)||(remote && here == remote)){ /* Tambien las locales remotas ? */ proc->flags |= PROC_USES_PUBLICS; } if (here == &local) { proc->flags |= PROC_USES_LOCALS; } } token_next() ; res.type = var->type ; res.lvalue = 1 ; res.asignation = 0 ; res.constant = 0 ; res.call = 0 ; res.value = 0 ; /* Indexado va [...] */ while (token.type == IDENTIFIER && token.code == identifier_leftb) /* "[" */ { /* De estructuras o arrays */ if (typedef_is_struct(res.type) && typedef_count(res.type) == 1) compile_error (MSG_NOT_AN_ARRAY) ; /* Cadenas y punteros se indexan en otro nivel */ if (typedef_is_pointer(res.type) || typedef_is_string(res.type)) { break ; } if (!typedef_is_struct(res.type) && !typedef_is_array (res.type)) { compile_error (MSG_NOT_AN_ARRAY) ; } ind = compile_expresion (0,0,TYPE_DWORD) ; if (ind.lvalue) { codeblock_add (code, MN_PTR | mntype(ind.type, 0), 0) ; } if (ind.constant && (ind.value < 0 || ind.value >= typedef_count(res.type))) { compile_error (MSG_BOUND) ; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightb) { /* "]" */ compile_error (MSG_EXPECTED, "]") ; } if (typedef_is_array(res.type)) { res.type = typedef_reduce(res.type) ; codeblock_add (code, MN_ARRAY, typedef_size(res.type)) ; } else /* estructura */ { codeblock_add (code, MN_ARRAY, typedef_size(res.type) / typedef_count(res.type)) ; } token_next() ; } /* Un acceso a un array es un acceso a su primer elemento */ res.count=1; if (typedef_is_array(res.type) && reduce_arrays == 1) { if (res.type.chunk[1].type != TYPE_CHAR) { while (typedef_is_array(res.type)) { res.count *= (typedef_count(res.type) ? typedef_count(res.type) : 1); res.type = typedef_reduce(res.type) ; } } } token_back() ; return res ; } /* * FUNCTION : compile_bestproc * * Compile a system call, given a list of system functions * with the same name * * PARAMS: * procs List of system functions * * RETURN VALUE: * Identifier code allocated for the function */ SYSPROC * compile_bestproc (SYSPROC ** procs) { int n, proc_count = 0 ; expresion_result res ; int count = 0 ; char validtypes[32] ; char type = -1 ; int min_params = 0 ; const char * proc_name = procs[0]->name ; while (procs[proc_count]) proc_count++ ; /* Get the minimum number of parameters */ for (n = 0 ; n < proc_count ; n++) if (procs[n]->params > min_params) min_params = procs[n]->params ; for (;;) { token_next() ; if (token.type == IDENTIFIER && token.code == identifier_rightp) /* ")" */ { token_back() ; break ; } token_back() ; count++ ; /* Eliminate any process that has not as many parameters */ for (n = 0 ; n < proc_count ; n++) { if (procs[n]->params < count) { memmove (&procs[n], &procs[n+1], sizeof(SYSPROC*) * (proc_count-n)) ; proc_count-- ; n-- ; } } if (proc_count == 0) { compile_error (MSG_INCORRECT_PARAMC, proc_name, min_params) ; } /* Find all the available types */ validtypes[0] = 0 ; for (n = 0 ; n < proc_count ; n++) { if (!strchr(validtypes, procs[n]->paramtypes[count-1])) { validtypes[strlen(validtypes)+1] = 0 ; validtypes[strlen(validtypes)] = procs[n]->paramtypes[count-1]; } } if (strlen(validtypes) == 1) { /* Same type for any function variant */ if (validtypes[0] == 'V') { /* Function will receive a varspace struct */ reduce_arrays = 0; res = compile_expresion (0, 1, 0); reduce_arrays = 1; while (typedef_is_pointer(res.type)) { codeblock_add (code, MN_PTR, 0); res.type = typedef_reduce(res.type); } if (typedef_is_struct(res.type)) { int size = res.type.varspace->count * sizeof(DCB_TYPEDEF); int nvar; segment_alloc (globaldata, size); codeblock_add (code, MN_GLOBAL, globaldata->current) ; for (nvar = 0 ; nvar < res.type.varspace->count ; nvar++) { DCB_TYPEDEF type; dcb_settype (&type, &res.type.varspace->vars[nvar].type); memcpy ((Uint8*)globaldata->bytes + globaldata->current, &type, sizeof(DCB_TYPEDEF)); globaldata->current += sizeof(DCB_TYPEDEF); } codeblock_add (code, MN_PUSH | MN_DWORD, res.type.varspace->count); count += 2; } else { DCB_TYPEDEF type; dcb_settype (&type, &res.type); segment_alloc (globaldata, sizeof(TYPEDEF)); codeblock_add (code, MN_GLOBAL, globaldata->current) ; memcpy ((Uint8*)globaldata->bytes + globaldata->current, &type, sizeof(DCB_TYPEDEF)); globaldata->current += sizeof(DCB_TYPEDEF); codeblock_add (code, MN_PUSH | MN_DWORD, 1); count += 2; } } else { switch (validtypes[0]) { case 'I': type = TYPE_DWORD ; break ; case 'B': type = TYPE_BYTE ; break ; case 'W': type = TYPE_WORD ; break ; case 'S': type = TYPE_STRING ; break ; case 'P': type = TYPE_POINTER ; break ; case 'F': type = TYPE_FLOAT ; break ; default: compile_error (MSG_INVALID_PARAMT) ; } res = compile_expresion(0,0,type) ; if (res.lvalue) codeblock_add (code, mntype(res.type, 0) | MN_PTR, 0) ; } } else { /* Different types availables */ res = compile_expresion(0,0,TYPE_UNDEFINED) ; if (res.lvalue) codeblock_add (code, mntype(res.type, 0) | MN_PTR, 0) ; /* Eliminate any incompatible data type, but allow some * conversions if no exact match is available */ switch (typedef_base(res.type)) { case TYPE_DWORD: case TYPE_SHORT: case TYPE_BYTE: case TYPE_SBYTE: case TYPE_WORD: case TYPE_INT: strdelchars (validtypes, "SFP") ; break ; case TYPE_FLOAT: if (strchr (validtypes, 'F')) strdelchars (validtypes, "SPIWB") ; else strdelchars (validtypes, "SP") ; break ; case TYPE_STRING: if (strchr (validtypes, 'S')) strdelchars (validtypes, "FPIWB") ; else strdelchars (validtypes, "P") ; break ; default: break ; } if (strlen(validtypes) != 1) compile_error (MSG_INVALID_PARAMT) ; /* Eliminate all functions that are not selected */ for (n = 0 ; n < proc_count ; n++) { if (procs[n]->paramtypes[count-1] != validtypes[0]) { memmove (&procs[n], &procs[n+1], sizeof(SYSPROC*) * (proc_count-n)) ; proc_count-- ; n-- ; } } /* Convert the result to the appropiate type, if needed */ switch (validtypes[0]) { case 'I': type = TYPE_DWORD ; break ; case 'B': type = TYPE_BYTE ; break ; case 'W': type = TYPE_WORD ; break ; case 'S': type = TYPE_STRING ; break ; case 'P': type = TYPE_POINTER ; break ; case 'F': type = TYPE_FLOAT ; break ; default: compile_error (MSG_INVALID_PARAMT) ; } res = convert_result_type (res, type) ; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_comma) /* "," */ { token_back() ; break ; } } /* Eliminate any process that has too many parameters */ for (n = 0 ; n < proc_count ; n++) { if (procs[n]->params != count) { memmove (&procs[n], &procs[n+1], sizeof(SYSPROC*) * (proc_count-n)) ; proc_count-- ; n-- ; } } if (proc_count > 1) compile_error (MSG_MULTIPLE_PROCS_FOUND, proc_name); if (proc_count == 0) compile_error (MSG_INCORRECT_PARAMC, proc_name, min_params) ; codeblock_add (code, MN_SYSCALL, procs[0]->code) ; return procs[0] ; } static void strdelchars (char * str, char * chars) { while (*str) { if (strchr(chars, *str)) strcpy (str, str+1) ; else str++ ; } } /* Compila una lista de parmetros */ int compile_paramlist (BASETYPE * types, const char * paramtypes) { expresion_result res ; int count = 0, type ; for (;;) { type = types ? *types : TYPE_UNDEFINED ; if (paramtypes) { switch (*paramtypes++) { case 'I': type = TYPE_DWORD ; break ; case 'B': type = TYPE_BYTE ; break ; case 'W': type = TYPE_WORD ; break ; case 'S': type = TYPE_STRING ; break ; case 'P': type = TYPE_POINTER ; break ; case 'F': type = TYPE_FLOAT ; break ; default: compile_error (MSG_INVALID_PARAMT) ; } } res = compile_expresion(0,0,type) ; if (types) { if (*types == TYPE_UNDEFINED) *types = typedef_base (res.type) ; types++ ; } if (res.lvalue) codeblock_add (code, mntype(res.type, 0) | MN_PTR, 0) ; count++ ; token_next() ; if (token.type == IDENTIFIER && token.code == identifier_comma) /* "," */ continue ; token_back() ; break ; } return count ; } /* * FUNCTION : compile_cast * * Compiles a cast operator (c-like type conversion: ([type])value) * * PARAMS : * None * * RETURN VALUE : * Returns the expression result * */ expresion_result compile_cast () { TYPEDEF type; BASETYPE basetype = TYPE_INT; int tokens = 0; int signed_prefix = 0; int unsigned_prefix = 0; expresion_result res; token_next(); // Check for signed/unsigned prefix if (token.type == IDENTIFIER) { if (token.code == identifier_signed) { signed_prefix = 1; tokens++; token_next(); } else if (token.code == identifier_unsigned) { unsigned_prefix = 1; tokens++; token_next(); } } // Create the data type definition if (token.type == IDENTIFIER) { if (token.code == identifier_dword) { basetype = signed_prefix ? TYPE_INT : TYPE_DWORD; signed_prefix = unsigned_prefix = 0; tokens++; token_next() ; } else if (token.code == identifier_word) { basetype = signed_prefix ? TYPE_SHORT : TYPE_WORD; signed_prefix = unsigned_prefix = 0; tokens++; token_next() ; } else if (token.code == identifier_byte) { basetype = signed_prefix ? TYPE_SBYTE : TYPE_BYTE; signed_prefix = unsigned_prefix = 0; tokens++; token_next() ; } else if (token.code == identifier_int) { basetype = unsigned_prefix ? TYPE_DWORD : TYPE_INT; signed_prefix = unsigned_prefix = 0; tokens++; token_next() ; } else if (token.code == identifier_short) { basetype = unsigned_prefix ? TYPE_WORD : TYPE_SHORT; signed_prefix = unsigned_prefix = 0; tokens++; token_next() ; } else if (token.code == identifier_char) { basetype = TYPE_CHAR; tokens++; token_next() ; } else if (token.code == identifier_float) { basetype = TYPE_FLOAT ; tokens++; token_next() ; } else if (token.code == identifier_string) { basetype = TYPE_STRING ; tokens++; token_next() ; } } // Don't allow a signed/unsigned prefix in non-integer types if (signed_prefix || unsigned_prefix) { compile_error (MSG_INVALID_TYPE); } // If type is not a basic one: check for user-defined types if (tokens == 0) { TYPEDEF * typep = typedef_by_name(token.code); if (typep == NULL) { type = typedef_new(TYPE_INT); compile_error(MSG_INVALID_TYPE); } else type = *typep; } else type = typedef_new(basetype); // Check for pointers to defined types while (token.type == IDENTIFIER && (token.code == identifier_pointer || token.code == identifier_multiply)) /* "POINTER" */ { type = typedef_pointer(type); tokens++; token_next() ; } // Check for the right parent if (token.type != IDENTIFIER || token.code != identifier_rightp) /* ")" */ compile_error(MSG_EXPECTED, ")"); // Do the cast res = compile_value(); if (typedef_is_equal(res.type, type)) return res; if (typedef_is_pointer(type)) { // Conversion of pointer to pointer of another type if (typedef_is_pointer(res.type)) { res.type = type; return res; } compile_error(MSG_PTR_CONVERSION); } else if (typedef_is_float(type)) { // Conversion of integer to float if (typedef_is_integer(res.type)) { if (res.lvalue) { codeblock_add (code, MN_PTR, 0); res.lvalue = 0; } codeblock_add (code, MN_INT2FLOAT, 0); res.type = type; } else compile_error(MSG_CONVERSION); } else if (type.chunk[0].type == TYPE_CHAR) { if (typedef_is_string(res.type)) { if (res.lvalue) { codeblock_add (code, MN_PTR | MN_STRING, 0); res.lvalue = 0; } codeblock_add (code, MN_STR2INT, 0); res.type = typedef_new(TYPE_INT); } else { compile_error(MSG_CONVERSION); } } else if (typedef_is_integer(type)) { // Conversion of float, string or integer to integer if (typedef_is_float(res.type)) { if (res.lvalue) { codeblock_add (code, MN_PTR | MN_FLOAT, 0); res.lvalue = 0; } codeblock_add (code, MN_FLOAT2INT, 0); res.type = typedef_new(TYPE_INT); } else if (typedef_is_string(res.type)) { if (res.lvalue) { codeblock_add (code, MN_PTR | MN_STRING, 0); res.lvalue = 0; } codeblock_add (code, MN_STR2INT, 0); res.type = typedef_new(TYPE_INT); } else if (typedef_is_array(res.type) && res.type.chunk[1].type == TYPE_CHAR) { codeblock_add (code, MN_A2STR, 0); codeblock_add (code, MN_STR2INT, 0); res.type = typedef_new(TYPE_INT); } else if (typedef_is_integer(res.type)) { if (res.lvalue) { codeblock_add (code, MN_PTR, 0); res.lvalue = 0; } } else { compile_error(MSG_CONVERSION); } if (type.chunk[0].type == TYPE_BYTE && typedef_is_integer(res.type)) { codeblock_add (code, MN_INT2BYTE, 0); res.type = type; } else if (type.chunk[0].type == TYPE_SBYTE && typedef_is_integer(res.type)) { codeblock_add (code, MN_INT2BYTE, 0); res.type = type; } else if (type.chunk[0].type == TYPE_WORD && typedef_is_integer(res.type)) { codeblock_add (code, MN_INT2WORD, 0); res.type = type; } else if (type.chunk[0].type == TYPE_SHORT && typedef_is_integer(res.type)) { codeblock_add (code, MN_INT2WORD, 0); res.type = type; } } else if (typedef_is_string(type)) { // Conversin de puntero, float, entero o cadena de ancho fijo a cadena if (typedef_is_array(res.type) && res.type.chunk[1].type == TYPE_CHAR) { codeblock_add (code, MN_A2STR, 0); res.type = typedef_new(TYPE_STRING); } else if (typedef_is_pointer(res.type)) { if (res.lvalue) { codeblock_add (code, MN_PTR, 0); res.lvalue = 0; } codeblock_add (code, MN_A2STR, 0); res.type = typedef_new(TYPE_STRING); } else if (res.type.chunk[0].type == TYPE_CHAR) { if (res.lvalue) { codeblock_add (code, MN_PTR, 0); res.lvalue = 0; } codeblock_add (code, MN_CHR2STR, 0); res.type = typedef_new(TYPE_STRING); } else if (typedef_is_integer(res.type)) { if (res.lvalue) { codeblock_add (code, MN_PTR, 0); res.lvalue = 0; } codeblock_add (code, MN_INT2STR | mntype(res.type, 0), 0); res.type = typedef_new(TYPE_STRING); } else if (typedef_is_float(res.type)) { if (res.lvalue) { codeblock_add (code, MN_PTR, 0); res.lvalue = 0; } codeblock_add (code, MN_FLOAT2STR, 0); res.type = typedef_new(TYPE_STRING); } else compile_error(MSG_CONVERSION); } else compile_error(MSG_CONVERSION); return res; } /* Compila un valor (elemento ms pequeo del lenguaje) */ expresion_result compile_value () { CONSTANT * c ; SYSPROC * sysproc ; PROCDEF * cproc ; int param_count, id ; expresion_result res ; token_next() ; /* ( ... ) */ // Minima Optimizacion (Splinter) if (token.type == IDENTIFIER ) { if (token.code == identifier_leftp) /* "(" */ { /* Check for cast-type expressions */ token_next(); if (token.type == IDENTIFIER && identifier_is_type(token.code)) { token_back(); return compile_cast(); } token_back(); res = compile_subexpresion() ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) /* ")" */ compile_error (MSG_EXPECTED, ")") ; return res ; } /* TYPE */ if (token.code == identifier_type) /* "TYPE" */ { token_next( ); /* "TYPE mouse" */ if (token.type == IDENTIFIER && token.code == identifier_mouse) /* "MOUSE" */ { codeblock_add (code, MN_PUSH, -1) ; res.value = -1 ; res.lvalue = 0 ; res.constant = 1 ; res.asignation = 0 ; res.call = 0 ; res.type = typedef_new(TYPE_INT) ; return res ; } if (token.type != IDENTIFIER || token.code < reserved_words) compile_error (MSG_PROCESS_NAME_EXP) ; codeblock_add (code, MN_TYPE, token.code) ; res.value = 0 ; res.lvalue = 0 ; res.constant = 0 ; res.asignation = 0 ; res.call = 0 ; res.type = typedef_new(TYPE_INT) ; return res ; } /* OFFSET */ if (token.code == identifier_offset || token.code == identifier_bandoffset) /* "OFFSET" or "&" */ { res = compile_factor() ; /* Para permitir &a.b */ if (!res.lvalue) compile_error (MSG_NOT_AN_LVALUE) ; res.lvalue = 0 ; res.type = typedef_pointer(res.type) ; return res ; } /* POINTER */ if (token.code == identifier_leftb) /* "[" */ { res = compile_subexpresion() ; if (!typedef_is_pointer(res.type)) compile_error (MSG_NOT_A_POINTER) ; if (res.lvalue) codeblock_add (code, MN_PTR, 0) ; res.type = typedef_reduce(res.type) ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightb) /* "]" */ compile_error (MSG_EXPECTED, "]") ; res.lvalue = 1 ; return res ; } if (token.code == identifier_pointer || token.code == identifier_multiply) /* "POINTER" or "*" */ { res = compile_factor() ; /* Para aceptar *ptr++ */ if (!typedef_is_pointer(res.type)) compile_error (MSG_NOT_A_POINTER) ; if (res.lvalue) codeblock_add (code, MN_PTR, 0) ; res.type = typedef_reduce(res.type) ; res.lvalue = 1 ; return res ; } /* SIZEOF */ if (token.code == identifier_sizeof) /* "SIZEOF" */ { token_next() ; if (token.type != IDENTIFIER || token.code != identifier_leftp) /* "(" */ compile_error (MSG_EXPECTED, "(") ; res.value = compile_sizeof(0) ; res.lvalue = 0 ; res.constant = 1 ; res.asignation = 0 ; res.call = 0 ; res.type = typedef_new(TYPE_DWORD) ; codeblock_add (code, MN_PUSH, res.value) ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) /* ")" */ compile_error (MSG_EXPECTED, ")") ; return res ; } } /* Numbers */ if (token.type == NUMBER) { codeblock_add (code, MN_PUSH, token.code) ; res.lvalue = 0 ; res.asignation = 0 ; res.constant = 1 ; res.call = 0 ; res.value = token.code ; res.type = typedef_new(TYPE_INT) ; return res ; } if (token.type == FLOAT) { codeblock_add (code, MN_PUSH | MN_FLOAT, *(int *)&token.value) ; res.lvalue = 0 ; res.asignation = 0 ; res.constant = 1 ; res.call = 0 ; res.fvalue = token.value ; res.type = typedef_new(TYPE_FLOAT) ; return res ; } /* Strings */ if (token.type == STRING) { codeblock_add (code, MN_STRING | MN_PUSH, token.code) ; res.lvalue = 0 ; res.asignation = 0 ; res.constant = 1 ; res.call = 0 ; res.value = token.code ; res.type = typedef_new(TYPE_STRING) ; return res ; } /* Constants */ if (token.type != IDENTIFIER) compile_error (MSG_UNKNOWN_IDENTIFIER) ; c = constants_search (token.code) ; if (c) { if (typedef_is_string(c->type)) codeblock_add (code, MN_PUSH | MN_STRING, c->value) ; else codeblock_add (code, MN_PUSH, c->value) ; res.lvalue = 0 ; res.asignation = 0 ; res.constant = 1 ; res.call = 0 ; res.value = c->value ; res.fvalue = *(float *)&c->value; res.type = c->type ; return res ; } /* Llamada a un procedimiento o funcin del sistema */ id = token.code ; token_next() ; // Minima Optimizacion (Splinter) if (token.type == IDENTIFIER ) { if (token.code == identifier_leftp) /* "(" */ { SYSPROC ** sysproc_list = sysproc_getall(id) ; if (sysproc_list) { sysproc = compile_bestproc (sysproc_list); free (sysproc_list); token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) /* ")" */ compile_error (MSG_EXPECTED, ")") ; res.lvalue = 0 ; res.asignation = 0 ; res.constant = 0 ; res.call = 1 ; res.value = 0 ; res.type = typedef_new(sysproc->type) ; return res ; } /* Llama a un procedimiento del usuario */ cproc = procdef_search (id) ; if (!cproc) cproc = procdef_new (procdef_getid(), id) ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) { /* ")" */ token_back() ; param_count = compile_paramlist (cproc->paramtype, 0) ; token_next() ; } else { param_count = 0 ; } if (token.type != IDENTIFIER || token.code != identifier_rightp) /* ")" */ compile_error (MSG_EXPECTED, ")") ; if (cproc->params == -1) { cproc->params = param_count ; } else if (cproc->params != param_count) { compile_error (MSG_INCORRECT_PARAMC, identifier_name(cproc->identifier), cproc->params ) ; } codeblock_add (code, MN_CALL, id) ; res.lvalue = 0 ; res.asignation = 0 ; res.constant = 0 ; res.call = 1 ; res.value = 0 ; res.type = typedef_new(cproc->type) ; return res ; } } token_back() ; /* Valor asignable */ return compile_sublvalue (0, 0, NULL) ; } expresion_result compile_factor () { expresion_result res, part ; token_next() ; res.lvalue = 0 ; res.call = 0 ; res.constant = 0 ; res.asignation = 0 ; /* "+2" */ if (token.type == IDENTIFIER && token.code == identifier_plus) /* "+" */ { token_next() ; } /* "-2" */ if (token.type == IDENTIFIER && token.code == identifier_minus) /* "-" */ { part = compile_factor() ; if (part.lvalue) codeblock_add (code, mntype(part.type, 0) | MN_PTR, 0) ; codeblock_add (code, mntype(part.type, 0) | MN_NEG, 0) ; res.type = part.type ; if (typedef_is_integer(part.type) || typedef_base(part.type) == TYPE_FLOAT) { res.constant = part.constant ; res.value = -part.value ; res.fvalue = -part.fvalue ; return res ; } compile_error (MSG_NUMBER_REQUIRED) ; } else if (token.type == IDENTIFIER && token.code == identifier_not) /* "NOT" or "!" */ { part = compile_factor() ; if (part.lvalue) codeblock_add (code, mntype(part.type, 0) | MN_PTR, 0) ; if (typedef_is_pointer(part.type)) { codeblock_add (code, mntype(part.type, 0) | MN_POINTER2BOL, 0) ; part.type = typedef_new(TYPE_DWORD) ; } codeblock_add (code, mntype(part.type, 0) | MN_NOT, 0) ; if (typedef_is_integer(part.type) || typedef_is_pointer(part.type) || typedef_base(part.type) == TYPE_FLOAT) { res.constant = part.constant ; res.value = !part.value ; res.fvalue = (float)!part.fvalue ; res.type = part.type ; return res ; } compile_error (MSG_NUMBER_REQUIRED) ; return res ; } else if (token.type == IDENTIFIER && token.code == identifier_bnot) /* "BNOT" or "~" */ { part = compile_factor() ; if (part.lvalue) codeblock_add (code, mntype(part.type, 0) | MN_PTR, 0) ; if (typedef_is_pointer(part.type)) { codeblock_add (code, mntype(part.type, 0) | MN_POINTER2BOL, 0) ; part.type = typedef_new(TYPE_DWORD) ; } codeblock_add (code, mntype(part.type, 0) | MN_BNOT, 0) ; if (typedef_is_integer(part.type)) { res.constant = part.constant ; res.value = ~part.value ; res.type = typedef_new(TYPE_INT) ; return res ; } compile_error (MSG_NUMBER_REQUIRED) ; return res ; } else if (token.type == IDENTIFIER && token.code == identifier_plusplus) /* "++" */ { part = compile_factor() ; if (!part.lvalue) compile_error (MSG_VARIABLE_REQUIRED) ; if (typedef_is_string(part.type)) { compile_error (MSG_INCOMP_TYPE) ; } if (typedef_is_pointer(part.type)) codeblock_add (code, MN_INC, typedef_size(typedef_reduce(part.type))) ; else codeblock_add (code, mntype(part.type, 0) | MN_INC, 1) ; res.asignation = 1 ; res.lvalue = 1 ; res.type = part.type ; return res ; } else if (token.type == IDENTIFIER && token.code == identifier_minusminus) /* "--" */ { part = compile_factor() ; if (!part.lvalue) compile_error (MSG_VARIABLE_REQUIRED) ; if (typedef_is_string(part.type)) { compile_error (MSG_INCOMP_TYPE) ; } if (typedef_is_pointer(part.type)) codeblock_add (code, MN_DEC, typedef_size(typedef_reduce(part.type))) ; else codeblock_add (code, mntype(part.type, 0) | MN_DEC, 1) ; res.asignation = 1 ; res.lvalue = 1 ; res.type = part.type ; return res ; } token_back() ; part = compile_value() ; /* Sufijos (operadores ., [], etc) */ for (;;) { token_next() ; /* Operador "." */ if (token.type == IDENTIFIER && token.code == identifier_point) /* "." */ { if (typedef_is_pointer(part.type)) { part.type = typedef_reduce(part.type) ; if (!typedef_is_struct(part.type)) compile_error (MSG_STRUCT_REQUIRED) ; codeblock_add (code, MN_PTR, 0) ; } if (typedef_is_struct(part.type)) { VARSPACE * v = typedef_members(part.type) ; if (!v->vars) compile_error (MSG_STRUCT_REQUIRED) ; part = compile_sublvalue (v, v->vars[0].offset, NULL) ; } else { VARSPACE * v = typedef_members(part.type) ; if (typedef_base(part.type) != TYPE_DWORD && typedef_base(part.type) != TYPE_INT) compile_error (MSG_INTEGER_REQUIRED) ; if (part.lvalue) codeblock_add (code, MN_PTR, 0) ; part = compile_sublvalue (&local, 0, v) ; /* referenciada REMOTA por proceso (Splinter) */ } continue ; } else if (token.type == IDENTIFIER && token.code == identifier_plusplus) /* Operador ++ posterior */ { if (!part.lvalue) compile_error (MSG_VARIABLE_REQUIRED) ; if (typedef_is_string(part.type)) { compile_error (MSG_INCOMP_TYPE) ; } if (typedef_is_pointer(part.type)) codeblock_add (code, MN_POSTINC, typedef_size(typedef_reduce(part.type))) ; else codeblock_add (code, mntype(part.type, 0) | MN_POSTINC, 1) ; part.asignation = 1 ; part.lvalue = 0 ; continue ; } else if (token.type == IDENTIFIER && token.code == identifier_minusminus) /* Operador -- posterior */ { if (!part.lvalue) compile_error (MSG_VARIABLE_REQUIRED) ; if (typedef_is_string(part.type)) { compile_error (MSG_INCOMP_TYPE) ; } if (typedef_is_pointer(part.type)) codeblock_add (code, MN_POSTDEC, typedef_size(typedef_reduce(part.type))) ; else codeblock_add (code, mntype(part.type, 0) | MN_POSTDEC, 1) ; part.asignation = 1 ; part.lvalue = 0 ; continue ; } /* Indexado va [...] */ if (token.type == IDENTIFIER && token.code == identifier_leftb) /* "[" */ { /* De punteros */ if (typedef_is_pointer(part.type)) { if (part.lvalue) codeblock_add (code, MN_PTR, 0) ; part.type = typedef_reduce(part.type) ; res = compile_subexpresion() ; if (!typedef_is_integer(res.type)) compile_error (MSG_INTEGER_REQUIRED) ; if (res.lvalue) codeblock_add (code, mntype(res.type, 0) | MN_PTR, 0) ; codeblock_add (code, MN_ARRAY, typedef_size(part.type)) ; part.lvalue = 1 ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightb) /* "]" */ compile_error (MSG_EXPECTED, "]") ; continue ; } /* De cadenas */ if (typedef_is_string(part.type)) { if (part.lvalue) codeblock_add (code, MN_STRING | MN_PTR, 0) ; res = compile_subexpresion() ; if (!typedef_is_integer(res.type)) compile_error (MSG_INTEGER_REQUIRED) ; if (res.lvalue) codeblock_add (code, mntype(res.type, 0) | MN_PTR, 0) ; codeblock_add (code, MN_CHRSTR, 0) ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightb) /* "]" */ compile_error (MSG_EXPECTED, "]") ; part.type = typedef_new(TYPE_STRING) ; part.lvalue = 0 ; } continue ; } break ; } token_back() ; return part ; } expresion_result compile_operand () { expresion_result left, right, res ; int op ; BASETYPE t ; left = compile_factor() ; for (;;) { token_next() ; if (token.type == IDENTIFIER && token.code == identifier_multiply) /* "*" */ { if (left.lvalue) codeblock_add (code, mntype(left.type, 0) | MN_PTR, 0) ; right = compile_factor() ; if (right.lvalue) codeblock_add (code, mntype(right.type, 0) | MN_PTR, 0) ; t = check_numeric_types (&left, &right) ; codeblock_add (code, MN_MUL | t, 0) ; res.constant = (right.constant && left.constant) ; if (t == MN_FLOAT) { res.fvalue = left.fvalue * right.fvalue ; res.type = typedef_new (TYPE_FLOAT) ; } else { res.type = typedef_new (TYPE_INT) ; res.value = left.value * right.value ; } res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; left = res ; continue ; } else if (token.type == IDENTIFIER && (token.code == identifier_divide || token.code == identifier_mod)) /* "/" or "%" */ { op = token.code == identifier_mod ? MN_MOD : MN_DIV ; if (op == MN_MOD && typedef_base(left.type) == TYPE_FLOAT) { compile_error (MSG_INTEGER_REQUIRED) ; } if (left.lvalue) codeblock_add (code, mntype(left.type, 0) | MN_PTR, 0) ; right = compile_factor() ; if (op == MN_MOD && typedef_base(right.type) == TYPE_FLOAT) compile_error (MSG_INTEGER_REQUIRED) ; if (right.lvalue) codeblock_add (code, mntype(right.type, 0) | MN_PTR, 0) ; t = check_numeric_types (&left, &right) ; codeblock_add (code, op | t, 0) ; res.constant = (right.constant && left.constant) ; res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; res.type = typedef_new(t == MN_FLOAT ? TYPE_FLOAT:TYPE_INT) ; if (res.constant) { if (t == MN_FLOAT) { if (right.fvalue == 0.0) compile_error (MSG_DIVIDE_BY_ZERO) ; if (op == MN_MOD) compile_error (MSG_NUMBER_REQUIRED) ; res.fvalue = left.fvalue / right.fvalue ; res.type = typedef_new(TYPE_FLOAT) ; } else { if (right.value == 0) compile_error (MSG_DIVIDE_BY_ZERO) ; res.value = op == MN_MOD ? left.value % right.value : left.value / right.value ; res.type = typedef_new(TYPE_INT) ; } } left = res ; continue ; } token_back() ; break ; } return left ; } expresion_result compile_operation () { expresion_result left, right, res ; int op ; BASETYPE t ; left = compile_operand() ; for (;;) { token_next() ; /* Suma (o resta) de un entero a un puntero */ if (typedef_is_pointer(left.type) && token.type == IDENTIFIER && (token.code == identifier_plus || token.code == identifier_minus)) /* "++" o "--" */ { TYPEDEF ptr_t = typedef_reduce(left.type) ; op = token.code == identifier_plus ? MN_ADD:MN_SUB ; if (left.lvalue) codeblock_add (code, MN_PTR, 0) ; right = compile_operand() ; if (right.lvalue) codeblock_add (code, mntype(right.type, 0) | MN_PTR, 0) ; if (!typedef_is_integer(right.type)) compile_error (MSG_INCOMP_TYPES) ; if (typedef_size(ptr_t) > 1) { codeblock_add (code, MN_ARRAY, (op == MN_ADD ? 1:-1) * typedef_size(ptr_t)) ; } else codeblock_add (code, op, 0) ; res.constant = 0 ; res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; res.type = left.type ; left = res ; continue ; } /* Suma de cadenas */ if (typedef_is_array(left.type) && left.lvalue && token.type == IDENTIFIER && token.code == identifier_plus && left.type.chunk[1].type == TYPE_CHAR) /* "+" */ { codeblock_add (code, MN_A2STR, 0) ; left.lvalue = 0 ; left.type = typedef_new(TYPE_STRING) ; } /* Suma/resta de valores numricos */ if (token.type == IDENTIFIER && (token.code == identifier_plus || token.code == identifier_minus)) /* "+" or "-" */ { op = token.code == identifier_plus ? MN_ADD : MN_SUB ; if (left.lvalue) codeblock_add (code, mntype(left.type, 0) | MN_PTR, 0) ; right = compile_operand() ; /* Concatenacin de cadenas */ if ((typedef_is_string(left.type) || typedef_is_string(right.type)) && op == MN_ADD) { if (typedef_is_array(right.type) && right.lvalue && right.type.chunk[1].type == TYPE_CHAR) { codeblock_add (code, MN_A2STR, 0) ; right.type = typedef_new(TYPE_STRING) ; right.lvalue = 0 ; } if (right.lvalue) codeblock_add (code, mntype(right.type, 0) | MN_PTR, 0) ; if (typedef_is_integer(right.type)) codeblock_add (code, MN_INT2STR | mntype(right.type, 0), 0) ; else if (typedef_is_float(right.type)) codeblock_add (code, MN_FLOAT2STR, 0) ; else if (typedef_is_pointer(right.type)) codeblock_add (code, MN_POINTER2STR, 0) ; else if (typedef_base(right.type) == TYPE_CHAR) codeblock_add (code, MN_CHR2STR, 0); else if (!typedef_is_string(right.type)) compile_error (MSG_INCOMP_TYPES) ; if (typedef_is_integer(left.type)) codeblock_add (code, MN_INT2STR | mntype(left.type, 0), 1) ; else if (typedef_is_float(left.type)) codeblock_add (code, MN_FLOAT2STR, 1) ; else if (typedef_is_pointer(left.type)) codeblock_add (code, MN_POINTER2STR, 1) ; else if (!typedef_is_string(left.type)) compile_error (MSG_INCOMP_TYPES) ; codeblock_add (code, MN_STRING | MN_ADD, 0) ; res.constant = 0 ; res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; res.type = typedef_new(TYPE_STRING) ; left = res ; continue ; } if (right.lvalue) codeblock_add (code, mntype(right.type, 0) | MN_PTR, 0) ; t = check_numeric_types (&left, &right) ; if (t != MN_FLOAT) t = MN_DWORD ; codeblock_add (code, op | t, 0) ; res.constant = (right.constant && left.constant) ; res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; if (t == MN_FLOAT) { res.type = typedef_new (TYPE_FLOAT) ; res.fvalue = op == MN_ADD ? left.fvalue + right.fvalue : left.fvalue - right.fvalue ; } else { res.type = typedef_new (TYPE_DWORD) ; res.value = op == MN_ADD ? left.value + right.value : left.value - right.value ; } left = res ; continue ; } token_back() ; break ; } return left ; } expresion_result compile_rotation () { expresion_result left, right, res ; int op ; BASETYPE t ; left = compile_operation() ; token_next() ; if (token.type == IDENTIFIER && (token.code == identifier_ror || token.code == identifier_rol)) /* ">>" or "<<" */ { op = token.code == identifier_ror ? MN_ROR : MN_ROL ; if (left.lvalue) codeblock_add (code, mntype(left.type, 0) | MN_PTR, 0) ; right = compile_operand() ; if (right.lvalue) codeblock_add (code, mntype(right.type, 0) | MN_PTR, 0) ; t = check_numeric_types (&left, &right) ; codeblock_add (code, op | mntype(left.type, 0), 0) ; res.constant = (right.constant && left.constant) ; if (t == MN_FLOAT) { compile_error (MSG_INTEGER_REQUIRED) ; } else { res.type = typedef_new (TYPE_DWORD) ; res.value = (op == MN_ROR ? (left.value >> right.value) : (left.value << right.value)) ; } res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; return res ; } token_back() ; return left ; } expresion_result compile_comparison () { expresion_result left = compile_rotation (), right, res ; int op ; BASETYPE t ; token_next() ; if (token.type == IDENTIFIER && ( token.code == identifier_eq || /* "==" */ token.code == identifier_gt || /* ">" */ token.code == identifier_lt || /* "<" */ token.code == identifier_gte || /* ">=" or "=>" */ token.code == identifier_lte || /* "<=" or "=<" */ token.code == identifier_ne )) /* "!=" or "<>" */ { int is_unsigned = 0; op = token.code ; if (left.lvalue && (left.type.chunk[0].type != TYPE_ARRAY || left.type.chunk[1].type != TYPE_CHAR)) codeblock_add (code, mntype(left.type, 0) | MN_PTR, 0) ; right = compile_comparison() ; if (right.lvalue) codeblock_add (code, mntype(right.type, 0) | MN_PTR, 0) ; t = check_numeric_or_string_types (&left, &right) ; if (t != MN_FLOAT && t != MN_STRING) t = MN_DWORD ; if (typedef_is_unsigned(left.type) && typedef_is_unsigned(right.type)) is_unsigned = MN_UNSIGNED; if (op == identifier_eq) { /* "==" */ codeblock_add (code, t | MN_EQ, 0) ; if (left.constant && right.constant) { if (t == MN_DWORD) res.value = left.value == right.value; else if (t == MN_FLOAT) res.fvalue = (float)(left.fvalue == right.fvalue); else res.value = strcmp(string_get(left.value), string_get(right.value)) == 0; } } else if (op == identifier_gt) { /* ">" */ codeblock_add (code, t | MN_GT | is_unsigned, 0) ; if (left.constant && right.constant) { if (t == MN_DWORD) res.value = left.value > right.value; else if (t == MN_FLOAT) res.fvalue = (float)(left.fvalue > right.fvalue); else res.value = strcmp(string_get(left.value), string_get(right.value)) > 0; } } else if (op == identifier_lt) { /* "<" */ codeblock_add (code, t | MN_LT | is_unsigned, 0) ; if (left.constant && right.constant) { if (t == MN_DWORD) res.value = left.value < right.value; else if (t == MN_FLOAT) res.fvalue = (float)(left.fvalue < right.fvalue); else res.value = strcmp(string_get(left.value), string_get(right.value)) < 0; } } else if (op == identifier_gte) { /* ">=" or "=>" */ codeblock_add (code, t | MN_GTE | is_unsigned, 0) ; if (left.constant && right.constant) { if (t == MN_DWORD) res.value = left.value >= right.value; else if (t == MN_FLOAT) res.fvalue = (float)(left.fvalue >= right.fvalue); else res.value = strcmp(string_get(left.value), string_get(right.value)) >= 0; } } else if (op == identifier_lte) { /* "<=" or "=<" */ codeblock_add (code, t | MN_LTE | is_unsigned, 0) ; if (left.constant && right.constant) { if (t == MN_DWORD) res.value = left.value <= right.value; else if (t == MN_FLOAT) res.fvalue = (float)(left.fvalue <= right.fvalue); else res.value = strcmp(string_get(left.value), string_get(right.value)) <= 0; } } else if (op == identifier_ne) { /* "!=" or "<>" */ codeblock_add (code, t | MN_NE, 0) ; if (left.constant && right.constant) { if (t == MN_DWORD) res.value = left.value != right.value; else if (t == MN_FLOAT) res.fvalue = (float)(left.fvalue != right.fvalue); else res.value = strcmp(string_get(left.value), string_get(right.value)) != 0; } } res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; res.constant = (right.constant && left.constant) ; res.type = typedef_new(TYPE_INT) ; return res ; } token_back() ; return left ; } expresion_result compile_compseq () { expresion_result left = compile_comparison (), right, res ; int et1; token_next() ; if (token.type == IDENTIFIER && token.code == identifier_and) /* "AND" or "&&" */ { et1 = codeblock_label_add(code); if (left.lvalue) codeblock_add (code, MN_PTR, 0) ; check_integer_type (&left) ; codeblock_add (code, MN_JTFALSE, et1) ; right = compile_compseq() ; if (right.lvalue) codeblock_add (code, MN_PTR, 0) ; check_integer_type (&right) ; codeblock_add (code, MN_AND, 0) ; codeblock_label_set (code, et1, code->current) ; /* if (left.lvalue) codeblock_add (code, MN_PTR, 0) ; right = compile_compseq() ; if (right.lvalue) codeblock_add (code, MN_PTR, 0) ; check_integer_types (&left, &right) ; codeblock_add (code, MN_AND, 0) ; */ res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; res.constant = (right.constant && left.constant) ; res.value = (left.value && right.value) ; res.type = typedef_new(TYPE_INT) ; return res ; } if (token.type == IDENTIFIER && token.code == identifier_or) /* "OR" or "||" */ { et1 = codeblock_label_add(code); if (left.lvalue) codeblock_add (code, MN_PTR, 0) ; check_integer_type (&left) ; codeblock_add (code, MN_JTTRUE, et1) ; right = compile_compseq() ; if (right.lvalue) codeblock_add (code, MN_PTR, 0) ; check_integer_type (&right) ; codeblock_add (code, MN_OR, 0) ; codeblock_label_set (code, et1, code->current) ; /* if (left.lvalue) codeblock_add (code, MN_PTR, 0) ; right = compile_compseq() ; if (right.lvalue) codeblock_add (code, MN_PTR, 0) ; check_integer_types (&left, &right) ; codeblock_add (code, MN_OR, 0) ; */ res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; res.constant = (right.constant && left.constant) ; res.value = (left.value || right.value) ; res.type = typedef_new(TYPE_INT) ; return res ; } if (token.type == IDENTIFIER && token.code == identifier_xor) /* "XOR" or "^^" */ { if (left.lvalue) codeblock_add (code, MN_PTR, 0) ; right = compile_compseq() ; if (right.lvalue) codeblock_add (code, MN_PTR, 0) ; check_integer_types (&left, &right) ; codeblock_add (code, MN_XOR, 0) ; res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; res.constant = (right.constant && left.constant) ; res.value = ((left.value!=0) ^ (right.value!=0)) ; res.type = typedef_new(TYPE_INT) ; return res ; } if (token.type == IDENTIFIER && (token.code == identifier_band || token.code == identifier_bandoffset)) /* "BAND" or "&" */ { if (left.lvalue) codeblock_add (code, MN_PTR, 0) ; right = compile_compseq() ; if (right.lvalue) codeblock_add (code, MN_PTR, 0) ; check_integer_types (&left, &right) ; codeblock_add (code, MN_BAND, 0) ; res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; res.constant = (right.constant && left.constant) ; res.value = (left.value & right.value) ; res.type = typedef_new(TYPE_INT) ; return res ; } if (token.type == IDENTIFIER && token.code == identifier_bor) /* "BOR" or "|" */ { if (left.lvalue) codeblock_add (code, MN_PTR, 0) ; right = compile_compseq() ; if (right.lvalue) codeblock_add (code, MN_PTR, 0) ; check_integer_types (&left, &right) ; codeblock_add (code, MN_BOR, 0) ; res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; res.constant = (right.constant && left.constant) ; res.value = (left.value | right.value) ; res.type = typedef_new(TYPE_INT) ; return res ; } if (token.type == IDENTIFIER && token.code == identifier_bxor) /* "BXOR" or "^" */ { if (left.lvalue) codeblock_add (code, MN_PTR, 0) ; right = compile_compseq() ; if (right.lvalue) codeblock_add (code, MN_PTR, 0) ; check_integer_types (&left, &right) ; codeblock_add (code, MN_BXOR, 0) ; res.lvalue = 0 ; res.asignation = 0 ; res.call = 0 ; res.constant = (right.constant && left.constant) ; res.value = (left.value ^ right.value) ; res.type = typedef_new(TYPE_INT) ; return res ; } token_back() ; return left ; } expresion_result compile_subexpresion () { expresion_result base = compile_compseq(), right, res ; int op, et1, et2 ; BASETYPE type ; token_next() ; if (token.type == IDENTIFIER) { /* Operador EXPR ? TRUE : FALSE */ if (token.code == identifier_question) /* "?" */ { base = convert_result_type (base, TYPE_DWORD); et1 = codeblock_label_add(code); et2 = codeblock_label_add(code); codeblock_add (code, MN_JFALSE, et1); right = compile_expresion (0, 0, 0); codeblock_add (code, MN_JUMP, et2); codeblock_label_set (code, et1, code->current); token_next(); if (token.type != IDENTIFIER || token.code != identifier_colon) { /* ":" */ compile_error (MSG_EXPECTED, ":"); } res = compile_expresion (0, 0, right.type.chunk[0].type); codeblock_label_set (code, et2, code->current); if (base.constant && res.constant && right.constant) { if (typedef_is_integer(base.type)) { return base.value ? right : res; } else if (typedef_is_float(base.type)) { return base.fvalue ? right : res; } } res.constant = 0; res.lvalue = (right.lvalue && res.lvalue); return res; } /* Asignaciones a cadenas de ancho fijo */ if (typedef_is_array(base.type) && base.lvalue && base.type.chunk[1].type == TYPE_CHAR && token.code == identifier_equal) /* "=" */ { right = compile_expresion(0,0,TYPE_UNDEFINED) ; if (typedef_is_integer(right.type)) { codeblock_add (code, MN_INT2STR | mntype(right.type, 0), 0) ; } else if (typedef_is_float(right.type)) { codeblock_add (code, MN_FLOAT2STR, 0) ; } else if (!typedef_is_string(right.type)) { compile_error (MSG_INCOMP_TYPE) ; } codeblock_add (code, MN_STR2A, base.type.chunk[0].count-1) ; right.asignation = 1 ; return right ; } /* Asignaciones a punteros */ if (typedef_is_pointer(base.type) && token.code == identifier_equal) /* "=" */ { TYPEDEF pointer_type ; pointer_type = typedef_reduce (base.type) ; if (!base.lvalue) compile_error (MSG_VARIABLE_REQUIRED) ; right = compile_expresion(0,0,TYPE_UNDEFINED) ; if ((typedef_base(right.type) == TYPE_DWORD || typedef_base(right.type) == TYPE_INT) && right.constant && right.value == 0) { right.type = base.type ; } if (!typedef_is_pointer(right.type)) { compile_error (MSG_NOT_A_POINTER) ; } /* Un puntero "void" puede asignarse a otro cualquiera */ if (typedef_base(typedef_reduce(right.type)) == TYPE_UNDEFINED) { right.type = typedef_pointer (pointer_type) ; } if (typedef_base(typedef_reduce(right.type)) != typedef_base(pointer_type)) { compile_error (MSG_TYPES_NOT_THE_SAME) ; } codeblock_add (code, MN_DWORD | MN_LET, 0) ; res.lvalue = 1 ; res.asignation = 1 ; res.call = 0 ; res.constant = 0 ; res.value = 0 ; res.type = base.type ; return res ; } /* Asignaciones a cadenas */ if (typedef_is_string(base.type) && token.code == identifier_equal) /* "=" */ { if (!base.lvalue) compile_error (MSG_VARIABLE_REQUIRED) ; right = compile_expresion(0,0,TYPE_UNDEFINED) ; if (typedef_is_integer(right.type)) { codeblock_add (code, MN_INT2STR | mntype(right.type, 0), 0) ; } else if (typedef_is_float(right.type)) { codeblock_add (code, MN_FLOAT2STR, 0) ; } else if (!typedef_is_string(right.type)) { compile_error (MSG_INCOMP_TYPE) ; } codeblock_add (code, MN_STRING | MN_LET, 0) ; res.lvalue = 1 ; res.asignation = 1 ; res.call = 0 ; res.constant = 0 ; res.value = 0 ; res.type = typedef_new(TYPE_STRING) ; return res ; } /* Puntero += entero */ if (typedef_is_pointer(base.type) && (token.code == identifier_plusequal || token.code == identifier_minusequal)) /* "+=" or "-=" */ { TYPEDEF pointer_type ; op = (token.code == identifier_plusequal ? MN_VARADD:MN_VARSUB) ; pointer_type = typedef_reduce (base.type) ; if (!base.lvalue) compile_error (MSG_VARIABLE_REQUIRED) ; right = compile_expresion(0,0,TYPE_UNDEFINED) ; if (!typedef_is_integer(right.type)) { compile_error (MSG_INCOMP_TYPES) ; } if (typedef_size(pointer_type) > 1) { codeblock_add (code, MN_ARRAY, (op == MN_VARADD ? 1:-1) * typedef_size(pointer_type)) ; } else { codeblock_add (code, op, 0) ; } res.lvalue = 1 ; res.asignation = 1 ; res.call = 0 ; res.constant = 0 ; res.value = 0 ; res.type = typedef_new(TYPE_STRING) ; return res ; } /* Cadena += cadena */ if (typedef_is_array(base.type) && base.lvalue && base.type.chunk[1].type == TYPE_CHAR && token.code == identifier_plusequal) /* "+=" */ { right = compile_expresion(0,0,TYPE_UNDEFINED) ; if (typedef_is_integer(right.type)) { codeblock_add (code, MN_INT2STR | mntype(right.type, 0), 0) ; } else if (typedef_is_float(right.type)) { codeblock_add (code, MN_FLOAT2STR, 0) ; } else if (!typedef_is_string(right.type)) { compile_error (MSG_INCOMP_TYPE) ; } codeblock_add (code, MN_STRACAT, base.type.chunk[0].count-1) ; right.asignation = 1 ; return right ; } if (typedef_is_string(base.type) && token.code == identifier_plusequal) /* "+=" */ { if (!base.lvalue) compile_error (MSG_VARIABLE_REQUIRED) ; right = compile_expresion(0,0,TYPE_UNDEFINED) ; if (typedef_is_integer(right.type)) { codeblock_add (code, MN_INT2STR | mntype(right.type, 0), 0) ; } else if (typedef_is_float(right.type)) { codeblock_add (code, MN_FLOAT2STR, 0) ; } else if (!typedef_is_string(right.type)) { compile_error (MSG_INCOMP_TYPE) ; } codeblock_add (code, MN_STRING | MN_VARADD, 0) ; res.lvalue = 1 ; res.asignation = 1 ; res.call = 0 ; res.constant = 0 ; res.value = 0 ; res.type = typedef_new(TYPE_STRING) ; return res ; } /* Otra posible combinacin */ if ( token.code == identifier_plusequal /* "+=" */ || token.code == identifier_minusequal /* "-=" */ || token.code == identifier_multequal /* "*=" */ || token.code == identifier_divequal /* "/=" */ || token.code == identifier_modequal /* "%=" */ || token.code == identifier_orequal /* "|=" */ || token.code == identifier_andequal /* "&=" */ || token.code == identifier_xorequal /* "^=" */ || token.code == identifier_rorequal /* ">>=" */ || token.code == identifier_rolequal /* "<<=" */ || token.code == identifier_equal) /* "=" */ { op = token.code ; if (typedef_is_array(base.type)) { compile_error (MSG_EXPECTED, "[") ; } if (typedef_is_struct(base.type)) { // Assignation to struct: struct copy if (token.code != identifier_equal) { /* "=" */ compile_error (MSG_EXPECTED, "=") ; } right = compile_expresion(0, 0, 0); while (typedef_is_array(right.type)) { right.type = typedef_reduce(right.type); } if (typedef_base(right.type) != TYPE_POINTER) { compile_error (MSG_STRUCT_REQUIRED); } if (!typedef_is_struct(typedef_reduce(right.type))) { compile_error (MSG_STRUCT_REQUIRED); } else if (right.type.varspace != base.type.varspace) { compile_error (MSG_TYPES_NOT_THE_SAME); } else { /* * Struct copy operator */ SYSPROC * proc_copy = sysproc_get (identifier_search_or_add("#COPY#")); SYSPROC * proc_memcopy = sysproc_get (identifier_search_or_add("MEMCOPY")); int size, nvar; while (typedef_is_pointer(base.type)) { codeblock_add (code, MN_PTR, 0); res.type = typedef_reduce(base.type); } if (typedef_base(base.type) != TYPE_STRUCT) { compile_error (MSG_STRUCT_REQUIRED); } else { size = right.type.varspace->count * sizeof(DCB_TYPEDEF); if (right.type.varspace->stringvar_count > 0) { // True struct copy version segment_alloc (globaldata, size); codeblock_add (code, MN_GLOBAL, globaldata->current) ; for (nvar = 0 ; nvar < right.type.varspace->count ; nvar++) { DCB_TYPEDEF type; dcb_settype (&type, &right.type.varspace->vars[nvar].type); memcpy ((Uint8*)globaldata->bytes + globaldata->current, &type, sizeof(DCB_TYPEDEF)); globaldata->current += sizeof(DCB_TYPEDEF); } codeblock_add (code, MN_PUSH | MN_DWORD, right.type.varspace->count); codeblock_add (code, MN_PUSH | MN_DWORD, right.count?right.count:1); codeblock_add (code, MN_SYSCALL, proc_copy->code); } else { // Optimized fast memcopy version codeblock_add (code, MN_PUSH | MN_DWORD, right.type.varspace->size*(right.count?right.count:1)); codeblock_add (code, MN_SYSCALL, proc_memcopy->code); } } base.type = right.type; base.constant = 0; base.lvalue = 0; base.call = 1; } return base; } if (!base.lvalue) compile_error (MSG_VARIABLE_REQUIRED) ; right = compile_expresion(0,0,typedef_base(base.type)) ; if (right.lvalue) codeblock_add (code, mntype(right.type, 0) | MN_PTR, 0) ; type = check_numeric_types (&base, &right) ; if (op == identifier_plusequal) /* "+=" */ codeblock_add (code, type | MN_VARADD, 0) ; else if (op == identifier_minusequal) /* "-=" */ codeblock_add (code, type | MN_VARSUB, 0) ; else if (op == identifier_multequal) /* "*=" */ codeblock_add (code, type | MN_VARMUL, 0) ; else if (op == identifier_divequal) /* "/=" */ codeblock_add (code, type | MN_VARDIV, 0) ; else if (op == identifier_modequal) /* "%=" */ codeblock_add (code, type | MN_VARMOD, 0) ; else if (op == identifier_orequal) /* "|=" */ codeblock_add (code, type | MN_VAROR, 0) ; else if (op == identifier_andequal) /* "&=" */ codeblock_add (code, type | MN_VARAND, 0) ; else if (op == identifier_xorequal) /* "^=" */ codeblock_add (code, type | MN_VARXOR, 0) ; else if (op == identifier_rorequal) /* ">>=" */ codeblock_add (code, type | MN_VARROR, 0) ; else if (op == identifier_rolequal) /* "<<=" */ codeblock_add (code, type | MN_VARROL, 0) ; else if (op == identifier_equal) /* "=" */ codeblock_add (code, type | MN_LET, 0) ; res.lvalue = 1 ; res.asignation = 1 ; res.call = 0 ; res.constant = 0 ; res.value = 0 ; res.type = right.type ; return res ; } else { token_back() ; } } else { token_back() ; } return base ; } expresion_result compile_expresion (int need_constant, int need_lvalue, BASETYPE t) { expresion_result res ; CODEBLOCK_POS pos ; if (code) pos = codeblock_pos(code); res = compile_subexpresion() ; /* Interpreta una estructura tal cual como un puntero a la misma */ if (res.lvalue && typedef_base(res.type) == TYPE_STRUCT && !need_lvalue) { res.type = typedef_pointer(res.type) ; res.lvalue = 0 ; res.constant = 0 ; } /* Interpretar arrays de byte como cadenas */ if (typedef_base(res.type) == TYPE_ARRAY && res.type.chunk[1].type == TYPE_CHAR && res.lvalue && !need_lvalue) { codeblock_add (code, MN_A2STR, 0) ; res.type = typedef_new(TYPE_STRING) ; /* Array 2 String */ res.lvalue = 0 ; } /* Quita los lvalue */ if (!need_lvalue && res.lvalue) { res.lvalue = 0 ; codeblock_add (code, mntype(res.type, 0) | MN_PTR, 0) ; } /* Conversiones de tipo */ if (t != TYPE_UNDEFINED) res = convert_result_type (res, t) ; /* Optimizacin de datos constantes */ if (res.constant) { if (code) codeblock_setpos(code, pos); if (typedef_base(res.type) == TYPE_FLOAT) codeblock_add (code, MN_PUSH | MN_FLOAT, *(int *)&res.fvalue) ; else if (typedef_base(res.type) == TYPE_STRING) codeblock_add (code, MN_PUSH | MN_STRING, res.value) ; else codeblock_add (code, MN_PUSH, res.value) ; } if (need_lvalue && !res.lvalue) compile_error (MSG_VARIABLE_REQUIRED) ; if (need_constant && !res.constant) compile_error (MSG_CONSTANT_EXP) ; return res ; } /* * FUNCTION : convert_result_type * * Given an expresion result in the current context, convert it * if possible to the basic type given (and emit the necessary code) * * PARAMS: * res Result of expression at current context * t Basic type required * * RETURN VALUE: * The converted type result */ expresion_result convert_result_type (expresion_result res, BASETYPE t) { /* Conversiones de tipo */ if (t < 9 && typedef_is_integer(res.type)) { res.type = typedef_new(t); } if (typedef_base(res.type) == TYPE_POINTER && t == TYPE_STRING) { codeblock_add (code, MN_POINTER2STR, 0) ; res.type = typedef_new(t) ; /* Pointer 2 String */ } if (typedef_base(res.type) == TYPE_DWORD && res.constant && res.value == 0 && t == TYPE_POINTER) { res.type = typedef_new(t) ; /* Null pointer */ } if (typedef_base(res.type) == TYPE_POINTER && t < 8) { codeblock_add (code, MN_POINTER2BOL, 0) ; res.type = typedef_new(t) ; /* Pointer 2 Int */ } if (typedef_base(res.type) == TYPE_FLOAT && t < 8) { if (t < 4) codeblock_add (code, MN_FLOAT2INT, 0) ; else codeblock_add (code, MN_FLOAT2INT, 0) ; res.type = typedef_new(t) ; res.value = (int)res.fvalue ; } if (t == TYPE_FLOAT && typedef_is_integer(res.type)) { codeblock_add (code, MN_INT2FLOAT, 0) ; res.type = typedef_new(TYPE_FLOAT) ; res.fvalue = (float)res.value ; } if ((t == TYPE_BYTE || t == TYPE_WORD || t == TYPE_DWORD) && typedef_is_integer(res.type)) { res.type = typedef_new(t) ; } if (t == TYPE_STRING && typedef_is_integer(res.type)) { codeblock_add (code, MN_INT2STR | mntype(res.type, 0), 0) ; if (res.constant) { char buffer[32] ; switch (res.type.chunk[0].type) { case TYPE_INT: sprintf (buffer, "%d", res.value) ; break; case TYPE_WORD: sprintf (buffer, "%d", (Uint16)res.value) ; break; case TYPE_BYTE: sprintf (buffer, "%d", (Uint8)res.value) ; break; case TYPE_SHORT: sprintf (buffer, "%d", (Sint16)res.value) ; break; case TYPE_SBYTE: sprintf (buffer, "%d", (Sint8)res.value) ; break; case TYPE_DWORD: sprintf (buffer, "%u", (Uint32)res.value) ; break; } res.value = string_new(buffer) ; } res.type = typedef_new(t) ; } if (t == TYPE_STRING && typedef_base(res.type) == TYPE_CHAR) { codeblock_add (code, MN_CHR2STR, 0) ; if (res.constant) { char buffer[2] ; buffer[0] = res.value; buffer[1] = 0; res.value = string_new(buffer) ; } res.type = typedef_new(t) ; } if (t != TYPE_UNDEFINED && typedef_base(res.type) != t) { switch (t) { case TYPE_CHAR: /* Allow string-to-char conversions */ if (typedef_is_string(res.type)) { codeblock_add (code, MN_STR2CHR, 0) ; if (res.constant == 1) res.value = (unsigned char)*(string_get(res.value)); } else compile_error (MSG_INTEGER_REQUIRED) ; break ; case TYPE_DWORD: case TYPE_INT: case TYPE_WORD: case TYPE_SHORT: case TYPE_BYTE: case TYPE_SBYTE: if (typedef_is_array(res.type) && res.lvalue && res.type.chunk[1].type == TYPE_CHAR) { codeblock_add (code, MN_A2STR, 0) ; codeblock_add (code, MN_STR2INT, 0) ; res.lvalue = 0 ; res.constant = 0; } else if (typedef_is_string(res.type)) { codeblock_add (code, MN_STR2INT, 0) ; if (res.constant == 1) res.value = atoi(string_get(res.value)); } else if (typedef_base(res.type) == TYPE_CHAR) { ; } else compile_error (MSG_INTEGER_REQUIRED) ; break ; case TYPE_FLOAT: if (typedef_is_string(res.type)) { codeblock_add (code, MN_STR2FLOAT, 0) ; if (res.constant == 1) res.fvalue = (float)atof(string_get(res.value)); } else compile_error (MSG_NUMBER_REQUIRED) ; break ; case TYPE_STRING: if (typedef_is_array(res.type) && res.lvalue && res.type.chunk[1].type == TYPE_CHAR) { codeblock_add (code, MN_A2STR, 0) ; res.lvalue = 0 ; } else if (typedef_is_integer(res.type)) { codeblock_add (code, MN_INT2STR | mntype(res.type, 0), 0) ; if (res.constant) { char buffer[32] ; sprintf (buffer, "%d", res.value) ; res.value = string_new(buffer) ; } } else if (typedef_is_float(res.type)) { codeblock_add (code, MN_FLOAT2STR, 0) ; if (res.constant) { char buffer[32] ; sprintf (buffer, "%g", res.fvalue) ; res.value = string_new(buffer) ; } } else compile_error (MSG_STRING_EXP) ; break ; default: compile_error (MSG_INCOMP_TYPE) ; } res.type = typedef_new(t) ; } return res ; } int compile_sentence_end () { token_next() ; if (token.type == NOTOKEN) return 1; if (token.type == IDENTIFIER && token.code == identifier_semicolon) /* ";" */ return 0 ; /* if (token.type == IDENTIFIER && token.code == identifier_end) { token_back() ; return 1 ; } */ compile_error (MSG_EXPECTED, ";") ; return 0; } extern int dcb_options ; void basetype_describe (char * buffer, BASETYPE t) { switch (t) { case TYPE_INT: sprintf (buffer, "INT") ; return ; case TYPE_DWORD: sprintf (buffer, "DWORD") ; return ; case TYPE_SHORT: sprintf (buffer, "SHORT") ; return ; case TYPE_WORD: sprintf (buffer, "WORD") ; return ; case TYPE_BYTE: sprintf (buffer, "BYTE") ; return ; case TYPE_CHAR: sprintf (buffer, "CHAR") ; return ; case TYPE_SBYTE: sprintf (buffer, "SIGNED BYTE") ; return ; case TYPE_STRING: sprintf (buffer, "STRING") ; return ; case TYPE_FLOAT: sprintf (buffer, "FLOAT") ; return ; case TYPE_STRUCT: sprintf (buffer, "STRUCT") ; case TYPE_ARRAY: sprintf (buffer, "ARRAY") ; return ; case TYPE_POINTER: sprintf (buffer, "POINTER") ; return ; case TYPE_UNDEFINED: default: sprintf (buffer, "") ; return ; } } void compile_block (PROCDEF * p) { int loop, last_loop, et1, et2 ; expresion_result res, from, to ; proc = p ; code = &p->code ; for (;;) { token_next() ; if (token.type == NOTOKEN) break ; if (token.type == IDENTIFIER) { if (token.code == identifier_end || /* "END" */ token.code == identifier_until || /* "UNTIL" */ token.code == identifier_else || /* "ELSE" */ token.code == identifier_elseif) /* "ELSEIF" */ break ; if (token.code == identifier_semicolon) /* ";" */ continue ; if (token.code == identifier_colon) /* ":" */ continue ; /* CONTINUE */ if (token.code == identifier_continue) /* "CONTINUE" */ { if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } if (!code->loop_active) compile_error (MSG_NO_LOOP) ; codeblock_add (code, MN_REPEAT, code->loop_active) ; compile_sentence_end() ; continue ; } /* BREAK */ if (token.code == identifier_break) /* "BREAK" */ { if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } if (!code->loop_active) compile_error (MSG_NO_LOOP) ; codeblock_add (code, MN_BREAK, code->loop_active) ; compile_sentence_end() ; continue ; } /* FRAME */ if (token.code == identifier_frame) /* "FRAME" */ { if (proc->type != TYPE_INT && proc->type != TYPE_DWORD) { if (!(proc->flags & PROC_FUNCTION)) compile_error(MSG_FRAME_REQUIRES_INT); } if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_semicolon) /* ";" */ { token_back() ; compile_expresion (0,0,TYPE_DWORD) ; codeblock_add (code, MN_FRAME, 0) ; compile_sentence_end() ; } else { codeblock_add (code, MN_PUSH, 100) ; codeblock_add (code, MN_FRAME, 0) ; } proc->flags |= PROC_USES_FRAME; continue ; } /* DEBUG */ if (token.code == identifier_debug) /* "DEBUG" */ { if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } codeblock_add (code, MN_DEBUG, 0) ; compile_sentence_end() ; continue ; } /* RETURN */ if (token.code == identifier_return) /* "RETURN" */ { if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_semicolon) /* ";" */ { token_back() ; compile_expresion (0,0,p->type) ; codeblock_add (code, MN_RETURN, 0) ; compile_sentence_end() ; } else { codeblock_add (code, MN_END, 0) ; } continue ; } /* ONEXIT */ if (token.code == identifier_onexit) /* "ONEXIT" */ { /* Finalizo el bloque actual y todo el codigo a continuacion es onexit */ codeblock_add (code, MN_END, 0) ; p->exitcode = code->current; continue ; } /* CLONE */ if (token.code == identifier_clone) /* "CLONE" */ { if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } et1 = codeblock_label_add (code) ; codeblock_add (code, MN_CLONE, et1) ; compile_block(p) ; codeblock_label_set (code, et1, code->current) ; proc->flags |= PROC_USES_FRAME; continue ; } /* IF */ if (token.code == identifier_if) /* "IF" */ { /* Label at the end of a IF/ELSEIF/ELSEIF/ELSE chain */ int end_of_chain = -1; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } for (;;) { token_next() ; if (token.type != IDENTIFIER || token.code != identifier_leftp) /* "(" */ { token_back() ; compile_expresion (0, 0, TYPE_DWORD); token_next() ; if (token.type != IDENTIFIER || (token.code != identifier_semicolon && token.code != identifier_colon)) /* ";" or ":" */ compile_error (MSG_EXPECTED, "(") ; } else { compile_expresion (0, 0, TYPE_DWORD); token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) /* ")" */ compile_error (MSG_EXPECTED, ")") ; } et1 = codeblock_label_add (code) ; codeblock_add (code, MN_JFALSE, et1) ; compile_block(p) ; if (token.type == IDENTIFIER && token.code == identifier_else) /* "ELSE" */ { et2 = codeblock_label_add (code) ; codeblock_add (code, MN_JUMP, et2) ; codeblock_label_set (code, et1, code->current) ; compile_block(p) ; codeblock_label_set (code, et2, code->current) ; break; } else if (token.type == IDENTIFIER && token.code == identifier_elseif) /* "ELSEIF" */ { if (end_of_chain == -1) end_of_chain = codeblock_label_add (code) ; codeblock_add (code, MN_JUMP, end_of_chain); codeblock_label_set (code, et1, code->current) ; continue; } else { codeblock_label_set (code, et1, code->current) ; break; } } if (end_of_chain != -1) codeblock_label_set (code, end_of_chain, code->current) ; continue ; } /* FOR */ if (token.code == identifier_for) /* "FOR" */ { int forline = line_count + (current_file << 24) ; loop = codeblock_loop_add (code) ; et1 = codeblock_label_add (code) ; et2 = codeblock_label_add (code) ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_leftp) /* "(" */ compile_error (MSG_EXPECTED, "(") ; /* Inicializadores */ token_next() ; if (token.type != IDENTIFIER || token.code != identifier_semicolon) /* ";" */ { token_back() ; do { compile_expresion(0,0,TYPE_DWORD) ; codeblock_add (code, MN_POP, 0) ; token_next() ; } while (token.type == IDENTIFIER && token.code == identifier_comma) ; /* "," */ } if (token.type != IDENTIFIER || token.code != identifier_semicolon) /* ";" */ compile_error (MSG_EXPECTED, ";") ; codeblock_loop_start (code, loop, code->current) ; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, forline) ; } /* Condiciones */ token_next() ; if (token.type != IDENTIFIER || token.code != identifier_semicolon) /* ";" */ { token_back() ; do { compile_expresion(0,0,TYPE_DWORD) ; codeblock_add (code, MN_BRFALSE, loop) ; token_next() ; } while (token.type == IDENTIFIER && token.code == identifier_comma) ; /* "," */ } if (token.type != IDENTIFIER || token.code != identifier_semicolon) /* ";" */ compile_error (MSG_EXPECTED, ";") ; codeblock_add (code, MN_JUMP, et2) ; /* Incrementos */ codeblock_label_set (code, et1, code->current) ; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, forline) ; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) /* ")" */ { token_back() ; do { compile_expresion(0,0,TYPE_DWORD) ; codeblock_add (code, MN_POP, 0) ; token_next() ; } while (token.type == IDENTIFIER && token.code == identifier_comma) ; /* "," */ } if (token.type != IDENTIFIER || token.code != identifier_rightp) /* ")" */ compile_error (MSG_EXPECTED, ")") ; codeblock_add (code, MN_REPEAT, loop) ; /* Bloque */ codeblock_label_set (code, et2, code->current) ; last_loop = code->loop_active ; code->loop_active = loop ; compile_block(p) ; code->loop_active = last_loop ; codeblock_add (code, MN_JUMP, et1) ; codeblock_loop_end (code, loop, code->current) ; continue ; } /* SWITCH */ if (token.code == identifier_switch) /* "SWITCH" */ { int switch_type = 0; expresion_result switch_exp ; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_leftp) /* "(" */ compile_error (MSG_EXPECTED, "(") ; switch_exp = compile_expresion(0, 0, 0) ; switch_type = typedef_base(switch_exp.type); if (switch_type == TYPE_ARRAY && switch_exp.type.chunk[0].type == TYPE_CHAR) { codeblock_add (code, MN_A2STR, 0) ; switch_type = TYPE_STRING; } else if (switch_type != TYPE_STRING) { switch_exp = convert_result_type (switch_exp, TYPE_INT); switch_type = TYPE_INT; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) /* ")" */ compile_error (MSG_EXPECTED, ")") ; token_next() ; if (token.type != IDENTIFIER || (token.code != identifier_semicolon && token.code != identifier_colon)) /* ";" or ":" */ token_back() ; if (switch_type == TYPE_STRING) codeblock_add (code, MN_SWITCH | MN_STRING, 0) ; else codeblock_add (code, MN_SWITCH, 0) ; et1 = codeblock_label_add (code) ; for (;;) { if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } token_next() ; if (token.type == IDENTIFIER && token.code == identifier_case) /* "CASE" */ { for (;;) { token_next() ; if (token.type == IDENTIFIER && token.code == identifier_colon) /* ":" */ break ; if (token.type == IDENTIFIER && token.code == identifier_comma) /* "," */ continue ; token_back() ; compile_expresion(0,0,switch_type) ; token_next() ; if (token.type == IDENTIFIER && token.code == identifier_twopoints) /* ".." */ { compile_expresion(0,0,switch_type) ; if (switch_type != TYPE_STRING) codeblock_add (code, MN_CASE_R, 0) ; else codeblock_add (code, MN_CASE_R | MN_STRING, 0) ; token_next() ; } else { if (switch_type == TYPE_STRING) codeblock_add (code, MN_CASE | MN_STRING, 0) ; else codeblock_add (code, MN_CASE, 0) ; } if (token.type == IDENTIFIER && token.code == identifier_colon) /* ":" */ break ; if (token.type != IDENTIFIER || token.code != identifier_comma) /* "," */ compile_error (MSG_EXPECTED, ";") ; } et2 = codeblock_label_add (code) ; codeblock_add (code, MN_JNOCASE, et2) ; compile_block (p) ; codeblock_add (code, MN_JUMP, et1) ; codeblock_label_set (code, et2, code->current) ; } else if (token.type == IDENTIFIER && token.code == identifier_default) /* "DEFAULT" */ { if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_colon) /* ":" */ compile_error (MSG_EXPECTED, ";") ; compile_block(p) ; } else if (token.type == IDENTIFIER && token.code == identifier_semicolon) /* ";" */ continue ; else if (token.type == IDENTIFIER && token.code == identifier_end) /* "END" */ break ; else compile_error (MSG_EXPECTED, "CASE"); } codeblock_label_set (code, et1, code->current) ; continue ; } /* LOOP */ if (token.code == identifier_loop) /* "LOOP" */ { loop = codeblock_loop_add (code) ; codeblock_loop_start (code, loop, code->current) ; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } last_loop = code->loop_active ; code->loop_active = loop ; compile_block(p) ; code->loop_active = last_loop ; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } codeblock_add (code, MN_REPEAT, loop) ; codeblock_loop_end (code, loop, code->current) ; continue ; } /* FROM ... TO */ if (token.code == identifier_from) /* "FROM" */ { int inc = 1 ; CODEBLOCK_POS var_pos; CODEBLOCK_POS var_end; // Compile the variable access loop = codeblock_loop_add(code) ; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } var_pos = codeblock_pos(code); res = compile_value () ; var_end = codeblock_pos(code); if (!res.lvalue) compile_error (MSG_VARIABLE_REQUIRED) ; if (!typedef_is_integer(res.type)) compile_error (MSG_INTEGER_REQUIRED); // Compile the assignation of first value token_next() ; if (token.type != IDENTIFIER || token.code != identifier_equal) /* "=" */ compile_error (MSG_EXPECTED, "=") ; from = compile_expresion(0,0,typedef_base(res.type)); codeblock_add (code, MN_LETNP | mntype(res.type, 0), 0); // Compile the loop termination check codeblock_loop_start (code, loop, code->current) ; codeblock_add_block (code, var_pos, var_end); codeblock_add (code, MN_PTR | mntype(res.type, 0), 0); token_next() ; if (token.type != IDENTIFIER || token.code != identifier_to) /* "TO" */ compile_error (MSG_EXPECTED, "TO") ; to = compile_expresion(0,0,TYPE_DWORD) ; token_next() ; if (token.type == IDENTIFIER && token.code == identifier_step) /* "STEP" */ { CODEBLOCK_POS p = codeblock_pos(code); expresion_result r = compile_expresion(1, 0, typedef_base(res.type)) ; if (!r.constant) compile_error (MSG_CONSTANT_EXP); if (!typedef_is_integer(r.type)) compile_error (MSG_INTEGER_REQUIRED); inc = r.value; codeblock_setpos(code, p); if (inc > 0) codeblock_add (code, MN_LTE, 0) ; else { if (inc == 0) compile_error (MSG_INVALID_STEP) ; codeblock_add (code, MN_GTE, 0) ; } } else { if (from.constant && to.constant) { if (from.value > to.value) inc = -1 ; codeblock_add (code, (from.value > to.value ? MN_GTE : MN_LTE), 0) ; } else codeblock_add (code, MN_LTE, 0) ; token_back() ; } if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } codeblock_add (code, MN_BRFALSE, loop) ; // Compile the loop block contents last_loop = code->loop_active ; code->loop_active = loop ; compile_block(p) ; code->loop_active = last_loop ; // Compile the increment and looping code codeblock_add_block (code, var_pos, var_end); if (inc == 1) codeblock_add (code, MN_INC | mntype(res.type, 0), 1) ; else if (inc == -1) codeblock_add (code, MN_DEC | mntype(res.type, 0), 1) ; else { codeblock_add (code, MN_PUSH, inc) ; codeblock_add (code, MN_VARADD | mntype(res.type, 0), 0) ; } codeblock_add (code, MN_POP, 0) ; codeblock_add (code, MN_REPEAT, loop) ; codeblock_loop_end (code, loop, code->current) ; continue ; } /* REPEAT ... UNTIL */ if (token.code == identifier_repeat) /* "REPEAT" */ { loop = codeblock_loop_add (code) ; codeblock_loop_start (code, loop, code->current) ; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } last_loop = code->loop_active ; code->loop_active = loop ; compile_block(p) ; code->loop_active = last_loop ; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } if (token.type != IDENTIFIER || token.code != identifier_until) /* "UNTIL" */ compile_error (MSG_EXPECTED, "UNTIL") ; token_next() ; if (token.type == IDENTIFIER && token.code == identifier_leftp) /* "(" */ { compile_expresion (0, 0, TYPE_DWORD) ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) /* ")" */ compile_error (MSG_EXPECTED, ")") ; } else { token_back() ; compile_expresion (0, 0, TYPE_DWORD) ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_semicolon) /* ";" */ compile_error (MSG_EXPECTED, ";") ; } codeblock_add (code, MN_REFALSE, loop) ; codeblock_loop_end (code, loop, code->current) ; continue ; } /* WHILE ... END */ if (token.code == identifier_while) /* "WHILE" */ { token_next() ; if (token.type != IDENTIFIER || token.code != identifier_leftp) /* "(" */ { token_back() ; loop = codeblock_loop_add (code) ; codeblock_loop_start (code, loop, code->current) ; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } compile_expresion (0, 0, TYPE_DWORD) ; token_next() ; if (token.type != IDENTIFIER || (token.code != identifier_semicolon && token.code != identifier_colon ) ) /* ";" or ":" */ compile_error (MSG_EXPECTED, ";") ; } else { loop = codeblock_loop_add (code) ; codeblock_loop_start (code, loop, code->current) ; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } compile_expresion (0, 0, TYPE_DWORD) ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) /* ")" */ compile_error (MSG_EXPECTED, ")") ; } if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } codeblock_add (code, MN_BRFALSE, loop) ; last_loop = code->loop_active ; code->loop_active = loop ; compile_block(p) ; code->loop_active = last_loop ; codeblock_add (code, MN_REPEAT, loop) ; codeblock_loop_end (code, loop, code->current) ; continue ; } } if (token.type != IDENTIFIER) // || token.code < reserved_words) compile_error (MSG_INVALID_SENTENCE) ; token_back() ; if (dcb_options & DCB_DEBUG) { codeblock_add (code, MN_SENTENCE, line_count + (current_file << 24)) ; } /* Asignation */ res = compile_subexpresion() ; if (!res.asignation && !res.call) compile_error (MSG_INVALID_SENTENCE) ; if (typedef_is_string(res.type) && !res.lvalue) codeblock_add (code, MN_STRING | MN_POP, 0) ; else codeblock_add (code, MN_POP, 0) ; if (compile_sentence_end()) break ; } } Fenix/fxc/src/Makefile.in0000644000000000000000000004711710607526712014261 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_CFLAGS = @COMMON_CFLAGS@ COMMON_LIBS = @COMMON_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DO_FPG = @DO_FPG@ DO_FPG_FALSE = @DO_FPG_FALSE@ DO_FPG_TRUE = @DO_FPG_TRUE@ DO_FXC = @DO_FXC@ DO_FXC_FALSE = @DO_FXC_FALSE@ DO_FXC_TRUE = @DO_FXC_TRUE@ DO_FXI = @DO_FXI@ DO_FXI_FALSE = @DO_FXI_FALSE@ DO_FXI_TRUE = @DO_FXI_TRUE@ DO_MAP = @DO_MAP@ DO_MAP_FALSE = @DO_MAP_FALSE@ DO_MAP_TRUE = @DO_MAP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ HAVE_WINDRES_FALSE = @HAVE_WINDRES_FALSE@ HAVE_WINDRES_TRUE = @HAVE_WINDRES_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_WINDRES = @ac_ct_WINDRES@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ bin_PROGRAMS = fxc INCLUDES = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I../../include -I../inc fxc_LDADD = $(SDL_LIBS) $(COMMON_LIBS) -lz SOURCE_FILES = main.c main_div.c token.c identifier.c segment.c \ constants.c strings.c varspace.c procedure.c codeblock.c \ c_main.c c_data.c c_code.c c_debug.c dcbw.c \ messages.c error.c \ sysstub.c typedef.c ../../common/files.c ../../common/xctype.c @HAVE_WINDRES_TRUE@fxc_SOURCES = $(SOURCE_FILES) fxc.rc @HAVE_WINDRES_FALSE@fxc_SOURCES = $(SOURCE_FILES) subdir = fxc/src mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = bin_PROGRAMS = fxc$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__fxc_SOURCES_DIST = main.c main_div.c token.c identifier.c segment.c \ constants.c strings.c varspace.c procedure.c codeblock.c \ c_main.c c_data.c c_code.c c_debug.c dcbw.c messages.c error.c \ sysstub.c typedef.c ../../common/files.c ../../common/xctype.c \ fxc.rc am__objects_1 = main.$(OBJEXT) main_div.$(OBJEXT) token.$(OBJEXT) \ identifier.$(OBJEXT) segment.$(OBJEXT) constants.$(OBJEXT) \ strings.$(OBJEXT) varspace.$(OBJEXT) procedure.$(OBJEXT) \ codeblock.$(OBJEXT) c_main.$(OBJEXT) c_data.$(OBJEXT) \ c_code.$(OBJEXT) c_debug.$(OBJEXT) dcbw.$(OBJEXT) \ messages.$(OBJEXT) error.$(OBJEXT) sysstub.$(OBJEXT) \ typedef.$(OBJEXT) files.$(OBJEXT) xctype.$(OBJEXT) @HAVE_WINDRES_TRUE@am_fxc_OBJECTS = $(am__objects_1) fxc.$(OBJEXT) @HAVE_WINDRES_FALSE@am_fxc_OBJECTS = $(am__objects_1) fxc_OBJECTS = $(am_fxc_OBJECTS) fxc_DEPENDENCIES = fxc_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/c_code.Po ./$(DEPDIR)/c_data.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/c_debug.Po ./$(DEPDIR)/c_main.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/codeblock.Po ./$(DEPDIR)/constants.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dcbw.Po ./$(DEPDIR)/error.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/files.Po ./$(DEPDIR)/identifier.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/main.Po ./$(DEPDIR)/main_div.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/messages.Po ./$(DEPDIR)/procedure.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/segment.Po ./$(DEPDIR)/strings.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/sysstub.Po ./$(DEPDIR)/token.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/typedef.Po ./$(DEPDIR)/varspace.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/xctype.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(am__fxc_SOURCES_DIST) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(fxc_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj .rc $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu fxc/src/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) files.$(OBJEXT): ../../common/files.c xctype.$(OBJEXT): ../../common/xctype.c fxc$(EXEEXT): $(fxc_OBJECTS) $(fxc_DEPENDENCIES) @rm -f fxc$(EXEEXT) $(LINK) $(fxc_LDFLAGS) $(fxc_OBJECTS) $(fxc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_code.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_data.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codeblock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constants.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcbw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/files.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/identifier.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main_div.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/messages.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procedure.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/segment.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysstub.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/token.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/typedef.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/varspace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xctype.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'` files.o: ../../common/files.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.o -MD -MP -MF "$(DEPDIR)/files.Tpo" \ @am__fastdepCC_TRUE@ -c -o files.o `test -f '../../common/files.c' || echo '$(srcdir)/'`../../common/files.c; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/files.Tpo" "$(DEPDIR)/files.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/files.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/files.c' object='files.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/files.Po' tmpdepfile='$(DEPDIR)/files.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.o `test -f '../../common/files.c' || echo '$(srcdir)/'`../../common/files.c files.obj: ../../common/files.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.obj -MD -MP -MF "$(DEPDIR)/files.Tpo" \ @am__fastdepCC_TRUE@ -c -o files.obj `if test -f '../../common/files.c'; then $(CYGPATH_W) '../../common/files.c'; else $(CYGPATH_W) '$(srcdir)/../../common/files.c'`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/files.Tpo" "$(DEPDIR)/files.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/files.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/files.c' object='files.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/files.Po' tmpdepfile='$(DEPDIR)/files.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.obj `if test -f '../../common/files.c'; then $(CYGPATH_W) '../../common/files.c'; else $(CYGPATH_W) '$(srcdir)/../../common/files.c'` xctype.o: ../../common/xctype.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xctype.o -MD -MP -MF "$(DEPDIR)/xctype.Tpo" \ @am__fastdepCC_TRUE@ -c -o xctype.o `test -f '../../common/xctype.c' || echo '$(srcdir)/'`../../common/xctype.c; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/xctype.Tpo" "$(DEPDIR)/xctype.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/xctype.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/xctype.c' object='xctype.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/xctype.Po' tmpdepfile='$(DEPDIR)/xctype.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xctype.o `test -f '../../common/xctype.c' || echo '$(srcdir)/'`../../common/xctype.c xctype.obj: ../../common/xctype.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xctype.obj -MD -MP -MF "$(DEPDIR)/xctype.Tpo" \ @am__fastdepCC_TRUE@ -c -o xctype.obj `if test -f '../../common/xctype.c'; then $(CYGPATH_W) '../../common/xctype.c'; else $(CYGPATH_W) '$(srcdir)/../../common/xctype.c'`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/xctype.Tpo" "$(DEPDIR)/xctype.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/xctype.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/xctype.c' object='xctype.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/xctype.Po' tmpdepfile='$(DEPDIR)/xctype.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xctype.obj `if test -f '../../common/xctype.c'; then $(CYGPATH_W) '../../common/xctype.c'; else $(CYGPATH_W) '$(srcdir)/../../common/xctype.c'` uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(PROGRAMS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-depend distclean-generic distclean-tags distdir dvi \ dvi-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am .rc.o: $(WINDRES) $< -I../../include -o $@ # 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: Fenix/fxc/src/c_debug.c0000644000000000000000000001360310607526720013740 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #ifdef TARGET_BEOS #include #else #include #endif #include "fxc.h" /* ---------------------------------------------------------------------- */ /* Este mdulo contiene funciones que muestran el equivalente en texto de */ /* una instruccin o mnemnico, o de un bloque de cdigo completo */ /* ---------------------------------------------------------------------- */ struct { char * name; int code; int params ; } mnemonics[] = { { "ARRAY", MN_ARRAY, 1 }, { "GET_PRIVATE", MN_GET_PRIV, 1 }, { "GET_REMOTE", MN_GET_REMOTE, 1 }, { "GET_LOCAL", MN_GET_LOCAL, 1 }, { "GET_GLOBAL", MN_GET_GLOBAL, 1 }, { "PRIVATE", MN_PRIVATE, 1 }, { "REMOTE", MN_REMOTE, 1 }, { "LOCAL", MN_LOCAL, 1 }, { "GLOBAL", MN_GLOBAL, 1 }, { "DUP", MN_DUP }, { "PUSH", MN_PUSH, 1 }, { "POP", MN_POP }, { "INDEX", MN_INDEX, 1 }, { "NEG", MN_NEG }, { "NOT", MN_NOT }, { "CALL", MN_CALL, 1 }, { "PROCESS", MN_PROC, 1 }, { "SYSCALL", MN_SYSCALL, 1 }, { "SYSPROC", MN_SYSPROC, 1 }, { "CLONE", MN_CLONE, 1 }, { "END", MN_END }, { "RETURN", MN_RETURN }, { "FRAME", MN_FRAME }, { "TYPE", MN_TYPE, 1 }, { "MUL", MN_MUL }, { "DIV", MN_DIV }, { "ADD", MN_ADD }, { "SUB", MN_SUB }, { "MOD", MN_MOD }, { "ROR", MN_ROR }, { "ROL", MN_ROL }, { "AND", MN_AND }, { "OR", MN_OR }, { "XOR", MN_XOR }, { "BNOT", MN_BNOT }, { "BAND", MN_BAND }, { "BOR", MN_BOR }, { "BXOR", MN_BXOR }, { "EQ", MN_EQ }, { "NE", MN_NE }, { "GT", MN_GT }, { "LT", MN_LT }, { "GTE", MN_GTE }, { "LTE", MN_LTE }, { "FLOAT2INT", MN_FLOAT2INT, 1 }, { "INT2FLOAT", MN_INT2FLOAT, 1 }, { "INT2WORD", MN_INT2WORD, 1 }, { "INT2BYTE", MN_INT2BYTE, 1 }, { "POSTINC", MN_POSTINC, 1 }, { "POSTDEC", MN_POSTDEC, 1 }, { "INC", MN_INC, 1 }, { "DEC", MN_DEC, 1 }, { "VARADD", MN_VARADD }, { "VARSUB", MN_VARSUB }, { "VARMUL", MN_VARMUL }, { "VARDIV", MN_VARDIV }, { "VARMOD", MN_VARMOD }, { "VARXOR", MN_VARXOR }, { "VARAND", MN_VARAND }, { "VAROR", MN_VAROR }, { "VARROR", MN_VARROR }, { "VARROL", MN_VARROL }, { "LET", MN_LET }, { "LETNP", MN_LETNP }, { "REPEAT", MN_REPEAT, 1 }, { "BREAK", MN_BREAK, 1 }, { "BRFALSE", MN_BRFALSE, 1 }, { "RETRUE", MN_RETRUE, 1 }, { "REFALSE", MN_REFALSE, 1 }, { "JUMP", MN_JUMP, 1 }, { "JFALSE", MN_JFALSE, 1 }, { "JTRUE", MN_JTRUE, 1 }, { "JTFALSE", MN_JTFALSE, 1 }, { "JTTRUE", MN_JTTRUE, 1 }, { "PTR", MN_PTR }, { "SWITCH", MN_SWITCH }, { "CASE", MN_CASE, 0 }, { "CASE_R", MN_CASE_R, 0 }, { "JNOCASE", MN_JNOCASE, 1 }, { "CHRSTR", MN_CHRSTR }, { "SUBSTR", MN_SUBSTR, 1 }, { "STR2INT", MN_STR2INT, 1 }, { "STR2CHR", MN_STR2CHR, 1 }, { "INT2STR", MN_INT2STR, 1 }, { "CHR2STR", MN_CHR2STR, 1 }, { "STR2FLOAT", MN_STR2FLOAT, 1 }, { "FLOAT2STR", MN_FLOAT2STR, 1 }, { "POINTER2STR", MN_POINTER2STR, 1 }, { "POINTER2BOL", MN_POINTER2BOL, 1 }, { "A2STR", MN_A2STR, 0 }, { "STR2A", MN_STR2A, 0 }, { "STRACAT", MN_STRACAT, 0 }, { "DEBUG", MN_DEBUG, 1 }, { "------", MN_SENTENCE, 1 }, { "PUBLIC", MN_PUBLIC, 1 }, { "GET_PUBLIC", MN_GET_PUBLIC, 1 }, { "REMOTE_PUBLIC", MN_REMOTE_PUBLIC, 1 }, { "GET_REMOTE_PUBLIC", MN_GET_REMOTE_PUBLIC, 1 }, { 0, -1 } } ; void mnemonic_dump (int i, int param) { int n = 0 ; printf("%03X ", i); while (mnemonics[n].name) { if (mnemonics[n].code == (i & MN_MASK)) { switch (MN_TYPEOF(i)) { case MN_UNSIGNED: printf ("UNSIGNED ") ; break ; case MN_WORD: printf ("SHORT ") ; break ; case MN_WORD | MN_UNSIGNED: printf ("WORD ") ; break ; case MN_BYTE: printf ("CHAR ") ; break ; case MN_BYTE | MN_UNSIGNED: printf ("BYTE ") ; break ; case MN_FLOAT: printf ("FLOAT ") ; break ; case MN_STRING: printf ("STRING ") ; break ; default: printf (" ") ; break ; } printf ("%-20s", mnemonics[n].name) ; if (i == MN_SYSCALL || i == MN_SYSPROC) { printf ("%-8s", sysproc_name(param)) ; } else if (i == (MN_PUSH | MN_FLOAT)) { printf ("%-8f", *(float *)¶m) ; } else { switch(MN_PARAMS(i)){ case 1: printf ("%-8d", param) ; break; } } printf ("\n") ; } n++ ; } } void codeblock_dump (CODEBLOCK * c) { int i, n, showdir ; for (i = 0 ; i < c->current ; i += MN_PARAMS(c->data[i])+1) { showdir = 0 ; for (n = 0 ; n < c->label_count ; n++) { if (c->labels[n] == i) { if (!showdir) printf ("\n") ; printf ("Label %d:\n", n) ; showdir = 1 ; } } for (n = 1 ; n < c->loop_count ; n++) { if (c->loops[n*2] == i) { if (!showdir) printf ("\n") ; printf("Start %d:\n", n) ; showdir = 1 ; } if (c->loops[n*2+1] == i) { if (!showdir) printf ("\n") ; printf("End %d:\n", n) ; showdir = 1 ; } } if (showdir) printf ("\n%d:\t", i) ; else printf ("\t") ; mnemonic_dump (c->data[i], c->data[i+1] ); } printf ("%d:\n", i) ; } Fenix/fxc/src/sysstub.c0000644000000000000000000001136710607526726014077 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #include "fxc.h" #include "messages.c" /* Fast access sysproc list, by identifier code */ SYSPROC * * sysproc_list = NULL; int sysproc_maxid = 0; /* Este fichero contiene slo las definiciones de las funciones del sistema */ #define SYSMACRO(a) 0 #include "sysprocs.h" /* * FUNCTION : sysproc_add * * Add a new system function to the internal system function list * * PARAMS: * name Name of the process * paramtypes String representation of the parameter * type Type of the returning value * func Pointer to the function itself or a stub * * RETURN VALUE: * Identifier code allocated for the function */ int sysproc_add (char * name, char * paramtypes, int type, void * func) { static SYSPROC * last = 0 ; static int sysproc_count = 0 ; if (!last) { last = sysprocs ; sysproc_count++ ; while (last[1].name) last++, sysproc_count++ ; } last[1].code = last[0].code + 1 ; last[1].name = name ; last[1].paramtypes = paramtypes ; last[1].params = strlen(paramtypes) ; last[1].type = type ; last[1].id = 0 ; last[1].next = NULL ; last++ ; sysproc_count++ ; if (sysproc_count == MAX_SYSPROCS) compile_error (MSG_TOO_MANY_SYSPROCS) ; /* If the fast-access list is already filled, free it to fill it again * in sysproc_get. We should add the new process to the list, but this * is a very rare possibility and we're lazy */ if (sysproc_list != NULL) { free (sysproc_list); sysproc_list = NULL; sysproc_maxid = 0; } return last->code ; } /* * FUNCTION : sysproc_get * * Search for a system function by name and return a pointer * to the first ocurrence or NULL if none exists * * PARAMS: * id Unique code of the identifier of the name * * RETURN VALUE: * Pointer to the SYSPROC object or NULL if none exists */ SYSPROC * sysproc_get (int id) { SYSPROC * s ; /* If the table is filled, get the process with direct access */ if (id < sysproc_maxid) return sysproc_list[id]; /* Fill the table */ if (sysproc_list == NULL) { /* Alloc IDs if necessary and get the maximum one */ for (s = sysprocs ; s->name ; s++) { if (s->id == 0) s->id = identifier_search_or_add(s->name) ; if (s->id > sysproc_maxid) sysproc_maxid = s->id; s->next = NULL; } /* Alloc the table */ sysproc_maxid = ((sysproc_maxid+1) & ~31) + 32; sysproc_list = (SYSPROC * *) calloc (sysproc_maxid, sizeof(SYSPROC*)); if (sysproc_list == NULL) abort(); /* Fill it */ for (s = sysprocs ; s->name ; s++) { if (s->id > 0) { s->next = sysproc_list[s->id]; sysproc_list[s->id] = s; } } if (id < sysproc_maxid) return sysproc_list[id]; } return NULL; } /* * FUNCTION : sysproc_getall * * Search for a system function by name and return a pointer * to a zero-terminated table with pointers to all ocurrences. * Up to 31 occurences can be found with this function. * * PARAMS: * id Unique code of the identifier of the name * * RETURN VALUE: * Pointer to a new SYSPROC table allocated with malloc() * NULL if no process with this id exists */ SYSPROC * * sysproc_getall (int id) { SYSPROC * s = sysproc_get(id) ; SYSPROC * * table; int found = 0 ; if (s == NULL) return NULL; table = malloc(sizeof(SYSPROC *) * 32) ; do { table[found++] = s; s = s->next; } while (s && found <= 31); table[found] = NULL; return table ; } /* * FUNCTION : sysproc_name * * Return the name of a given system function * * PARAMS: * code Internal code of the function * * RETURN VALUE: * Pointer to the name or NULL if it was not found */ char * sysproc_name (int code) { SYSPROC * s = sysprocs ; while (s->name) { if (s->code == code) return s->name ; s++ ; } return 0 ; } Fenix/fxc/src/CVS/0000755000000000000000000000000010607744626012643 5ustar rootrootFenix/fxc/src/CVS/Repository0000644000000000000000000000001610601620476014730 0ustar rootrootFenix/fxc/src Fenix/fxc/src/CVS/Root0000644000000000000000000000007410601620476013500 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/fxc/src/CVS/Entries0000644000000000000000000000214310607744626014177 0ustar rootroot/Makefile.am/1.4/Thu Apr 12 22:08:11 2007// /Makefile.in/1.6/Thu Apr 12 22:08:11 2007// /c_code.c/1.19/Thu Apr 12 22:08:15 2007// /c_data.c/1.9/Thu Apr 12 22:08:16 2007// /c_debug.c/1.4/Thu Apr 12 22:08:17 2007// /c_main.c/1.12/Thu Apr 12 22:08:19 2007// /codeblock.c/1.4/Thu Apr 12 22:08:19 2007// /constants.c/1.1.1.1/Thu Apr 12 22:08:19 2007// /dcbw.c/1.9/Thu Apr 12 22:08:20 2007// /dcbw_old.c/1.1.1.1/Thu Apr 12 22:08:20 2007// /error.c/1.3/Thu Apr 12 22:08:20 2007// /fxc.ico/1.1/Thu Apr 12 22:08:20 2007/-kb/ /fxc.rc/1.1/Thu Apr 12 22:08:20 2007/-kb/ /identifier.c/1.2/Thu Apr 12 22:08:21 2007// /main.c/1.8/Thu Apr 12 22:08:21 2007// /main_div.c/1.10/Thu Apr 12 22:08:21 2007// /messages.c/1.4/Thu Apr 12 22:08:22 2007// /procedure.c/1.4/Thu Apr 12 22:08:22 2007// /resource.h/1.1/Thu Apr 12 22:08:22 2007// /segment.c/1.1.1.1/Thu Apr 12 22:08:22 2007// /strings.c/1.2/Thu Apr 12 22:08:22 2007// /sysstub.c/1.1.1.1/Thu Apr 12 22:08:23 2007// /token.c/1.6/Thu Apr 12 22:08:23 2007// /typedef.c/1.2/Thu Apr 12 22:08:23 2007// /varspace.c/1.1.1.1/Thu Apr 12 22:08:23 2007// /Makefile/1.29/Fri Apr 13 18:19:03 2007// D Fenix/fxc/src/main_div.c0000644000000000000000000003412110607526724014140 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #include "fxc.h" /* ----------------------------------------------------------------------- */ /* Este mdulo contiene las definiciones de constantes, locales y globales */ /* predefinidos, as como el cdigo que los carga y define cada una de las */ /* funciones del sistema (es llamado antes de empezar a compilar). */ /* ----------------------------------------------------------------------- */ struct { char * name ; int code ; } keys[] = { { "_ESC", 1 }, { "_1", 2 }, { "_2", 3 }, { "_3", 4 }, { "_4", 5 }, { "_5", 6 }, { "_6", 7 }, { "_7", 8 }, { "_8", 9 }, { "_9", 10 }, { "_0", 11 }, { "_MINUS", 12 }, { "_PLUS", 13 }, { "_BACKSPACE", 14 }, { "_TAB", 15 }, { "_Q", 16 }, { "_W", 17 }, { "_E", 18 }, { "_R", 19 }, { "_T", 20 }, { "_Y", 21 }, { "_U", 22 }, { "_I", 23 }, { "_O", 24 }, { "_P", 25 }, { "_L_BRACHET", 26 }, { "_R_BRACHET", 27 }, { "_ENTER", 28 }, { "_C_ENTER", 28 }, { "_CONTROL", 29 }, { "_A", 30 }, { "_S", 31 }, { "_D", 32 }, { "_F", 33 }, { "_G", 34 }, { "_H", 35 }, { "_J", 36 }, { "_K", 37 }, { "_L", 38 }, { "_SEMICOLON", 39 }, { "_APOSTROPHE", 40 }, { "_WAVE", 41 }, { "_L_SHIFT", 42 }, { "_BACKSLASH", 43 }, { "_Z", 44 }, { "_X", 45 }, { "_C", 46 }, { "_V", 47 }, { "_B", 48 }, { "_N", 49 }, { "_M", 50 }, { "_COMMA", 51 }, { "_POINT", 52 }, { "_SLASH", 53 }, { "_C_BACKSLASH", 53 }, { "_R_SHIFT", 54 }, { "_C_ASTERISK", 55 }, { "_PRN_SCR", 55 }, { "_ALT", 56 }, { "_SPACE", 57 }, { "_CAPS_LOCK", 58 }, { "_F1", 59 }, { "_F2", 60 }, { "_F3", 61 }, { "_F4", 62 }, { "_F5", 63 }, { "_F6", 64 }, { "_F7", 65 }, { "_F8", 66 }, { "_F9", 67 }, { "_F10", 68 }, { "_NUM_LOCK", 69 }, { "_SCROLL_LOCK", 70 }, { "_HOME", 71 }, { "_C_HOME", 71 }, { "_UP", 72 }, { "_C_UP", 72 }, { "_PGUP", 73 }, { "_C_PGUP", 73 }, { "_C_MINUS", 74 }, { "_LEFT", 75 }, { "_C_LEFT", 75 }, { "_C_CENTER", 76 }, { "_RIGHT", 77 }, { "_C_RIGHT", 77 }, { "_C_PLUS", 78 }, { "_END", 79 }, { "_C_END", 79 }, { "_DOWN", 80 }, { "_C_DOWN", 80 }, { "_PGDN", 81 }, { "_C_PGDN", 81 }, { "_INS", 82 }, { "_C_INS", 82 }, { "_DEL", 83 }, { "_C_DEL", 83 }, { "_F11", 87 }, { "_F12", 88 }, { "_LESS", 89 }, { "_EQUALS", 90 }, { "_GREATER", 91 }, { "_ASTERISK", 92 }, { "_R_ALT", 93 }, { "_R_CONTROL", 94 }, { "_L_ALT", 95 }, { "_L_CONTROL", 96 }, { "_MENU", 97 }, { "_L_WINDOWS", 98 }, { "_R_WINDOWS", 98 }, { 0, 0 } } ; char * locals_def = " id; \n" " STRUCT reserved \n" " id_scan ; \n" " process_type ; \n" " type_scan ; \n" " status = 2 ; \n" " changed ; \n" " xgraph_flags ; \n" " saved_status = 2 ; \n" " prev_z ; \n" " distance1 ; \n" " distance2 ; \n" " frame_percent ; \n" " box_x0, box_y0 ; \n" " box_x1, box_y1 ; \n" " END \n" " father ; \n" " son ; \n" " smallbro ; \n" " bigbro ; \n" " priority ; \n" " ctype ; \n" " cnumber ; \n" " x ; \n" " y ; \n" " z ; \n" " graph ; \n" " flags ; \n" " size = 100 ; \n" " angle ; \n" " region ; \n" " file ; \n" " pointer xgraph ; \n" " height ; \n" " resolution ; \n" " alpha = 255 ; \n" " size_x = 100 ; \n" " size_y = 100 ; \n" " blendop ; \n" " STRUCT _saved_ \n" " x ; \n" " y ; \n" " graph ; \n" " angle ; \n" " alpha ; \n" " blendop ; \n" " size ; \n" " size_x ; \n" " size_y ; \n" " flags ; \n" " file ; \n" " pointer xgraph ; \n" " priority; \n" " END \n" ; char * globals_def = " STRUCT mouse \n" " x, y ; \n" " graph ; \n" " file ; \n" " z = -512 ; \n" " angle ; \n" " size = 100 ; \n" " flags ; \n" " region ; \n" " left, middle, right ; \n" " wheelup, wheeldown ; \n" " END \n" " \n" " STRUCT scroll[9] \n" " x0, y0 ; \n" " x1, y1 ; \n" " z = 512 ; \n" " camera ; \n" " ratio = 200; \n" " speed ; \n" " region1 = -1 ; \n" " region2 = -1 ; \n" " flags1 ; \n" " flags2 ; \n" " follow = -1 ; \n" " reserved[6] ; // Tamao: 20 dwords \n" " END \n" " \n" " STRUCT joy \n" " left ; \n" " right ; \n" " up ; \n" " down ; \n" " button1 ; \n" " button2 ; \n" " button3 ; \n" " button4 ; \n" " END \n" " \n" " STRUCT setup \n" " card ; \n" " port ; \n" " irq ; \n" " dma ; \n" " dma2 ; \n" " master ; \n" " sound_fx ; \n" " cd_audio ; \n" " END \n" " \n" " timer[9] ; \n" " \n" " text_z = -256; \n" " fading ; \n" " shift_status ; \n" " ascii ; \n" " scan_code ; \n" " joy_filter ; \n" " joy_status ; \n" " restore_type ; \n" " dump_type ; \n" " max_process_time ; \n" " \n" " // Modo 7 \n" " \n" " STRUCT m7[9] \n" " camera ; \n" " \n" " height = 32 ; \n" " distance = 64 ; \n" " horizon = 0 ; \n" " focus = 256 ; \n" " z = 256 ; \n" " color = 0 ; \n" " flags = 0 ; \n" " reserved[1] ; \n" " END \n" " \n" " // No documentados \n" " \n" " fps ; \n" " \n" " // Propios de Fenix \n" " \n" " text_flags ; \n" " pansep = 64 ; \n" " reverb = 0 ; \n" " volume = 128 ; \n" " sound_freq = 22050; \n" " sound_mode = 1 ; \n" " \n" " graph_mode = 0; \n" /* Undocumented - Obsolete */ " scale_mode = SCALE_NONE; \n" " \n" " argc ; \n" " string argv[32] ; \n" " \n" " speed_gauge = 0 ; \n" " FLOAT frame_time = 0 ; \n" " STRING regex_reg[15] ; \n" " alpha_steps = 16 ; \n" " \n" " STRUCT fileinfo \n" " STRING path; \n" " STRING name; \n" " directory; \n" " hidden; \n" " readonly; \n" " size; \n" " STRING created; \n" " STRING modified; \n" " END \n" " full_screen = 0 ; \n" /* Undocumented - Obsolete */ " exit_status = 0 ; \n" /* SDL_QUIT status - updated automatically in FXI */ " window_status = 1 ; \n" /* MINIMIZED:0 VISIBLE:1 updated automatically in FXI */ " focus_status = 1 ; \n" /* FOCUS status - updated automatically in FXI */ " mouse_status = 1; \n" /* MOUSE status (INSIDE WINDOW:1) - updated in FXI */ " STRUCT cdinfo \n" " current_track; \n" " current_frame; \n" " tracks; \n" " minute; \n" " second; \n" " subframe; \n" " minutes; \n" " seconds; \n" " subframes; \n" " STRUCT track[99] \n" " audio; \n" " minutes; \n" " seconds; \n" " subframes; \n" " END; \n" " END; \n" " fxi_os = -1 ;\n" " sound_channels = 8 ;\n" " \n"; struct { char * name ; int code ; } constants_def[] = { { "M320X200", 3200200 }, { "M320X240", 3200240 }, { "M320X400", 3200400 }, { "M360X240", 3600240 }, { "M376X282", 3760282 }, { "M400X300", 4000300 }, { "M512X384", 5120384 }, { "M640X400", 6400400 }, { "M640X480", 6400480 }, { "M800X600", 8000600 }, { "M1024X768", 10240768 }, { "M1280X1024", 12801024 }, { "MODE_MONO", 0 }, { "MODE_STEREO", 1 }, { "MODE_8BITS", 8 }, { "MODE_16BITS", 16 }, { "MODE_8BPP", 8 }, { "MODE_16BPP", 16 }, { "MODE_WINDOW", 0x0000 }, { "MODE_2XSCALE", 0x0100 }, { "MODE_FULLSCREEN", 0x0200 }, { "MODE_DOUBLEBUFFER", 0x0400 }, { "MODE_HARDWARE", 0x0800 }, { "DOUBLE_BUFFER", 0x0400 }, /* Obsolete */ { "HW_SURFACE", 0x0800 }, /* Obsolete */ { "MODE_MODAL", 0x1000 }, /* GRAB INPU */ { "MODE_FRAMELESS", 0x2000 }, /* FRAMELESS window */ { "SCALE_NONE", SCALE_NONE }, { "SCALE_SCALE2X", SCALE_SCALE2X }, { "SCALE_HQ2X", SCALE_HQ2X }, { "SCALE_SCANLINE2X", SCALE_SCANLINE2X }, { "SCALE_NORMAL2X", SCALE_NOFILTER }, { "SCALE_NOFILTER", SCALE_NOFILTER }, { "FALSE", 0 }, { "TRUE", !0 }, { "S_KILL", 0 }, { "S_WAKEUP", 1 }, { "S_SLEEP", 2 }, { "S_FREEZE", 3 }, { "S_KILL_TREE", 100 }, { "S_WAKEUP_TREE", 101 }, { "S_SLEEP_TREE", 102 }, { "S_FREEZE_TREE", 103 }, { "ALL_TEXT", 0 }, { "ALL_SOUND", -1 }, { "G_WIDE", 0 }, /* Obsolete */ { "G_WIDTH", 0 }, { "G_HEIGHT", 1 }, { "G_CENTER_X", 2 }, { "G_CENTER_Y", 3 }, { "G_X_CENTER", 2 }, { "G_Y_CENTER", 3 }, { "G_PITCH", 4 }, { "G_DEPTH", 5 }, { "G_FRAMES", 6 }, { "G_ANIMATION_STEPS", 7 }, { "G_ANIMATION_STEP", 8 }, { "G_ANIMATION_SPEED", 9 }, { "PF_NODIAG", 1 }, { "PF_REVERSE", 2 }, { "C_SCREEN", 0 }, { "C_SCROLL", 1 }, { "C_M7", 2 }, { "PARTIAL_DUMP", 0 }, { "COMPLETE_DUMP", 1 }, { "NO_RESTORE", -1 }, { "PARTIAL_RESTORE", 0 }, { "COMPLETE_RESTORE", 1 }, { "C_0", 1 }, { "C_1", 2 }, { "C_2", 4 }, { "C_3", 8 }, { "C_4", 16 }, { "C_5", 32 }, { "C_6", 64 }, { "C_7", 128 }, { "C_8", 256 }, { "C_9", 512 }, { "MIN_INT", -32767 }, { "MAX_INT", 32767 }, { "PI", 180000 }, { "BACKGROUND", 0 }, { "SCREEN", -1 }, { "O_READ", 0 }, { "O_READWRITE", 1 }, { "O_RDWR", 1 }, { "O_WRITE", 2 }, { "O_ZREAD", 3 }, { "O_ZWRITE", 4 }, { "SEEK_SET", 0 }, { "SEEK_CUR", 1 }, { "SEEK_END", 2 }, { "CD_TRAYEMPTY", 0 }, { "CD_STOPPED", 1 }, { "CD_PLAYING", 2 }, { "CD_PAUSED", 3 }, { "CD_ERROR", -1 }, { "OS_WIN32", 0 }, { "OS_LINUX", 1 }, { "OS_BEOS", 2 }, { "OS_MACOS", 3 }, { "OS_GP32", 4 }, { "OS_DC", 5 }, { "OS_BSD", 6 }, { "STATUS_DEAD" , 0 }, { "STATUS_KILLED" , 1 }, { "STATUS_RUNNING" , 2 }, { "STATUS_SLEEPING" , 3 }, { "STATUS_FROZEN" , 4 }, { "STATUS_WAITING" , 7 }, /* Flags para gr_blit */ { "B_HMIRROR" , B_HMIRROR }, { "B_VMIRROR" , B_VMIRROR }, { "B_TRANSLUCENT" , B_TRANSLUCENT }, { "B_ALPHA" , B_ALPHA }, { "B_ABLEND" , B_ABLEND }, { "B_SBLEND" , B_SBLEND }, { "B_NOCOLORKEY" , B_NOCOLORKEY }, { 0, 0 } } ; void div_init () { int i = 0, code ; while (keys[i].name) { code = identifier_search_or_add (keys[i].name) ; constants_add (code, typedef_new(TYPE_DWORD), keys[i].code) ; i++ ; } i = 0 ; while (constants_def[i].name) { code = identifier_search_or_add (constants_def[i].name) ; constants_add (code, typedef_new(TYPE_DWORD), constants_def[i].code) ; i++ ; } token_init (globals_def, 0) ; /* (2006/11/19 19:34 GMT-03:00, Splinter - jj_arg@yahoo.com) */ compile_varspace (&global, globaldata, 1, 1, 0, NULL, DEFAULT_ALIGNMENT) ; token_init (locals_def, 0) ; /* (2006/11/19 19:34 GMT-03:00, Splinter - jj_arg@yahoo.com) */ compile_varspace (&local, localdata, 1, 1, 0, NULL, DEFAULT_ALIGNMENT) ; } Fenix/fxc/src/Makefile.am0000644000000000000000000000110710607526712014235 0ustar rootrootbin_PROGRAMS = fxc .rc.o: $(WINDRES) $< -I../../include -o $@ INCLUDES = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I../../include -I../inc fxc_LDADD = $(SDL_LIBS) $(COMMON_LIBS) -lz SOURCE_FILES = main.c main_div.c token.c identifier.c segment.c \ constants.c strings.c varspace.c procedure.c codeblock.c \ c_main.c c_data.c c_code.c c_debug.c dcbw.c \ messages.c error.c \ sysstub.c typedef.c ../../common/files.c ../../common/xctype.c if HAVE_WINDRES fxc_SOURCES = $(SOURCE_FILES) fxc.rc else fxc_SOURCES = $(SOURCE_FILES) endif Fenix/fxc/src/c_data.c0000644000000000000000000007261210607526716013575 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #ifdef TARGET_BEOS #include #else #include #endif #include #include #include "fxc.h" #include "messages.c" /* ---------------------------------------------------------------------- */ /* Este mdulo contiene las funciones que compilan definiciones de datos: */ /* declaraciones de variables e inicialziacin de las mismas */ /* ---------------------------------------------------------------------- */ int compile_array_data (VARSPACE * n, segment * data, int size, int subsize, BASETYPE *t) { int block, count = 0, base, remaining = size ; int base_offset, total_length ; expresion_result res ; for (;;) { if (!remaining && size) { token_back(); break; compile_error (MSG_TOO_MANY_INIT) ; } token_next() ; /* if (*t == TYPE_UNDEFINED && token.type == STRING) { *t = typedef_base(typedef_new(TYPE_STRING)) ; } */ if (token.type == STRING && *t == TYPE_CHAR) { const char * str = string_get(token.code) ; int subcount = 0 ; if (subsize == 0) subsize = strlen(str)+1; if ((int)strlen(str) > subsize-1) compile_error(MSG_TOO_MANY_INIT) ; while (*str) { segment_add_as (data, *str++, *t) ; subcount++ ; } while (subcount++ < subsize) segment_add_as (data, 0, *t) ; count += subsize ; remaining -= subsize ; } else if (token.type == IDENTIFIER && ( token.code == identifier_rightp || token.code == identifier_semicolon) ) { token_back() ; break ; } else if (token.type == IDENTIFIER && token.code == identifier_leftp) { block = compile_array_data (n, data, remaining, remaining, t) ; remaining -= block ; count += block ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) compile_error (MSG_EXPECTED, ")") ; } else { token_back() ; res = compile_expresion(1, 0, *t) ; if (*t == TYPE_UNDEFINED) { *t = typedef_base (res.type) ; if (*t == TYPE_UNDEFINED) { compile_error (MSG_INCOMP_TYPE) ; } } base = res.value ; if (*t == TYPE_FLOAT) base = *(int *)&res.fvalue ; token_next() ; if (token.type == IDENTIFIER && token.code == identifier_dup) { token_next() ; if (token.type != IDENTIFIER || token.code != identifier_leftp) compile_error (MSG_EXPECTED, "(") ; base_offset = data->current ; block = compile_array_data (n, data, remaining, remaining, t) ; total_length = data->current - base_offset ; if (size && block * base > remaining) { break; //compile_error (MSG_TOO_MANY_INIT) ; } count += block * base ; if (size) remaining -= block * base ; while (base-- > 1) { segment_copy (data, base_offset, total_length) ; base_offset += total_length ; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) compile_error (MSG_EXPECTED, ")") ; } else { token_back() ; if (*t == TYPE_STRING) varspace_varstring (n, data->current) ; segment_add_as (data, base, *t) ; count ++ ; if (size) remaining -- ; } } token_next() ; if (token.type == IDENTIFIER && token.code == identifier_comma){ continue ; } token_back() ; break ; } return count ; } static BASETYPE get_basetype (VARSPACE * v) { TYPEDEF t ; BASETYPE type = TYPE_UNDEFINED, newtype ; int n ; for (n = 0 ; n < v->count ; n++) { t = v->vars[n].type ; while (typedef_is_array(t)) { t = typedef_reduce(t) ; } if (typedef_is_struct(t)) { newtype = get_basetype (typedef_members(t)) ; } else { newtype = typedef_base(t) ; } if (type != TYPE_UNDEFINED && type != newtype) { return TYPE_UNDEFINED ; } type = newtype ; } return type ; } /* * FUNCTION : compile_struct_data * * Compile the values of an struct initialization * Does not suppor parenthized sections or the DUP operator * * PARAMS: * n Current variable space * data Current data segment * size Size (total number of variables) of the array * including all dimensions (1 for single struct) * sub 1 if the struct we'are initializing is part of * another one (the function will then ignore * a trailing comma) * * RETURN VALUE: * Number of structs initialized */ int compile_struct_data (VARSPACE * n, segment * data, int size, int sub) { int elements = 0 ; int position = 0 ; expresion_result res ; for(;;) { token_next() ; /* Allow parenthized struct initialization */ if (token.type == IDENTIFIER && token.code == identifier_leftp) { if ((elements % n->count) != 0) { compile_error (MSG_NOT_ENOUGH_INIT); } /* Note - don't ignore a trailing comma! */ elements = compile_struct_data (n, data, size, 0) ; if (elements >= n->count) { size -= (elements / n->count); } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightp) { compile_error (MSG_EXPECTED, ")") ; } token_next() ; if ((elements % n->count) == 0 && size > 0 && token.type == IDENTIFIER && token.code == identifier_comma) { continue; } token_back() ; return elements ; } /* Allow empty initialization */ if (token.type == IDENTIFIER && token.code == identifier_semicolon) { return 0 ; } token_back() ; for (;;) { TYPEDEF next_type = n->vars[position].type ; /* Next variable is a pointer */ if (typedef_is_pointer (next_type)) { res = compile_expresion(1, 0, TYPE_DWORD) ; if (!res.constant) { compile_error (MSG_INCORRECT_PTR_INIT); } segment_add_as (data, 0, TYPE_POINTER) ; } else if (typedef_is_array (next_type)) { /* Next variable is an array */ int elements = typedef_tcount(next_type) ; BASETYPE base; /* Get the array base type */ while (typedef_is_array(next_type)) { next_type = typedef_reduce(next_type); } base = typedef_base(next_type); /* Special case: array of structs */ if (base == TYPE_STRUCT) { compile_struct_data (next_type.varspace, data, elements, 1); } else { token_next(); /* Special case: intializing char[] strings */ if (token.type == STRING && next_type.chunk[1].type == TYPE_CHAR) { const char * str = string_get(token.code) ; int subcount = 0 ; if ((int)strlen(str) > typedef_count(next_type)-1) { compile_error(MSG_TOO_MANY_INIT) ; } while (*str) { segment_add_as (data, *str++, TYPE_CHAR) ; subcount++ ; } while (subcount++ < typedef_count(next_type)) { segment_add_as (data, 0, TYPE_CHAR) ; } } else { /* Initializing normal arrays */ int has_parents = 1; if (token.type != IDENTIFIER || token.code != identifier_leftp) { has_parents = 0; token_back(); } compile_array_data (n, data, elements, elements, &base) ; if (has_parents) { token_next() ; if (token.type != IDENTIFIER || token.code != token.type != identifier_rightp) { compile_error (MSG_EXPECTED, ")") ; } } } } } else if (typedef_is_struct (next_type)) { /* Next variable is another struct */ compile_struct_data (next_type.varspace, data, 1, 1) ; } else { /* Next variable is a single type */ res = compile_expresion(1, 0, typedef_base(next_type)) ; if (!res.constant) { compile_error (MSG_CONSTANT_EXP); } segment_add_as (data, typedef_base(next_type) == TYPE_FLOAT ? *(int*)&res.fvalue : res.value, typedef_base(next_type)) ; } position++ ; elements++ ; if (position == n->count && size < 2 && sub) { break ; } /* A comma should be here */ token_next() ; if (token.type == IDENTIFIER && token.code == identifier_semicolon) { token_back(); break ; } if (token.type == IDENTIFIER && token.code == identifier_rightp) { token_back() ; break ; } if (token.type != IDENTIFIER || token.code != identifier_comma) { compile_error (MSG_EXPECTED, ",") ; } /* Wrap around for the next struct */ if (position == n->count) { if (size == 1 && !sub) { compile_error (MSG_TOO_MANY_INIT) ; } size--; position = 0; } } break; } return elements ; } static void set_type (TYPEDEF * t, BASETYPE type) { #if 0 int n ; for (n = 0 ; n < t->depth ; n++) if (t->chunk[n].type == TYPE_UNDEFINED) { t->chunk[n].type = type ; break ; } return ; #endif t->chunk[t->depth-1].type = type ; return ; } /* * FUNCTION : compile_varspace * * Compile a variable space (a LOCAL, PRIVATE or GLOBAL section, * or part of a STRUCT data) * * PARAMS : * n Pointer to the VARSPACE object (already initialized) * data Pointer to the data segment. All variables are added at end. * additive 1 if the compiling is additive (the struct members have * non-local offset; GLOBAL case) or not (STRUCT case) * copies Number of data copies (if the STRUCT is part of an array) * collision Check this varspace array for name collisions (NULL = end of array), if nonzero * (2006/11/19 19:34 GMT-03:00, Splinter - jj_arg@yahoo.com) * alignment Byte size for member alignment. Empty data will be added * to the varspace if its size is not multiple of this value. * * In any case, nested varspaces (structs) will have an alignment of 0. * * RETURN VALUE : * None * */ int compile_varspace (VARSPACE * n, segment * data, int additive, int copies, int padding, VARSPACE ** collision, int alignment) { int i, j, total_count, last_count = 0 ; int base_offset = data->current ; int total_length ; int size, count ; int code ; int is_pointer = 0 ; BASETYPE basetype = TYPE_UNDEFINED ; BASETYPE basetypeb = TYPE_UNDEFINED ; TYPEDEF type ; TYPEDEF typeb ; expresion_result res ; segment * s = 0 ; VARSPACE * v = 0 ; int unsigned_prefix = 0; int signed_prefix = 0; PROCDEF * proc = NULL; for (;;) { basetype = basetypeb ; type = typeb ; is_pointer = 0; if (n->reserved == n->count) { varspace_alloc (n, 16) ; } if (alignment && (n->size % alignment) > 0) { int extra = alignment - (n->size % alignment); if (n->reserved <= n->count + extra) { varspace_alloc (n, extra + 16); } if (data->reserved <= data->current + extra) { segment_alloc (data, extra + 16); } n->size += extra; data->current += extra; } token_next() ; /* Se salta comas y puntos y coma */ if (token.type == NOTOKEN) { break ; } if (token.type != IDENTIFIER) { compile_error (MSG_INCOMP_TYPE) ; } if (token.code == identifier_comma) { basetype = basetypeb ; type = typeb ; continue ; } if (token.code == identifier_semicolon) { basetype = TYPE_UNDEFINED ; basetypeb = TYPE_UNDEFINED ; is_pointer = 0 ; s = 0 ; v = 0 ; continue ; } if (token.code == identifier_end) { break ; } /* "Unsigned" */ if (token.code == identifier_unsigned) { unsigned_prefix = 1; token_next(); } else if (token.code == identifier_signed) { signed_prefix = 1; token_next(); } /* Tipos de datos bsicos */ if (token.code == identifier_dword) { basetype = signed_prefix ? TYPE_INT : TYPE_DWORD ; signed_prefix = unsigned_prefix = 0; token_next() ; } else if (token.code == identifier_word) { basetype = signed_prefix ? TYPE_SHORT : TYPE_WORD ; signed_prefix = unsigned_prefix = 0; token_next() ; } else if (token.code == identifier_byte) { basetype = signed_prefix ? TYPE_SBYTE : TYPE_BYTE ; signed_prefix = unsigned_prefix = 0; token_next() ; } else if (token.code == identifier_int) { basetype = unsigned_prefix ? TYPE_DWORD : TYPE_INT; signed_prefix = unsigned_prefix = 0; token_next() ; } else if (token.code == identifier_short) { basetype = unsigned_prefix ? TYPE_WORD : TYPE_SHORT; signed_prefix = unsigned_prefix = 0; token_next() ; } else if (token.code == identifier_char) { basetype = TYPE_CHAR ; token_next() ; } else if (token.code == identifier_float) { basetype = TYPE_FLOAT ; token_next() ; } else if (token.code == identifier_string) { basetype = TYPE_STRING ; token_next() ; } else { if ((proc = procdef_search (token.code))) { /* Variables tipo proceso, Splinter */ basetype = TYPE_INT ; token_next(); } else { if (token.type == IDENTIFIER && token.code >= reserved_words && segment_by_name(token.code) == 0) { int code = token.code; token_next(); if (token.type == IDENTIFIER && token.code >= reserved_words) { proc = procdef_new(procdef_getid(),code); basetype = TYPE_INT ; } else { token_back(); } } } } if (signed_prefix || unsigned_prefix) { compile_error(MSG_INVALID_TYPE); } if (basetype != TYPE_STRUCT) { type = typedef_new(basetype) ; } if (basetype == TYPE_UNDEFINED) { type = typedef_new(TYPE_INT) ; } /* Tipos de datos definidos por el usuario */ if (basetype != TYPE_STRUCT && (s = segment_by_name(token.code)) != 0) { basetype = TYPE_STRUCT ; type = *typedef_by_name(token.code) ; token_next() ; } /* Tipos de datos derivados */ while (token.type == IDENTIFIER && (token.code == identifier_pointer || token.code == identifier_multiply)) { is_pointer++ ; token_next() ; } if (token.type == IDENTIFIER && token.code == identifier_struct) { type.chunk[0].type = TYPE_STRUCT ; type.chunk[0].count = 1 ; type.depth = 1 ; token_next() ; s = 0 ; } basetypeb = basetype ; typeb = type ; while (is_pointer) { type = typedef_enlarge(type) ; type.chunk[0].type = TYPE_POINTER ; basetype = TYPE_POINTER ; is_pointer-- ; s = 0 ; v = 0 ; } /* Nombre del dato */ if (token.type != IDENTIFIER) { compile_error (MSG_IDENTIFIER_EXP) ; } if (token.code < reserved_words) { if ( proc ) { compile_error (MSG_VARIABLE_ERROR); } token_back() ; break ; } if (varspace_search (n, token.code)) { compile_error (MSG_VARIABLE_ALREADY) ; } /* (2006/11/19 19:34 GMT-03:00, Splinter - jj_arg@yahoo.com) */ if ( collision ) { for (i=0; collision[i];i++) { if (varspace_search (collision[i], token.code)) { compile_error (MSG_VARIABLE_ALREADY) ; } } } /* (2006/11/19 19:34 GMT-03:00, Splinter - jj_arg@yahoo.com) */ code = token.code ; n->vars[n->count].code = token.code ; n->vars[n->count].offset = data->current; /* Non-additive STRUCT; use zero-based member offsets */ if (!additive) { n->vars[n->count].offset -= base_offset; } token_next() ; /* Compila una estructura no predefinida */ if (!s && typedef_is_struct(type)) { VARSPACE * members ; type.chunk[0].count = 1 ; count = 1 ; while (token.type == IDENTIFIER && token.code == identifier_leftb) { res = compile_expresion(1, 0, TYPE_INT) ; if (!typedef_is_integer(res.type)) { compile_error (MSG_INTEGER_REQUIRED) ; } count *= res.value+1 ; type = typedef_enlarge(type) ; type.chunk[0].type = TYPE_ARRAY ; type.chunk[0].count = res.value+1 ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightb) { compile_error (MSG_EXPECTED, "]") ; } token_next() ; } token_back() ; // Da la vuelta a los ndices ([3][2] -> [2][3]) for (i = 0 ; i < type.depth ; i++) { if (type.chunk[i].type != TYPE_ARRAY) { break ; } } for (j = --i ; j > i-j ; j--) { TYPECHUNK n ; n = type.chunk[j] ; type.chunk[j] = type.chunk[i-j] ; type.chunk[i-j] = n ; } members = (VARSPACE *)malloc (sizeof(VARSPACE)) ; if (!members) { fprintf (stdout, "compile_varspace: out of memory\n") ; exit(1) ; } varspace_init (members) ; size = compile_varspace (members, data, 0, count, 0, NULL, 0) ; type.varspace = members ; token_next() ; if (token.type == IDENTIFIER && token.code == identifier_equal) { i = data->current ; data->current = n->vars[n->count].offset ; compile_struct_data (members, data, count, 0); data->current = i ; } else { token_back() ; } for (i = 0 ; i < members->stringvar_count ; i++) { varspace_varstring (n, members->stringvars[i]) ; } n->size += typedef_size(type) ; n->vars[n->count].type = type ; n->count++ ; continue ; /* No ; */ } else if (token.type == IDENTIFIER && token.code == identifier_leftb) { /* Compila un array */ total_count = 1 ; while (token.type == IDENTIFIER && token.code == identifier_leftb) { if (type.depth == MAX_TYPECHUNKS) { compile_error (MSG_TOO_MANY_AL) ; } type = typedef_enlarge(type) ; type.chunk[0].type = TYPE_ARRAY ; token_next() ; if (token.type == IDENTIFIER && token.code == identifier_rightb) { type.chunk[0].count = 0 ; if (total_count != 1) { compile_error (MSG_VTA) ; } total_count = 0 ; } else { token_back() ; res = compile_expresion(1,0,TYPE_DWORD) ; if (!total_count) { compile_error (MSG_VTA) ; } total_count *= res.value+1 ; last_count = res.value+1 ; type.chunk[0].count = res.value+1 ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_rightb) { compile_error (MSG_EXPECTED, "]") ; } } token_next() ; } // Da la vuelta a los ndices [10][5] -> [5][10] for (i = 0 ; i < type.depth ; i++) { if (type.chunk[i].type != TYPE_ARRAY) { break ; } } for (j = --i ; j > i-j ; j--) { TYPECHUNK n ; n = type.chunk[j] ; type.chunk[j] = type.chunk[i-j] ; type.chunk[i-j] = n ; } if (s && token.type == IDENTIFIER && token.code == identifier_equal) { int ii = 1; for (i = 0 ; i < total_count ; i++) { segment_add_from (data, s) ; } i = data->current ; data->current = n->vars[n->count].offset ; ii = compile_struct_data (type.varspace, data, typedef_count(type), 0); type.chunk[0].count = ii / typedef_members(typeb)->count; /* Comentado para poder inicializar arrays de structs sin dimension */ // data->current = i; } else if (token.type == IDENTIFIER && token.code == identifier_equal) { /* if (basetype == TYPE_UNDEFINED) basetype = TYPE_INT;*/ i = compile_array_data (n, data, total_count, last_count, &basetype) ; assert (basetype != TYPE_UNDEFINED) ; set_type (&type, basetype) ; if (total_count == 0) { type.chunk[0].count = i ; } else if (i < total_count) { for (; i < total_count ; i++) { if (basetype == TYPE_STRING) { varspace_varstring (n, data->current) ; } segment_add_as (data, 0, basetype) ; } } } else if (s) { int string_offset = 0, j; if (total_count == 0) { compile_error (MSG_EXPECTED, "=") ; } for (i = 0 ; i < total_count ; i++) { segment_add_from (data, s) ; for (j = 0 ; j < type.varspace->stringvar_count ; j++) { varspace_varstring (n, type.varspace->stringvars[j] + string_offset); } string_offset += type.varspace->size; } token_back() ; } else { if (basetype == TYPE_UNDEFINED) { basetype = TYPE_INT; set_type (&type, basetype) ; } if (type.chunk[0].count == 0) { compile_error (MSG_EXPECTED, "=") ; } for (i = 0 ; i < total_count ; i++) { if (basetype == TYPE_STRING) { varspace_varstring (n, data->current) ; } segment_add_as (data, 0, basetype) ; } token_back() ; } } else if (s && token.type == IDENTIFIER && token.code == identifier_equal) { /* Compila una asignacin de valores por defecto */ segment_add_from (data, s) ; i = data->current ; data->current = n->vars[n->count].offset ; if (!additive) { data->current += base_offset; } compile_struct_data (type.varspace, data, 1, 0); data->current = i ; } else if (token.type == IDENTIFIER && token.code == identifier_equal) { res = compile_expresion(1,0,basetype) ; if (basetype == TYPE_UNDEFINED) { basetype = typedef_base (res.type) ; if (basetype == TYPE_UNDEFINED) { compile_error (MSG_INCOMP_TYPE) ; } set_type (&type, basetype) ; } if (basetype == TYPE_FLOAT) { segment_add_as (data, *(int *)&res.fvalue, basetype) ; } else { if (basetype == TYPE_STRING) { varspace_varstring (n, data->current) ; } segment_add_as (data, res.value, basetype) ; } } else if (!s) { /* Asigna valores por defecto (0) */ if (basetype == TYPE_UNDEFINED) { basetype = TYPE_INT; set_type (&type, basetype) ; } if (basetype == TYPE_STRING) { varspace_varstring (n, data->current) ; } segment_add_as (data, 0, basetype) ; token_back() ; } else { if (typedef_is_struct(type)) { for (i = 0 ; i < type.varspace->stringvar_count ; i++) { varspace_varstring(n, type.varspace->stringvars[i] + n->size); } } segment_add_from (data, s) ; token_back() ; } n->size += typedef_size(type) ; n->vars[n->count].type = type ; /* Variables tipo proceso, asigno varspace al tipo. Splinter */ if ( proc ) { n->vars[n->count].type.varspace = proc->pubvars; } n->count++ ; token_next() ; if (token.type == IDENTIFIER && token.code == identifier_comma) { continue ; } if (token.type == IDENTIFIER && token.code == identifier_semicolon) { basetype = TYPE_UNDEFINED; basetypeb = basetype; is_pointer = 0 ; continue ; } compile_error (MSG_EXPECTED, ";") ; token_back() ; break ; } if (padding && (data->current % padding) > 0) { padding -= data->current % padding; data->current += padding; n->size += padding; if (data->reserved <= data->current) { segment_alloc (data, data->reserved - data->current + 32); } } n->last_offset = data->current ; total_length = data->current - base_offset ; //n->size *= copies ; while (copies-- > 1) { int i ; for (i = 0 ; i < n->stringvar_count ; i++) { if (n->stringvars[i] >= base_offset && n->stringvars[i] < base_offset + total_length) { varspace_varstring (n, n->stringvars[i] - base_offset + data->current) ; } } segment_copy (data, base_offset, total_length) ; base_offset += total_length ; } return total_length ; } Fenix/fxc/src/c_main.c0000644000000000000000000010726710607526722013612 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #include #include #ifdef TARGET_BEOS #include #endif #include #include "fxc.h" #include "messages.c" /* ---------------------------------------------------------------------- */ /* Mdulo principal del compilador. Contiene cdigo que inicializa los */ /* identificadores conocidos, as como las funciones de compilado de */ /* nivel ms alto */ /* ---------------------------------------------------------------------- */ /* Tipos */ int identifier_dword ; int identifier_word ; int identifier_byte ; int identifier_int ; int identifier_short ; int identifier_char ; int identifier_unsigned ; int identifier_signed ; int identifier_string ; int identifier_float ; int identifier_struct ; int identifier_type ; int identifier_declare ; int identifier_program ; int identifier_debug ; int identifier_const ; int identifier_begin ; int identifier_end ; int identifier_global ; int identifier_local ; int identifier_public ; int identifier_private ; int identifier_const ; int identifier_dup ; int identifier_from ; int identifier_step ; int identifier_to ; int identifier_if ; int identifier_else ; int identifier_elseif ; int identifier_for ; int identifier_while ; int identifier_frame ; int identifier_clone ; int identifier_onexit ; int identifier_switch ; int identifier_case ; int identifier_default ; int identifier_repeat ; int identifier_until ; int identifier_loop ; int identifier_break ; int identifier_continue ; int identifier_return ; int identifier_process ; int identifier_function ; int identifier_bandoffset ; int identifier_offset ; int identifier_sizeof ; int identifier_pointer ; int identifier_and ; int identifier_or ; int identifier_xor ; int identifier_not ; int identifier_band ; int identifier_bor ; int identifier_bxor ; int identifier_bnot ; int identifier_plus ; int identifier_minus ; int identifier_plusplus ; int identifier_minusminus ; int identifier_equal ; int identifier_multiply ; int identifier_mod ; int identifier_divide ; int identifier_semicolon ; int identifier_colon ; int identifier_comma ; int identifier_ror ; int identifier_rol ; int identifier_rightp ; int identifier_leftp ; int identifier_rightb ; int identifier_leftb ; int identifier_point ; int identifier_twopoints ; int identifier_eq ; int identifier_ne ; int identifier_gte ; int identifier_lte ; int identifier_lt ; int identifier_gt ; int identifier_question ; int identifier_plusequal ; int identifier_minusequal ; int identifier_multequal ; int identifier_divequal ; int identifier_modequal ; int identifier_orequal ; int identifier_xorequal ; int identifier_andequal ; int identifier_rorequal ; int identifier_rolequal ; int identifier_mouse ; int identifier_include ; int identifier_import ; int reserved_words ; #ifdef TARGET_MAC static int debug ; #else int debug; #endif void compile_init () { /* Initialize reserved words */ identifier_dword = identifier_add("DWORD") ; identifier_word = identifier_add("WORD") ; identifier_byte = identifier_add("BYTE") ; identifier_int = identifier_add("INT") ; identifier_short = identifier_add("SHORT") ; identifier_char = identifier_add("CHAR") ; identifier_unsigned = identifier_add("UNSIGNED") ; identifier_signed = identifier_add("SIGNED") ; identifier_float = identifier_add("FLOAT") ; identifier_string = identifier_add("STRING") ; identifier_struct = identifier_add("STRUCT") ; identifier_declare = identifier_add("DECLARE") ; identifier_include = identifier_add("INCLUDE") ; identifier_program = identifier_add("PROGRAM") ; identifier_debug = identifier_add("DEBUG") ; identifier_const = identifier_add("CONST") ; identifier_begin = identifier_add("BEGIN") ; identifier_end = identifier_add("END") ; identifier_process = identifier_add("PROCESS") ; identifier_function = identifier_add("FUNCTION") ; identifier_global = identifier_add("GLOBAL") ; identifier_local = identifier_add("LOCAL") ; identifier_public = identifier_add("PUBLIC") ; identifier_private = identifier_add("PRIVATE") ; identifier_dup = identifier_add("DUP") ; identifier_from = identifier_add("FROM") ; identifier_to = identifier_add("TO") ; identifier_step = identifier_add("STEP") ; identifier_for = identifier_add("FOR") ; identifier_while = identifier_add("WHILE") ; identifier_repeat = identifier_add("REPEAT") ; identifier_until = identifier_add("UNTIL") ; identifier_switch = identifier_add("SWITCH") ; identifier_case = identifier_add("CASE") ; identifier_default = identifier_add("DEFAULT") ; identifier_loop = identifier_add("LOOP") ; identifier_break = identifier_add("BREAK") ; identifier_continue = identifier_add("CONTINUE") ; identifier_return = identifier_add("RETURN") ; identifier_if = identifier_add("IF") ; identifier_else = identifier_add("ELSE") ; identifier_elseif = identifier_add("ELSEIF") ; identifier_frame = identifier_add("FRAME") ; identifier_clone = identifier_add("CLONE") ; identifier_onexit = identifier_add("ONEXIT") ; identifier_and = identifier_add("AND"); identifier_or = identifier_add("OR"); identifier_xor = identifier_add("XOR"); identifier_not = identifier_add("NOT"); identifier_band = identifier_add("BAND"); identifier_bor = identifier_add("BOR"); identifier_bxor = identifier_add("BXOR"); identifier_bnot = identifier_add("BNOT"); identifier_sizeof = identifier_add("SIZEOF"); identifier_offset = identifier_add("OFFSET"); identifier_pointer = identifier_add("POINTER"); identifier_type = identifier_add("TYPE"); identifier_bandoffset = identifier_add("&"); identifier_add_as ("!", identifier_not) ; identifier_add_as ("&&", identifier_and) ; identifier_add_as ("||", identifier_or) ; identifier_add_as ("^^", identifier_xor) ; identifier_add_as ("~", identifier_bnot) ; // identifier_add_as ("&", identifier_band) ; identifier_add_as ("|", identifier_bor) ; identifier_add_as ("^", identifier_bxor) ; identifier_plus = identifier_add("+") ; identifier_minus = identifier_add("-") ; identifier_plusplus = identifier_add("++") ; identifier_minusminus = identifier_add("--") ; identifier_multiply = identifier_add("*") ; identifier_mod = identifier_add("%") ; identifier_divide = identifier_add("/") ; identifier_equal = identifier_add("=") ; identifier_semicolon = identifier_add(";") ; identifier_comma = identifier_add(",") ; identifier_ror = identifier_add(">>") ; identifier_rol = identifier_add("<<") ; identifier_rightp = identifier_add(")") ; identifier_leftp = identifier_add("(") ; identifier_rightb = identifier_add("]") ; identifier_leftb = identifier_add("[") ; identifier_point = identifier_add(".") ; identifier_twopoints = identifier_add("..") ; identifier_question = identifier_add("?") ; identifier_add_as ("MOD", identifier_mod) ; // identifier_add_as (":", identifier_semicolon) ; // <<<--- Conflicto con identifier_colon identifier_add_as ("ELIF", identifier_elseif); identifier_add_as ("ELSIF", identifier_elseif); identifier_colon = identifier_add(":") ; // <<<--- Conflicto con identifier_semicolon identifier_eq = identifier_add("==") ; identifier_ne = identifier_add("!=") ; identifier_gt = identifier_add(">") ; identifier_lt = identifier_add("<") ; identifier_gte = identifier_add(">=") ; identifier_lte = identifier_add("<=") ; identifier_add_as ("<>", identifier_ne) ; identifier_add_as ("=>", identifier_gte) ; identifier_add_as ("=<", identifier_lte) ; identifier_plusequal = identifier_add("+=") ; identifier_andequal = identifier_add("&=") ; identifier_xorequal = identifier_add("^=") ; identifier_orequal = identifier_add("|=") ; identifier_divequal = identifier_add("/=") ; identifier_modequal = identifier_add("%=") ; identifier_multequal = identifier_add("*=") ; identifier_minusequal = identifier_add("-=") ; identifier_rorequal = identifier_add(">>=") ; identifier_rolequal = identifier_add("<<=") ; identifier_import = identifier_add("IMPORT") ; reserved_words = identifier_next_code() ; identifier_mouse = identifier_add("MOUSE") ; varspace_init (&global) ; varspace_init (&local) ; globaldata = segment_new() ; localdata = segment_new() ; } extern void token_dump() ; void compile_error (const char *fmt, ...) { char text[4000] ; va_list ap; va_start(ap, fmt); vsprintf(text, fmt, ap); va_end(ap); fprintf (stdout, MSG_COMPILE_ERROR, files[current_file], line_count, text) ; token_dump () ; exit (2) ; } int imports[1024] ; int nimports = 0 ; // Funcion nula void * compile_export ( const char * name ) { return ( NULL ) ; } void compile_import () { const char * filename ; void * library = NULL; dlfunc RegisterFunctions ; #if defined( TARGET_Linux ) || defined ( TARGET_BEOS ) || defined ( TARGET_MAC ) || defined ( TARGET_BSD ) char soname[1024]; char * ptr; #endif token_next() ; if (token.type != STRING) { compile_error (MSG_STRING_EXP) ; } imports[nimports++] = token.code ; filename = string_get(token.code) ; #if defined( TARGET_Linux ) || defined ( TARGET_BEOS ) || defined ( TARGET_BSD ) #define DLLEXT ".so" #define SIZEDLLEXT 3 snprintf (soname, 1024, "./%s" DLLEXT, filename); #endif #ifdef TARGET_MAC int indexMac; int contmac=0; char *nameMac=files[current_file]; /* Get the real directory for Mac OS X */ while (contmac (4+SIZEDLLEXT) && strcmp(ptr-(4+SIZEDLLEXT), ".dll" DLLEXT) == 0) { strcpy (ptr-(4+SIZEDLLEXT), DLLEXT); } filename = soname; #endif library = dlopen (filename, RTLD_NOW | RTLD_GLOBAL) ; if (!library) compile_error (dlerror()) ; RegisterFunctions = dlsym (library, "RegisterFunctions") ; if (!RegisterFunctions) compile_error(MSG_NO_COMPATIBLE_DLL) ; (*RegisterFunctions)(compile_export, sysproc_add) ; } void compile_constants () { int code; expresion_result res; for (;;) { token_next() ; if (token.type == NOTOKEN) { break ; } if (token.type != IDENTIFIER) { compile_error (MSG_CONSTANT_NAME_EXP) ; } if (token.code == identifier_semicolon) { continue ; } if (token.code == identifier_begin || token.code == identifier_local || token.code == identifier_public || token.code == identifier_private || token.code == identifier_global) { token_back() ; return ; } if (token.code == identifier_end) { return ; } if (token.code < reserved_words) { compile_error (MSG_INVALID_IDENTIFIER); } code = token.code ; token_next() ; if (token.type != IDENTIFIER || token.code != identifier_equal) { compile_error (MSG_EXPECTED, "=") ; } res = compile_expresion(1, 0, 0) ; if (typedef_base(res.type) != TYPE_STRING && typedef_base(res.type) != TYPE_FLOAT && typedef_base(res.type) != TYPE_INT && typedef_base(res.type) != TYPE_DWORD) { compile_error (MSG_INVALID_TYPE); } constants_add (code, res.type, typedef_base(res.type) == TYPE_FLOAT ? *(int *)&res.fvalue : res.value) ; token_next() ; if (token.type == IDENTIFIER && token.code == identifier_semicolon) { continue ; } compile_error (MSG_EXPECTED, ";") ; } } void compile_process () { PROCDEF * proc ; VARIABLE * var ; int is_declare = 0 ; int is_function = 0 ; int type_implicit = 1; int code, tcode, params ; BASETYPE type, typeb ; TYPEDEF ctype, ctypeb ; int signed_prefix = 0; int unsigned_prefix = 0; tcode = token.code ; if ( tcode == identifier_declare ) { /* Es una declaracion? */ is_declare = 1; token_next() ; tcode = token.code; } if (tcode == identifier_function) { /* Es funcion? */ is_function = 1; } if ((tcode == identifier_process || tcode == identifier_function)) { /* Si proceso o funcion, obtengo el signo */ token_next() ; tcode = token.code; } if (token.code == identifier_signed) { /* signed */ signed_prefix = 1; token_next(); tcode = token.code; } else if (token.code == identifier_unsigned) { /* unsigned */ unsigned_prefix = 1; token_next(); tcode = token.code; } if (segment_by_name(token.code)) { /* Nombre del Segmento al que pertenece */ tcode = identifier_pointer ; token_next() ; } if (identifier_is_basic_type(token.code)) { /* Salto identificador de tipo basico */ tcode = token.code; token_next(); } while (token.code == identifier_pointer || token.code == identifier_multiply) { /* Salto el indentificador POINTER */ tcode = token.code ; token_next() ; } // Check if the process name is valid if (token.type != IDENTIFIER || token.code < reserved_words) { compile_error (MSG_PROCNAME_EXP) ; } code = token.code ; // Create the process if it is not defined already proc = procdef_search (code) ; if (!proc) { proc = procdef_new (procdef_getid(), code) ; } else if (proc->defined) { compile_error (MSG_PROC_ALREADY_DEFINED); } // Parse the process parameters token_next () ; if (token.type != IDENTIFIER || token.code != identifier_leftp) { compile_error (MSG_EXPECTED, "(") ; } if ( !is_declare ) proc->defined = 1 ; if (is_function) { if (is_declare && proc->declared && !(proc->flags&PROC_FUNCTION)) { compile_error (MSG_PROTO_ERROR) ; } proc->flags |= PROC_FUNCTION; } if (tcode == identifier_float){ if (is_declare && proc->declared && proc->type != TYPE_FLOAT) { compile_error (MSG_PROTO_ERROR) ; } proc->type = TYPE_FLOAT ; } if (tcode == identifier_string){ if (is_declare && proc->declared && proc->type != TYPE_STRING) compile_error (MSG_PROTO_ERROR) ; proc->type = TYPE_STRING ; } if (tcode == identifier_word){ if (is_declare && proc->declared && proc->type != signed_prefix ? TYPE_SHORT : TYPE_WORD) compile_error (MSG_PROTO_ERROR) ; proc->type = signed_prefix ? TYPE_SHORT : TYPE_WORD; signed_prefix = unsigned_prefix = 0; } if (tcode == identifier_dword){ if (is_declare && proc->declared && proc->type != signed_prefix ? TYPE_INT : TYPE_DWORD) compile_error (MSG_PROTO_ERROR) ; proc->type = signed_prefix ? TYPE_INT : TYPE_DWORD; signed_prefix = unsigned_prefix = 0; } if (tcode == identifier_byte){ if (is_declare && proc->declared && proc->type != signed_prefix ? TYPE_SBYTE : TYPE_BYTE) compile_error (MSG_PROTO_ERROR) ; proc->type = signed_prefix ? TYPE_SBYTE : TYPE_BYTE; signed_prefix = unsigned_prefix = 0; } if (tcode == identifier_int){ if (is_declare && proc->declared && proc->type != unsigned_prefix ? TYPE_DWORD : TYPE_INT) compile_error (MSG_PROTO_ERROR) ; proc->type = unsigned_prefix ? TYPE_DWORD : TYPE_INT; signed_prefix = unsigned_prefix = 0; } if (tcode == identifier_short){ if (is_declare && proc->declared && proc->type != unsigned_prefix ? TYPE_WORD : TYPE_SHORT) compile_error (MSG_PROTO_ERROR) ; proc->type = unsigned_prefix ? TYPE_WORD : TYPE_SHORT; signed_prefix = unsigned_prefix = 0; } if (tcode == identifier_char){ if (is_declare && proc->declared && proc->type != TYPE_CHAR) compile_error (MSG_PROTO_ERROR) ; proc->type = TYPE_CHAR; } if (tcode == identifier_pointer || tcode == identifier_multiply){ if (is_declare && proc->declared && proc->type != TYPE_POINTER) compile_error (MSG_PROTO_ERROR) ; proc->type = TYPE_POINTER ; } if (signed_prefix || unsigned_prefix){ compile_error(MSG_INVALID_TYPE); } token_next() ; /* Recoge los parmetros y su tipo */ params = 0 ; type = TYPE_INT; typeb = TYPE_INT; type_implicit = 1; ctype = typedef_new(type) ; ctypeb = ctype ; signed_prefix = unsigned_prefix = 0; while (token.type != IDENTIFIER || token.code != identifier_rightp) { type = typeb; ctype = ctypeb; /* Recogo signo del parametro */ if (token.type == IDENTIFIER && token.code == identifier_unsigned){ unsigned_prefix = 1; token_next(); }else if (token.type == IDENTIFIER && token.code == identifier_signed){ signed_prefix = 1; token_next(); } /* Recogo tipo del parametro */ if (token.type == IDENTIFIER && token.code == identifier_dword) { type_implicit = 0; type = signed_prefix ? TYPE_INT : TYPE_DWORD; unsigned_prefix = signed_prefix = 0; ctype = typedef_new(type) ; token_next() ; } else if (token.type == IDENTIFIER && token.code == identifier_int) { type_implicit = 0; type = unsigned_prefix ? TYPE_DWORD : TYPE_INT; unsigned_prefix = signed_prefix = 0; ctype = typedef_new(type) ; token_next() ; } else if (token.type == IDENTIFIER && token.code == identifier_word) { type_implicit = 0; type = signed_prefix ? TYPE_SHORT : TYPE_WORD ; unsigned_prefix = signed_prefix = 0; ctype = typedef_new(type) ; token_next() ; } else if (token.type == IDENTIFIER && token.code == identifier_short) { type_implicit = 0; type = unsigned_prefix ? TYPE_WORD : TYPE_SHORT; unsigned_prefix = signed_prefix = 0; ctype = typedef_new(type) ; token_next() ; } else if (token.type == IDENTIFIER && token.code == identifier_byte) { type_implicit = 0; type = signed_prefix ? TYPE_SBYTE : TYPE_BYTE ; unsigned_prefix = signed_prefix = 0; ctype = typedef_new(type) ; token_next() ; } else if (token.type == IDENTIFIER && token.code == identifier_char) { type_implicit = 0; type = TYPE_CHAR ; ctype = typedef_new(type) ; token_next() ; } else if (token.type == IDENTIFIER && token.code == identifier_string) { type_implicit = 0; type = TYPE_STRING ; ctype = typedef_new(type) ; token_next() ; } else if (token.type == IDENTIFIER && token.code == identifier_float) { type_implicit = 0; type = TYPE_FLOAT ; ctype = typedef_new(type) ; token_next() ; } else if (token.type == IDENTIFIER && segment_by_name(token.code)) { type_implicit = 0; ctype = *typedef_by_name(token.code) ; type = TYPE_STRUCT ; token_next() ; } if (signed_prefix || unsigned_prefix) { compile_error(MSG_INVALID_TYPE); signed_prefix = unsigned_prefix = 0; } typeb = type; ctypeb = ctype; while (token.type == IDENTIFIER && (token.code == identifier_pointer || token.code == identifier_multiply)) { type_implicit = 0; type = TYPE_POINTER ; ctype = typedef_pointer(ctype) ; token_next() ; } if (type == TYPE_STRUCT) { type_implicit = 0; type = TYPE_POINTER ; ctype = typedef_pointer(ctype) ; } if (token.type != IDENTIFIER || token.code < reserved_words) compile_error (MSG_INVALID_PARAM) ; /* Check if the process was used before declared */ if (!proc->declared) { var = varspace_search (&local, token.code) ; if (var) { /* El parmetro es en realidad un local */ if (type_implicit) { type = typedef_base(var->type); ctype = var->type; } if (typedef_base(var->type) != type) { if (typedef_is_integer(var->type) && typedef_is_integer(typedef_new(type))) { /* A parameter was used before the process is declared. The data type declared is different from the data type used, but both are integers. The error is ignored, but no conversion is done. This can lead to type conversion issues. */ } else compile_error (MSG_INVALID_PARAMT) ; } codeblock_add (&proc->code, MN_LOCAL, var->offset) ; codeblock_add (&proc->code, MN_PRIVATE, proc->pridata->current) ; codeblock_add (&proc->code, MN_PTR, 0) ; if (typedef_base(var->type) == TYPE_STRING) codeblock_add (&proc->code, MN_LET | MN_STRING, 0) ; else codeblock_add (&proc->code, MN_LET, 0) ; codeblock_add (&proc->code, MN_POP, 0) ; if (proc->privars->reserved == proc->privars->count) varspace_alloc (proc->privars, 16) ; proc->privars->vars[proc->privars->count].type = typedef_new (TYPE_DWORD); proc->privars->vars[proc->privars->count].offset = proc->pridata->current ; proc->privars->vars[proc->privars->count].code = -1 ; proc->privars->count++ ; segment_add_dword (proc->pridata, 0) ; } else { var = varspace_search (&global, token.code); if (var) { /* El parmetro es en realidad un global */ if (type_implicit) { type = typedef_base(var->type); ctype = var->type; } if (typedef_base(var->type) != type) compile_error (MSG_INVALID_PARAMT) ; codeblock_add (&proc->code, MN_GLOBAL, var->offset) ; codeblock_add (&proc->code, MN_PRIVATE, proc->pridata->current) ; codeblock_add (&proc->code, MN_PTR, 0) ; if (typedef_base(var->type) == TYPE_STRING) codeblock_add (&proc->code, MN_LET | MN_STRING, 0) ; else codeblock_add (&proc->code, MN_LET, 0) ; codeblock_add (&proc->code, MN_POP, 0) ; if (proc->privars->reserved == proc->privars->count) varspace_alloc (proc->privars, 16) ; proc->privars->vars[proc->privars->count].type = typedef_new (TYPE_DWORD); proc->privars->vars[proc->privars->count].offset = proc->pridata->current ; proc->privars->vars[proc->privars->count].code = -1 ; proc->privars->count++ ; segment_add_dword (proc->pridata, 0) ; } else { /* Crear la variable privada */ if (proc->privars->reserved == proc->privars->count) varspace_alloc (proc->privars, 16) ; if (type == TYPE_STRING) varspace_varstring (proc->privars, proc->pridata->current) ; proc->privars->vars[proc->privars->count].type = ctype; proc->privars->vars[proc->privars->count].offset = proc->pridata->current ; proc->privars->vars[proc->privars->count].code = token.code ; proc->privars->count++ ; segment_add_dword (proc->pridata, 0) ; } } } if (proc->declared && proc->paramtype[params] != type) compile_error (MSG_PROTO_ERROR) ; if (proc->params != -1) { /* El proceso fue usado previamente */ if (proc->paramtype[params] == TYPE_UNDEFINED) { proc->paramtype[params] = type ; } else if ((proc->paramtype[params] == TYPE_DWORD || proc->paramtype[params] == TYPE_INT) && (type == TYPE_DWORD || type == TYPE_INT || type == TYPE_BYTE || type == TYPE_WORD || type == TYPE_SHORT || type == TYPE_SBYTE )) { proc->paramtype[params] = type ; } else if (type == TYPE_DWORD && (proc->paramtype[params] == TYPE_BYTE || proc->paramtype[params] == TYPE_WORD)) { proc->paramtype[params] = type ; } else if (proc->paramtype[params] != type) { compile_error (MSG_INVALID_PARAMT) ; } } else { proc->paramtype[params] = type; } params++ ; if (params == MAX_PARAMS) compile_error (MSG_TOO_MANY_PARAMS) ; token_next() ; if (token.type == IDENTIFIER && token.code == identifier_comma) token_next() ; } /* END while (token.type != IDENTIFIER || token.code != identifier_rightp) */ if (proc->params == -1) { proc->params = params ; } else if (proc->params != params) { compile_error (MSG_INCORRECT_PARAMC, identifier_name(code), proc->params) ; } token_next () ; if (token.type == IDENTIFIER && token.code == identifier_semicolon) token_next () ; /* Se admite una seccin interna de datos locales; sin embargo, los datos declarados aqu tienen el mismo efecto que si son declarados externamente y afectarn a todos los procesos (Ya no va mas esto, ahora los datos locales son locales, Splinter) */ if (!proc->declared) { while ( token.type == IDENTIFIER && ( token.code == identifier_local || token.code == identifier_public || token.code == identifier_private ) ) { if ( token.code == identifier_local || token.code == identifier_public ) { /* (2006/11/19 19:34 GMT-03:00, Splinter - jj_arg@yahoo.com) */ /* Ahora las declaraciones locales, son solo locales al proceso, pero visibles desde todo proceso */ /* Se permite declarar local/publica una variable que haya sido declarada global, es una variable propia, no es la global */ VARSPACE * v[] = { &local, proc->privars, NULL }; compile_varspace ( proc->pubvars, proc->pubdata, 1, 1, 0, v, DEFAULT_ALIGNMENT ) ; } else if ( token.code == identifier_private ) { /* (2006/11/19 19:34 GMT-03:00, Splinter - jj_arg@yahoo.com) */ /* Se permite declarar privada una variable que haya sido declarada global, es una variable propia, no es la global */ VARSPACE * v[] = { &local, proc->pubvars, NULL }; compile_varspace ( proc->privars, proc->pridata, 1, 1, 0, v, DEFAULT_ALIGNMENT ) ; } token_next () ; } } /* Gestiona procesos cuyos parmetros son variables locales */ if (!is_declare) { if (token.type != IDENTIFIER || token.code != identifier_begin) { compile_error (MSG_NO_BEGIN) ; } compile_block (proc) ; if (token.type == IDENTIFIER && token.code == identifier_else) { compile_error (MSG_ELSE_WOUT_IF) ; } } if (token.type != IDENTIFIER || token.code != identifier_end) { compile_error (MSG_NO_END) ; } if (!is_declare) { codeblock_add (&proc->code, MN_END, 0) ; if (debug) { printf ("\n\n---------- Process %d (%s)\n\n", proc->typeid, identifier_name(code)) ; if ( proc->privars->count ) { printf ("---- Private variables\n") ; varspace_dump (proc->privars, 0) ; printf ("\n") ; } if ( proc->pubvars->count ) { printf ("---- Public variables\n") ; varspace_dump (proc->pubvars, 0) ; printf ("\n") ; } //segment_dump (proc->pridata) ; codeblock_dump (&proc->code) ; } } proc->declared = 1 ; } void compile_program () { int code ; /* Ahora lo del program es opcional :-P */ token_next() ; if (token.type == IDENTIFIER && token.code == identifier_program) { token_next() ; if (token.type != IDENTIFIER || token.code < reserved_words) { compile_error (MSG_PROGRAM_NAME_EXP) ; } token_next() ; if (token.type != IDENTIFIER || token.code != identifier_semicolon) { compile_error (MSG_EXPECTED, ";") ; } } else { token_back() ; } mainproc = procdef_new(procdef_getid(), identifier_search_or_add("MAIN")) ; for (;;) { token_next () ; while (token.type == IDENTIFIER && token.code == identifier_semicolon) { token_next() ; } if (token.type == IDENTIFIER && token.code == identifier_import) { compile_import() ; } else if (token.type == IDENTIFIER && token.code == identifier_const) { compile_constants() ; } else if (token.type == IDENTIFIER && token.code == identifier_local) { /* (2006/11/19 19:34 GMT-03:00, Splinter - jj_arg@yahoo.com) */ VARSPACE * v[] = { &global, NULL }; compile_varspace ( &local, localdata, 1, 1, 0, v, DEFAULT_ALIGNMENT ) ; } else if (token.type == IDENTIFIER && token.code == identifier_global) { /* (2006/11/19 19:34 GMT-03:00, Splinter - jj_arg@yahoo.com) */ VARSPACE * v[] = { &local, NULL }; compile_varspace ( &global, globaldata, 1, 1, 0, v, DEFAULT_ALIGNMENT ) ; } else if (token.type == IDENTIFIER && token.code == identifier_private) { /* (2006/11/19 19:34 GMT-03:00, Splinter - jj_arg@yahoo.com) */ VARSPACE * v[] = { &local, &global, NULL }; compile_varspace ( mainproc->privars, mainproc->pridata, 1, 1, 0, v, DEFAULT_ALIGNMENT ) ; } else if (token.type == IDENTIFIER && token.code == identifier_begin) { if (mainproc->defined) { /* Hack para poder redefinir el proceso principal */ mainproc->code.current -= 1 ; } mainproc->defined = 1 ; compile_block (mainproc) ; if (token.type == IDENTIFIER && token.code == identifier_else) { compile_error (MSG_ELSE_WOUT_IF) ; } if (token.type != IDENTIFIER || token.code != identifier_end) { compile_error (MSG_NO_END) ; } codeblock_add (&mainproc->code, MN_END, 0) ; } else if (token.type == IDENTIFIER && token.code == identifier_type) { /* Tipo de dato definido por el usuario */ segment * s = segment_new() ; VARSPACE * v = varspace_new() ; TYPEDEF t = typedef_new(TYPE_STRUCT); t.chunk[0].count = 1 ; token_next() ; if ((code = token.code) < reserved_words || token.type != IDENTIFIER) { compile_error (MSG_INVALID_TYPE) ; } t.varspace = v ; typedef_name (t, code) ; segment_name (s, code) ; /* (2006/11/19 19:34 GMT-03:00, Splinter - jj_arg@yahoo.com) */ compile_varspace (v, s, 0, 1, 0, NULL, 0) ; if (token.code != identifier_end) { compile_error (MSG_NO_END) ; } } else if (token.type == IDENTIFIER && (token.code == identifier_process || token.code == identifier_function || token.code == identifier_declare || identifier_is_basic_type(token.type))) { /* Definicin de proceso */ compile_process() ; } else if (segment_by_name(token.code)) { compile_process() ; } else { break ; } } if (debug) { printf ("\n----- Main procedure\n\n") ; varspace_dump (mainproc->privars, 0) ; //segment_dump (mainproc->pridata) ; printf ("\n"); codeblock_dump (&mainproc->code) ; printf ("\n") ; } if (global.count && debug) { printf ("\n---- Global variables\n\n") ; varspace_dump (&global, 0) ; } if (local.count && debug) { printf ("\n---- Local variables\n\n") ; varspace_dump (&local, 0) ; //segment_dump (localdata) ; } if (token.type != NOTOKEN) { compile_error (MSG_UNEXPECTED_TOKEN) ; } program_postprocess() ; if (!mainproc->defined) { compile_error (MSG_NO_MAIN) ; } #ifdef DEBUG_VERBOSE identifier_dump() ; string_dump() ; #endif } Fenix/fxc/src/dcbw.c0000644000000000000000000003737110607526722013301 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #ifdef TARGET_BEOS #include #else #include #endif #include #include #include "fxc.h" #include "dcb.h" /* Datos externos accedidos vilmente */ extern char * string_mem ; extern int * string_offset ; extern int string_count, string_used ; extern int procdef_count ; extern int identifier_count ; extern PROCDEF ** procs ; /* Gestin de la lista de ficheros a incluir en el DCB */ DCB_FILE * dcb_files = 0 ; int dcb_ef_alloc = 0 ; int dcb_filecount = 0 ; char ** dcb_fullname = 0 ; void dcb_add_file (const char * filename) { file * fp ; long size ; const char * ptr ; int i ; char buffer[1024]; if (filename[0] == '@') { fp = file_open (filename+1, "rb") ; if (!fp) return ; while (!file_eof(fp)) { file_gets (fp, buffer, sizeof(buffer)) ; if (strchr(buffer, '\n')) *strchr(buffer,'\n') = 0 ; if (buffer[0] == '#' || !buffer[0]) continue ; dcb_add_file(buffer) ; } file_close(fp) ; return ; } fp = file_open (filename, "rb0") ; if (!fp) return ; size = file_size (fp) ; file_close (fp) ; if (dcb_ef_alloc == dcb_filecount) { dcb_files = (DCB_FILE *)realloc (dcb_files, sizeof(DCB_FILE) * (dcb_ef_alloc += 16)) ; dcb_fullname = (char **)realloc (dcb_fullname, sizeof(char *) * dcb_ef_alloc) ; if (!dcb_files || !dcb_fullname) compile_error ("dcb_add_file: out of memory"); } ptr = filename ; while (strchr(ptr, '\\')) ptr = strchr(ptr,'\\')+1 ; if (strlen(ptr) > 55) { file_close (fp) ; return ; } /* Comprueba que el fichero no haya sido ya aadido */ for (i = 0 ; i < dcb_filecount ; i++) if (strcmp(ptr, dcb_files[i].Name) == 0) return ; strcpy (dcb_files[dcb_filecount].Name, ptr) ; dcb_files[dcb_filecount].SFile = size ; dcb_fullname[dcb_filecount] = strdup(filename) ; dcb_filecount++ ; } /* Hack para poder asignar ID's a los varspaces */ VARSPACE ** dcb_orig_varspace = 0 ; int dcb_varspaces = 0 ; static int dcb_varspace (VARSPACE * v) { int n, result ; for (n = 0 ; n < dcb_varspaces ; n++) { if (dcb_orig_varspace[n] == v) return n ; } dcb.varspace = (DCB_VARSPACE *) realloc (dcb.varspace, sizeof(DCB_VARSPACE) * (dcb_varspaces+1)) ; dcb_orig_varspace = (VARSPACE **) realloc (dcb_orig_varspace, sizeof(VARSPACE *) * (dcb_varspaces+1)) ; dcb_orig_varspace[dcb_varspaces] = v ; dcb.varspace[dcb_varspaces].NVars = v->count ; result = dcb_varspaces++ ; for (n = 0 ; n < v->count ; n++) { if (v->vars[n].type.varspace) { dcb_varspace (v->vars[n].type.varspace) ; } } return result ; } /* Conversiones de TYPEDEF */ void dcb_settype (DCB_TYPEDEF * d, TYPEDEF * t) { int n ; for (n = 0 ; n < MAX_TYPECHUNKS ; n++) { d->BaseType[n] = t->chunk[n].type ; d->Count [n] = t->chunk[n].count ; } if (t->varspace) { d->Members = dcb_varspace (t->varspace) ; } else { d->Members = NO_MEMBERS ; } } /* Funcin principal que crea el fichero DCB * (ver dcb.h con la estructura del mismo) */ DCB_HEADER dcb ; int dcb_save (const char * filename, int options, const char * stubname) { file * fp ; Uint32 n, i ; long offset ; long offset_dcbfiles ; identifier * id ; long stubsize = 0; void * stubdata; int NPriVars = 0 ; int NPubVars = 0 ; int SCode = 0 ; int SPrivate = 0 ; int SPublic = 0 ; fp = file_open (filename, "wb0") ; if (!fp) { fprintf (stdout, "Error: imposible abrir %s\n", filename) ; return 0 ; } /* Write the stub file */ if (stubname != NULL) { file * stub = file_open (stubname, "rb0"); if (!stub) { fprintf (stdout, "Error: imposible abrir %s\n", stubname); return 0; } stubsize = file_size(stub); stubdata = malloc(stubsize); if (stubdata == NULL) { fprintf (stdout, "Error: Stub %s demasiado grande\n", stubname); return 0; } if (file_read(stub, stubdata, stubsize) != stubsize) { fprintf (stdout, "Error leyendo stub %s\n", stubname); return 0; } file_write (fp, stubdata, stubsize); if (stubsize & 15) { file_write (fp, stubdata, 16 - (stubsize & 15)); stubsize += 16 - (stubsize & 15); } free(stubdata); file_close(stub); } /* Asumimos que dcb.varspace ha sido rellenado anteriormente */ /* 1. Rellenar los datos de la cabecera */ memcpy (dcb.data.Header, "dcb\xD\xA\x1F\00\00", 8) ; dcb.data.Version = DCB_VERSION ; dcb.data.NProcs = procdef_count ; dcb.data.NFiles = dcb_filecount ; dcb.data.NID = identifier_count ; dcb.data.NStrings = string_count ; dcb.data.NLocVars = local.count ; dcb.data.NLocStrings = local.stringvar_count ; dcb.data.NGloVars = global.count ; dcb.data.SGlobal = globaldata->current ; dcb.data.SLocal = localdata->current ; dcb.data.SText = string_used ; dcb.data.NImports = nimports ; dcb.data.NSourceFiles = n_files ; /* Splinter, Correccion para guardar info necesaria */ if (!(options & DCB_DEBUG)) { dcb.data.NID = 0 ; /* dcb.data.NLocVars = 0 ; dcb.data.NGloVars = 0 ; */ } /* 2. Crear tabla de procesos */ dcb.proc = (DCB_PROC *) malloc(sizeof(DCB_PROC) * dcb.data.NProcs) ; for (n = 0 ; n < dcb.data.NProcs ; n++) { dcb.proc[n].data.ID = procs[n]->identifier ; dcb.proc[n].data.Flags = procs[n]->flags ; dcb.proc[n].data.NParams = procs[n]->params ; dcb.proc[n].data.NPriVars = procs[n]->privars->count ; dcb.proc[n].data.NPriStrings = procs[n]->privars->stringvar_count ; dcb.proc[n].data.NPubVars = procs[n]->pubvars->count ; dcb.proc[n].data.NPubStrings = procs[n]->pubvars->stringvar_count ; dcb.proc[n].data.NSentences = procs[n]->sentence_count ; dcb.proc[n].data.SPrivate = procs[n]->pridata->current ; dcb.proc[n].data.SPublic = procs[n]->pubdata->current ; dcb.proc[n].data.SCode = procs[n]->code.current * 4 ; dcb.proc[n].data.OExitCode = procs[n]->exitcode ; SCode += dcb.proc[n].data.SCode ; NPriVars += dcb.proc[n].data.NPriVars ; NPubVars += dcb.proc[n].data.NPubVars ; SPrivate += dcb.proc[n].data.SPrivate ; SPublic += dcb.proc[n].data.SPublic ; dcb.proc[n].sentence = (DCB_SENTENCE *) malloc(sizeof(DCB_SENTENCE) * dcb.proc[n].data.NSentences) ; for (i = 0 ; i < dcb.proc[n].data.NSentences ; i++) { dcb.proc[n].sentence[i].NFile = 0 ; dcb.proc[n].sentence[i].NLine = procs[n]->sentences[i].line ; dcb.proc[n].sentence[i].NCol = procs[n]->sentences[i].col ; dcb.proc[n].sentence[i].OCode = procs[n]->sentences[i].offset ; } /* Splinter, tipos de parametros */ dcb.proc[n].privar = (DCB_VAR *) malloc(sizeof(DCB_VAR) * dcb.proc[n].data.NPriVars) ; for (i = 0 ; i < dcb.proc[n].data.NPriVars ; i++) { dcb_settype (&dcb.proc[n].privar[i].Type, &procs[n]->privars->vars[i].type) ; dcb.proc[n].privar[i].ID = procs[n]->privars->vars[i].code ; dcb.proc[n].privar[i].Offset = procs[n]->privars->vars[i].offset ; } dcb.proc[n].pubvar = (DCB_VAR *) malloc(sizeof(DCB_VAR) * dcb.proc[n].data.NPubVars) ; for (i = 0 ; i < dcb.proc[n].data.NPubVars ; i++) { dcb_settype (&dcb.proc[n].pubvar[i].Type, &procs[n]->pubvars->vars[i].type) ; dcb.proc[n].pubvar[i].ID = procs[n]->pubvars->vars[i].code ; dcb.proc[n].pubvar[i].Offset = procs[n]->pubvars->vars[i].offset ; } } /* 3. Crear tablas globales */ dcb.id = (DCB_ID *) malloc(sizeof(DCB_ID) * dcb.data.NID) ; id = identifier_first() ; for (n = 0 ; n < dcb.data.NID ; n++) { assert (id != 0) ; strncpy (dcb.id[n].Name, id->name, sizeof(dcb.id[n].Name)) ; dcb.id[n].Code = id->code ; id = identifier_next(id) ; } dcb.glovar = (DCB_VAR *) malloc(sizeof(DCB_VAR) * dcb.data.NGloVars) ; dcb.locvar = (DCB_VAR *) malloc(sizeof(DCB_VAR) * dcb.data.NLocVars) ; for (n = 0 ; n < dcb.data.NGloVars ; n++) { dcb_settype (&dcb.glovar[n].Type, &global.vars[n].type) ; dcb.glovar[n].ID = global.vars[n].code ; dcb.glovar[n].Offset = global.vars[n].offset ; } for (n = 0 ; n < dcb.data.NLocVars ; n++) { dcb_settype (&dcb.locvar[n].Type, &local.vars[n].type) ; dcb.locvar[n].ID = local.vars[n].code ; dcb.locvar[n].Offset = local.vars[n].offset ; } dcb.data.NVarSpaces = dcb_varspaces ; dcb.file = dcb_files ; /* 4. Clculo de offsets */ offset = sizeof(DCB_HEADER_DATA) ; dcb.data.OProcsTab = offset ; offset += sizeof(DCB_PROC_DATA) * dcb.data.NProcs ; dcb.data.OStrings = offset ; offset += 4 * dcb.data.NStrings ; dcb.data.OGloVars = offset ; offset += sizeof(DCB_VAR) * dcb.data.NGloVars ; dcb.data.OLocVars = offset ; offset += sizeof(DCB_VAR) * dcb.data.NLocVars ; dcb.data.OLocStrings = offset ; offset += 4 * dcb.data.NLocStrings ; dcb.data.OID = offset ; offset += sizeof(DCB_ID) * dcb.data.NID ; dcb.data.OVarSpaces = offset ; offset += sizeof(DCB_VARSPACE) * dcb.data.NVarSpaces ; dcb.data.OText = offset ; offset += dcb.data.SText ; dcb.data.OImports = offset ; offset += 4 * dcb.data.NImports ; dcb.data.OGlobal = offset ; offset += dcb.data.SGlobal ; dcb.data.OLocal = offset ; offset += dcb.data.SLocal ; dcb.data.OSourceFiles = offset ; offset += 256 * dcb.data.NSourceFiles ; for (n = 0 ; n < dcb.data.NVarSpaces ; n++) { dcb.varspace[n].OVars = offset ; offset += sizeof(DCB_VAR) * dcb.varspace[n].NVars ; } for (n = 0 ; n < dcb.data.NProcs ; n++) { dcb.proc[n].data.OSentences = offset ; offset += sizeof(DCB_SENTENCE) * dcb.proc[n].data.NSentences ; /* Privadas */ dcb.proc[n].data.OPriVars = offset ; offset += sizeof(DCB_VAR) * dcb.proc[n].data.NPriVars ; dcb.proc[n].data.OPriStrings = offset ; offset += 4 * dcb.proc[n].data.NPriStrings ; dcb.proc[n].data.OPrivate = offset ; offset += dcb.proc[n].data.SPrivate ; /* Publicas */ dcb.proc[n].data.OPubVars = offset ; offset += sizeof(DCB_VAR) * dcb.proc[n].data.NPubVars ; dcb.proc[n].data.OPubStrings = offset ; offset += 4 * dcb.proc[n].data.NPubStrings ; dcb.proc[n].data.OPublic = offset ; offset += dcb.proc[n].data.SPublic ; /* Code */ dcb.proc[n].data.OCode = offset ; offset += dcb.proc[n].data.SCode ; } dcb.data.OFilesTab = offset ; offset += sizeof(DCB_FILE) * dcb.data.NFiles ; for (n = 0 ; n < dcb.data.NFiles ; n++) { dcb.file[n].OFile = offset ; offset += dcb.file[n].SFile ; } /* 5. Guardar todo en disco ordenadamente */ file_write (fp, &dcb, sizeof(DCB_HEADER_DATA)) ; for (n = 0 ; n < dcb.data.NProcs ; n++) file_write (fp, &dcb.proc[n], sizeof(DCB_PROC_DATA)) ; file_write (fp, string_offset, 4 * dcb.data.NStrings) ; file_write (fp, dcb.glovar, sizeof(DCB_VAR) * dcb.data.NGloVars) ; file_write (fp, dcb.locvar, sizeof(DCB_VAR) * dcb.data.NLocVars) ; file_write (fp, local.stringvars, 4 * dcb.data.NLocStrings) ; file_write (fp, dcb.id, sizeof(DCB_ID) * dcb.data.NID) ; file_write (fp, dcb.varspace, sizeof(DCB_VARSPACE) * dcb.data.NVarSpaces) ; file_write (fp, string_mem, dcb.data.SText) ; file_write (fp, &imports, 4 * dcb.data.NImports) ; file_write (fp, globaldata->bytes, dcb.data.SGlobal) ; file_write (fp, localdata->bytes, dcb.data.SLocal) ; file_write (fp, files, 256 * dcb.data.NSourceFiles) ; for (n = 0 ; n < dcb.data.NVarSpaces ; n++) { VARIABLE * var ; DCB_VAR v ; var = &dcb_orig_varspace[n]->vars[0] ; for (i = 0 ; i < dcb.varspace[n].NVars ; i++, var++) { dcb_settype (&v.Type, &var->type) ; v.ID = var->code ; v.Offset = var->offset ; file_write (fp, &v, sizeof(DCB_VAR)) ; } } for (n = 0 ; n < dcb.data.NProcs ; n++) { file_write (fp, dcb.proc[n].sentence, sizeof(DCB_SENTENCE) * dcb.proc[n].data.NSentences) ; /* Privadas */ file_write (fp, dcb.proc[n].privar, sizeof(DCB_VAR) * dcb.proc[n].data.NPriVars) ; file_write (fp, procs[n]->privars->stringvars, 4 * dcb.proc[n].data.NPriStrings) ; file_write (fp, procs[n]->pridata->bytes, dcb.proc[n].data.SPrivate) ; /* Publicas */ file_write (fp, dcb.proc[n].pubvar, sizeof(DCB_VAR) * dcb.proc[n].data.NPubVars) ; file_write (fp, procs[n]->pubvars->stringvars, 4 * dcb.proc[n].data.NPubStrings) ; file_write (fp, procs[n]->pubdata->bytes, dcb.proc[n].data.SPublic) ; /* Code */ file_write (fp, procs[n]->code.data, dcb.proc[n].data.SCode) ; } offset_dcbfiles = file_pos(fp) ; file_seek (fp, offset_dcbfiles, SEEK_SET) ; file_write (fp, dcb.file, sizeof(DCB_FILE) * dcb.data.NFiles) ; for (n = 0 ; n < dcb.data.NFiles ; n++) { char buffer[8192] ; file * fp_r = file_open (dcb_fullname[n], "rb") ; int chunk_size ; assert (fp_r) ; dcb.file[n].OFile = file_pos(fp) ; while (!file_eof(fp_r)) { chunk_size = file_read (fp_r, buffer, 8192) ; file_write (fp, buffer, chunk_size) ; if (chunk_size < 8192) { break ; } } dcb.file[n].SFile = file_pos(fp) - dcb.file[n].OFile ; printf ("File added: %32s (%10d bytes)\n", dcb.file[n].Name, dcb.file[n].SFile) ; file_close (fp_r) ; } offset = file_pos(fp) ; file_seek (fp, offset_dcbfiles, SEEK_SET) ; file_write (fp, dcb.file, sizeof(DCB_FILE) * dcb.data.NFiles) ; /* Write the stub signature */ if (stubname != NULL) { struct { char magic[12]; int dcb_offset; } dcb_signature; /* Voy al final del archivo */ file_seek (fp, offset, SEEK_SET) ; strcpy (dcb_signature.magic, "DCB Stub\x1A\x0D\x0A"); dcb_signature.dcb_offset = (int)stubsize; ARRANGE_DWORD(&dcb_signature.dcb_offset); file_write (fp, &dcb_signature, sizeof(dcb_signature)); } file_close (fp) ; /* 6. Mostrar estadsticas */ printf ("\nFichero %s grabado (%ld bytes):\n\n", filename, offset) ; printf (" Procesos: %8d procesos\n", dcb.data.NProcs) ; printf (" Datos globales: %8d bytes \n", dcb.data.SGlobal) ; printf (" Datos locales: %8d bytes\n", dcb.data.SLocal) ; printf (" Datos privados: %8d bytes\n", SPrivate) ; printf (" Datos publicos: %8d bytes\n", SPublic) ; printf (" Codigo: %8d bytes\n", SCode) ; printf ("Variables globales: %8d variables \n", dcb.data.NGloVars) ; printf (" Variables locales: %8d variables \n", dcb.data.NLocVars) ; printf ("Variables privadas: %8d variables\n", NPriVars) ; printf ("Variables publicas: %8d variables\n", NPubVars) ; printf (" Identificadores: %8d identificadores\n", dcb.data.NID) ; printf (" Estructuras: %8d estructuras\n", dcb.data.NVarSpaces) ; printf (" Cadenas: %8d cadenas (%d bytes)\n", dcb.data.NStrings, dcb.data.SText) ; if (dcb.data.NFiles) { printf (" Ficheros: %8d ficheros (%ld bytes)\n", dcb.data.NFiles, offset - dcb.data.OFilesTab) ; } printf ("\n") ; return 1 ; } Fenix/fxc/src/main.c0000644000000000000000000001527510607526724013307 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #include #ifdef WIN32 // NEEDED FOR LOCALE DETECTION #include #include #include #include "Shlwapi.h" #endif #include "fxc.h" #define FXC_VERSION "FXC " VERSION " (" __DATE__ " " __TIME__ ")" #include "messages.c" #include "errors.h" /* ---------------------------------------------------------------------- */ int debug = 0 ; #define MAX_FILES 64 int path_file = 5; int n_files = 0 ; char files[MAX_FILES][256] ; char langinfo[64] ; int load_file (char * filename) { #ifdef TARGET_MAC char fileMac[256] ; snprintf (fileMac, 256, "%s/%s", files[path_file], filename) ; snprintf (filename, 256, fileMac); #endif long size ; file * fp = file_open (filename, "rb0") ; char * source ; if (n_files == MAX_FILES) compile_error (MSG_TOO_MANY_FILES) ; strcpy (files[n_files++], filename) ; if (!fp) { fprintf (stdout, MSG_FILE_NOT_FOUND "\n", filename) ; exit (1) ; } size = file_size (fp) ; source = (char *) malloc(size+1) ; if (!source) { fprintf (stdout, MSG_FILE_TOO_BIG "\n", filename) ; exit (1) ; } if (size == 0) { fprintf (stdout, MSG_FILE_EMPTY "\n", filename) ; exit (1) ; } if (!file_read (fp, source, size)) { fprintf (stdout, MSG_READ_ERROR "\n", filename) ; exit (1) ; } source[size] = 0 ; file_close (fp) ; token_init (source, n_files-1) ; return n_files-1 ; } extern int full_screen, double_buffer ; int dcb_options = 0 ; int main (int argc, char **argv) { char * filename = 0 ; char dcbname[256] ; char stubname[256] = ""; int i, j ; printf (FXC_VERSION " - Copyright (C) 1999 José Luis Cebrián Pagüe\n") ; printf ("Fenix comes with ABSOLUTELY NO WARRANTY; see COPYING for details\n\n") ; // Default lang to EN strcpy(langinfo,"EN") ; // LANG detect #ifdef WIN32 GetLocaleInfo(LOCALE_USER_DEFAULT,LOCALE_SABBREVCTRYNAME,langinfo,64) ; strlwr(langinfo) ; #else if (getenv("LANG")!=NULL && strlen(getenv("LANG"))>=2) strcpy(langinfo,getenv("LANG")) ; #endif langinfo[2] = 0 ; srand (time(NULL)) ; /* Init SDL */ if ( SDL_Init (SDL_INIT_VIDEO) < 0 ) { printf ("SDL Init Error: %s\n", SDL_GetError()) ; exit(1) ; } /* Get command line parameters */ for (i = 1 ; i < argc ; i++) { if (argv[i][0] == '-') { j = 1 ; while (argv[i][j]) { if (argv[i][j] == 'd') debug = 1 ; if (argv[i][j] == 'c') dos_chars = 1 ; if (argv[i][j] == 'a') autoinclude = 1 ; if (argv[i][j] == 'g') dcb_options |= DCB_DEBUG ; if (argv[i][j] == 's') { // -s "stub": Use a stub if (argv[i][j+1]) strncpy (stubname, argv[i]+j+1, 256); else if (argv[i+1] && argv[i+1][0] != '-') strncpy (stubname, argv[++i], 256); break; } if (argv[i][j] == 'f') { // -f "filename": Embed a file to the DCB if (argv[i][j+1]) dcb_add_file (argv[i+j]+1) ; else while (argv[i+1]) { if (argv[i+1][0] == '-') break ; dcb_add_file (argv[i+1]) ; i++ ; } break ; } if (argv[i][j] == 'i') { // -i "path": add a file to the path for include files if (argv[i][j+1] == 0) { if (i == argc-1) { printf (MSG_DIRECTORY_MISSING "\n") ; exit (1) ; } file_addp (argv[i+1]); i++ ; break ; } file_addp (argv[i]+j+1) ; break ; } if (argv[i][j] == 'l') { // -lLANG: Set the language for errors and messages if (argv[i][j+1] == 0) { if (i != argc-1) { strcpy(langinfo,argv[i+1]) ; } i++ ; break ; } strcpy(langinfo,argv[i]+j+1) ; break ; } j++ ; } } else { if (filename) { printf (MSG_TOO_MANY_FILES "\n") ; return 0 ; } filename = argv[i] ; } } if (!filename) { printf (MSG_USING MSG_OPTION_D MSG_OPTIONS, argv[0]) ; return 0 ; } strcpy (dcbname, filename) ; if (strrchr(dcbname, '.')) *strrchr(dcbname, '.') = 0 ; strcat (dcbname, ".dcb") ; memset (&dcb, 0, sizeof(dcb)); /* build error messages list */ err_buildErrorTable() ; init_c_type() ; identifier_init() ; constants_init() ; string_init () ; compile_init () ; div_init() ; load_file (filename) ; compile_program() ; if (stubname[0] != 0) { if (!file_exists(stubname)) { #ifdef WIN32 char exepath[MAX_PATH]; GetModuleFileName(NULL, exepath, sizeof(exepath)); PathRemoveFileSpec(exepath); strcat (exepath, "\\"); memmove (stubname + strlen(exepath), stubname, strlen(stubname)+1); memcpy (stubname, exepath, strlen(exepath)); #else const char * ptr = argv[0] + strlen(argv[0]); while (ptr > argv[0] && *ptr != '\\' && *ptr != '/') ptr--; if (*ptr == '\\' || *ptr == '/') ptr++; if (ptr > argv[0]) { memmove (stubname + (ptr - argv[0]), stubname, strlen(stubname)+1); memcpy (stubname, argv[0], ptr - argv[0]); } #endif if (!file_exists(stubname)) { strcat (stubname, ".exe"); if (!file_exists(stubname)) { compile_error ("Can't open stub file %s", stubname); return -1; } } } #ifdef WIN32 if (strchr(dcbname, '.')) { char * ptr = dcbname + strlen(dcbname); while (ptr > dcbname && *ptr != '.') ptr--; if (stricmp(ptr, ".dcb") == 0) strcpy(ptr, ".exe"); } #endif dcb_save (dcbname, dcb_options, stubname); } else { dcb_save (dcbname, dcb_options, NULL) ; } /* destroy error messages list */ err_destroyErrorTable() ; return 1 ; } Fenix/fxc/src/varspace.c0000644000000000000000000001405310607526726014162 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #include "fxc.h" /* ---------------------------------------------------------------------- */ /* Este mdulo contiene funciones de utilidad para crear e ir rellenando */ /* varspaces (tablas con identificador, offset y tipo de cada VARIABLE) */ /* y segmentos de datos */ /* ---------------------------------------------------------------------- */ VARSPACE global, local ; /* * FUNCTION : varspace_dump * * Dumps descriptively the variables of a given varspace to the * standard output. Recursively describes struct types. * * PARAMS : * n Pointer to the varspace * indent Left indentation in chars (internal; use 0) * * RETURN VALUE : * None */ void varspace_dump (VARSPACE * n, int indent) { int i, t, to ; char buffer[128] ; for (i = 0 ; i < n->count ; i++) { if (i < n->count-1) to = n->vars[i+1].offset - 1 ; else to = n->last_offset - 1 ; printf ("[%04d:%04d]\t", n->vars[i].offset, to) ; for (t = 0 ; t < indent ; t++) printf (" + ") ; typedef_describe (buffer, n->vars[i].type) ; printf ("%s %s", buffer, identifier_name(n->vars[i].code)) ; // Describe arrays of structs if (typedef_is_array(n->vars[i].type)) { TYPEDEF r = typedef_reduce(n->vars[i].type); while (typedef_is_array(r)) r = typedef_reduce(r); if (typedef_is_struct(r)) { printf (":\n") ; varspace_dump (typedef_members(r), indent+1) ; } else printf ("\n"); } // Describe structs else if (typedef_is_struct(n->vars[i].type)) { printf (":\n") ; varspace_dump (typedef_members(n->vars[i].type), indent+1) ; } else printf ("\n") ; } } /* * FUNCTION : varspace_new * * Create a new varspace in dynamic memory, and initialize * it using varspace_init * * PARAMS : * None * * RETURN VALUE : * Pointer to the new varspace */ VARSPACE * varspace_new () { VARSPACE * v = (VARSPACE *) malloc (sizeof(VARSPACE)) ; if (!v) compile_error ("varspace_new: out of memory\n") ; varspace_init (v) ; return v ; } /* * FUNCTION : varspace_destroy * * Destroy a dynamic varspace created with varspace_new * * PARAMS : * v Pointer to the varspace * * RETURN VALUE : * None */ void varspace_destroy (VARSPACE * v) { free (v->vars) ; free (v) ; } /* * FUNCTION : varspace_init * * Initialize all members of a varspace. Use this function * to initialize a varspace that is created in local * memory instead of a dynamic one created with varspace_new. * * PARAMS : * n Pointer to the not-initialized varspace * * RETURN VALUE : * None */ void varspace_init (VARSPACE * n) { n->vars = (VARIABLE *) malloc (sizeof(VARIABLE) * 16) ; n->reserved = 16 ; n->count = 0 ; n->size = 0 ; n->stringvars = 0 ; n->stringvar_reserved = 0 ; n->stringvar_count = 0 ; if (!n->vars) compile_error ("varspace_init: out of memory\n") ; } /* * FUNCTION : varspace_varstring * * Add a new string offset to the varspace. A varspace has * a count of every string variable it contains, but this * list is not updated automatically. You should mark * every string you create using this function. * * PARAMS : * n Pointer to the varspace * offset Offset of the new string * * RETURN VALUE : * None */ void varspace_varstring (VARSPACE * n, int offset) { if (n->stringvar_reserved == n->stringvar_count) { n->stringvars = (int *) realloc (n->stringvars, (n->stringvar_reserved+=16)*sizeof(int)) ; if (!n->stringvars) compile_error ("varspace_varstring: out of memory\n") ; } n->stringvars[n->stringvar_count++] = offset ; } /* * FUNCTION : varspace_alloc * * Allocate space for new variables in the varspace. This * is an internal function. Use varspace_add instead. * * PARAMS : * n Pointer to the varspace * count Number of new variables of space to reserve * * RETURN VALUE : * None */ void varspace_alloc (VARSPACE * n, int count) { n->vars = (VARIABLE *) realloc (n->vars, sizeof(VARIABLE) * (n->reserved += count)) ; if (!n->vars) compile_error ("varspace_alloc: out of memory\n") ; } /* * FUNCTION : varspace_add * * Add a new variable to a given varspace. This function does not * mark string variables. You should use varspace_varstring after * adding new strings to a varspace. * * PARAMS : * n Pointer to the varspace * v Variable to add * * RETURN VALUE : * None */ void varspace_add (VARSPACE * n, VARIABLE v) { if (n->count == n->reserved) varspace_alloc (n, 16) ; n->vars[n->count++] = v ; n->size += typedef_size(v.type) ; } /* * FUNCTION : varspace_search * * Search a variable in a varspace by its identifier. * * PARAMS : * n Pointer to the varspace * code Identifier of the variable * * RETURN VALUE : * Pointer to the variable found or NULL if none */ VARIABLE * varspace_search (VARSPACE * n, int code) { int i ; for (i = 0 ; i < n->count ; i++) if (n->vars[i].code == code) return &n->vars[i] ; return 0 ; } Fenix/fxc/src/fxc.ico0000644000000000000000000000627610607526724013474 0ustar rootroot ( @ DDDDDDDDDDDDDDDDCCCCCCCDDDDDDDDDDDDDDDDֽԭ}}~~DD즦vvm͸ܿ⠠DDݗᬽل|}{{ׯ?ҧרؔ~~DD}珮Jdel}xx|=}xxyyLMCDu픾WVge6;Ejjqyy<ĞV\CDv%{k<ajU^75:;;;;;;;<=TήCDTM@?[bpUZhUZh[35:Q;;=̀CDoQ5[ap[fqU_j[an[-7Pgh :hpQ;;e֚CD vvi_UUO9x---E^5 |7ek89:glKKUDD?|rf\PB>..-.D[5 ~:ho;=>Y|eemDD|zoe[PD8ƈ.DʈD[3=jqU@BdzDDSyod[PD92É@=D[/}:hlccg|WĪDD yyod\QH@;BHDƈ]6IeglDG zrh_WNIEMTNPˉtdpjknDDa}vk_UONQSYX[h][`ßהDHѹpzuLzqCZ] jhott es׿D%pkkvbb`Qj(x xw/D Nu]MzlokHL }R/2DGt2`}wu'͏k4h^ڝ꾾DUt}<yhޱDEd3c!~DEDDDDE QD uFDDDDD OTDDDDIDDDDDDDDDDDDDDFenix/fxc/src/dcbw_old.c0000644000000000000000000003050110607526724014125 0ustar rootroot/* Fenix - Compilador/intrprete de videojuegos * Copyright (C) 1999 Jos Luis Cebrin Page * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include "fxc.h" #include "dcb.h" /* Datos externos accedidos vilmente */ extern char * string_mem ; extern int string_offset[] ; extern int string_count, string_used ; extern int procdef_count ; extern int identifier_count ; extern PROCDEF * * procs ; /* Gestin de la lista de ficheros a incluir en el DCB */ DCB_FILE * dcb_files = 0 ; int dcb_ef_alloc = 0 ; int dcb_filecount = 0 ; char * * dcb_fullname = 0 ; void dcb_add_file (const char * filename) { file * fp ; long size ; const char * ptr ; int i ; if (filename[0] == '@') { char buffer[256] ; fp = file_open (filename+1, "rb") ; if (!fp) return ; while (!file_eof(fp)) { file_gets (fp, buffer, 256) ; if (strchr(buffer, '\n')) *strchr(buffer,'\n') = 0 ; if (buffer[0] == '#' || !buffer[0]) continue ; dcb_add_file(buffer) ; } file_close(fp) ; return ; } fp = file_open (filename, "rb0") ; if (!fp) return ; size = file_size (fp) ; file_close (fp) ; if (dcb_ef_alloc == dcb_filecount) { dcb_files = (DCB_FILE *)realloc (dcb_files, sizeof(DCB_FILE) * (dcb_ef_alloc += 16)) ; dcb_fullname = (char * *)realloc (dcb_fullname, sizeof(char *) * dcb_ef_alloc) ; if (!dcb_files || !dcb_fullname) compile_error ("dcb_add_file: out of memory"); } ptr = filename ; while (strchr(ptr, '\\')) ptr = strchr(ptr,'\\')+1 ; if (strlen(ptr) > 55) { file_close (fp) ; return ; } /* Comprueba que el fichero no haya sido ya aadido */ for (i = 0 ; i < dcb_filecount ; i++) if (strcmp(ptr, dcb_files[i].Name) == 0) return ; strcpy (dcb_files[dcb_filecount].Name, ptr) ; dcb_files[dcb_filecount].SFile = size ; dcb_fullname[dcb_filecount] = strdup(filename) ; dcb_filecount++ ; } /* Hack para poder asignar ID's a los varspaces */ VARSPACE * * dcb_orig_varspace = 0 ; int dcb_varspaces = 0 ; static int dcb_varspace (VARSPACE * v) { int n ; for (n = 0 ; n < dcb_varspaces ; n++) { if (dcb_orig_varspace[n] == v) return n ; } dcb.varspace = (DCB_VARSPACE *) realloc (dcb.varspace, sizeof(DCB_VARSPACE) * (dcb_varspaces+1)) ; dcb_orig_varspace = (VARSPACE * *) realloc (dcb_orig_varspace, sizeof(VARSPACE *) * (dcb_varspaces+1)) ; dcb_orig_varspace[dcb_varspaces] = v ; dcb.varspace[dcb_varspaces].NVars = v->count ; dcb_varspaces++ ; for (n = 0 ; n < v->count ; n++) { if (v->vars[n].type.varspace) dcb_varspace (v->vars[n].type.varspace) ; } return dcb_varspaces-1 ; } /* Conversiones de TYPEDEF */ static void dcb_settype (DCB_TYPEDEF * d, TYPEDEF * t) { int n ; for (n = 0 ; n < MAX_TYPECHUNKS ; n++) { d->BaseType[n] = t->chunk[n].type ; d->Count [n] = t->chunk[n].count ; } if (t->varspace) d->Members = dcb_varspace (t->varspace) ; else d->Members = NO_MEMBERS ; } /* Funcin principal que crea el fichero DCB * (ver dcb.h con la estructura del mismo) */ DCB_HEADER dcb ; int dcb_save (const char * filename, int options) { file * fp ; Uint32 n, i ; long offset ; long offset_dcbfiles ; identifier * id ; int NPriVars = 0 ; int SCode = 0 ; int SPrivate = 0 ; fp = file_open (filename, "wb0") ; if (!fp) { fprintf (stdout, "Error: imposible abrir %s\n", filename) ; return 0 ; } /* Los varspace se van rellenando automticamente */ dcb.varspace = 0 ; /* 1. Rellenar los datos de la cabecera */ memcpy (dcb.Header, "dcb\xD\xA\x1F\00\00", 8) ; dcb.Version = DCB_VERSION ; dcb.NProcs = procdef_count ; dcb.NFiles = dcb_filecount ; dcb.NID = identifier_count ; dcb.NStrings = string_count ; dcb.NLocVars = local.count ; dcb.NLocStrings = local.stringvar_count ; dcb.NGloVars = global.count ; dcb.SGlobal = globaldata->current ; dcb.SLocal = localdata->current ; dcb.SText = string_used ; dcb.NImports = nimports ; dcb.NSourceFiles = n_files ; if (!(options & DCB_DEBUG)) { dcb.NID = 0 ; dcb.NLocVars = 0 ; dcb.NGloVars = 0 ; } /* 2. Crear tabla de procesos */ dcb.proc = (DCB_PROC *) malloc(sizeof(DCB_PROC) * dcb.NProcs) ; for (n = 0 ; n < dcb.NProcs ; n++) { dcb.proc[n].ID = procs[n]->identifier ; dcb.proc[n].NParams = procs[n]->params ; dcb.proc[n].NPriVars = procs[n]->privars->count ; dcb.proc[n].NPriStrings = procs[n]->privars->stringvar_count ; dcb.proc[n].NSentences = procs[n]->sentence_count ; dcb.proc[n].SPrivate = procs[n]->pridata->current ; dcb.proc[n].SCode = procs[n]->code.current * 4 ; SCode += dcb.proc[n].SCode ; NPriVars += dcb.proc[n].NPriVars ; SPrivate += dcb.proc[n].SPrivate ; if (!(options & DCB_DEBUG)) { dcb.proc[n].NPriVars = 0 ; dcb.proc[n].NSentences = 0 ; } dcb.proc[n].sentence = (DCB_SENTENCE *) malloc (sizeof(DCB_SENTENCE) * dcb.proc[n].NSentences) ; for (i = 0 ; i < dcb.proc[n].NSentences ; i++) { dcb.proc[n].sentence[i].NFile = 0 ; dcb.proc[n].sentence[i].NLine = procs[n]->sentences[i].line ; dcb.proc[n].sentence[i].NCol = procs[n]->sentences[i].col ; dcb.proc[n].sentence[i].OCode = procs[n]->sentences[i].offset ; } dcb.proc[n].privar = (DCB_VAR *) malloc (sizeof(DCB_VAR) * dcb.proc[n].NPriVars) ; for (i = 0 ; i < dcb.proc[n].NPriVars ; i++) { dcb_settype (&dcb.proc[n].privar[i].Type, &procs[n]->privars->vars[i].type) ; dcb.proc[n].privar[i].ID = procs[n]->privars->vars[i].code ; dcb.proc[n].privar[i].Offset = procs[n]->privars->vars[i].offset ; } } /* 3. Crear tablas globales */ dcb.id = (DCB_ID *) malloc(sizeof(DCB_ID) * dcb.NID) ; id = identifier_first() ; for (n = 0 ; n < dcb.NID ; n++) { assert (id != 0) ; memcpy (dcb.id[n].Name, id->name, sizeof(dcb.id[n].Name)) ; dcb.id[n].Code = id->code ; id = identifier_next(id) ; } dcb.glovar = (DCB_VAR *) malloc(sizeof(DCB_VAR) * dcb.NGloVars) ; dcb.locvar = (DCB_VAR *) malloc(sizeof(DCB_VAR) * dcb.NLocVars) ; for (n = 0 ; n < dcb.NGloVars ; n++) { dcb_settype (&dcb.glovar[n].Type, &global.vars[n].type) ; dcb.glovar[n].ID = global.vars[n].code ; dcb.glovar[n].Offset = global.vars[n].offset ; } for (n = 0 ; n < dcb.NLocVars ; n++) { dcb_settype (&dcb.locvar[n].Type, &local.vars[n].type) ; dcb.locvar[n].ID = local.vars[n].code ; dcb.locvar[n].Offset = local.vars[n].offset ; } dcb.NVarSpaces = dcb_varspaces ; dcb.file = dcb_files ; /* 4. Clculo de offsets */ offset = DCB_HEADER_SIZE ; dcb.OProcsTab = offset ; offset += DCB_PROC_SIZE * dcb.NProcs ; dcb.OStrings = offset ; offset += 4 * dcb.NStrings ; dcb.OGloVars = offset ; offset += DCB_VAR_SIZE * dcb.NGloVars ; dcb.OLocVars = offset ; offset += DCB_VAR_SIZE * dcb.NLocVars ; dcb.OLocStrings = offset ; offset += 4 * dcb.NLocStrings ; dcb.OID = offset ; offset += DCB_ID_SIZE * dcb.NID ; dcb.OVarSpaces = offset ; offset += DCB_VARSPACE_SIZE * dcb.NVarSpaces ; dcb.OText = offset ; offset += dcb.SText ; dcb.OImports = offset ; offset += 4 * dcb.NImports ; dcb.OGlobal = offset ; offset += dcb.SGlobal ; dcb.OLocal = offset ; offset += dcb.SLocal ; dcb.OSourceFiles = offset ; offset += 256 * dcb.NSourceFiles ; for (n = 0 ; n < dcb.NVarSpaces ; n++) { dcb.varspace[n].OVars = offset ; offset += DCB_VAR_SIZE * dcb.varspace[n].NVars ; } for (n = 0 ; n < dcb.NProcs ; n++) { dcb.proc[n].OSentences = offset ; offset += DCB_SENTENCE_SIZE * dcb.proc[n].NSentences ; dcb.proc[n].OPriVars = offset ; offset += DCB_VAR_SIZE * dcb.proc[n].NPriVars ; dcb.proc[n].OPriStrings = offset ; offset += 4 * dcb.proc[n].NPriStrings ; dcb.proc[n].OPrivate = offset ; offset += dcb.proc[n].SPrivate ; dcb.proc[n].OCode = offset ; offset += dcb.proc[n].SCode ; } dcb.OFilesTab = offset ; offset += DCB_FILE_SIZE * dcb.NFiles ; for (n = 0 ; n < dcb.NFiles ; n++) { dcb.file[n].OFile = offset ; offset += dcb.file[n].SFile ; } /* 5. Guardar todo en disco ordenadamente */ file_write (fp, &dcb, DCB_HEADER_SIZE) ; for (n = 0 ; n < dcb.NProcs ; n++) file_write (fp, &dcb.proc[n], DCB_PROC_SIZE) ; file_write (fp, &string_offset, 4 * dcb.NStrings) ; file_write (fp, dcb.glovar, DCB_VAR_SIZE * dcb.NGloVars) ; file_write (fp, dcb.locvar, DCB_VAR_SIZE * dcb.NLocVars) ; file_write (fp, local.stringvars, 4 * dcb.NLocStrings) ; file_write (fp, dcb.id, DCB_ID_SIZE * dcb.NID) ; file_write (fp, dcb.varspace, DCB_VARSPACE_SIZE * dcb.NVarSpaces) ; file_write (fp, string_mem, dcb.SText) ; file_write (fp, &imports, 4 * dcb.NImports) ; file_write (fp, globaldata->bytes, dcb.SGlobal) ; file_write (fp, localdata->bytes, dcb.SLocal) ; file_write (fp, files, 256 * dcb.NSourceFiles) ; for (n = 0 ; n < dcb.NVarSpaces ; n++) { VARIABLE * var ; DCB_VAR v ; var = &dcb_orig_varspace[n]->vars[0] ; for (i = 0 ; i < dcb.varspace[n].NVars ; i++, var++) { dcb_settype (&v.Type, &var->type) ; v.ID = var->code ; v.Offset = var->offset ; file_write (fp, &v, DCB_VAR_SIZE) ; } } for (n = 0 ; n < dcb.NProcs ; n++) { file_write (fp, dcb.proc[n].sentence, DCB_SENTENCE_SIZE * dcb.proc[n].NSentences) ; file_write (fp, dcb.proc[n].privar, DCB_VAR_SIZE * dcb.proc[n].NPriVars) ; file_write (fp, procs[n]->privars->stringvars, 4 * dcb.proc[n].NPriStrings) ; file_write (fp, procs[n]->pridata->bytes, dcb.proc[n].SPrivate) ; file_write (fp, procs[n]->code.data, dcb.proc[n].SCode) ; } offset_dcbfiles = file_pos(fp) ; file_seek (fp, offset_dcbfiles, SEEK_SET) ; file_write (fp, dcb.file, DCB_FILE_SIZE * dcb.NFiles) ; for (n = 0 ; n < dcb.NFiles ; n++) { char buffer[8192] ; file * fp_r = file_open (dcb_fullname[n], "rb") ; int chunk_size ; assert (fp_r) ; dcb.file[n].OFile = file_pos(fp) ; while (!file_eof(fp_r)) { chunk_size = file_read (fp_r, buffer, 8192) ; file_write (fp, buffer, chunk_size) ; if (chunk_size < 8192) break ; } dcb.file[n].SFile = file_pos(fp) - dcb.file[n].OFile ; printf ("File added: %32s (%10d bytes)\n", dcb.file[n].Name, dcb.file[n].SFile) ; file_close (fp_r) ; } offset = file_pos(fp) ; file_seek (fp, offset_dcbfiles, SEEK_SET) ; file_write (fp, dcb.file, DCB_FILE_SIZE * dcb.NFiles) ; file_close (fp) ; /* 6. Mostrar estadsticas */ printf ("\nFichero %s grabado (%ld bytes):\n\n", filename, offset) ; printf (" Procesos: %8d procesos\n", dcb.NProcs) ; printf (" Datos globales: %8d bytes \n", dcb.SGlobal) ; printf (" Datos locales: %8d bytes\n", dcb.SLocal) ; printf (" Datos privados: %8d bytes\n", SPrivate) ; printf (" Cdigo: %8d bytes\n", SCode) ; if (options & DCB_DEBUG) { printf ("Variables globales: %8d variables \n", dcb.NGloVars) ; printf (" Variables locales: %8d variables \n", dcb.NLocVars) ; printf ("Variables privadas: %8d variables\n", NPriVars) ; printf (" Identificadores: %8d identificadores\n", dcb.NID) ; printf (" Estructuras: %8d estructuras\n", dcb.NVarSpaces) ; } printf (" Cadenas: %8d cadenas (%d bytes)\n", dcb.NStrings, dcb.SText) ; if (dcb.NFiles) { printf (" Ficheros: %8d ficheros (%ld bytes)\n", dcb.NFiles, offset - dcb.OFilesTab) ; } printf ("\n") ; return 1 ; } Fenix/fxc/src/error.c0000644000000000000000000000727610607526724013516 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #ifdef TARGET_BEOS #include #else #include #endif #include "fxc.h" #include "errors.h" #include "files.h" /* Errors indexed table */ struct _errindex errtable[10] ; /* * Generate & populate the error table */ void err_buildErrorTable() { file * fp ; char fname[64] ; char line[1024] ; char * token ; int code ; int size ; char * msg = NULL ; struct _errmsg * err = NULL ; /* open the desired localized error file, check for existence if not open EN default */ strcpy(fname,"msg/") ; strcat(fname,langinfo) ; strcat(fname,".msg") ; if (!file_exists(fname)) strcpy(fname,"msg/en.msg") ; fp = file_open(fname,"r") ; if (fp) { while (file_gets (fp,line,1024)) { // Check for multiline... if (line[0]=='_') { // must resize the string and concatenate if (err) { size = strlen(err->msg) + strlen(line) ; msg = (char *)malloc(size) ; strcpy(msg,err->msg) ; line[0]='\n' ; strcat(msg,line) ; free (err->msg) ; err->msg = strdup(msg) ; } } else { // Check for comment token = strtok(line,"#") ; code = 0 ; while (token!=NULL) { /* don't process comments */ if (strlen(token)==0) break ; if (!code) code = atoi(token) ; else msg = token ; token = strtok(NULL,"#") ; } if (code) err = err_addError(code,msg) ; } } file_close(fp) ; } } struct _errmsg * err_addError(int code, const char * msg) { int idx ; struct _errmsg * err ; struct _errmsg * cerr ; /* build error object */ err = malloc(sizeof(struct _errmsg)) ; if (err) { err->code = code ; err->msg = strdup(msg) ; err->prev = NULL ; err->next = NULL ; /* determine index to use... */ idx = code/100 ; /* find insertion point */ cerr = errtable[idx].errlist ; if (cerr) { while (cerr->next) cerr = cerr->next ; cerr->next = err ; err->prev = cerr ; } else { errtable[idx].errlist = err ; } errtable[idx].count++ ; } return err ; } void err_delError(struct _errmsg * err) { int idx ; if (!err) return ; idx = err->code/100 ; if (err->next) { err->next->prev = err->prev ; } if (err->prev) err->prev->next = err->next ; else errtable[idx].errlist = err->next ; free(err->msg) ; free(err) ; errtable[idx].count-- ; } void err_destroyErrorTable(void) { int i ; for (i=0;i<10;i++) { while (errtable[i].count>0) { err_delError(errtable[i].errlist) ; } } } const char * err_getErrorByCode(int code) { int idx ; struct _errmsg * err ; idx = code/100 ; err = errtable[idx].errlist ; while (err && err->code!=code) err = err->next ; if (!err) return 0 ; else return err->msg ; } Fenix/fxc/src/constants.c0000644000000000000000000000460410607526722014367 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include "fxc.h" /* ---------------------------------------------------------------------- */ /* Gestor de constantes */ /* ---------------------------------------------------------------------- */ static CONSTANT * constants ; static int constants_used ; static int constants_reserved ; void constants_init () { constants = (CONSTANT *) malloc (sizeof(CONSTANT)*16); constants_reserved = 16 ; constants_used = 0 ; } void constants_alloc (int count) { constants = (CONSTANT *) realloc (constants, (constants_reserved += count) * sizeof(CONSTANT)) ; if (!constants) { fprintf (stdout, "constants_alloc: sin memoria\n") ; exit (1) ; } } CONSTANT * constants_search (int code) { int i ; for (i = 0 ; i < constants_used ; i++) if (constants[i].code == code) return &constants[i] ; return 0 ; } void constants_add (int code, TYPEDEF type, int value) { if (constants_used == constants_reserved) constants_alloc (16) ; constants[constants_used].code = code ; constants[constants_used].type = type ; constants[constants_used].value = value ; constants_used++ ; } void constants_dump () { int i ; printf ("---- %d constants of %d ----\n", constants_used, constants_reserved) ; for (i = 0 ; i < constants_used ; i++) printf ("%4d: %-16s= %d\n", i, identifier_name(constants[i].code), constants[i].value) ; } Fenix/fxc/src/messages.c0000644000000000000000000002675410607526724014176 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifdef ENGLISH #define MSG_FILE_NOT_FOUND "%s: file not found" #define MSG_FILE_TOO_BIG "%s: file too big" #define MSG_FILE_EMPTY "%s: file is empty" #define MSG_READ_ERROR "%s: file reading error" #define MSG_DIRECTORY_MISSING "You must specify a directory" #define MSG_TOO_MANY_FILES "Too many files specified" #define MSG_USING "Use: %s [options] filename\n\n" #define MSG_OPTION_D " -d Debugging mode\n" #define MSG_OPTIONS " -i dir Adds the directory to the PATH\n" \ " -a Automaticaly adds all files to the DCB\n" \ " -f file Adds a single file to the DCB\n" \ " -l lang Specify locale settings\n" \ " -s stub Generate a stubbed executable from the given stub\n" \ " -g Stores debugging information at the DCB\n" \ " -c File uses the MS-DOS character set\n\n" \ "This program is free software. You can distribute and/or modify it\n" \ "under the terms of the GNU General Public License as published by the\n" \ "Free Software Foundation; either the version 2 of the license or\n" \ "(at your will) any later version.\n\n" \ "Read the file COPYING for details\n\n" #define MSG_COMPILE_ERROR "Error in file %s at line %d: %s " #define MSG_CONSTANT_NAME_EXP "Constant name expected" #define MSG_INVALID_IDENTIFIER "Invalid identifier" #define MSG_EXPECTED "\"%s\" expected" #define MSG_PROCNAME_EXP "Procedure name expected" #define MSG_INVALID_PARAM "Parameter name invalid" #define MSG_INVALID_PARAMT "Parameter type invalid" #define MSG_TOO_MANY_PARAMS "Too many parameters in a definition" #define MSG_INCORRECT_PARAMC "Incorrect number of parameters. Function: %s MinParams: %d." #define MSG_NO_BEGIN "BEGIN expected" #define MSG_NO_END "END expected" #define MSG_ELSE_WOUT_IF "ELSE without IF" #define MSG_PROGRAM_NAME_EXP "Program name expected" #define MSG_PROCESS_NAME_EXP "Procedure name expected" #define MSG_INVALID_TYPE "Invalid data type" #define MSG_UNEXPECTED_TOKEN "Unexpected token (too many ENDs?)" #define MSG_UNEXPECTED_TOKEN_GENERIC "Unexpected token" #define MSG_NO_MAIN "Main procedure was not defined" #define MSG_INTEGER_REQUIRED "Integer type required" #define MSG_NUMBER_REQUIRED "Numeric type required" #define MSG_INCOMP_TYPES "Data types not compatible with operation" #define MSG_INCOMP_TYPE "Data type not accepted here" #define MSG_UNKNOWN_IDENTIFIER "Unknown identifier" #define MSG_NOT_AN_ARRAY "Not an array or struct array" #define MSG_BOUND "Index out of range" #define MSG_IDENTIFIER_EXP "Identifier expected" #define MSG_NOT_AN_LVALUE "Can't get the address of an inmediate value" #define MSG_NOT_A_POINTER "Pointer required" #define MSG_VARIABLE_REQUIRED "Variable required" #define MSG_STRUCT_REQUIRED "Struct required" #define MSG_DIVIDE_BY_ZERO "Division by zero" #define MSG_TYPES_NOT_THE_SAME "Values are of incompatible type" #define MSG_CONSTANT_EXP "Constant value expected" #define MSG_STRING_EXP "String expected" #define MSG_NO_LOOP "Out of loop" #define MSG_INVALID_STEP "Invalid STEP" #define MSG_INVALID_SENTENCE "Invalid sentence" #define MSG_VTA "Can't create an array of undefined multiple sizes" #define MSG_TOO_MANY_AL "Too many array levels" #define MSG_VARIABLE_ALREADY "Variable already declared" #define MSG_IDENTIFIER_EXP "Identifier expected" #define MSG_CANT_INIT_STR "This struct can't be initialized" #define MSG_TOO_MANY_INIT "Too many initializers" #define MSG_TOO_MANY_INCLUDES "Too many nested includes" #define MSG_IDENTIFIER_TOO_LONG "Identifier too long" #define MSG_INVALID_CHAR "Invalid Character" #define MSG_TOO_MANY_TYPES "Too many user-defined types" #define MSG_UNDEFINED_PROC "Undefined procedure" #define MSG_NO_COMPATIBLE_DLL "The library is not Fenix compatible" #define MSG_TOO_MANY_SYSPROCS "Too many system functions" #define MSG_INCORRECT_PTR_INIT "A pointer can only be initialized to 0" #define MSG_NOT_ENOUGH_INIT "Not enough initializers" #define MSG_MULTIPLE_PROCS_FOUND "Various conflicting versions of %s found" #define MSG_QUESTION_INC "Incompatible types at the sides of ? operator" #define MSG_UNKNOWN_PREP "Unknown preprocessor directive" #define MSG_PTR_CONVERSION "Invalid conversion of non-pointer to pointer" #define MSG_CONVERSION "Unsupported data type cast" #define MSG_PROC_ALREADY_DEFINED "Process already defined" #define MSG_FRAME_REQUIRES_INT "FRAME requires an INT return value type" #define MSG_VARIABLE_ERROR "Variable already defined as process, expected type or variable name" #define MSG_PROTO_ERROR "Conflict with previous declaration" #else #define MSG_FILE_NOT_FOUND "%s: fichero no encontrado" #define MSG_FILE_TOO_BIG "%s: fichero demasiado grande" #define MSG_FILE_EMPTY "%s: fichero vaco" #define MSG_READ_ERROR "%s: error de lectura" #define MSG_DIRECTORY_MISSING "Debe especificar un directorio" #define MSG_TOO_MANY_FILES "Especifico demasiados ficheros" #define MSG_USING "Uso: %s [opciones] fichero\n\n" #define MSG_OPTION_D " -d Activar modo de depuracion\n" #define MSG_OPTIONS " -i dir Anade ese directorio al PATH\n" \ " -a Autoincluye todos los ficheros en el DCB\n" \ " -f file Incluye un fichero en el DCB\n" \ " -s stub Genera un ejecutable basado en el stub indicado\n" \ " -l lang Especificar locale\n" \ " -g Guarda informacion de depurado\n" \ " -c Usar caracteres MS-DOS\n\n" \ "Este programa es software libre. Se permite distribuirlo y/o modificarlo\n" \ "segun los terminos de la GNU General Public License publicada por la\n" \ "Free Software Foundation; tanto la version 2 de la licencia como\n" \ "(a tu eleccion) cualquier version posterior\n\n" \ "Lee el fichero COPYING para obtener los detalles\n\n" #define MSG_COMPILE_ERROR "Error en linea %d: %s " #define MSG_CONSTANT_NAME_EXP "Se esperaba nombre de constante" #define MSG_INVALID_IDENTIFIER "Identificador invalido" #define MSG_EXPECTED "Se esperaba \"%s\"" #define MSG_PROCNAME_EXP "Se esperaba nombre de proceso" #define MSG_INVALID_PARAM "Nombre de parametro incorrecto" #define MSG_INVALID_PARAMT "Tipo de parametro incorrecto" #define MSG_TOO_MANY_PARAMS "Demasiados parametros en definicion de proceso" #define MSG_INCORRECT_PARAMC "El numero de parametros es incorrecto. Funcion: %s Parametros Minimos: %d" #define MSG_NO_BEGIN "Se esperaba BEGIN" #define MSG_NO_END "Se esperaba END" #define MSG_ELSE_WOUT_IF "ELSE sin IF" #define MSG_PROGRAM_NAME_EXP "Se esperaba nombre del programa" #define MSG_PROCESS_NAME_EXP "Se esperaba nombre del programa" #define MSG_INVALID_TYPE "Tipo de dato invalido" #define MSG_UNEXPECTED_TOKEN "Simbolo o instruccion inesperada aqui (demasiados END?)" #define MSG_UNEXPECTED_TOKEN_GENERIC "Simbolo o instruccion inesperada aqui" #define MSG_NO_MAIN "Proceso principal no definido" #define MSG_INTEGER_REQUIRED "Se requiere un dato entero" #define MSG_NUMBER_REQUIRED "Se requiere un dato numerico" #define MSG_INCOMP_TYPES "No se pueden operar esos tipos de dato entre si" #define MSG_INCOMP_TYPE "El tipo de dato no es valido ahi" #define MSG_UNKNOWN_IDENTIFIER "Identificador desconocido" #define MSG_NOT_AN_ARRAY "No es un array o estructura multiple" #define MSG_BOUND "ndice fuera de rango" #define MSG_IDENTIFIER_EXP "Se esperaba identificador" #define MSG_NOT_AN_LVALUE "Solo se puede extraer la direccion de una variable" #define MSG_NOT_A_POINTER "Se requiere un puntero" #define MSG_VARIABLE_REQUIRED "Se requiere una variable" #define MSG_STRUCT_REQUIRED "Se requiere una estructura" #define MSG_DIVIDE_BY_ZERO "Division por cero" #define MSG_TYPES_NOT_THE_SAME "Los datos no son del mismo tipo" #define MSG_CONSTANT_EXP "Se esperaba un valor constante" #define MSG_STRING_EXP "Se esperaba una cadena" #define MSG_NO_LOOP "Fuera de bucle" #define MSG_INVALID_STEP "STEP invalido" #define MSG_INVALID_SENTENCE "Sentencia invalida" #define MSG_VTA "No se puede crear un array de tamanos multiples sin especificarlos" #define MSG_TOO_MANY_AL "Demasiados niveles de array" #define MSG_VARIABLE_ALREADY "Variable ya declarada antes" #define MSG_IDENTIFIER_EXP "Se esperaba identificador" #define MSG_CANT_INIT_STR "No se puede inicializar esa estructura" #define MSG_TOO_MANY_INIT "Demasiados inicializadores" #define MSG_TOO_MANY_INCLUDES "Demasiados include anidados" #define MSG_IDENTIFIER_TOO_LONG "Identificador demasiado largo" #define MSG_INVALID_CHAR "Caracter invalido" #define MSG_TOO_MANY_TYPES "Demasiados tipos definidos por el usuario" #define MSG_UNDEFINED_PROC "Procedimiento no definido" #define MSG_NO_COMPATIBLE_DLL "La libreria no es compatible Fenix" #define MSG_TOO_MANY_SYSPROCS "Demasiadas funciones del sistema" #define MSG_INCORRECT_PTR_INIT "Un puntero slo puede inicializarse a 0" #define MSG_NOT_ENOUGH_INIT "No hay suficientes inicializadores" #define MSG_MULTIPLE_PROCS_FOUND "Hay disponibles varias versiones de %s en conflicto" #define MSG_QUESTION_INC "Tipos incompatibles a los lados del operador ?" #define MSG_UNKNOWN_PREP "Directiva de preprocesador desconocida" #define MSG_PTR_CONVERSION "Conversin invlida de no puntero a puntero" #define MSG_CONVERSION "Conversin de tipo de dato no soportada" #define MSG_PROC_ALREADY_DEFINED "Proceso ya definido" #define MSG_FRAME_REQUIRES_INT "FRAME requiere que el proceso devuelva un tipo INT" #define MSG_VARIABLE_ERROR "Variable definida como proceso, se espera tipo o nombre de variable" #define MSG_PROTO_ERROR "Conflicto con declaracion previa" #endif Fenix/fxc/src/token.c0000644000000000000000000004732610607526726013507 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #include #include "fxc.h" #include "messages.c" /* ---------------------------------------------------------------------- */ /* Tokenizador. La funcin token_next, ampliamente utilizada, recoge el */ /* siguiente token (identificador, operador, etc) del cdigo fuente, y */ /* rellena la estructura global "token" con los datos del mismo. */ /* ---------------------------------------------------------------------- */ int line_count = 0 ; // Se pone a 0, ya que lo incremente con cada \n, y hasta no obtener un \n no se procesa la linea (Splinter) int current_file = 0 ; static int disable_defines = 0; static int identifiers_as_strings = 0; struct _token token ; struct _token token_prev ; struct _token token_saved ; static int use_saved = 0 ; #define MAX_SOURCES 32 #define MAX_MACRO_PARAMS 16 typedef struct _define { int code; char * text; int param_count; int param_id[MAX_MACRO_PARAMS]; } DEFINE; static const char * source_ptr ; static char * source_start ; static const char * old_sources[MAX_SOURCES] ; static char * old_sources_start[MAX_SOURCES] ; static int old_line_counts[MAX_SOURCES] ; static int old_current_file[MAX_SOURCES] ; static int sources = 0 ; static DEFINE * defines = NULL; static int defines_allocated = 0; static int defines_count = 0; static int id_define; static int id_ifdef; static int id_ifndef; static int id_endif; static int id_else; static int id_if; /* * FUNCTION : preprocessor_jumpto * * Ignores all of the remaining source file, until * a preprocessor directive with identifier id1 * (or id2 if non-zero), and moves the source_ptr * source code pointer just after it. * * This function is used by preprocessor() * with a #ifdef, #ifndef or #if directive. * * PARAMS : * id1 Identifier of ending directive (i.e. id_endif) * id2 Alternative ending directive (i.e. id_else) or 0 if none * * RETURN VALUE : * None */ void preprocessor_jumpto(int id, int id2) { int depth = 1; use_saved = 0; while (depth > 0 && *source_ptr) { if (*source_ptr == '\n') { line_count++ ; source_ptr++; while (ISSPACE(*source_ptr)) { if (*source_ptr == '\n') { line_count++ ; } source_ptr++; } if (*source_ptr == '#') { source_ptr++; if (*source_ptr == '\n') { line_count++ ; } token_next(); if (token.type == IDENTIFIER) { if (token.code == id || (id2 && token.code == id2)) depth--; else if (token.code == id_ifdef || token.code == id_ifndef || token.code == id_if) depth++; } continue; } } source_ptr++; } } /* * FUNCTION : preprocessor_expand * * Expands a macro to a malloc'ed text area and moves the * token processing to it using token_init(). This function * is called just after the macro name is read (next token * should be a '(' if any parameters needed) * * PARAMS : * None * * RETURN VALUE : * None */ void preprocessor_expand (DEFINE * def) { const char * param_left[MAX_MACRO_PARAMS]; const char * param_right[MAX_MACRO_PARAMS]; const char * begin; const char * old_source; char * text; int i, count, depth, allocated, size, part, actual_line_count; /* No params - easy case */ if (def->param_count == -1) { token_init (def->text, current_file); return; } /* Find left parenthesis */ token_next(); if (token.type != IDENTIFIER || token.code != identifier_leftp) compile_error (MSG_EXPECTED, "("); /* Mark parameters' starting and ending positions */ for (count = 0 ; count < def->param_count ; count++) { depth = 0; param_left[count] = source_ptr; while (*source_ptr && (*source_ptr != ')' || depth > 0) && *source_ptr != ',') { if (*source_ptr == '"' || *source_ptr == '\'') { begin = source_ptr++; while (*source_ptr && *source_ptr != *begin) source_ptr++; if (!*source_ptr) compile_error (MSG_EXPECTED, "\""); source_ptr++; continue; } if (*source_ptr == '(') depth++; source_ptr++; } param_right[count] = source_ptr; if (!*source_ptr) compile_error (MSG_EXPECTED, ")"); if (*source_ptr == ')') break; source_ptr++; } if (count != def->param_count-1 || *source_ptr != ')') { compile_error(MSG_INCORRECT_PARAMC, string_get(def->code), def->param_count-1 ); } source_ptr++; /* Expand the macro */ allocated = 128; size = 0; text = (char *)malloc(allocated); old_source = source_ptr; source_ptr = def->text; actual_line_count = line_count; while (*source_ptr && *source_ptr != '\n') { begin = source_ptr; while (ISSPACE(*source_ptr) && *source_ptr != '\n') source_ptr++; if (*source_ptr ) { if ( *source_ptr != '\n') { token_next(); if (token.type == IDENTIFIER) { /* Next token is an identifier. Search for parameter */ for (i = 0 ; i < def->param_count ; i++) { if (def->param_id[i] == token.code) break; } if (i != def->param_count) { /* Parameter found - expand it */ part = param_right[i] - param_left[i]; if (size + part + 1 >= allocated) { allocated += ((part + 256) & ~ 127); text = (char *)realloc(text, part); } text[size++] = ' '; memcpy (text + size, param_left[i], part); size += part; continue; } } /* No parameter found - copy the token */ part = source_ptr - begin; if (size + part + 1 >= allocated) { allocated += ((part + 256) & ~127); text = (char *)realloc(text, part); } memcpy (text + size, begin, part); size += part; } else { line_count++; source_ptr++; } } } text[size] = 0; source_ptr = old_source; line_count = actual_line_count; /* Now "include" the expanded text "file" */ token_init (text, current_file); free(text); } /* * FUNCTION : preprocessor * * Evaluates a preprocessor directive. This function is called * just after a '#' symbol is found after an end-of-line. * * The function moves source_ptr to the next line. * * PARAMS : * None * * RETURN VALUE : * None */ void preprocessor () { int i, ifdef; const char * ptr; int actual_line_count; static int initialized = 0; if (!initialized) { id_define = identifier_search_or_add("DEFINE"); id_ifdef = identifier_search_or_add("IFDEF"); id_ifndef = identifier_search_or_add("IFNDEF"); id_else = identifier_search_or_add("ELSE"); id_endif = identifier_search_or_add("ENDIF"); id_if = identifier_search_or_add("IF"); initialized = 1; } disable_defines = 1; token_next(); if (token.type != IDENTIFIER) compile_error (MSG_UNKNOWN_PREP); /* #define TEXT value */ if (token.code == id_define) { token_next(); if (token.type != IDENTIFIER) compile_error (MSG_INVALID_IDENTIFIER); /* Allocate the macro */ if (defines_allocated == defines_count) { defines_allocated += 8; defines = (DEFINE *) realloc(defines, sizeof(DEFINE) * defines_allocated); } defines[defines_count].code = token.code; /* Check for parameters: no space allowed between name and ( */ if (*source_ptr == '(') { source_ptr++; for (defines[defines_count].param_count = i = 0 ; *source_ptr != ')' ; ) { if (!*source_ptr) compile_error (MSG_EXPECTED, ")"); if (i == MAX_MACRO_PARAMS) compile_error (MSG_TOO_MANY_PARAMS); token_next(); if (token.type != IDENTIFIER || token.code < reserved_words) compile_error (MSG_INVALID_IDENTIFIER); defines[defines_count].param_id[i++] = token.code; defines[defines_count].param_count++; while (ISSPACE(*source_ptr)) source_ptr++; if (*source_ptr == ',') source_ptr++; } source_ptr++; } else { /* No parameters and no parenthesis */ defines[defines_count].param_count = -1; } while (ISSPACE(*source_ptr) && *source_ptr != '\n') source_ptr++; ptr = source_ptr; while (*ptr && *ptr != '\n') ptr++; while (ptr > source_ptr && (!*ptr || ISSPACE(*ptr))) ptr--; defines[defines_count].text = (char *)malloc(ptr-source_ptr+2); strncpy (defines[defines_count].text, source_ptr, ptr-source_ptr+1); defines[defines_count].text[ptr-source_ptr+1] = 0; defines_count++; source_ptr = ptr+1; disable_defines = 0; return; } /* #ifdef CONST / #ifndef CONST*/ if (token.code == id_ifdef || token.code == id_ifndef) { ifdef = token.code == id_ifdef; token_next(); if (token.type != IDENTIFIER) compile_error (MSG_INVALID_IDENTIFIER); for (i = 0 ; i < defines_count ; i++) { if (defines[i].code == token.code) { if (ifdef) { disable_defines = 0; return; } break; } } if (!ifdef && i == defines_count) { disable_defines = 0; return; } preprocessor_jumpto(id_else, id_endif); disable_defines = 0; return; } /* #if */ if (token.code == id_if) { expresion_result res; ptr = source_ptr; while (*ptr && *ptr != '\n') ptr++; if (*ptr) { ptr++; line_count++; } actual_line_count=line_count; disable_defines = 0; identifiers_as_strings = 1; res = compile_expresion(0,0,TYPE_DWORD); identifiers_as_strings = 0; source_ptr = ptr; line_count=actual_line_count; use_saved = 0; if (!res.constant) compile_error (MSG_CONSTANT_EXP); if (!res.value) { disable_defines = 1; preprocessor_jumpto(id_else, id_endif); disable_defines = 0; } return; } /* #else */ if (token.code == id_else) { preprocessor_jumpto(id_endif, 0); disable_defines = 0; return; } /* #endif */ if (token.code == id_endif) { disable_defines = 0; return; } /* Unknown preprocessor directive */ compile_error (MSG_UNKNOWN_PREP); } void token_init (const char * source, int file) { char * ptr; char * clean_source; if (sources == MAX_SOURCES) compile_error (MSG_TOO_MANY_INCLUDES) ; if (!source) { fprintf (stdout, "token_init: no source\n") ; exit (1) ; } /* Perform cleaning of the source file */ clean_source = (char *) malloc(strlen(source) + 2); ptr = clean_source; *ptr++ = '\n'; /* Adds a blank line to detect first-line # directives */ while (*source) { if (*source == '\\' && source[1] == '\n') { source += 2; *ptr++ = ' '; } else { *ptr++ = *source++; } } *ptr = 0; /* Store the old source pointer */ old_line_counts [sources] = line_count ; old_current_file [sources] = current_file ; old_sources [sources] = source_ptr ; old_sources_start [sources] = source_start ; sources++ ; /* Use the new source */ line_count = 0; source_ptr = clean_source; source_start = clean_source; use_saved = 0; current_file = file ; } int token_endfile() { if (source_start) { free (source_start); source_start = 0; } if (sources > 0) { sources-- ; source_ptr = old_sources[sources] ; source_start = old_sources_start[sources] ; line_count = old_line_counts[sources] ; current_file = old_current_file[sources] ; } return 0 ; } void token_dump () { fprintf (stdout, "(") ; if (token.type == NUMBER) fprintf (stdout, "%d", token.code) ; else if (token.type == FLOAT) fprintf (stdout, "%f", token.value) ; else if (token.type == STRING) fprintf (stdout, "\"%s\"", string_get(token.code)) ; else if (token.type == IDENTIFIER) fprintf (stdout, "\"%s\"", identifier_name(token.code)) ; else if (token.type == NOTOKEN) fprintf (stdout, "EOF") ; else fprintf (stdout, "unknown\n") ; fprintf (stdout, ")\n") ; } extern void load_file (const char * filename) ; void token_next () { static char buffer[1024] ; static int i, len ; char * buffer_ptr = buffer ; if (!source_ptr) { token.type = NOTOKEN ; return ; } if (use_saved) { token = token_saved ; use_saved = 0 ; return ; } token_prev = token ; while (1) { while (ISSPACE(*source_ptr)) { if (*source_ptr == '\n') { line_count++ ; for (source_ptr++ ; ISSPACE(*source_ptr) ; source_ptr++) { if (*source_ptr == '\n') { line_count++ ; } } if (*source_ptr != '#') break; /* Comandos de preprocesador */ source_ptr++; preprocessor(); continue; } source_ptr++ ; } if (!*source_ptr) { while (!*source_ptr) { if (sources == 0) { token.type = NOTOKEN ; return ; } token_endfile() ; if (!source_ptr) { token.type = NOTOKEN; return; } } continue; } /* Ignora comentarios */ if (*source_ptr == '/' && *(source_ptr+1) == '*') { while (*source_ptr != '*' || source_ptr[1] != '/') { if (*source_ptr == '\n') { line_count++ ; } if (!*source_ptr) { token.type = NOTOKEN ; return ; } source_ptr++ ; } source_ptr += 2 ; continue ; } if (*source_ptr == '/' && *(source_ptr+1) == '/') { while (*source_ptr != '\n' && *source_ptr) source_ptr++ ; if (*source_ptr) { source_ptr++ ; line_count++ ; if (*source_ptr == '#') { source_ptr++; preprocessor(); } } continue ; } /* Cadenas */ if (*source_ptr == '"' || *source_ptr == '\'') { token.type = STRING ; token.code = string_compile(&source_ptr) ; return ; } /* Operadores de ms de un caracter */ len = 0 ; if (*source_ptr == '<') { if (source_ptr[1] == '<') { if (source_ptr[2] == '=') len = 3 ; else len = 2 ; } else if (source_ptr[1] == '>') len = 2 ; else if (source_ptr[1] == '=') len = 2 ; else len = 1 ; } else if (*source_ptr == '>') { if (source_ptr[1] == '>') { if (source_ptr[2] == '=') len = 3 ; else len = 2 ; } else if (source_ptr[1] == '=') len = 2 ; else if (source_ptr[1] == '>') len = 2 ; else len = 1 ; } else if (*source_ptr == '|') { if (source_ptr[1] == '|') { if (source_ptr[2] == '=') len = 3 ; else len = 2 ; } else if (source_ptr[1] == '=') len = 2 ; else len = 1 ; } else if (*source_ptr == '=') { if (source_ptr[1] == '=') len = 2 ; else if (source_ptr[1] == '>') len = 2 ; else if (source_ptr[1] == '<') len = 2 ; else len = 1 ; } else if (*source_ptr == '.') { if (source_ptr[1] == '.') len = 2 ; else len = 1 ; } else if (strchr("!&^%*+-/", *source_ptr)) { if (source_ptr[1] == '=') len = 2 ; else if (strchr("+-&^", *source_ptr) && source_ptr[1] == *source_ptr) len = 2 ; else len = 1 ; } if (len) { strncpy (buffer, source_ptr, len) ; buffer[len] = 0 ; source_ptr += len ; token.code = identifier_search_or_add(buffer) ; token.type = IDENTIFIER ; return ; } /* Numbers */ if (ISNUM(*source_ptr)) { const char * ptr ; double num = 0, dec ; int base = 10 ; /* Hex/Bin/Octal numbers with the h/b/o sufix */ ptr = source_ptr ; while (*ptr == '1' || *ptr == '0') ptr++ ; if ((*ptr == 'b' || *ptr == 'B') && !ISALNUM(ptr[1])) base = 2 ; else { ptr = source_ptr ; while (ISALNUM(*ptr)) ptr++ ; if (*ptr == 'h' || *ptr == 'H') base = 16 ; if (*ptr == 'o' || *ptr == 'O') base = 8 ; } /* Calculate the number value */ while (ISNUM(*source_ptr) || (base > 10 && ISALNUM(*source_ptr))) { if (ISNUM(*source_ptr)) num = num * base + (*source_ptr++ - '0') ; if (*source_ptr >= 'a' && *source_ptr <= 'f' && base > 10) num = num * base + (*source_ptr++ - 'a' + 10) ; if (*source_ptr >= 'A' && *source_ptr <= 'F' && base > 10) num = num * base + (*source_ptr++ - 'A' + 10) ; } token.type = NUMBER ; if (base==16) token.code = (unsigned int)num ; else token.code = (int)num ; token.value = (float)num ; /* We have the integer part now - convert to int/float */ if ((*source_ptr) == '.' && base == 10) { source_ptr++ ; if (!ISNUM(*source_ptr)) source_ptr-- ; else { dec = 1.0 / (double)base ; while (ISNUM(*source_ptr) || (base > 100 && ISALNUM(*source_ptr))) { if (ISNUM(*source_ptr)) num = num + dec * (*source_ptr++ - '0') ; if (*source_ptr >= 'a' && *source_ptr <= 'f' && base > 10) num = num + dec * (*source_ptr++ - 'a' + 10) ; if (*source_ptr >= 'A' && *source_ptr <= 'F' && base > 10) num = num + dec * (*source_ptr++ - 'A' + 10) ; dec /= (double)base ; } token.type = FLOAT ; token.value = (float)num ; } } /* Skip the base sufix */ if (base == 16 && *source_ptr == 'h') source_ptr++; if (base == 8 && *source_ptr == 'o') source_ptr++; if (base == 2 && *source_ptr == 'b') source_ptr++; return ; } /* Identificadores */ if (ISWORDFIRST(*source_ptr)) { while (ISWORDCHAR(*source_ptr)) { if (buffer_ptr == buffer+1023) compile_error (MSG_IDENTIFIER_TOO_LONG) ; *buffer_ptr++ = TOUPPER(*source_ptr++) ; } *buffer_ptr++ = 0 ; token.code = identifier_search_or_add(buffer) ; token.type = IDENTIFIER ; /* Search for #define constant inclusion at this point */ if (!disable_defines) { for (i = 0 ; i < defines_count ; i++) { if (defines[i].code == token.code) { preprocessor_expand(&defines[i]); token_next(); return; } } } /* In a #if, all identifiers are strings */ if (identifiers_as_strings) { token.type = STRING; token.code = string_new(buffer); return; } /* Include */ if (token.code == identifier_include && !use_saved) { while (ISSPACE(*source_ptr)) source_ptr++ ; if (*source_ptr == '"') { source_ptr++ ; buffer_ptr = buffer ; while (*source_ptr && *source_ptr != '"') { if (buffer_ptr == buffer+1023) compile_error (MSG_IDENTIFIER_TOO_LONG) ; *buffer_ptr++ = *source_ptr++ ; } if (*source_ptr == '"') source_ptr++ ; *buffer_ptr = 0 ; load_file (buffer) ; token_next() ; return ; } compile_error (MSG_IDENTIFIER_EXP) ; } return ; } /* 1-char operator or invalid symbol */ if (!*source_ptr) break ; if (*source_ptr > 0 && *source_ptr < 32) { compile_error (MSG_INVALID_CHAR) ; return ; } *buffer_ptr++ = *source_ptr++ ; *buffer_ptr = 0 ; token.code = identifier_search_or_add(buffer) ; token.type = IDENTIFIER ; return ; } token.type = NOTOKEN ; return ; /* End-of-file */ } void token_back () { if (use_saved) { fprintf (stdout, "Error: two token_back in a row\n") ; exit(1) ; } token_saved = token ; token = token_prev ; use_saved = 1 ; } Fenix/fxc/src/typedef.c0000644000000000000000000001075610607526726014024 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include "fxc.h" #include "messages.c" TYPEDEF typedef_new (BASETYPE type) { TYPEDEF t ; t.chunk[0].type = type ; if (type == TYPE_POINTER) { t.depth = 2 ; t.chunk[1].type = TYPE_UNDEFINED ; } else t.depth = 1 ; t.varspace = 0 ; return t ; } TYPEDEF typedef_reduce (TYPEDEF base) { TYPEDEF t = base ; memmove (&t.chunk[0], &t.chunk[1], sizeof(TYPECHUNK) * (MAX_TYPECHUNKS-1)) ; t.depth-- ; return t ; } TYPEDEF typedef_enlarge (TYPEDEF base) { TYPEDEF t = base ; memmove (&t.chunk[1], &t.chunk[0], sizeof(TYPECHUNK) * (MAX_TYPECHUNKS-1)) ; t.depth++ ; return t ; } TYPEDEF typedef_pointer (TYPEDEF base) { TYPEDEF t = typedef_enlarge(base) ; t.chunk[0].type = TYPE_POINTER ; return t ; } void typedef_describe (char * buffer, TYPEDEF t) { switch (t.chunk[0].type) { case TYPE_INT: sprintf (buffer, "INT") ; return ; case TYPE_DWORD: sprintf (buffer, "DWORD") ; return ; case TYPE_SHORT: sprintf (buffer, "SHORT") ; return ; case TYPE_WORD: sprintf (buffer, "WORD") ; return ; case TYPE_BYTE: sprintf (buffer, "BYTE") ; return ; case TYPE_CHAR: sprintf (buffer, "CHAR") ; return ; case TYPE_SBYTE: sprintf (buffer, "SIGNED BYTE") ; return ; case TYPE_STRING: sprintf (buffer, "STRING") ; return ; case TYPE_FLOAT: sprintf (buffer, "FLOAT") ; return ; case TYPE_STRUCT: if (t.chunk[0].count > 1) sprintf (buffer, "STRUCT [%d]", t.chunk[0].count) ; else sprintf (buffer, "STRUCT") ; return ; case TYPE_ARRAY: sprintf (buffer, "ARRAY [%d] OF ", t.chunk[0].count) ; typedef_describe (buffer + strlen(buffer), typedef_reduce(t)) ; return ; case TYPE_POINTER: sprintf (buffer, "POINTER TO ") ; typedef_describe (buffer + strlen(buffer), typedef_reduce(t)) ; return ; case TYPE_UNDEFINED: default: sprintf (buffer, "") ; return ; } } int typedef_subsize (TYPEDEF t, int c) { switch (t.chunk[c].type) { case TYPE_BYTE: case TYPE_SBYTE: case TYPE_CHAR: return 1 ; case TYPE_WORD: case TYPE_SHORT: return 2 ; case TYPE_DWORD: case TYPE_INT: case TYPE_FLOAT: case TYPE_STRING: case TYPE_POINTER: return 4 ; case TYPE_ARRAY: return t.chunk[c].count * typedef_subsize(t,c+1) ; case TYPE_STRUCT: return t.varspace->size ; default: compile_error (MSG_INCOMP_TYPE) ; return 0 ; } } int typedef_size (TYPEDEF t) { return typedef_subsize (t, 0) ; } /* Tipos nombrados (structs, tpicamente) */ #define MAX_NAMED 64 static TYPEDEF named_types[MAX_NAMED] ; static int named_codes[MAX_NAMED] ; static int named_count = 0 ; TYPEDEF * typedef_by_name (int code) { int n ; for (n = 0 ; n < named_count ; n++) if (named_codes[n] == code) return &named_types[n] ; return 0 ; } void typedef_name (TYPEDEF t, int code) { if (named_count == MAX_NAMED) compile_error (MSG_TOO_MANY_TYPES) ; named_codes[named_count] = code ; named_types[named_count] = t ; named_count++ ; } int typedef_tcount (TYPEDEF t) { int n ; int count = 1 ; if (t.chunk[0].type == TYPE_STRUCT) return t.chunk[0].count ; for (n = 0 ; t.chunk[n].type == TYPE_ARRAY ; n++) count *= t.chunk[n].count ; return count ; } int typedef_is_equal (TYPEDEF a, TYPEDEF b) { int n; if (a.depth != b.depth) return 0; for (n = 0 ; n < a.depth ; n++) { if (a.chunk[n].type != b.chunk[n].type) return 0; if (a.chunk[n].type == TYPE_ARRAY) { if (a.chunk[n].count != b.chunk[n].count) return 0; } } return 1; } Fenix/fxc/src/codeblock.c0000644000000000000000000002252510607526722014302 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #ifdef TARGET_BEOS #include #else #include #endif #include "fxc.h" #include "messages.c" /* * FUNCTION : codeblock_postprocess * * After every codeblock has been completed (all the source code is * compiled), update a codeblock with all things that couldn't be * done before. This function does the following: * * - Updates all user procedure/function calls with the process * number instead of its identifier id. Emits a compiler error * if a process what user but never defined. * * - Updates all jumps so that they go to absolute opcode offsets * inside the procedure, instead of refering to the label table * * This function will be called once for each existing code block. * * PARAMS : * code Pointer to the codeblock to modify * * RETURN VALUE : * None */ void codeblock_postprocess (CODEBLOCK * code) { int * ptr = code->data ; PROCDEF * proc ; while (ptr < code->data + code->current) { if (*ptr == MN_CALL || *ptr == MN_PROC || *ptr == MN_TYPE) { proc = procdef_search (ptr[1]) ; if (!proc || !proc->defined) { token.type = IDENTIFIER ; token.code = ptr[1] ; // Patch so linecount gets right line_count = identifier_line(token.code) ; current_file = identifier_file(token.code) ; compile_error (MSG_UNDEFINED_PROC) ; } ptr[1] = proc->typeid ; } if (*ptr == MN_JUMP || *ptr == MN_JFALSE || *ptr == MN_JTFALSE || *ptr == MN_JTRUE || *ptr == MN_JTTRUE || *ptr == MN_JNOCASE || *ptr == MN_CLONE) { ptr++ ; *ptr = code->labels[*ptr] ; ptr++ ; continue ; } if (*ptr == MN_REFALSE) { *ptr++ = MN_JFALSE ; *ptr = code->loops[*ptr*2] ; ptr++ ; continue ; } if (*ptr == MN_REPEAT || *ptr == MN_RETRUE) { *ptr = (*ptr == MN_REPEAT ? MN_JUMP : MN_JTRUE) ; ptr++ ; *ptr = code->loops[*ptr*2] ; ptr++ ; continue ; } if (*ptr == MN_BREAK || *ptr == MN_BRFALSE) { *ptr = (*ptr == MN_BREAK ? MN_JUMP : MN_JFALSE) ; ptr++ ; *ptr = code->loops[*ptr*2 + 1] ; ptr++ ; continue ; } ptr+=MN_PARAMS(*ptr)+1 ; } } /* * FUNCTION : codeblock_init * * Initializes a new code block and allocates initial data * for all its internal structs. * * PARAMS : * c Pointer to the codeblock to initialize * * RETURN VALUE : * None */ void codeblock_init(CODEBLOCK * c) { c->data = (int *) malloc (64 * sizeof(int)) ; c->loops = (int *) malloc (16 * sizeof(int)) ; c->labels = (int *) malloc (16 * sizeof(int)) ; c->reserved = 64 ; c->loop_reserved = 8 ; c->loop_count = 1 ; c->loop_active = 0 ; c->label_count = 0 ; c->label_reserved = 16 ; c->current = 0 ; c->previous = 0 ; c->previous2 = 0 ; if (!c->data || !c->loops || !c->labels) { fprintf (stdout, "CODEBLOCK: sin memoria\n") ; exit (1) ; } } /* * FUNCTION : codeblock_alloc * codeblock_loop_alloc * codeblock_label_alloc * * Internal functions that alloc more memory for an * internal data of the code block. Shouldn't be used * outside this module. * * PARAMS : * c Pointer to the codeblock * count Additional size in number of members * * RETURN VALUE : * None */ static void codeblock_alloc (CODEBLOCK * c, int count) { c->reserved += count ; c->data = (int *) realloc (c->data, c->reserved * sizeof(int)) ; if (!c->data) { fprintf (stdout, "CODEBLOCK: sin memoria\n") ; exit (1) ; } } static void codeblock_loop_alloc (CODEBLOCK * c, int count) { c->loop_reserved += count ; c->loops = (int *) realloc (c->loops, c->loop_reserved * sizeof(int) * 2) ; if (!c->loops) { fprintf (stdout, "CODEBLOCK: sin memoria\n") ; exit (1) ; } } static void codeblock_label_alloc (CODEBLOCK * c, int count) { c->label_reserved += count ; c->labels = (int *) realloc (c->labels, c->label_reserved * sizeof(int) * 2) ; if (!c->labels) { fprintf (stdout, "CODEBLOCK: sin memoria\n") ; exit (1) ; } } int codeblock_loop_add (CODEBLOCK * c) { return c->loop_count++ ; } void codeblock_loop_start (CODEBLOCK * c, int loop, int begin) { if (c->loop_reserved <= loop) codeblock_loop_alloc (c, loop + 8 - c->loop_reserved) ; if (c->loop_count <= loop) c->loop_count = loop+1 ; c->loops[loop*2] = begin ; } void codeblock_loop_end (CODEBLOCK * c, int loop, int end) { if (c->loop_reserved <= loop) codeblock_loop_alloc (c, loop + 8 - c->loop_reserved) ; if (c->loop_count <= loop) c->loop_count = loop+1 ; c->loops[loop*2+1] = end ; } int codeblock_label_add (CODEBLOCK * c) { c->label_count++ ; if (c->label_count == c->label_reserved) codeblock_label_alloc (c, c->label_count + 16) ; return c->label_count - 1 ; } void codeblock_label_set (CODEBLOCK * c, int label, int offset) { c->labels[label] = offset ; } void codeblock_stepback (CODEBLOCK * c) { int code = c->data[c->previous]; int param = 0; if (MN_PARAMS(code) > 0) param = c->data[c->previous+1]; if (c->previous != c->previous2) { c->current = c->previous; c->previous = c->previous2; codeblock_add (c, code, param); } } CODEBLOCK_POS codeblock_pos(CODEBLOCK * c) { CODEBLOCK_POS p; p.current = c->current; p.previous = c->previous; p.previous2 = c->previous2; return p; } void codeblock_setpos(CODEBLOCK * c, CODEBLOCK_POS p) { c->current = p.current; c->previous = p.previous; c->previous2 = p.previous2; } void codeblock_add_block (CODEBLOCK * c, CODEBLOCK_POS from, CODEBLOCK_POS to) { if (c->current+(to.current - from.current)+2 >= c->reserved) codeblock_alloc (c, (to.current - from.current + 34) & 0x1F) ; memcpy (c->data + c->current, c->data + from.current, 4*(to.current - from.current)); c->current += to.current - from.current; c->previous = c->current - (to.current - to.previous); if (to.current - from.current > 2) c->previous2 = c->current - (to.current - to.previous2); else c->previous2 = c->previous; } void codeblock_add (CODEBLOCK * c, int code, int param) { if (!c) return ; if (MN_PARAMS(code) == 0 && param) { printf ("Aviso: mnemnico 0x%02X no recibe parmetros\n", code) ; } if (c->current > 0) { if (code == MN_ARRAY && c->data[c->previous] == MN_PUSH) { c->data[c->previous] = MN_INDEX ; c->data[c->previous+1] *= param ; codeblock_stepback(c); return ; } else if (code == MN_ADD && c->data[c->previous] == MN_PUSH) { c->data[c->previous] = MN_INDEX ; codeblock_stepback(c); return ; } else if (code == MN_SUB && c->data[c->previous] == MN_PUSH) { c->data[c->previous] = MN_INDEX ; c->data[c->previous+1] = -c->data[c->previous+1] ; codeblock_stepback(c); return ; } else if ((code & MN_MASK) == MN_INDEX) { if (c->data[c->previous] == MN_INDEX) { c->data[c->previous+1] += param ; return ; } if ((c->data[c->previous] & MN_MASK) == MN_GLOBAL || (c->data[c->previous] & MN_MASK) == MN_LOCAL || (c->data[c->previous] & MN_MASK) == MN_PUBLIC || (c->data[c->previous] & MN_MASK) == MN_REMOTE_PUBLIC || (c->data[c->previous] & MN_MASK) == MN_PRIVATE || (c->data[c->previous] & MN_MASK) == MN_REMOTE) { c->data[c->previous+1] += param ; return ; } } else if (code == MN_POP) { switch (c->data[c->previous] & MN_MASK) { case MN_LET: c->data[c->previous] = MN_LETNP | (c->data[c->previous] & ~MN_MASK); return ; case MN_CALL: c->data[c->previous] = MN_PROC ; return ; case MN_SYSCALL: c->data[c->previous] = MN_SYSPROC ; return ; } } else if ((code & MN_MASK) == MN_PTR) { /* Mismo caso */ switch (c->data[c->previous] & MN_MASK) { case MN_PRIVATE: c->data[c->previous] = MN_GET_PRIV | (code & ~MN_MASK) ; return ; case MN_LOCAL: c->data[c->previous] = MN_GET_LOCAL | (code & ~MN_MASK) ; return ; case MN_PUBLIC: c->data[c->previous] = MN_GET_PUBLIC | (code & ~MN_MASK) ; return ; case MN_REMOTE_PUBLIC: c->data[c->previous] = MN_GET_REMOTE_PUBLIC | (code & ~MN_MASK) ; return ; case MN_GLOBAL: c->data[c->previous] = MN_GET_GLOBAL | (code & ~MN_MASK) ; return ; case MN_REMOTE: c->data[c->previous] = MN_GET_REMOTE | (code & ~MN_MASK) ; return ; } } } c->previous2 = c->previous; c->previous = c->current ; c->data[c->current++] = code ; if (MN_PARAMS(code) > 0) { c->data[c->current++] = param ; } if (c->current+2 >= c->reserved) codeblock_alloc (c, 32) ; } Fenix/fxc/src/Makefile0000644000000000000000000004231110607744626013651 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # fxc/src/Makefile. Generated from Makefile.in by configure. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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. srcdir = . top_srcdir = ../.. pkgdatadir = $(datadir)/fenix pkglibdir = $(libdir)/fenix pkgincludedir = $(includedir)/fenix top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /bin/install -c 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 = i686-pc-mingw32 host_triplet = i686-pc-mingw32 target_triplet = i686-pc-mingw32 ACLOCAL = ${SHELL} /c/Fenix/missing --run aclocal-1.7 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /c/Fenix/missing --run tar AUTOCONF = ${SHELL} /c/Fenix/missing --run autoconf AUTOHEADER = ${SHELL} /c/Fenix/missing --run autoheader AUTOMAKE = ${SHELL} /c/Fenix/missing --run automake-1.7 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -O3 -finline-functions -ffast-math -I/usr/local/include COMMON_CFLAGS = -I/usr/local/include -DTARGET_Win32 -DWIN32 -D_WIN32 COMMON_LIBS = -L/usr/local/lib -lz -lshlwapi CPP = gcc -E CPPFLAGS = CYGPATH_W = echo DEFS = -DPACKAGE_NAME=\"fenix\" -DPACKAGE_TARNAME=\"fenix\" -DPACKAGE_VERSION=\"0.92a\" -DPACKAGE_STRING=\"fenix\ 0.92a\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"fenix\" -DVERSION=\"0.92a\" -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 DEPDIR = .deps DO_FPG = DO_FPG_FALSE = # DO_FPG_TRUE = DO_FXC = DO_FXC_FALSE = # DO_FXC_TRUE = DO_FXI = DO_FXI_FALSE = # DO_FXI_TRUE = DO_MAP = DO_MAP_FALSE = # DO_MAP_TRUE = ECHO_C = ECHO_N = -n ECHO_T = EGREP = grep -E EXEEXT = .exe HAVE_WINDRES_FALSE = # HAVE_WINDRES_TRUE = INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = LIBOBJS = LIBS = -L/usr/local/lib LTLIBOBJS = MAINT = # MAINTAINER_MODE_FALSE = MAINTAINER_MODE_TRUE = # MAKEINFO = ${SHELL} /c/Fenix/missing --run makeinfo OBJEXT = o PACKAGE = fenix PACKAGE_BUGREPORT = PACKAGE_NAME = fenix PACKAGE_STRING = fenix 0.92a PACKAGE_TARNAME = fenix PACKAGE_VERSION = 0.92a PATH_SEPARATOR = : SDL_CFLAGS = -I/usr/local/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main SDL_CONFIG = /usr/local/bin/sdl-config SDL_LIBS = -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows SET_MAKE = SHELL = /bin/sh STRIP = VERSION = 0.92a WINDRES = windres ac_ct_CC = gcc ac_ct_STRIP = ac_ct_WINDRES = windres am__fastdepCC_FALSE = # am__fastdepCC_TRUE = am__include = include am__quote = bindir = ${exec_prefix}/bin build = i686-pc-mingw32 build_alias = build_cpu = i686 build_os = mingw32 build_vendor = pc datadir = ${prefix}/share exec_prefix = ${prefix} host = i686-pc-mingw32 host_alias = host_cpu = i686 host_os = mingw32 host_vendor = pc includedir = ${prefix}/include infodir = ${prefix}/info install_sh = /c/Fenix/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localstatedir = ${prefix}/var mandir = ${prefix}/man oldincludedir = /usr/include prefix = /usr/local program_transform_name = s,x,x, sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com sysconfdir = ${prefix}/etc target = i686-pc-mingw32 target_alias = target_cpu = i686 target_os = mingw32 target_vendor = pc bin_PROGRAMS = fxc INCLUDES = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I../../include -I../inc fxc_LDADD = $(SDL_LIBS) $(COMMON_LIBS) -lz SOURCE_FILES = main.c main_div.c token.c identifier.c segment.c \ constants.c strings.c varspace.c procedure.c codeblock.c \ c_main.c c_data.c c_code.c c_debug.c dcbw.c \ messages.c error.c \ sysstub.c typedef.c ../../common/files.c ../../common/xctype.c fxc_SOURCES = $(SOURCE_FILES) fxc.rc #fxc_SOURCES = $(SOURCE_FILES) subdir = fxc/src mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = bin_PROGRAMS = fxc$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__fxc_SOURCES_DIST = main.c main_div.c token.c identifier.c segment.c \ constants.c strings.c varspace.c procedure.c codeblock.c \ c_main.c c_data.c c_code.c c_debug.c dcbw.c messages.c error.c \ sysstub.c typedef.c ../../common/files.c ../../common/xctype.c \ fxc.rc am__objects_1 = main.$(OBJEXT) main_div.$(OBJEXT) token.$(OBJEXT) \ identifier.$(OBJEXT) segment.$(OBJEXT) constants.$(OBJEXT) \ strings.$(OBJEXT) varspace.$(OBJEXT) procedure.$(OBJEXT) \ codeblock.$(OBJEXT) c_main.$(OBJEXT) c_data.$(OBJEXT) \ c_code.$(OBJEXT) c_debug.$(OBJEXT) dcbw.$(OBJEXT) \ messages.$(OBJEXT) error.$(OBJEXT) sysstub.$(OBJEXT) \ typedef.$(OBJEXT) files.$(OBJEXT) xctype.$(OBJEXT) am_fxc_OBJECTS = $(am__objects_1) fxc.$(OBJEXT) #am_fxc_OBJECTS = $(am__objects_1) fxc_OBJECTS = $(am_fxc_OBJECTS) fxc_DEPENDENCIES = fxc_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles DEP_FILES = ./$(DEPDIR)/c_code.Po ./$(DEPDIR)/c_data.Po \ ./$(DEPDIR)/c_debug.Po ./$(DEPDIR)/c_main.Po \ ./$(DEPDIR)/codeblock.Po ./$(DEPDIR)/constants.Po \ ./$(DEPDIR)/dcbw.Po ./$(DEPDIR)/error.Po \ ./$(DEPDIR)/files.Po ./$(DEPDIR)/identifier.Po \ ./$(DEPDIR)/main.Po ./$(DEPDIR)/main_div.Po \ ./$(DEPDIR)/messages.Po ./$(DEPDIR)/procedure.Po \ ./$(DEPDIR)/segment.Po ./$(DEPDIR)/strings.Po \ ./$(DEPDIR)/sysstub.Po ./$(DEPDIR)/token.Po \ ./$(DEPDIR)/typedef.Po ./$(DEPDIR)/varspace.Po \ ./$(DEPDIR)/xctype.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(am__fxc_SOURCES_DIST) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(fxc_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj .rc $(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu fxc/src/Makefile Makefile: # $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) files.$(OBJEXT): ../../common/files.c xctype.$(OBJEXT): ../../common/xctype.c fxc$(EXEEXT): $(fxc_OBJECTS) $(fxc_DEPENDENCIES) @rm -f fxc$(EXEEXT) $(LINK) $(fxc_LDFLAGS) $(fxc_OBJECTS) $(fxc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c include ./$(DEPDIR)/c_code.Po include ./$(DEPDIR)/c_data.Po include ./$(DEPDIR)/c_debug.Po include ./$(DEPDIR)/c_main.Po include ./$(DEPDIR)/codeblock.Po include ./$(DEPDIR)/constants.Po include ./$(DEPDIR)/dcbw.Po include ./$(DEPDIR)/error.Po include ./$(DEPDIR)/files.Po include ./$(DEPDIR)/identifier.Po include ./$(DEPDIR)/main.Po include ./$(DEPDIR)/main_div.Po include ./$(DEPDIR)/messages.Po include ./$(DEPDIR)/procedure.Po include ./$(DEPDIR)/segment.Po include ./$(DEPDIR)/strings.Po include ./$(DEPDIR)/sysstub.Po include ./$(DEPDIR)/token.Po include ./$(DEPDIR)/typedef.Po include ./$(DEPDIR)/varspace.Po include ./$(DEPDIR)/xctype.Po distclean-depend: -rm -rf ./$(DEPDIR) .c.o: if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ fi # source='$<' object='$@' libtool=no \ # depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ fi # source='$<' object='$@' libtool=no \ # depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'` files.o: ../../common/files.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.o -MD -MP -MF "$(DEPDIR)/files.Tpo" \ -c -o files.o `test -f '../../common/files.c' || echo '$(srcdir)/'`../../common/files.c; \ then mv "$(DEPDIR)/files.Tpo" "$(DEPDIR)/files.Po"; \ else rm -f "$(DEPDIR)/files.Tpo"; exit 1; \ fi # source='../../common/files.c' object='files.o' libtool=no \ # depfile='$(DEPDIR)/files.Po' tmpdepfile='$(DEPDIR)/files.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.o `test -f '../../common/files.c' || echo '$(srcdir)/'`../../common/files.c files.obj: ../../common/files.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.obj -MD -MP -MF "$(DEPDIR)/files.Tpo" \ -c -o files.obj `if test -f '../../common/files.c'; then $(CYGPATH_W) '../../common/files.c'; else $(CYGPATH_W) '$(srcdir)/../../common/files.c'`; \ then mv "$(DEPDIR)/files.Tpo" "$(DEPDIR)/files.Po"; \ else rm -f "$(DEPDIR)/files.Tpo"; exit 1; \ fi # source='../../common/files.c' object='files.obj' libtool=no \ # depfile='$(DEPDIR)/files.Po' tmpdepfile='$(DEPDIR)/files.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.obj `if test -f '../../common/files.c'; then $(CYGPATH_W) '../../common/files.c'; else $(CYGPATH_W) '$(srcdir)/../../common/files.c'` xctype.o: ../../common/xctype.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xctype.o -MD -MP -MF "$(DEPDIR)/xctype.Tpo" \ -c -o xctype.o `test -f '../../common/xctype.c' || echo '$(srcdir)/'`../../common/xctype.c; \ then mv "$(DEPDIR)/xctype.Tpo" "$(DEPDIR)/xctype.Po"; \ else rm -f "$(DEPDIR)/xctype.Tpo"; exit 1; \ fi # source='../../common/xctype.c' object='xctype.o' libtool=no \ # depfile='$(DEPDIR)/xctype.Po' tmpdepfile='$(DEPDIR)/xctype.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xctype.o `test -f '../../common/xctype.c' || echo '$(srcdir)/'`../../common/xctype.c xctype.obj: ../../common/xctype.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xctype.obj -MD -MP -MF "$(DEPDIR)/xctype.Tpo" \ -c -o xctype.obj `if test -f '../../common/xctype.c'; then $(CYGPATH_W) '../../common/xctype.c'; else $(CYGPATH_W) '$(srcdir)/../../common/xctype.c'`; \ then mv "$(DEPDIR)/xctype.Tpo" "$(DEPDIR)/xctype.Po"; \ else rm -f "$(DEPDIR)/xctype.Tpo"; exit 1; \ fi # source='../../common/xctype.c' object='xctype.obj' libtool=no \ # depfile='$(DEPDIR)/xctype.Po' tmpdepfile='$(DEPDIR)/xctype.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xctype.obj `if test -f '../../common/xctype.c'; then $(CYGPATH_W) '../../common/xctype.c'; else $(CYGPATH_W) '$(srcdir)/../../common/xctype.c'` uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(PROGRAMS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-depend distclean-generic distclean-tags distdir dvi \ dvi-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am .rc.o: $(WINDRES) $< -I../../include -o $@ # 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: Fenix/fxc/src/procedure.c0000644000000000000000000000772310607526724014352 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #ifdef TARGET_BEOS #include #else #include #endif #include "fxc.h" /* ---------------------------------------------------------------------- */ /* Gestor de procesos y bloques de cdigo. Este mdulo contiene funciones */ /* de utilidad para crear procesos y bloques de cdigo as como otras que */ /* se emplean durante y despus del compilado. */ /* ---------------------------------------------------------------------- */ PROCDEF * mainproc = 0 ; int procdef_count = 0 ; int procdef_maxid = -1 ; PROCDEF ** procs = 0 ; int procs_allocated = 0 ; int procdef_getid() { return ++procdef_maxid ; } PROCDEF * procdef_new (int typeid, int id) { PROCDEF * proc = (PROCDEF *) malloc (sizeof(PROCDEF)) ; int n ; if (!proc) { fprintf (stdout, "procdef_new: sin memoria\n") ; exit (1) ; } proc->pridata = segment_new() ; proc->privars = varspace_new() ; /* (2006/11/19 23:15 GMT-03:00, Splinter - jj_arg@yahoo.com) */ proc->pubdata = segment_new() ; proc->pubvars = varspace_new() ; /* (2006/11/19 23:15 GMT-03:00, Splinter - jj_arg@yahoo.com) */ proc->params = -1 ; proc->defined = 0 ; proc->declared = 0 ; proc->type = TYPE_DWORD ; proc->flags = 0 ; proc->sentence_count = 0 ; proc->sentences = 0 ; if (typeid >= procs_allocated) { procs_allocated = typeid + 15 ; procs = (PROCDEF **) realloc (procs, sizeof(PROCDEF **) * procs_allocated) ; if (!procs) { fprintf (stdout, "procdef_new: sin memoria\n") ; exit (1) ; } } proc->typeid = typeid ; proc->identifier = id ; procs[typeid] = proc ; for (n = 0 ; n < MAX_PARAMS ; n++) proc->paramtype[n] = TYPE_UNDEFINED ; proc->exitcode = 0 ; codeblock_init (&proc->code) ; procdef_count++ ; return proc ; } PROCDEF * procdef_search (int id) { int n ; for (n = 0 ; n <= procdef_maxid; n++) { if (procs[n]->identifier == id) return procs[n] ; } return 0 ; } PROCDEF * procdef_get (int typeid) { return procs_allocated > typeid ? procs[typeid] : 0 ; } void procdef_destroy (PROCDEF * proc) { varspace_destroy (proc->privars) ; segment_destroy (proc->pridata) ; /* (2006/11/20 01:09 GMT-03:00, Splinter - jj_arg@yahoo.com) */ varspace_destroy (proc->pubvars); segment_destroy (proc->pubdata) ; procs[proc->typeid] = 0 ; free (proc->code.data) ; free (proc->code.loops) ; free (proc->code.labels) ; free (proc) ; procdef_count-- ; } /* Realiza acciones posteriores al compilado sobre el cdigo: * - Convierte saltos de cdigo de etiqueta a offset * - Convierte identificador de procesos en CALL o TYPE a typeid */ void program_postprocess () { int n ; for (n = 0 ; n <= procdef_maxid ; n++) codeblock_postprocess (&procs[n]->code) ; } Fenix/fxc/src/strings.c0000644000000000000000000001301710607526726014046 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #ifdef TARGET_BEOS #include #else #include #endif #include "fxc.h" /* ---------------------------------------------------------------------- */ /* Gestor de cadenas */ /* ---------------------------------------------------------------------- */ char * string_mem = 0 ; int string_allocated = 0 ; int string_used = 0 ; int * string_offset = 0 ; int string_max = 0 ; int string_count = 0 ; int autoinclude = 0 ; void string_init () { string_mem = (char *) malloc (4096) ; string_allocated = 4096 ; string_used = 1 ; string_count = 1 ; string_offset = (int *) malloc(1024 * sizeof(int)) ; string_max = 1024 ; string_mem[0] = 0 ; string_offset[0] = 0 ; } void string_alloc (int bytes) { string_mem = (char *) realloc (string_mem, string_allocated += bytes) ; if (!string_mem) { fprintf (stdout, "string_alloc: sin memoria\n") ; exit(1) ; } } void string_dump () { int i ; printf ("---- %d strings ----\n", string_count) ; for (i = 0 ; i < string_count ; i++) printf ("%4d: %s\n", i, string_mem + string_offset[i]) ; } int string_new (const char * text) { int len = strlen(text)+1 ; if (string_count == string_max) { string_max += 1024 ; string_offset = (int *) realloc (string_offset, string_max * sizeof(int)) ; if (string_offset == 0) { fprintf (stdout, "Demasiadas cadenas\n") ; exit(1) ; } } while (string_used+len >= string_allocated) string_alloc (1024) ; string_offset[string_count] = string_used ; strcpy (string_mem + string_used, text) ; string_used += len ; return string_count++ ; } int string_compile (const char ** source) { char c = *(*source)++, conv ; const char * ptr ; if (string_count == string_max) { string_max += 1024 ; string_offset = (int *) realloc (string_offset, string_max * sizeof(int)) ; if (string_offset == 0) { fprintf (stdout, "Demasiadas cadenas\n") ; exit(1) ; } } string_offset[string_count] = string_used ; while (*(*source)) { if (*(*source) == c) // Termina la string? { (*source)++ ; if (*(*source) == c) // Comienza una nueva? (esto es para strings divididas) { string_mem[string_used++] = c ; (*source)++ ; } else { // Elimino todos los espacios para buscar si hay otra string, esto es para strings divididas ptr = (*source) ; while (ISSPACE(*ptr)) { if (*ptr == '\n') line_count++ ; ptr++ ; } // Si despues de saltar todos los espacios, no tengo un delimitador de string, salgo if (*ptr != c) { (*source) = ptr; // Fix: Splinter, por problema con numeracion de lineas break ; } // Obtengo delimitador de string, me posiciono en el caracter siguiente, dentro de la string (*source) = ptr+1 ; continue ; } } else if (*(*source) == '\n') { line_count++ ; string_mem[string_used++] = '\n' ; (*source)++ ; } else { conv = convert(*(*source)) ; string_mem[string_used++] = conv ; (*source)++ ; } if (string_used >= string_allocated) string_alloc (1024) ; } string_mem[string_used++] = 0 ; if (string_used >= string_allocated) string_alloc (1024) ; /* Hack: aade el posible fichero al DCB */ if (autoinclude) { if (strchr(string_mem + string_offset[string_count], '\\') || strchr(string_mem + string_offset[string_count], '.')) { dcb_add_file (string_mem + string_offset[string_count]) ; } } return string_count++ ; } const char * string_get (int code) { assert (code < string_count && code >= 0) ; return string_mem + string_offset[code] ; } void string_save (file * fp) { file_writeUint32 (fp, &string_count) ; file_writeUint32 (fp, &string_allocated) ; if (string_count) { ARRANGE_DWORDS (string_offset, string_count); file_write (fp, string_offset, 4 * string_count) ; ARRANGE_DWORDS (string_offset, string_count); } if (string_used) { file_write (fp, string_mem, string_used) ; } } void string_load (file * fp) { file_readUint32 (fp, &string_count) ; file_readUint32 (fp, &string_used) ; if (string_count > string_max) { string_max = ((string_count + 1024) & 1023) ; string_offset = (int *) realloc (string_offset, string_max * sizeof(int)) ; } file_read (fp, string_offset, 4 * string_count) ; ARRANGE_DWORDS (string_offset, string_count); if (string_used > string_allocated) { string_allocated = string_used ; string_mem = (char *) realloc (string_mem, string_used) ; } file_read (fp, string_mem, string_used) ; } Fenix/fxc/src/segment.c0000644000000000000000000001252410607526726014021 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #include "fxc.h" #include "messages.c" static int max_id = 0 ; static int free_id[1024] ; static int free_count = 0 ; static segment * * segments = 0 ; static int segments_reserved = 0 ; segment * globaldata, * localdata ; static void segment_register (segment * s) { /* Saves the segment in the global array */ if (!segments) { segments = (segment * *)malloc (sizeof(segment *) * 16) ; segments_reserved = 16 ; } if (segments_reserved <= s->id) { segments_reserved = s->id + 16 ; segments = (segment * *)malloc (sizeof(segment *) * segments_reserved) ; } if (!segments) compile_error ("segment_new: out of memory\n") ; segments[s->id] = s ; } segment * segment_new () { /* Creates the segment */ segment * s = (segment *)malloc (sizeof(segment)) ; if (!s) compile_error ("segment_new: out of memory\n") ; if (free_count) s->id = free_id[--free_count] ; else s->id = max_id++ ; s->current = 0 ; s->reserved = 128 ; s->bytes = (int *) malloc(128) ; if (!s->bytes) compile_error ("segment_new: out of memory\n") ; segment_register (s) ; return s ; } segment * segment_duplicate (segment * b) { segment * s = (segment *)malloc (sizeof(segment)) ; if (!s) compile_error ("segment_new: out of memory\n") ; if (free_count) s->id = free_id[--free_count] ; else s->id = max_id++ ; s->current = b->current ; s->reserved = b->reserved ; s->bytes = (int *) malloc(s->reserved) ; if (!s->bytes) compile_error ("segment_new: out of memory\n") ; memcpy (s->bytes, b->bytes, s->current) ; segment_register (s) ; return s ; } void segment_destroy (segment * s) { segments[s->id] = 0 ; if (free_count < 1024) free_id[free_count++] = s->id ; free (s->bytes) ; free (s) ; } void segment_alloc (segment * n, int count) { n->reserved += count ; n->bytes = realloc (n->bytes, n->reserved) ; if (!n->bytes) compile_error ("segment_alloc: out of memory\n") ; } int segment_add_as (segment * n, Sint32 value, BASETYPE t) { switch (t) { case TYPE_DWORD: case TYPE_INT: case TYPE_FLOAT: case TYPE_STRING: case TYPE_POINTER: return segment_add_dword (n, (Sint32)value) ; case TYPE_WORD: case TYPE_SHORT: return segment_add_word (n, (Sint16)value) ; case TYPE_BYTE: case TYPE_SBYTE: case TYPE_CHAR: return segment_add_byte (n, (Sint8)value) ; default: compile_error (MSG_INCOMP_TYPE) ; return 0 ; } } int segment_add_from (segment * n, segment * s) { if (n->current+s->current >= n->reserved) segment_alloc (n, s->current) ; memcpy ((Uint8 *)n->bytes + n->current, s->bytes, s->current) ; return n->current += s->current ; } int segment_add_byte (segment * n, Sint8 value) { if (n->current+1 >= n->reserved) segment_alloc (n, 64) ; *((Sint8 *)n->bytes + n->current) = value ; return n->current ++ ; } int segment_add_word (segment * n, Sint16 value) { if (n->current+2 >= n->reserved) segment_alloc (n, 64) ; *(Sint16 *)((Uint8 *)n->bytes + n->current) = value ; n->current += 2 ; return n->current - 2 ; } int segment_add_dword (segment * n, Sint32 value) { if (n->current+4 >= n->reserved) segment_alloc (n, 64) ; *(Sint32 *)((Uint8 *)n->bytes + n->current) = value ; n->current += 4 ; return n->current - 4 ; } segment * segment_get (int id) { return segments[id] ; } void segment_dump (segment * s) { int i ; for (i = 0 ; i < s->current ; i++) printf ("%02X ", *((Uint8*)s->bytes + i)) ; printf ("\n") ; } void segment_copy(segment *s, int base_offset, int total_length) { if (s->reserved < s->current + total_length) segment_alloc (s, total_length) ; memcpy ((Uint8 *)s->bytes + s->current, (Uint8 *)s->bytes + base_offset, total_length) ; s->current += total_length ; } VARIABLE * variable_new () { VARIABLE * v = (VARIABLE *) malloc (sizeof(VARIABLE)) ; if (!v) compile_error ("variable_new: out of memory\n") ; return v; } /* Segmentos nombrados */ #define MAX_NAMED 64 static segment * named_segs[MAX_NAMED] ; static int named_codes[MAX_NAMED] ; static int named_count = 0 ; segment * segment_by_name (int code) { int n ; for (n = 0 ; n < named_count ; n++) if (named_codes[n] == code) return named_segs[n] ; return 0 ; } void segment_name (segment * s, int code) { if (named_count == MAX_NAMED) compile_error (MSG_TOO_MANY_TYPES) ; named_segs[named_count] = s ; named_codes[named_count] = code ; named_count++ ; } Fenix/fxc/Makefile.am0000644000000000000000000000001410607526706013445 0ustar rootrootSUBDIRS=src Fenix/fxc/res/0000755000000000000000000000000010606775650012212 5ustar rootrootFenix/fxc/res/CVS/0000755000000000000000000000000010606775650012645 5ustar rootrootFenix/fxc/res/CVS/Repository0000644000000000000000000000001610601620476014732 0ustar rootrootFenix/fxc/res Fenix/fxc/res/CVS/Root0000644000000000000000000000007410601620476013502 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/fxc/res/CVS/Entries0000644000000000000000000000000210606775650014171 0ustar rootrootD Fenix/fxc/FXC.proj0000644000000000000000000006465410607526706012751 0ustar rootrootMIDEi,DPrf)PrEnPrVrPrivRnPr DAccSPth/boot/develop/headers/beSPth/boot/develop/headers/cppSPth/boot/develop/headers/posixSPth/boot/develop/libSPth/boot/beos/system/libPPth{project}PPth/resPPth../commonPPth/incPPth../includePPth/boot/home/config/libPPth/boot/home/config/includeTrgg Xgcc_linkgcc_linkapplication/x-vnd.Be-elfexecutableapplication/x-mw-projectgcc_linkapplication/x-vnd.Be.ar-archiveagcc_linkogcc_linkcgcctext/*ccgcctext/*c++gcctext/*cpgcctext/*cppgcctext/*doctext/*exptext/*htext/*htmltext/*sogcc_linkrsrcGPrfeGenBRsDtResDataGenBShDtShellData-noprofileGenB cccg gccLanguageGenB-cccggccCommonWarningGenB'cccggccWarningGenB*cccggccCodeGenerationGenB)cccgAdditionalGCCCompilerOptions-DTARGET_BEOSGenBmsanNASMOptions8P&@f}QP&@뒻? ?밻P&@ D'kn"u$p=B"섖섖M>G'$>G'>쀟>섖G'лG'>%SX_VQQ"섖pI'3_#D)_#>쀟섖>쀟섖M>>l)>_#>쀟>섖_#=!Y섖쐼KpI'(K'ļD K'I'X_ (K'XW0ͯX_I' C J'3=X_숽"섖S'KpH'L)xH'>쀟섖>쀟섖M>>t)>xH' >쀟>섖xH' =!Y섖옽KS'Z'̽DY'U'X_0Z'XW8@0ͯX_U'CU'N'X_쐾XWU'408K'DX_S'SleCS'TYNAhX_]CS'TYNAh@R 0U'cccgU'϶ @R TYNAhmsan4TYNAGenBdlcggccLinkerGenB'dlcgAdditionalGCCLinkerOptions8P&@f}QP&@뒻? ?밻P&@ D'kn"u$p=B"섖섖M>G'$>G'>쀟>섖G'лG'>%SX_VQQ"섖pI'3_#D)_#>쀟섖>쀟섖M>>l)>_#>쀟>섖_#=!Y섖쐼KpI'(K'ļD K'I'X_ (K'XW0ͯX_I' C J'3=X_숽"섖S'KpH'L)xH'>$섖>쀟섖M>>t)>S'H >쀟>섖S'H =!Y섖옽KS'(̽D ^'Y' X_h Z'XWt(hͯX_Y' C Z'I'X_쐾XWU'Z'$h0Z'DX_S'SleCS'TYNAhX_]CS'TYNAh @R h Z'msanZ'϶ @R TYNAhdlcg4TYNAGenBGNOLUpdateProjGenBmwcxProjectPrefsx86application/x-vnd.Be-elfexecutable../bin/fxcSectPLibrarieshyDPrf)\x ly,"hxxLinklMime'#application/x-vnd.Be-elfexecutableMSFlName libdl.soLinkkMime'#application/x-vnd.Be-elfexecutableMSFlName libz.soSectPResourceshyDPrf)\x ly,"hxxPLnkcB=Mimeapplication/x-be-resourceMSFlName fxc.rsrcSectPSourcesshyDPrf)\x ly,"hxxFil1B=Mimetext/x-source-codeMSFl Name codeblock.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName messages.cSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1 B=Mimetext/x-source-codeMSFl Name constants.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1B=Mimetext/x-source-codeMSFlName c_code.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName messages.cSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1B=Mimetext/x-source-codeMSFlName c_data.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName messages.cSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1P,B=Mimetext/x-source-codeMSFlName c_debug.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1B=Mimetext/x-source-codeMSFlName c_main.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName messages.cSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1PB=Mimetext/x-source-codeMSFlName dcbw.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1`B="Mimetext/x-source-codeMSFlName error.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName errors.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil10B={Mimetext/x-source-codeMSFlName files.cSrFlName files.hFil1B=(Mimetext/x-source-codeMSFl!Name identifier.cSrFl Name codeblock.hSrFlName compiler.hSrFl"Nameidentifiers.hSrFlName procdef.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hFil1pB= Mimetext/x-source-codeMSFlName main.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName errors.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName messages.cSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1pB=.Mimetext/x-source-codeMSFlName main_div.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1^B=0Mimetext/x-source-codeMSFlName messages.cFil1B=1Mimetext/x-source-codeMSFl Name procedure.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil10B=3Mimetext/x-source-codeMSFlName segment.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName messages.cSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1B=6Mimetext/x-source-codeMSFlName strings.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1@B=9Mimetext/x-source-codeMSFlName sysstub.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName messages.cSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName sysprocs.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1@hB=;Mimetext/x-source-codeMSFlName token.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName messages.cSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil10B=@Mimetext/x-source-codeMSFlName typedef.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName messages.cSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil10B=BMimetext/x-source-codeMSFlName varspace.cSrFl Name codeblock.hSrFlName compiler.hSrFl Name constants.hSrFlName dcb.hSrFlName files.hSrFlName fxc.hSrFl"Nameidentifiers.hSrFlName offsets.hSrFlName procdef.hSrFlName pslang.hSrFlName segment.hSrFlName token.hSrFlName typedef.hSrFlName varspace.hSrFlName xctype.hSrFlName xstrings.hFil1@@B=FMimetext/x-source-codeMSFlName xctype.cSrFlName xctype.hSectPHeadersshyDPrf)\x ly,"hxxIgFl_Mimetext/x-source-codeMSFl Name codeblock.hIgFl^Mimetext/x-source-codeMSFlName compiler.hIgFl_Mimetext/x-source-codeMSFl Name constants.hIgFlYMimetext/x-source-codeMSFlName dcb.hIgFl\Mimetext/x-source-codeMSFlName errors.hIgFl_Mimetext/x-source-codeMSFl Name errors_st.hIgFl[Mimetext/x-source-codeMSFlName files.hIgFl^Mimetext/x-source-codeMSFlName files_st.hIgFlaMimetext/x-source-codeMSFl"Namefnx_loadlib.hIgFlYMimetext/x-source-codeMSFlName fxc.hIgFlaMimetext/x-source-codeMSFl"Nameidentifiers.hIgFl]Mimetext/x-source-codeMSFlName offsets.hIgFl]Mimetext/x-source-codeMSFlName procdef.hIgFl\Mimetext/x-source-codeMSFlName pslang.hIgFl]Mimetext/x-source-codeMSFlName segment.hIgFl^Mimetext/x-source-codeMSFlName sysprocs.hIgFl[Mimetext/x-source-codeMSFlName token.hIgFl]Mimetext/x-source-codeMSFlName typedef.hIgFl`Mimetext/x-source-codeMSFl!Name typedef_st.hIgFl^Mimetext/x-source-codeMSFlName varspace.hIgFl\Mimetext/x-source-codeMSFlName xctype.hIgFl_Mimetext/x-source-codeMSFl Name xctype_st.hIgFl^Mimetext/x-source-codeMSFlName xstrings.hFenix/fxc/FXC.plg0000644000000000000000000000552210607526704012544 0ustar rootroot

Build Log

--------------------Configuration: FXC - Win32 Debug--------------------

Command Lines

Creating command line "rc.exe /l 0xc0a /fo"Debug/fxc.res" /i "res" /d "_DEBUG" "C:\Fenix\Fenix\fxc\res\fxc.rc"" Creating temporary file "C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSPB.tmp" with contents [ /nologo /MT /W3 /Gm /GX /ZI /Od /I ".\inc" /I "..\include" /I "..\..\sdl\include" /I "..\..\zlib\include" /D "_DEBUG" /D "TARGET_win32" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR"Debug/" /Fp"Debug/FXC.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\Fenix\Fenix\fxc\src\c_code.c" "C:\Fenix\Fenix\fxc\src\c_data.c" "C:\Fenix\Fenix\fxc\src\c_debug.c" "C:\Fenix\Fenix\fxc\src\c_main.c" "C:\Fenix\Fenix\fxc\src\codeblock.c" "C:\Fenix\Fenix\fxc\src\constants.c" "C:\Fenix\Fenix\fxc\src\dcbw.c" "C:\Fenix\Fenix\fxc\src\error.c" "C:\Fenix\Fenix\common\files.c" "C:\Fenix\Fenix\fxc\src\identifier.c" "C:\Fenix\Fenix\fxc\src\main.c" "C:\Fenix\Fenix\fxc\src\main_div.c" "C:\Fenix\Fenix\fxc\src\messages.c" "C:\Fenix\Fenix\fxc\src\procedure.c" "C:\Fenix\Fenix\fxc\src\segment.c" "C:\Fenix\Fenix\fxc\src\strings.c" "C:\Fenix\Fenix\fxc\src\sysstub.c" "C:\Fenix\Fenix\fxc\src\token.c" "C:\Fenix\Fenix\fxc\src\typedef.c" "C:\Fenix\Fenix\fxc\src\varspace.c" "C:\Fenix\Fenix\common\xctype.c" ] Creating command line "cl.exe @C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSPB.tmp" Creating temporary file "C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSPC.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib shlwapi.lib /nologo /subsystem:console /incremental:yes /pdb:"..\bin\Debug/FXC.pdb" /debug /machine:I386 /out:"..\bin\Debug/FXC.exe" /pdbtype:sept .\Debug\c_code.obj .\Debug\c_data.obj .\Debug\c_debug.obj .\Debug\c_main.obj .\Debug\codeblock.obj .\Debug\constants.obj .\Debug\dcbw.obj .\Debug\error.obj .\Debug\files.obj .\Debug\identifier.obj .\Debug\main.obj .\Debug\main_div.obj .\Debug\messages.obj .\Debug\procedure.obj .\Debug\segment.obj .\Debug\strings.obj .\Debug\sysstub.obj .\Debug\token.obj .\Debug\typedef.obj .\Debug\varspace.obj .\Debug\xctype.obj .\Debug\fxc.res ..\..\zlib\lib\zdll.lib ] Creating command line "link.exe @C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSPC.tmp"

Output Window

Compiling resources... Compiling... c_code.c c_data.c c_debug.c c_main.c codeblock.c constants.c dcbw.c error.c files.c identifier.c main.c main_div.c messages.c procedure.c segment.c strings.c sysstub.c token.c typedef.c varspace.c xctype.c Linking...

Results

FXC.exe - 0 error(s), 0 warning(s)
Fenix/fxc/inc/0000755000000000000000000000000010607526710012162 5ustar rootrootFenix/fxc/inc/segment.h0000644000000000000000000000441710607526710014003 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __SEGMENT_H #define __SEGMENT_H #ifdef TARGET_MAC #include #else #include #endif #ifndef __TYPEDEF_H #include "typedef.h" #endif /* Un segmento es una zona lineal de datos que puede crecer dinmicamente */ typedef struct _segment { void * bytes ; int current ; int reserved ; int id ; } segment ; extern segment * segment_new() ; extern segment * segment_duplicate(segment * s) ; extern segment * segment_get(int id) ; /* Devuelven el offset del nuevo dato */ extern int segment_add_as (segment * s, Sint32 value, BASETYPE t) ; extern int segment_add_dword (segment * s, Sint32 value) ; extern int segment_add_word (segment * s, Sint16 value) ; extern int segment_add_byte (segment * s, Sint8 value) ; extern int segment_add_from (segment * s, segment * from) ; extern void segment_dump(segment *) ; extern void segment_destroy(segment *) ; extern void segment_copy(segment *, int base_offset, int total_length) ; extern void segment_alloc (segment * n, int count) ; extern segment * globaldata ; extern segment * localdata ; /* Segmentos nombrados (para tipos definidos por el usuario */ extern segment * segment_by_name (int code) ; extern void segment_name (segment * s, int code) ; #endif Fenix/fxc/inc/procdef.h0000644000000000000000000000463110607526710013761 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __PROCDEF_H #define __PROCDEF_H /* Procesos (un "PROCDEF" es, en realidad, simplemente su definicin) */ #ifndef __SEGMENT_H #include "segment.h" #endif #ifndef __VARSPACE_H #include "varspace.h" #endif #ifndef __CODEBLOCK_H #include "codeblock.h" #endif #ifndef __TYPEDEF_H #include "typedef.h" #endif #define MAX_PARAMS 16 #define PROC_USES_FRAME 0x01 #define PROC_USES_LOCALS 0x02 #define PROC_FUNCTION 0x04 #define PROC_USES_PUBLICS 0x08 typedef struct _sentence { int file ; int line ; int col ; int offset ; } SENTENCE ; typedef struct _procdef { VARSPACE * privars ; segment * pridata ; /* (2006/11/19 23:15 GMT-03:00, Splinter - jj_arg@yahoo.com) */ VARSPACE * pubvars ; segment * pubdata ; /* (2006/11/19 23:15 GMT-03:00, Splinter - jj_arg@yahoo.com) */ int typeid ; int identifier ; int params ; int defined ; int declared ; int flags ; BASETYPE paramtype[MAX_PARAMS] ; BASETYPE type ; CODEBLOCK code ; int exitcode; SENTENCE * sentences ; int sentence_count ; } PROCDEF ; extern int procdef_count ; extern int procdef_maxid ; extern int procdef_getid() ; extern PROCDEF * procdef_new (int typeid, int identifier) ; extern PROCDEF * procdef_get (int typeid) ; extern PROCDEF * procdef_search (int identifier) ; extern void procdef_destroy(PROCDEF *) ; /* Proceso "principal", el primero en definirse y ejecutarse */ extern PROCDEF * mainproc ; #endif Fenix/fxc/inc/CVS/0000755000000000000000000000000010607526710012615 5ustar rootrootFenix/fxc/inc/CVS/Repository0000644000000000000000000000001610601620476014712 0ustar rootrootFenix/fxc/inc Fenix/fxc/inc/CVS/Root0000644000000000000000000000007410601620476013462 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/fxc/inc/CVS/Entries0000644000000000000000000000076110607526710014155 0ustar rootroot/codeblock.h/1.1.1.1/Thu Apr 12 22:08:08 2007// /compiler.h/1.6/Thu Apr 12 22:08:08 2007// /constants.h/1.1.1.1/Thu Apr 12 22:08:08 2007// /errors.h/1.1.1.1/Thu Apr 12 22:08:09 2007// /errors_st.h/1.1.1.1/Thu Apr 12 22:08:09 2007// /fxc.h/1.3/Thu Apr 12 22:08:09 2007// /identifiers.h/1.1.1.1/Thu Apr 12 22:08:09 2007// /procdef.h/1.4/Thu Apr 12 22:08:10 2007// /segment.h/1.1.1.1/Thu Apr 12 22:08:10 2007// /token.h/1.3/Thu Apr 12 22:08:10 2007// /varspace.h/1.1.1.1/Thu Apr 12 22:08:10 2007// D Fenix/fxc/inc/codeblock.h0000644000000000000000000000462410607526710014266 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __CODEBLOCK_H #define __CODEBLOCK_H /* Bloques de cdigo compilado. Contienen estructuras que slo se emplean * durante el compilado: la funcin program_postprocess() independiza los * datos (CODEBLOCK.data[]) de dichas estructuras, que el intrprete * no necesita */ typedef struct _codeblock { int * data ; int reserved ; int current ; int previous ; int previous2 ; int * loops ; int loop_count ; int loop_reserved ; int loop_active ; int * labels ; int label_count ; int label_reserved ; } CODEBLOCK ; typedef struct _codeblock_pos { int current; int previous; int previous2; } CODEBLOCK_POS ; extern void codeblock_init(CODEBLOCK * c) ; extern void codeblock_add (CODEBLOCK * c, int code, int param) ; extern void codeblock_add_block (CODEBLOCK * c, CODEBLOCK_POS from, CODEBLOCK_POS to); extern void codeblock_loop_start (CODEBLOCK * c, int loop, int begin) ; extern void codeblock_loop_end (CODEBLOCK * c, int loop, int end) ; extern int codeblock_loop_add (CODEBLOCK * c) ; extern int codeblock_label_add (CODEBLOCK * c) ; extern void codeblock_label_set (CODEBLOCK * c, int label, int offset) ; extern void codeblock_postprocess (CODEBLOCK * c) ; extern void codeblock_dump (CODEBLOCK * c) ; extern void mnemonic_dump (int i, int param) ; extern void program_postprocess () ; extern CODEBLOCK_POS codeblock_pos(CODEBLOCK * c); extern void codeblock_setpos(CODEBLOCK * c, CODEBLOCK_POS p); #endif Fenix/fxc/inc/constants.h0000644000000000000000000000255610607526710014357 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __CONSTANTS_H #define __CONSTANTS_H /* Gestor de constantes */ #ifndef __TYPEDEF_H #include "typedef.h" #endif typedef struct _constant { int code ; int value ; TYPEDEF type ; } CONSTANT ; extern void constants_init () ; extern void constants_dump () ; extern void constants_add (int code, TYPEDEF type, int value) ; extern CONSTANT * constants_search (int code) ; #endif Fenix/fxc/inc/fxc.h0000644000000000000000000001000210607526710013104 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : fxc.h * DESCRIPTION : Base includes in FXC and some vars and const defines * * HISTORY: * */ #ifndef ENGLISH #define ENGLISH #endif #ifdef TARGET_MAC #include #else #include #endif #include "files.h" #include "xctype.h" /* ---------------------------------------------------------------------- */ /* Mdulos generales de mantenimiento de datos */ /* ---------------------------------------------------------------------- */ #include "typedef.h" #include "constants.h" #include "identifiers.h" #include "xstrings.h" /* ---------------------------------------------------------------------- */ /* Trucos de portabilidad */ /* ---------------------------------------------------------------------- */ #if SDL_BYTEORDER == SDL_LIL_ENDIAN #define ARRANGE_DWORD(x) #define ARRANGE_WORD(x) #define ARRANGE_DWORDS(x,c) #define ARRANGE_WORDS(x,c) #else static __inline__ void DO_Swap16(Uint16 * D) { *D = ((*D<<8)|(*D>>8)); } static __inline__ void DO_Swap32(Uint32 * D) { *D = ((*D<<24)|((*D<<8)&0x00FF0000)|((*D>>8)&0x0000FF00)|(*D>>24)); } #define ARRANGE_DWORD(x) DO_Swap32(x) #define ARRANGE_WORD(x) DO_Swap16(x) #define ARRANGE_DWORDS(x,c) { \ int __n; \ Uint32 * __p = (Uint32 *)(x); \ for (__n = 0 ; __n < (int)(c) ; __n++) \ ARRANGE_DWORD(&__p[__n]); \ } #define ARRANGE_WORDS(x,c) { \ int __n; \ Uint16 * __p = (Uint16 *)(x); \ for (__n = 0 ; __n < (int)(c) ; __n++) \ ARRANGE_WORD(&__p[__n]); \ } #endif /* ---------------------------------------------------------------------- */ /* Compilador */ /* ---------------------------------------------------------------------- */ #include "segment.h" #include "varspace.h" #include "token.h" #include "codeblock.h" #include "procdef.h" #include "compiler.h" extern int autoinclude ; /* Incluye ficheros en el DCB automticamente */ extern int imports[] ; /* Cdigos de cadena con nombres de imports */ extern int nimports ; /* Nmero de imports */ extern char langinfo[64] ; /* language setting */ /* Funciones para guardar y cargar un fichero DCB */ #include "dcb.h" extern void dcb_add_file (const char * filename) ; extern int dcb_save (const char * filename, int options, const char * stubname) ; extern void dcb_settype (DCB_TYPEDEF * d, TYPEDEF * t) ; /* Funciones del sistema (no definidas) */ typedef struct _sysproc { int code ; char * name ; char * paramtypes ; BASETYPE type ; int params ; int id ; /* For sysproc_list */ struct _sysproc * next; } SYSPROC ; extern int sysproc_add (char * name, char * paramtypes, int type, void * func); extern SYSPROC * sysproc_get (int id) ; extern SYSPROC * * sysproc_getall (int id) ; extern char * sysproc_name (int code) ; /* Constantes DIV */ extern void div_init() ; #include "offsets.h" #include "pslang.h" Fenix/fxc/inc/compiler.h0000644000000000000000000001211310607526710014143 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __COMPILER_H #define __COMPILER_H #ifdef TARGET_MAC #include #else #include #endif #ifndef __TYPEDEF_H #include "typedef.h" #endif #ifndef __PROCDEF_H #include "procdef.h" #endif #ifndef __VARSPACE_H #include "varspace.h" #endif /* Compilador */ typedef struct _expresion_result { int asignation ; int call ; int lvalue ; int constant ; TYPEDEF type ; int count; // Usados para array genericos Sint32 value ; float fvalue ; } expresion_result ; extern void compile_error (const char * error, ...) ; /* Compilado de secciones superiores */ extern void compile_init (); extern void compile_program (); extern void compile_sentence (PROCDEF * p) ; extern void compile_block(PROCDEF *) ; /* Compilado de secciones especiales (definicin de datos, etc) */ extern int compile_array_data (VARSPACE * n, segment * data, int size, int subsize, BASETYPE *t) ; extern int compile_varspace (VARSPACE * n, segment * data, int additive, int copies, int padding, VARSPACE ** c, int alignment) ; extern void compile_constants () ; #define DEFAULT_ALIGNMENT 4 /* Compilador de expresiones */ extern expresion_result compile_value () ; extern expresion_result compile_factor () ; extern expresion_result compile_operand () ; extern expresion_result compile_operation () ; extern expresion_result compile_rotation () ; extern expresion_result compile_clausule () ; extern expresion_result compile_comparison () ; extern expresion_result compile_subexpresion () ; extern expresion_result compile_expresion (int need_constant, int need_lvalue, BASETYPE t) ; extern expresion_result convert_result_type (expresion_result res, BASETYPE t); /* Cdigos de identificadores y palabras reservadas */ extern int identifier_program, identifier_debug, identifier_const, identifier_begin, identifier_end, identifier_struct, identifier_global, identifier_local, identifier_public, identifier_private, identifier_const, identifier_dup, identifier_while, identifier_repeat, identifier_until, identifier_switch, identifier_case, identifier_default, identifier_loop, identifier_for, identifier_from, identifier_step, identifier_to, identifier_if, identifier_else, identifier_break, identifier_continue, identifier_return, identifier_frame, identifier_clone, identifier_onexit, identifier_sizeof, identifier_bandoffset, identifier_offset, identifier_pointer, identifier_type, identifier_and, identifier_or , identifier_xor, identifier_not, identifier_band, identifier_bor, identifier_bxor, identifier_bnot, identifier_plus, identifier_minus, identifier_plusplus, identifier_minusminus, identifier_equal, identifier_multiply, identifier_mod, identifier_divide, identifier_semicolon, identifier_colon, identifier_comma, identifier_ror, identifier_rol, identifier_rightp, identifier_leftp, identifier_rightb, identifier_leftb, identifier_point, identifier_twopoints, identifier_eq, identifier_ne, identifier_gte, identifier_lte, identifier_lt, identifier_gt, identifier_plusequal, identifier_minusequal, identifier_multequal, identifier_divequal, identifier_modequal, identifier_orequal, identifier_xorequal, identifier_andequal, identifier_rorequal, identifier_rolequal, identifier_mouse, identifier_dword, identifier_word, identifier_byte, identifier_string, identifier_float, identifier_include, identifier_type, identifier_import, identifier_elseif, identifier_question, identifier_function, identifier_int, identifier_short, identifier_char, identifier_unsigned, identifier_signed ; extern int reserved_words ; /* Nmero de palabras reservadas */ extern int identifier_is_type(int id); extern int identifier_is_basic_type(int id); #endif Fenix/fxc/inc/token.h0000644000000000000000000000322610607526710013456 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __TOKEN_H #define __TOKEN_H /* Tokenizador */ /* Tipos de token */ #define IDENTIFIER 1 #define STRING 2 #define NUMBER 3 #define FLOAT 4 #define NOTOKEN 5 extern struct _token { int type ; int code ; float value ; } token ; extern void token_init (const char * source, int file) ; extern void token_next () ; extern void token_back () ; extern void token_dump () ; #ifdef TARGET_MAC extern int path_file ; #endif extern int line_count ; extern int current_file ; extern int n_files ; extern char files[][256] ; /* Se exportan todos los token */ extern struct _token token ; extern struct _token token_prev ; extern struct _token token_saved ; #endif Fenix/fxc/inc/errors.h0000644000000000000000000000253410607526710013653 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __ERRORS_H #define __ERRORS_H #include extern struct _errindex errtable[10] ; extern struct _errmsg * err_addError(int code,const char * msg) ; extern void err_delError(struct _errmsg * err) ; extern const char * err_getErrorByCode(int code) ; extern void err_buildErrorTable(void) ; extern void err_destroyErrorTable(void) ; #endif Fenix/fxc/inc/varspace.h0000644000000000000000000000365410607526710014147 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __VARSPACE_H #define __VARSPACE_H #ifndef __TYPEDEF_H #include "typedef.h" #endif /* Un VARSPACE es una zona de definicin de variables */ typedef struct _varspace { struct _variable * vars ; int size ; int count ; int reserved ; int last_offset ; int * stringvars ; int stringvar_reserved ; int stringvar_count ; } VARSPACE ; typedef struct _variable { TYPEDEF type ; int code ; int offset ; } VARIABLE ; extern VARSPACE * varspace_new () ; extern void varspace_alloc (VARSPACE * n, int count) ; extern void varspace_init (VARSPACE * n) ; extern void varspace_add (VARSPACE * n, VARIABLE v) ; extern VARIABLE * varspace_search (VARSPACE * n, int code) ; extern void varspace_dump (VARSPACE * n, int indent) ; extern void varspace_destroy (VARSPACE * n) ; extern void varspace_varstring (VARSPACE * n, int offset) ; /* Datos globales y locales */ extern VARSPACE global ; extern VARSPACE local ; #endif Fenix/fxc/inc/identifiers.h0000644000000000000000000000350110607526710014637 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __IDENTIFIERS_H #define __IDENTIFIERS_H typedef struct _identifier { const char * name ; int code ; int line ; // First USE for the identifier int f ; // file where the id was found struct _identifier * next ; } identifier ; /* Gestor de identificadores */ extern void identifier_init () ; extern void identifier_dump () ; extern int identifier_add (const char * string) ; extern int identifier_add_as (const char * string, int code) ; extern int identifier_search (const char * string) ; extern int identifier_search_or_add (const char * string) ; extern const char * identifier_name (int code) ; extern int identifier_line (int code) ; extern int identifier_file (int code) ; extern int identifier_next_code () ; extern identifier * identifier_first() ; extern identifier * identifier_next (identifier * id) ; #endif Fenix/fxc/inc/errors_st.h0000644000000000000000000000235510607526710014362 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __ERRORS_ST_H #define __ERRORS_ST_H typedef struct _errmsg { int code ; char * msg ; struct _errmsg * next ; struct _errmsg * prev ; } errmsg ; typedef struct _errindex { int count ; errmsg * errlist ; } errindex ; #endif Fenix/fxc/Makefile0000644000000000000000000003062110607744626013063 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # fxc/Makefile. Generated from Makefile.in by configure. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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. srcdir = . top_srcdir = .. pkgdatadir = $(datadir)/fenix pkglibdir = $(libdir)/fenix pkgincludedir = $(includedir)/fenix top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /bin/install -c 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 = i686-pc-mingw32 host_triplet = i686-pc-mingw32 target_triplet = i686-pc-mingw32 ACLOCAL = ${SHELL} /c/Fenix/missing --run aclocal-1.7 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /c/Fenix/missing --run tar AUTOCONF = ${SHELL} /c/Fenix/missing --run autoconf AUTOHEADER = ${SHELL} /c/Fenix/missing --run autoheader AUTOMAKE = ${SHELL} /c/Fenix/missing --run automake-1.7 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -O3 -finline-functions -ffast-math -I/usr/local/include COMMON_CFLAGS = -I/usr/local/include -DTARGET_Win32 -DWIN32 -D_WIN32 COMMON_LIBS = -L/usr/local/lib -lz -lshlwapi CPP = gcc -E CPPFLAGS = CYGPATH_W = echo DEFS = -DPACKAGE_NAME=\"fenix\" -DPACKAGE_TARNAME=\"fenix\" -DPACKAGE_VERSION=\"0.92a\" -DPACKAGE_STRING=\"fenix\ 0.92a\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"fenix\" -DVERSION=\"0.92a\" -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 DEPDIR = .deps DO_FPG = DO_FPG_FALSE = # DO_FPG_TRUE = DO_FXC = DO_FXC_FALSE = # DO_FXC_TRUE = DO_FXI = DO_FXI_FALSE = # DO_FXI_TRUE = DO_MAP = DO_MAP_FALSE = # DO_MAP_TRUE = ECHO_C = ECHO_N = -n ECHO_T = EGREP = grep -E EXEEXT = .exe HAVE_WINDRES_FALSE = # HAVE_WINDRES_TRUE = INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = LIBOBJS = LIBS = -L/usr/local/lib LTLIBOBJS = MAINT = # MAINTAINER_MODE_FALSE = MAINTAINER_MODE_TRUE = # MAKEINFO = ${SHELL} /c/Fenix/missing --run makeinfo OBJEXT = o PACKAGE = fenix PACKAGE_BUGREPORT = PACKAGE_NAME = fenix PACKAGE_STRING = fenix 0.92a PACKAGE_TARNAME = fenix PACKAGE_VERSION = 0.92a PATH_SEPARATOR = : SDL_CFLAGS = -I/usr/local/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main SDL_CONFIG = /usr/local/bin/sdl-config SDL_LIBS = -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows SET_MAKE = SHELL = /bin/sh STRIP = VERSION = 0.92a WINDRES = windres ac_ct_CC = gcc ac_ct_STRIP = ac_ct_WINDRES = windres am__fastdepCC_FALSE = # am__fastdepCC_TRUE = am__include = include am__quote = bindir = ${exec_prefix}/bin build = i686-pc-mingw32 build_alias = build_cpu = i686 build_os = mingw32 build_vendor = pc datadir = ${prefix}/share exec_prefix = ${prefix} host = i686-pc-mingw32 host_alias = host_cpu = i686 host_os = mingw32 host_vendor = pc includedir = ${prefix}/include infodir = ${prefix}/info install_sh = /c/Fenix/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localstatedir = ${prefix}/var mandir = ${prefix}/man oldincludedir = /usr/include prefix = /usr/local program_transform_name = s,x,x, sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com sysconfdir = ${prefix}/etc target = i686-pc-mingw32 target_alias = target_cpu = i686 target_os = mingw32 target_vendor = pc SUBDIRS = src subdir = fxc mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive DIST_COMMON = Makefile.am Makefile.in DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu fxc/Makefile Makefile: # $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (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): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ clean-generic clean-recursive ctags ctags-recursive distclean \ distclean-generic distclean-recursive distclean-tags distdir \ dvi dvi-am dvi-recursive info info-am info-recursive install \ install-am install-data install-data-am install-data-recursive \ install-exec install-exec-am install-exec-recursive \ install-info install-info-am install-info-recursive install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \ ps-recursive tags tags-recursive uninstall uninstall-am \ uninstall-info-am uninstall-info-recursive uninstall-recursive # 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: Fenix/fxi/0000755000000000000000000000000010631334454011416 5ustar rootrootFenix/fxi/Makefile.in0000644000000000000000000003035010607526732013471 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_CFLAGS = @COMMON_CFLAGS@ COMMON_LIBS = @COMMON_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DO_FPG = @DO_FPG@ DO_FPG_FALSE = @DO_FPG_FALSE@ DO_FPG_TRUE = @DO_FPG_TRUE@ DO_FXC = @DO_FXC@ DO_FXC_FALSE = @DO_FXC_FALSE@ DO_FXC_TRUE = @DO_FXC_TRUE@ DO_FXI = @DO_FXI@ DO_FXI_FALSE = @DO_FXI_FALSE@ DO_FXI_TRUE = @DO_FXI_TRUE@ DO_MAP = @DO_MAP@ DO_MAP_FALSE = @DO_MAP_FALSE@ DO_MAP_TRUE = @DO_MAP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ HAVE_WINDRES_FALSE = @HAVE_WINDRES_FALSE@ HAVE_WINDRES_TRUE = @HAVE_WINDRES_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_WINDRES = @ac_ct_WINDRES@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ SUBDIRS = src subdir = fxi mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive DIST_COMMON = Makefile.am Makefile.in DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu fxi/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (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): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ clean-generic clean-recursive ctags ctags-recursive distclean \ distclean-generic distclean-recursive distclean-tags distdir \ dvi dvi-am dvi-recursive info info-am info-recursive install \ install-am install-data install-data-am install-data-recursive \ install-exec install-exec-am install-exec-recursive \ install-info install-info-am install-info-recursive install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \ ps-recursive tags tags-recursive uninstall uninstall-am \ uninstall-info-am uninstall-info-recursive uninstall-recursive # 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: Fenix/fxi/CVS/0000755000000000000000000000000010607744630012055 5ustar rootrootFenix/fxi/CVS/Repository0000644000000000000000000000001210601620504014133 0ustar rootrootFenix/fxi Fenix/fxi/CVS/Root0000644000000000000000000000007410601620504012707 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/fxi/CVS/Entries0000644000000000000000000000055410607744630013415 0ustar rootrootD/inc//// D/res//// D/src//// /FXI.dep/1.2/Thu Apr 12 22:08:24 2007// /FXI.dsp/1.2/Thu Apr 12 22:08:25 2007// /FXI.mak/1.2/Thu Apr 12 22:08:25 2007// /FXI.plg/1.2/Thu Apr 12 22:08:25 2007// /FXI.proj/1.3/Thu Apr 12 22:08:27 2007/-kb/ /Makefile.am/1.1/Thu Apr 12 22:08:27 2007// /Makefile.in/1.5/Thu Apr 12 22:08:28 2007// /Makefile/1.28/Fri Apr 13 18:19:03 2007// Fenix/fxi/src/0000755000000000000000000000000010631334454012205 5ustar rootrootFenix/fxi/src/instance.c0000644000000000000000000005435310607526770014176 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : instance.c * DESCRIPTION : Implements FENIX language function handlers * * HISTORY: 0.80 - Solved leak problem in instance_destroy() * */ #include #include #include #ifdef TARGET_BEOS #include #else #include #endif #include "fxi.h" #define MIN_PRIORITY -2048 #define MAX_PRIORITY 2048 #define PRIORITIES (MAX_PRIORITY - MIN_PRIORITY + 1) /* ---------------------------------------------------------------------- */ /* Mdulo de gestin de instancias, con las funciones de incializacin y */ /* destruccin, duplicado, etc. */ /* ---------------------------------------------------------------------- */ INSTANCE * first_instance = 0 ; INSTANCE * last_instance = 0 ; /* Priority lists */ static INSTANCE * first_by_priority; static INSTANCE * iterator_by_priority = NULL; static int iterator_reset = 1; /* Dirty list: a list of all instances that need an update because * they changed its priority since the last execution */ static INSTANCE * dirty_list = NULL; static int instance_maxid = FIRST_INSTANCE_ID-2 ; /* * FUNCTION : instance_getid * * Allocate and return a free instance identifier code. * It must be an even number. It should reuse already freed * identifiers, but there is little point currently because * an array is not used to access them. * * PARAMS : * None * * RETURN VALUE : * A new, unused instance identifier */ int instance_getid() { instance_maxid += 2 ; return instance_maxid ; } /* * FUNCTION : instance_duplicate * * Create a copy of an instance, using the same local/private data * - Updates the instance list, adding the new instance * - Marks all local and private strings * - Updates all parents local family variables * * The new instance uses the same code pointer as the father * (it begins execution at the same line, instead of the first one) * * PARAMS : * father Pointer to the original instance * * RETURN VALUE : * Pointer to the new instance */ INSTANCE * instance_duplicate (INSTANCE * father) { INSTANCE * r, * brother ; int n ; r = (INSTANCE *) malloc (sizeof(INSTANCE)) ; assert (r != 0) ; r->pridata = (int *) malloc (father->private_size + 4) ; r->pubdata = (int *) malloc (father->public_size + 4) ; r->locdata = (int *) malloc (local_size + 4) ; r->code = father->code ; r->codeptr = father->codeptr ; r->exitcode = father->exitcode ; r->proc = father->proc ; r->inpridata = NULL ; r->inproc = NULL ; r->breakpoint = 0 ; r->private_size = father->private_size ; r->public_size = father->public_size ; r->first_run = 1 ; if ( father->private_size > 0 ) { memcpy (r->pridata, father->pridata, father->private_size) ; } if ( father->public_size > 0 ) { memcpy (r->pubdata, father->pubdata, father->public_size) ; } if ( local_size > 0 ) { memcpy (r->locdata, father->locdata, local_size) ; } /* Inicializa datos DIV */ /* Crea el proceso clnico como si lo hubiera llamado el padre */ /* No s si es eso lo que hace DIV */ LOCDWORD(r, PROCESS_ID) = instance_getid() ; LOCDWORD(r, PROCESS_TYPE) = LOCDWORD(father, PROCESS_TYPE) ; LOCDWORD(r, SON) = 0 ; LOCDWORD(r, SMALLBRO) = 0 ; LOCDWORD(r, FATHER) = LOCDWORD(father, PROCESS_ID) ; brother = instance_get(LOCDWORD(father, SON)) ; if (brother) { LOCDWORD(r, BIGBRO) = LOCDWORD(brother, PROCESS_ID) ; LOCDWORD(brother, SMALLBRO) = LOCDWORD(r, PROCESS_ID) ; } else { LOCDWORD(r, BIGBRO) = 0 ; } LOCDWORD(father,SON) = LOCDWORD(r,PROCESS_ID) ; /* Actualiza las cuentas de uso de las cadenas */ for (n = 0 ; n < r->proc->string_count ; n++) string_use (PRIDWORD(r, r->proc->strings[n])) ; for (n = 0 ; n < r->proc->pubstring_count ; n++) string_use (PUBDWORD(r, r->proc->pubstrings[n])) ; for (n = 0 ; n < local_strings ; n++) string_use (LOCDWORD(r, localstr[n])) ; /* Aade la instancia al final de la lista */ r->next = 0 ; r->prev = last_instance ; if (r->prev) r->prev->next = r ; r->next_by_priority = NULL; r->prev_by_priority = NULL; last_instance = r ; if (!first_instance) { first_instance = r ; LOCDWORD(r, FATHER) = 0 ; } /* The called_by pointer should be set only when the caller * is waiting for this process to return */ r->called_by = NULL; r->stack = NULL; /* Initialize list pointers */ r->next_dirty = dirty_list; dirty_list = r; r->is_dirty = 1; LOCDWORD(r, STATUS) = STATUS_RUNNING; return r ; } /* * FUNCTION : instance_new * * Create a new instance, using the default local/private data * - Updates the instance list, adding the new instance * - Marks all local and private strings * - Updates all parents local family variables * * PARAMS : * proc Pointer to the procedure definition * father Pointer to the father instance (may be NULL) * * RETURN VALUE : * Pointer to the new instance */ INSTANCE * instance_new (PROCDEF * proc, INSTANCE * father) { INSTANCE * r, * brother ; int n ; r = (INSTANCE *) malloc (sizeof(INSTANCE)) ; assert (r != 0) ; r->pridata = (int *) malloc (proc->private_size + 4) ; r->pubdata = (int *) malloc (proc->public_size + 4) ; r->locdata = (int *) malloc (local_size + 4) ; r->code = proc->code ; r->codeptr = proc->code ; r->exitcode = proc->exitcode ; r->proc = proc ; r->inpridata = NULL ; r->inproc = NULL ; r->breakpoint = 0 ; r->private_size = proc->private_size ; r->public_size = proc->public_size ; r->first_run = 1 ; if ( proc->private_size > 0 ) { memcpy (r->pridata, proc->pridata, proc->private_size) ; } if ( proc->public_size > 0 ) { memcpy (r->pubdata, proc->pubdata, proc->public_size) ; } if ( local_size > 0 ) { memcpy (r->locdata, localdata, local_size) ; } /* Inicializa datos DIV */ LOCDWORD(r, PROCESS_ID) = instance_getid() ; LOCDWORD(r, PROCESS_TYPE) = proc->type ; LOCDWORD(r, SON) = 0 ; LOCDWORD(r, SMALLBRO) = 0 ; if (father) { LOCDWORD(r, FATHER) = LOCDWORD(father, PROCESS_ID) ; brother = instance_get(LOCDWORD(father, SON)) ; if (brother) { LOCDWORD(r, BIGBRO) = LOCDWORD(brother, PROCESS_ID) ; LOCDWORD(brother, SMALLBRO) = LOCDWORD(r, PROCESS_ID) ; } else { LOCDWORD(r, BIGBRO) = 0 ; } LOCDWORD(father,SON) = LOCDWORD(r, PROCESS_ID) ; } else { LOCDWORD(r, FATHER) = 0 ; LOCDWORD(r, BIGBRO) = 0 ; } /* Cuenta los usos de las variables tipo cadena */ for (n = 0 ; n < proc->string_count ; n++) string_use (PRIDWORD(r, proc->strings[n])) ; for (n = 0 ; n < proc->pubstring_count ; n++) string_use (PUBDWORD(r, proc->pubstrings[n])) ; for (n = 0 ; n < local_strings ; n++) string_use (LOCDWORD(r, localstr[n])) ; /* Aade la instancia al final de la lista */ r->next = 0 ; r->prev = last_instance ; if (r->prev) r->prev->next = r ; r->next_by_priority = NULL; r->prev_by_priority = NULL; last_instance = r ; if (!first_instance) { first_instance = r ; LOCDWORD(r, FATHER) = 0 ; } /* The called_by pointer should be set only when the caller * is waiting for this process to return */ r->called_by = NULL; r->stack = NULL; /* Initialize list pointers */ r->next_dirty = dirty_list; dirty_list = r; r->is_dirty = 1; LOCDWORD(r, STATUS) = STATUS_RUNNING; return r ; } /* * FUNCTION : instance_get * * Returns a instance, given its ID. This is actually * slow, it should use a better search method. * * PARAMS : * id Integer ID of the instance * * RETURN VALUE : * Pointer to the found instance or NULL if not found */ INSTANCE * instance_get(int id) { INSTANCE * i = first_instance ; while (i) { if (LOCDWORD(i, PROCESS_ID) == id) break ; i = i->next ; } return i ; } INSTANCE * instance_getfather (INSTANCE * i) { return instance_get(LOCDWORD(i, FATHER)) ; } INSTANCE * instance_getson (INSTANCE * i) { return instance_get(LOCDWORD(i, SON)) ; } INSTANCE * instance_getbigbro (INSTANCE * i) { return instance_get(LOCDWORD(i, BIGBRO)) ; } INSTANCE * instance_getsmallbro (INSTANCE * i) { return instance_get(LOCDWORD(i, SMALLBRO)) ; } /* * FUNCTION : instance_destroy_all * * Destroy all instances. Simply calls instance_destroy * for any and every instance in existence. * * PARAMS : * except Don't destroy this instance (used for LET_ME_ALONE) * * RETURN VALUE : * None */ void instance_destroy_all (INSTANCE * except) { INSTANCE * i, * next ; i = first_instance ; while (i) { next = i->next ; if (i != except) instance_destroy (i) ; i = next ; } } /* * FUNCTION : instance_destroy * * Destroy an instance, effectively * - Updates any instance list, removing the given instance * - Discards all local and private strings * - Updates all parents local family variables * - Frees any memory involved * * PARAMS : * r Pointer to the instance * * RETURN VALUE : * None */ void instance_destroy (INSTANCE * r) { INSTANCE * father, * bigbro, * smallbro, * smallson, * bigson, * smallerbro=NULL; int n ; if (LOCDWORD(r, GRAPHID) != 0) object_list_dirty = 1; LOCDWORD(r, STATUS) = STATUS_RUNNING; if (LOCDWORD(r, BOX_X0) != -2) gr_mark_instance(r); /* Actualiza la cuenta de referencia de las variables tipo string */ for (n = 0 ; n < r->proc->string_count ; n++) string_discard (PRIDWORD(r, r->proc->strings[n])) ; for (n = 0 ; n < r->proc->pubstring_count ; n++) string_discard (PUBDWORD(r, r->proc->pubstrings[n])) ; for (n = 0 ; n < local_strings ; n++) string_discard (LOCDWORD(r, localstr[n])) ; /* Actualiza rbol DIV */ /* Si tengo hermano mayor */ bigbro = instance_get(LOCDWORD(r,BIGBRO)) ; if (bigbro) { LOCDWORD(bigbro,SMALLBRO) = LOCDWORD(r,SMALLBRO) ; } /* Si tengo un hermano */ smallbro = instance_get(LOCDWORD(r,SMALLBRO)) ; if (smallbro) { LOCDWORD(smallbro,BIGBRO) = LOCDWORD(r,BIGBRO) ; } /* Yo, ya estoy fuera */ father = instance_get(LOCDWORD(r,FATHER)) ; if ( father ) { smallerbro = instance_get(LOCDWORD(father,SON)); if ( smallerbro == r ) { smallerbro = bigbro; } } else { if ( smallbro ) { smallerbro = smallbro; while (LOCDWORD(smallerbro,SMALLBRO)) { smallerbro = instance_get(LOCDWORD(smallerbro,SMALLBRO)) ; assert ( smallerbro != 0) ; } } else { smallerbro = bigbro; } } /* Tengo hijos */ smallson = instance_get(LOCDWORD(r,SON)) ; if (smallson) { /* Busca el primer y el ltimo hijo */ bigson = smallson ; /* Asignar los procesos huerfanos al padre, si es que tengo padre */ LOCDWORD(bigson,FATHER) = father ? LOCDWORD(father,PROCESS_ID) : 0 ; while (LOCDWORD(bigson,BIGBRO)) { bigson = instance_get(LOCDWORD(bigson,BIGBRO)) ; assert ( bigson != 0) ; /* Asignar los procesos huerfanos al padre, si es que tengo padre */ LOCDWORD(bigson,FATHER) = father ? LOCDWORD(father,PROCESS_ID) : 0 ; } /* Si tengo hermanos, pongo mis hijos como hermanos menores del menor de mis hermanos */ if ( smallerbro ) { LOCDWORD(smallerbro,SMALLBRO) = LOCDWORD(bigson,PROCESS_ID) ; LOCDWORD(bigson,BIGBRO) = LOCDWORD(smallerbro,PROCESS_ID) ; } /* Si tengo padre */ if (father) { LOCDWORD(father,SON) = LOCDWORD(smallson,PROCESS_ID) ; } } else if (father) { /* Si tengo padre */ /* Si soy el primer hijo, asigno a mi hermano mayor como hijo primero a mi padre */ if (LOCDWORD(father,SON) == LOCDWORD(r, PROCESS_ID)) { LOCDWORD(father,SON) = LOCDWORD(r,BIGBRO) ; } } /* Quita la instancia de la lista */ if (r->prev) { r->prev->next = r->next ; } if (r->next) { r->next->prev = r->prev ; } if (first_instance == r) first_instance = r->next ; if (last_instance == r) last_instance = r->prev ; /* Remove the instance from the priority list */ if (first_by_priority == r) first_by_priority = r->next_by_priority; if (r->prev_by_priority) r->prev_by_priority->next_by_priority = r->next_by_priority; if (r->next_by_priority) r->next_by_priority->prev_by_priority = r->prev_by_priority; /* Remove the instance from the dirty list */ if (dirty_list == r) dirty_list = r->next_dirty; else if (r->is_dirty) { INSTANCE * i = dirty_list; while (i) { if (i->next_dirty == r) { i->next_dirty = r->next_dirty; break; } i = i->next_dirty; } } if (r->stack) free (r->stack) ; free (r->locdata) ; free (r->pubdata) ; free (r->pridata) ; free (r) ; } /* * FUNCTION : instance_update_bbox * * Update the internal bounding box local variables in a instance * (Offsets BBOX_X0, BBOX_Y0, BBOX_X1, BBOX_Y1). * * PARAMS : * i Pointer to the instance * * RETURN VALUE : * None */ void instance_update_bbox (INSTANCE * i) { REGION dest, * r ; GRAPH * gr ; int x, y, n, * ptr ; int scalex, scaley ; gr = instance_graph (i) ; if (!gr) return ; if (LOCDWORD(i,REGIONID) >= 0 && LOCDWORD(i,REGIONID) <= 31) r = ®ions[LOCDWORD(i,REGIONID)] ; else r = ®ions[0] ; x = LOCDWORD(i, COORDX) ; y = LOCDWORD(i, COORDY) ; RESOLXY(i, x, y); scalex = LOCDWORD(i,GRAPHSIZEX); scaley = LOCDWORD(i,GRAPHSIZEY); if (scalex == 100 && scaley == 100) scalex = scaley = LOCDWORD(i,GRAPHSIZE); gr_get_bbox (&dest, r, x, y, LOCDWORD(i,FLAGS) ^ LOCDWORD(i,XGRAPH_FLAGS), LOCDWORD(i,XGRAPH) ? 0 : LOCDWORD(i,ANGLE), scalex, scaley, gr) ; if (LOCDWORD(i, CTYPE) == 1) /* c_scroll */ { n = 0 ; if (LOCDWORD(i, CFLAGS)) { while (!(LOCDWORD(i, CFLAGS) & (1 << n))) n++ ; n++ ; } ptr = &GLODWORD(SCROLLS) + 20 * n ; dest.x -= ptr[0] ; dest.y -= ptr[1] ; dest.x2 -= ptr[0] ; dest.y2 -= ptr[1] ; } LOCDWORD(i, BOX_X0) = dest.x ; LOCDWORD(i, BOX_Y0) = dest.y ; LOCDWORD(i, BOX_X1) = dest.x2 ; LOCDWORD(i, BOX_Y1) = dest.y2 ; } /* * FUNCTION : instance_visible * * Returns 1 if the instance is visible (has a valid visible graphic) * * PARAMS : * i Pointer to the instance * * RETURN VALUE : * 1 if the instance is visible, 0 otherwise */ int instance_visible (INSTANCE * i) { if ((LOCDWORD(i,STATUS) & ~STATUS_WAITING_MASK) == STATUS_SLEEPING || (LOCDWORD(i,STATUS) & ~STATUS_WAITING_MASK) == STATUS_RUNNING) { if (instance_graph(i)) return 1; } return 0; } /* * FUNCTION : instance_posupdate * * Updates the internal position variables of the instance. These variables * are used to detect any aspect change in a instance. Use * instance_poschanged() to compare current position with the stored one. * * PARAMS : * i Pointer to the instance * * RETURN VALUE : * None */ void instance_posupdate (INSTANCE * i) { LOCDWORD(i,SAVED_X) = LOCDWORD(i,COORDX); LOCDWORD(i,SAVED_Y) = LOCDWORD(i,COORDY); LOCDWORD(i,SAVED_GRAPH) = LOCDWORD(i,GRAPHID); LOCDWORD(i,SAVED_ANGLE) = LOCDWORD(i,ANGLE); LOCDWORD(i,SAVED_ALPHA) = LOCDWORD(i,ALPHA); LOCDWORD(i,SAVED_BLENDOP) = LOCDWORD(i,BLENDOP); LOCDWORD(i,SAVED_SIZE) = LOCDWORD(i,GRAPHSIZE); LOCDWORD(i,SAVED_SIZEX) = LOCDWORD(i,GRAPHSIZEX); LOCDWORD(i,SAVED_SIZEY) = LOCDWORD(i,GRAPHSIZEY); LOCDWORD(i,SAVED_FLAGS) = LOCDWORD(i,FLAGS); LOCDWORD(i,SAVED_FILE) = LOCDWORD(i,FILEID); LOCDWORD(i,SAVED_XGRAPH) = LOCDWORD(i,XGRAPH); } /* * FUNCTION : instance_poschanged * * Compares the internal position variables of the instance with its * currents values, and returns 1 if there is any difference. Used * to detect changes in a visible process's aspect or position. * * PARAMS : * i Pointer to the instance * * RETURN VALUE : * 1 if there is any change, 0 otherwise */ int instance_poschanged (INSTANCE * i) { GRAPH * graph = instance_graph(i); if (graph && (graph->modified || (graph->frames > 0 && graph->next_time < current_time) ) ) return 1; return LOCDWORD(i,SAVED_X) != LOCDWORD(i,COORDX) || LOCDWORD(i,SAVED_Y) != LOCDWORD(i,COORDY) || LOCDWORD(i,SAVED_GRAPH) != LOCDWORD(i,GRAPHID) || LOCDWORD(i,SAVED_ANGLE) != LOCDWORD(i,ANGLE) || LOCDWORD(i,SAVED_ALPHA) != LOCDWORD(i,ALPHA) || LOCDWORD(i,SAVED_BLENDOP) != LOCDWORD(i,BLENDOP) || LOCDWORD(i,SAVED_SIZE) != LOCDWORD(i,GRAPHSIZE) || LOCDWORD(i,SAVED_SIZEX) != LOCDWORD(i,GRAPHSIZEX) || LOCDWORD(i,SAVED_SIZEY) != LOCDWORD(i,GRAPHSIZEY) || LOCDWORD(i,SAVED_FLAGS) != LOCDWORD(i,FLAGS) || LOCDWORD(i,SAVED_FILE) != LOCDWORD(i,FILEID) || LOCDWORD(i,SAVED_XGRAPH) != LOCDWORD(i,XGRAPH) || LOCDWORD(i,PREV_Z) != LOCDWORD(i,COORDZ) ; } /* * FUNCTION : instance_graph * * Returns the instance graphic or NULL if there is none * * PARAMS : * i Pointer to the instance * * RETURN VALUE : * Pointer to the graphic or NULL if none */ GRAPH * instance_graph (INSTANCE * i) { int * xgraph, c, a ; if (LOCDWORD(i,XGRAPH)) { xgraph = (int *) LOCDWORD(i,XGRAPH) ; c = *xgraph++; if (c) { a = LOCDWORD(i,ANGLE) % 360000 ; if (a < 0) a += 360000 ; c = xgraph[a*c/360000] ; LOCDWORD(i,XGRAPH_FLAGS) = 0; if (c < 0) { c = -c; LOCDWORD(i, XGRAPH_FLAGS) = B_HMIRROR; } return bitmap_get(LOCDWORD(i,FILEID), c) ; } } if (LOCDWORD(i,GRAPHID)) return bitmap_get(LOCDWORD(i,FILEID), LOCDWORD(i,GRAPHID)) ; return 0 ; } /* * FUNCTION : instance_exists * * Given an instance pointer, returns TRUE if it is still valid. * * PARAMS : * i Pointer to the instance * * RETURN VALUE : * 1 if the instance pointer is in the global instance list, 0 otherwise */ int instance_exists (INSTANCE * i) { INSTANCE * pos = first_instance; while (pos) { if (pos == i) return 1; pos = pos->next; } return 0; } /* * FUNCTION : instance_next_by_priority * * Gets the next instance pointer until no more instances are * returned. Instances are returned sorted by priority. * * PARAMS : * None * * RETURN VALUE : * Pointer to the next priority on the list or NULL * if there is no more instances. The next call in this * case will return a pointer to the first instance * (the one with the lower priority) */ INSTANCE * instance_next_by_priority() { INSTANCE * i; INSTANCE * j; INSTANCE * best_prev; INSTANCE * best_next; if (iterator_by_priority == NULL) { // NULL will be returned once and then the list will be reset if (!iterator_reset) { iterator_reset = 1; return NULL; } iterator_reset = 0; // Add all dirty instances to its place at the list i = dirty_list; while (i != NULL) { // Check the priority value if (LOCDWORD(i, PRIORITY) < MIN_PRIORITY) LOCDWORD(i, PRIORITY) = MIN_PRIORITY; if (LOCDWORD(i, PRIORITY) > MAX_PRIORITY) LOCDWORD(i, PRIORITY) = MAX_PRIORITY; // Remove the instance from the list if (i->prev_by_priority) i->prev_by_priority->next_by_priority = i->next_by_priority; if (i->next_by_priority) i->next_by_priority->prev_by_priority = i->prev_by_priority; if (first_by_priority == i) first_by_priority = i->next_by_priority; // Add the instance to the list. The easy case is when there is // already some instance with the same priority. j = first_by_priority; best_prev = best_next = NULL; i->prev_by_priority = NULL; i->next_by_priority = NULL; while (j) { if (LOCDWORD(j, PRIORITY) == LOCDWORD(i, PRIORITY)) { i->prev_by_priority = j; i->next_by_priority = j->next_by_priority; j->next_by_priority = i; if (i->next_by_priority) i->next_by_priority->prev_by_priority = i; break; } else if (LOCDWORD(j, PRIORITY) > LOCDWORD(i, PRIORITY)) { best_prev = j; } else if (!best_next) { best_next = j; } j = j->next_by_priority; } if (j == NULL) { // No best case if (best_prev) { // But some instance was found with a lower priority i->next_by_priority = best_prev->next_by_priority; best_prev->next_by_priority = i; if (i->next_by_priority) i->next_by_priority->prev_by_priority = i; i->prev_by_priority = best_prev; /* Splinter */ } else if (best_next) { // But some instance was found with a higher priority i->prev_by_priority = best_next->prev_by_priority; best_next->prev_by_priority = i; if (i->prev_by_priority) i->prev_by_priority->next_by_priority = i; else first_by_priority = i; i->next_by_priority = best_next; /* Splinter */ } else { // There are no instances in the list first_by_priority = i; } } i->is_dirty = 0; i = i->next_dirty; } // Reset the dirty list dirty_list = NULL; iterator_by_priority = first_by_priority->next_by_priority; return first_by_priority; } i = iterator_by_priority; iterator_by_priority = iterator_by_priority->next_by_priority; return i; } /* * FUNCTION : instance_dirty * * Adds an instance to the dirty instances list. This is a list of all * instances which priority changed since the last execution. * * PARAMS : * i Pointer to the instance * * RETURN VALUE : * None */ void instance_dirty (INSTANCE * i) { i->next_dirty = dirty_list; dirty_list = i; } Fenix/fxi/src/Makefile.in0000644000000000000000000006750110607526736014274 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_CFLAGS = @COMMON_CFLAGS@ COMMON_LIBS = @COMMON_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DO_FPG = @DO_FPG@ DO_FPG_FALSE = @DO_FPG_FALSE@ DO_FPG_TRUE = @DO_FPG_TRUE@ DO_FXC = @DO_FXC@ DO_FXC_FALSE = @DO_FXC_FALSE@ DO_FXC_TRUE = @DO_FXC_TRUE@ DO_FXI = @DO_FXI@ DO_FXI_FALSE = @DO_FXI_FALSE@ DO_FXI_TRUE = @DO_FXI_TRUE@ DO_MAP = @DO_MAP@ DO_MAP_FALSE = @DO_MAP_FALSE@ DO_MAP_TRUE = @DO_MAP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ HAVE_WINDRES_FALSE = @HAVE_WINDRES_FALSE@ HAVE_WINDRES_TRUE = @HAVE_WINDRES_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_WINDRES = @ac_ct_WINDRES@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ bin_PROGRAMS = fxi INCLUDES = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I../../include -I../inc -DDEBUG fxi_LDADD = $(SDL_LIBS) $(COMMON_LIBS) -lz -lpng -lSDL_mixer fxi_LDFLAGS = --as-needed SOURCE_FILES = main.c dcbr.c instance.c strings.c \ i_main.c i_debug.c i_func.c \ g_main.c g_maps.c g_blit.c g_texts.c g_pal.c g_draw.c \ g_systexts.c g_console.c g_scroll.c g_flic.c g_mode7.c \ img_png.c img_pcx.c sound.c pathfind.c fnc_exports.c \ g_conversion.c g_font.c g_fpg.c g_blendop.c f_bgload.c \ f_cd.c f_sort.c fbm.c fgc.c fpl.c f_joystick.c i_copy.c \ ../../common/dirs.c ../../common/regex.c \ ../../common/files.c ../../common/xctype.c \ g_profiler.c i_saveload.c \ scaler_scanline.c scaler_normal.c scaler_hq2x.c scaler_scale2x.c \ mmx_main.c mmx_hspan.c #hacer un if con mmx para activarlo o no noinst_HEADERS = ../inc/fxi.h ../../include/files.h ../../include/xctype.h \ ../../include/offsets.h ../../include/pslang.h ../inc/fmath.h @HAVE_WINDRES_TRUE@fxi_SOURCES = $(SOURCE_FILES) fxi.rc @HAVE_WINDRES_FALSE@fxi_SOURCES = $(SOURCE_FILES) subdir = fxi/src mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = bin_PROGRAMS = fxi$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__fxi_SOURCES_DIST = main.c dcbr.c instance.c strings.c i_main.c \ i_debug.c i_func.c g_main.c g_maps.c g_blit.c g_texts.c g_pal.c \ g_draw.c g_systexts.c g_console.c g_scroll.c g_flic.c g_mode7.c \ img_png.c img_pcx.c sound.c pathfind.c fnc_exports.c \ g_conversion.c g_font.c g_fpg.c g_blendop.c f_bgload.c f_cd.c \ f_sort.c fbm.c fgc.c fpl.c f_joystick.c i_copy.c \ ../../common/dirs.c ../../common/regex.c ../../common/files.c \ ../../common/xctype.c g_profiler.c i_saveload.c \ scaler_scanline.c scaler_normal.c scaler_hq2x.c \ scaler_scale2x.c mmx_main.c mmx_hspan.c fxi.rc am__objects_1 = main.$(OBJEXT) dcbr.$(OBJEXT) instance.$(OBJEXT) \ strings.$(OBJEXT) i_main.$(OBJEXT) i_debug.$(OBJEXT) \ i_func.$(OBJEXT) g_main.$(OBJEXT) g_maps.$(OBJEXT) \ g_blit.$(OBJEXT) g_texts.$(OBJEXT) g_pal.$(OBJEXT) \ g_draw.$(OBJEXT) g_systexts.$(OBJEXT) g_console.$(OBJEXT) \ g_scroll.$(OBJEXT) g_flic.$(OBJEXT) g_mode7.$(OBJEXT) \ img_png.$(OBJEXT) img_pcx.$(OBJEXT) sound.$(OBJEXT) \ pathfind.$(OBJEXT) fnc_exports.$(OBJEXT) g_conversion.$(OBJEXT) \ g_font.$(OBJEXT) g_fpg.$(OBJEXT) g_blendop.$(OBJEXT) \ f_bgload.$(OBJEXT) f_cd.$(OBJEXT) f_sort.$(OBJEXT) \ fbm.$(OBJEXT) fgc.$(OBJEXT) fpl.$(OBJEXT) f_joystick.$(OBJEXT) \ i_copy.$(OBJEXT) dirs.$(OBJEXT) regex.$(OBJEXT) files.$(OBJEXT) \ xctype.$(OBJEXT) g_profiler.$(OBJEXT) i_saveload.$(OBJEXT) \ scaler_scanline.$(OBJEXT) scaler_normal.$(OBJEXT) \ scaler_hq2x.$(OBJEXT) scaler_scale2x.$(OBJEXT) \ mmx_main.$(OBJEXT) mmx_hspan.$(OBJEXT) @HAVE_WINDRES_TRUE@am_fxi_OBJECTS = $(am__objects_1) fxi.$(OBJEXT) @HAVE_WINDRES_FALSE@am_fxi_OBJECTS = $(am__objects_1) fxi_OBJECTS = $(am_fxi_OBJECTS) fxi_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/dcbr.Po ./$(DEPDIR)/dirs.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/f_bgload.Po ./$(DEPDIR)/f_cd.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/f_joystick.Po ./$(DEPDIR)/f_sort.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/fbm.Po ./$(DEPDIR)/fgc.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/files.Po ./$(DEPDIR)/fnc_exports.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/fpl.Po ./$(DEPDIR)/g_blendop.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/g_blit.Po ./$(DEPDIR)/g_console.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/g_conversion.Po ./$(DEPDIR)/g_draw.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/g_flic.Po ./$(DEPDIR)/g_font.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/g_fpg.Po ./$(DEPDIR)/g_main.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/g_maps.Po ./$(DEPDIR)/g_mode7.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/g_pal.Po ./$(DEPDIR)/g_profiler.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/g_scroll.Po ./$(DEPDIR)/g_systexts.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/g_texts.Po ./$(DEPDIR)/i_copy.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/i_debug.Po ./$(DEPDIR)/i_func.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/i_main.Po ./$(DEPDIR)/i_saveload.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/img_pcx.Po ./$(DEPDIR)/img_png.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/instance.Po ./$(DEPDIR)/main.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mmx_hspan.Po ./$(DEPDIR)/mmx_main.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/pathfind.Po ./$(DEPDIR)/regex.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/scaler_hq2x.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/scaler_normal.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/scaler_scale2x.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/scaler_scanline.Po ./$(DEPDIR)/sound.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/strings.Po ./$(DEPDIR)/xctype.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(am__fxi_SOURCES_DIST) HEADERS = $(noinst_HEADERS) DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in SOURCES = $(fxi_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj .rc $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu fxi/src/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) dirs.$(OBJEXT): ../../common/dirs.c regex.$(OBJEXT): ../../common/regex.c files.$(OBJEXT): ../../common/files.c xctype.$(OBJEXT): ../../common/xctype.c fxi$(EXEEXT): $(fxi_OBJECTS) $(fxi_DEPENDENCIES) @rm -f fxi$(EXEEXT) $(LINK) $(fxi_LDFLAGS) $(fxi_OBJECTS) $(fxi_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcbr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/f_bgload.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/f_cd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/f_joystick.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/f_sort.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fgc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/files.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnc_exports.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_blendop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_blit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_console.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_conversion.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_draw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_flic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_font.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_fpg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_maps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_mode7.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_pal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_profiler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_scroll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_systexts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_texts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i_copy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i_debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i_func.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i_saveload.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_pcx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_png.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/instance.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmx_hspan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmx_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pathfind.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scaler_hq2x.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scaler_normal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scaler_scale2x.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scaler_scanline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sound.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xctype.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'` dirs.o: ../../common/dirs.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dirs.o -MD -MP -MF "$(DEPDIR)/dirs.Tpo" \ @am__fastdepCC_TRUE@ -c -o dirs.o `test -f '../../common/dirs.c' || echo '$(srcdir)/'`../../common/dirs.c; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/dirs.Tpo" "$(DEPDIR)/dirs.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/dirs.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/dirs.c' object='dirs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/dirs.Po' tmpdepfile='$(DEPDIR)/dirs.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dirs.o `test -f '../../common/dirs.c' || echo '$(srcdir)/'`../../common/dirs.c dirs.obj: ../../common/dirs.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dirs.obj -MD -MP -MF "$(DEPDIR)/dirs.Tpo" \ @am__fastdepCC_TRUE@ -c -o dirs.obj `if test -f '../../common/dirs.c'; then $(CYGPATH_W) '../../common/dirs.c'; else $(CYGPATH_W) '$(srcdir)/../../common/dirs.c'`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/dirs.Tpo" "$(DEPDIR)/dirs.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/dirs.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/dirs.c' object='dirs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/dirs.Po' tmpdepfile='$(DEPDIR)/dirs.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dirs.obj `if test -f '../../common/dirs.c'; then $(CYGPATH_W) '../../common/dirs.c'; else $(CYGPATH_W) '$(srcdir)/../../common/dirs.c'` regex.o: ../../common/regex.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regex.o -MD -MP -MF "$(DEPDIR)/regex.Tpo" \ @am__fastdepCC_TRUE@ -c -o regex.o `test -f '../../common/regex.c' || echo '$(srcdir)/'`../../common/regex.c; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/regex.Tpo" "$(DEPDIR)/regex.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/regex.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/regex.c' object='regex.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/regex.Po' tmpdepfile='$(DEPDIR)/regex.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regex.o `test -f '../../common/regex.c' || echo '$(srcdir)/'`../../common/regex.c regex.obj: ../../common/regex.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regex.obj -MD -MP -MF "$(DEPDIR)/regex.Tpo" \ @am__fastdepCC_TRUE@ -c -o regex.obj `if test -f '../../common/regex.c'; then $(CYGPATH_W) '../../common/regex.c'; else $(CYGPATH_W) '$(srcdir)/../../common/regex.c'`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/regex.Tpo" "$(DEPDIR)/regex.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/regex.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/regex.c' object='regex.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/regex.Po' tmpdepfile='$(DEPDIR)/regex.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regex.obj `if test -f '../../common/regex.c'; then $(CYGPATH_W) '../../common/regex.c'; else $(CYGPATH_W) '$(srcdir)/../../common/regex.c'` files.o: ../../common/files.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.o -MD -MP -MF "$(DEPDIR)/files.Tpo" \ @am__fastdepCC_TRUE@ -c -o files.o `test -f '../../common/files.c' || echo '$(srcdir)/'`../../common/files.c; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/files.Tpo" "$(DEPDIR)/files.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/files.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/files.c' object='files.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/files.Po' tmpdepfile='$(DEPDIR)/files.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.o `test -f '../../common/files.c' || echo '$(srcdir)/'`../../common/files.c files.obj: ../../common/files.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.obj -MD -MP -MF "$(DEPDIR)/files.Tpo" \ @am__fastdepCC_TRUE@ -c -o files.obj `if test -f '../../common/files.c'; then $(CYGPATH_W) '../../common/files.c'; else $(CYGPATH_W) '$(srcdir)/../../common/files.c'`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/files.Tpo" "$(DEPDIR)/files.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/files.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/files.c' object='files.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/files.Po' tmpdepfile='$(DEPDIR)/files.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.obj `if test -f '../../common/files.c'; then $(CYGPATH_W) '../../common/files.c'; else $(CYGPATH_W) '$(srcdir)/../../common/files.c'` xctype.o: ../../common/xctype.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xctype.o -MD -MP -MF "$(DEPDIR)/xctype.Tpo" \ @am__fastdepCC_TRUE@ -c -o xctype.o `test -f '../../common/xctype.c' || echo '$(srcdir)/'`../../common/xctype.c; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/xctype.Tpo" "$(DEPDIR)/xctype.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/xctype.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/xctype.c' object='xctype.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/xctype.Po' tmpdepfile='$(DEPDIR)/xctype.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xctype.o `test -f '../../common/xctype.c' || echo '$(srcdir)/'`../../common/xctype.c xctype.obj: ../../common/xctype.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xctype.obj -MD -MP -MF "$(DEPDIR)/xctype.Tpo" \ @am__fastdepCC_TRUE@ -c -o xctype.obj `if test -f '../../common/xctype.c'; then $(CYGPATH_W) '../../common/xctype.c'; else $(CYGPATH_W) '$(srcdir)/../../common/xctype.c'`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/xctype.Tpo" "$(DEPDIR)/xctype.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/xctype.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../common/xctype.c' object='xctype.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/xctype.Po' tmpdepfile='$(DEPDIR)/xctype.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xctype.obj `if test -f '../../common/xctype.c'; then $(CYGPATH_W) '../../common/xctype.c'; else $(CYGPATH_W) '$(srcdir)/../../common/xctype.c'` uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../../include $(distdir)/../inc @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(PROGRAMS) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-depend distclean-generic distclean-tags distdir dvi \ dvi-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am .rc.o: $(WINDRES) $< -I../../include -o $@ # 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: Fenix/fxi/src/fpl.c0000644000000000000000000001145410607526740013143 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : fbm.c * DESCRIPTION : Fenix Bitmap handling functions * * HISTORY: 0.85 - first version */ #include #include #include "fxi.h" #include "fpl.h" const char * fpl_error = ""; /* * FUNCTION : fpl_load_from * * Load a FPL file from an already opened file * * PARAMS : * fp Pointer to the file object * fgc_depth Color depth if the graphic is part of a FGC file or 0 if it isn't * Part of the header are supposed to not be there if this * parameter is greater than 0 (see fbm.h for details) * * RETURN VALUE : * 0 if error (fpl_error will have a description in this case) * 1 on SUCCESS * */ int fpl_load_from (file * fp) { FPL_HEADER header; static unsigned char color_palette[768]; int n ; // Read the header and check the file type and version if (file_read (fp, &header, sizeof(FPL_HEADER)) != sizeof(FPL_HEADER)) { fpl_error = "Error de lectura" ; return 0 ; } if (strncmp(header.magic, FPL_MAGIC, strlen(FPL_MAGIC)) == 0) { fpl_error = "Fichero FPL invlido" ; return 0 ; } ARRANGE_DWORD(&file_header.depth); ARRANGE_DWORD(&file_header.version); if (!FPL_VALID_DEPTH(header.depth)) { fpl_error = "Profundidad de color no vlida en el fichero FPL" ; return 0 ; } if ((header.version & 0xFF00) != 0x0100) { fpl_error = "El fichero FPL es de una versin posterior incompatible"; return 0; } if (file_read(fp, color_palette, 768) != 768) { fpl_error = "Fichero FPL truncado"; return 0; } for (n = 0 ; n < 256 ; n++) { palette[n].r = color_palette[3*n + 0]; palette[n].g = color_palette[3*n + 1]; palette[n].b = color_palette[3*n + 2]; } palette_loaded = 1 ; palette_changed = 1 ; return 1 ; } /* * FUNCTION : fpl_save_to * * Save palette data * * PARAMS : * fp Pointer to the file object * * RETURN VALUE : * 1 if no error, 0 otherwise (fpl_error will have a description in this case) * */ int fpl_save_to (file * fp) { static char color_palette[768]; int n ; // Write the color palette for (n = 0 ; n < 256 ; n++) { color_palette[3*n + 0] = palette[n].r; color_palette[3*n + 1] = palette[n].g; color_palette[3*n + 2] = palette[n].b; } if (file_write (fp, &color_palette, 768) != 768) { fbm_error = "Error escribiendo fichero FPL"; return 0; } return 1; } /* * FUNCTION : fpl_save * * Save a palette to a new FPL file * * PARAMS : * filename Name of the file to be created * * RETURN VALUE : * 1 if no error, 0 otherwise (fpl_error will have a description in this case) * */ int fpl_save (const char * filename) { FPL_HEADER file_header; file * fp; int return_value; // Create the file fp = file_open (filename, "wb9"); if (fp == NULL) { fpl_error = "Error al crear fichero FPL"; return 0; } // Write the FPL file header strcpy (file_header.magic, FPL_MAGIC); file_header.depth = 8; file_header.version = 0x0100; ARRANGE_DWORD(&file_header.depth); ARRANGE_DWORD(&file_header.version); if (file_write (fp, &file_header, sizeof(FPL_HEADER)) != sizeof(FPL_HEADER)) { fpl_error = "Error escribiendo en fichero FPL"; file_close (fp); return 0; } // Use fbm_save_to to save the rest of the data return_value = fpl_save_to(fp); file_close(fp); return return_value; } /* * FUNCTION : fpl_load * * Load a palette from a FPL file * * PARAMS : * filename Name of the file to read * * RETURN VALUE : * 1 if no error, 0 otherwise (fpl_error will have a description in this case) * */ int fpl_load (const char * filename) { file * fp; int return_value; // Open the file fp = file_open (filename, "rb9"); if (fp == NULL) { fpl_error = "Error al abrir fichero FPL"; return 0; } // Use fbm_load_from to load the rest of the data return_value = fpl_load_from(fp); file_close(fp); return return_value; } Fenix/fxi/src/g_systexts.c0000644000000000000000000005173710607526756014615 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifdef TARGET_BEOS #include #else #include #endif #include #include #include #include #include "fxi.h" #include "dcb.h" #define CHARWIDTH 6 static char sysfont[][8][16] = { { { "......" }, { "......" }, { "......" }, { "......" }, { "......" }, { "......" }, { "......" }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "O...O." }, { "OOOOO." }, { "O...O." }, { "O...O." }, { "O...O." }, { "......" } },{ { "OOOO.." }, { "O...O." }, { "O...O." }, { "OOOO.." }, { "O...O." }, { "O...O." }, { "OOOO.." }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "O....." }, { "O....." }, { "O....." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "OOOO.." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "OOOO.." }, { "......" } },{ { "OOOOO." }, { "O....." }, { "O....." }, { "OOOO.." }, { "O....." }, { "O....." }, { "OOOOO." }, { "......" } },{ { "OOOOO." }, { "O....." }, { "O....." }, { "OOOO.." }, { "O....." }, { "O....." }, { "O....." }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "O....." }, { "O..OO." }, { "O...O." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "O...O." }, { "O...O." }, { "O...O." }, { "OOOOO." }, { "O...O." }, { "O...O." }, { "O...O." }, { "......" } },{ { "OOOOO." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "OOOOO." }, { "......" } },{ { "....O." }, { "....O." }, { "....O." }, { "....O." }, { "....O." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "O...O." }, { "O..O.." }, { "O.O..." }, { "OO...." }, { "O.O..." }, { "O..O.." }, { "O...O." }, { "......" } },{ { "O....." }, { "O....." }, { "O....." }, { "O....." }, { "O....." }, { "O....." }, { "OOOOO." }, { "......" } },{ { "O...O." }, { "OO.OO." }, { "O.O.O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "......" } },{ { ".OOO.." }, { "......" }, { "OO..O." }, { "OO..O." }, { "O.O.O." }, { "O..OO." }, { "O..OO." }, { "......" } },{ { "OO..O." }, { "OO..O." }, { "O.O.O." }, { "O.O.O." }, { "O.O.O." }, { "O..OO." }, { "O..OO." }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "OOOO.." }, { "O...O." }, { "O...O." }, { "OOOO.." }, { "O....." }, { "O....." }, { "O....." }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O.O.O." }, { "OO..O." }, { ".OOO.." }, { "......" } },{ { "OOOO.." }, { "O...O." }, { "O...O." }, { "OOOO.." }, { "O.O..." }, { "O..O.." }, { "O...O." }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "O....." }, { ".OOO.." }, { "....O." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "OOOOO." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "......" } },{ { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { ".O.O.." }, { ".O.O.." }, { "..O..." }, { "......" } },{ { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O.O.O." }, { "O.O.O." }, { ".O.O.." }, { "......" } },{ { "O...O." }, { "O...O." }, { ".O.O.." }, { "..O..." }, { ".O.O.." }, { "O...O." }, { "O...O." }, { "......" } },{ { "O...O." }, { "O...O." }, { ".O.O.." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "......" } },{ { "OOOOO." }, { "....O." }, { "...O.." }, { "..O..." }, { ".O...." }, { "O....." }, { "OOOOO." }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "..O..." }, { ".OO..." }, { "O.O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "OOOOO." }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "....O." }, { "..OO.." }, { ".O...." }, { "O....." }, { "OOOOO." }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "....O." }, { ".OOO.." }, { "....O." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "....O." }, { "O...O." }, { "O...O." }, { "OOOOO." }, { "....O." }, { "....O." }, { "....O." }, { "......" } },{ { "OOOOO." }, { "O....." }, { "OOOO.." }, { "....O." }, { "....O." }, { "....O." }, { "OOOO.." }, { "......" } },{ { ".OOO.." }, { "O....." }, { "OOOO.." }, { "O...O." }, { "O...O." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "OOOOO." }, { "....O." }, { "...O.." }, { "..O..." }, { ".O...." }, { "O....." }, { "O....." }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "O...O." }, { ".OOO.." }, { "O...O." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "O...O." }, { "O...O." }, { ".OOOO." }, { "....O." }, { ".OOO.." }, { "......" } },{ { "......" }, { "......" }, { "......" }, { "......" }, { "......" }, { "......" }, { "..OO.." }, { "......" } },{ { "......" }, { "......" }, { "..OO.." }, { "......" }, { "......" }, { "..OO.." }, { "......" }, { "......" } },{ { "......" }, { "......" }, { "......" }, { ".OOOO." }, { "......" }, { ".OOOO." }, { "......" }, { "......" } },{ { "OO...." }, { "O...O." }, { "...O.." }, { "..O..." }, { ".O...." }, { "O...O." }, { "...OO." }, { "......" } },{ { "......" }, { "......" }, { ".OOO.." }, { "....O." }, { ".OOOO." }, { "O...O." }, { ".OOOO." }, { "......" } },{ { "O....." }, { "O....." }, { "OOOO.." }, { "O...O." }, { "O...O." }, { "O...O." }, { "OOOO.." }, { "......" } },{ { "......" }, { "......" }, { ".OOO.." }, { "O...O." }, { "O....." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "....O." }, { "....O." }, { ".OOOO." }, { "O...O." }, { "O...O." }, { "O...O." }, { ".OOOO." }, { "......" } },{ { "......" }, { "......" }, { ".OOO.." }, { "O...O." }, { "OOOO.." }, { "O....." }, { ".OOOO." }, { "......" } },{ { ".OOO.." }, { "O...O." }, { "O....." }, { "OOO..." }, { "O....." }, { "O....." }, { "O....." }, { "......" } },{ { "......" }, { "......" }, { ".OOOO." }, { "O...O." }, { "O...O." }, { ".OOOO." }, { "....O." }, { ".OOO.." } },{ { "O....." }, { "O....." }, { "OOOO.." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "......" } },{ { "......" }, { "..O..." }, { "......" }, { ".OO..." }, { "..O..." }, { "..O..." }, { ".OOO.." }, { "......" } },{ { "......" }, { "....O." }, { "......" }, { "..OOO." }, { "....O." }, { "....O." }, { "O...O." }, { ".OOO.." } },{ { "O....." }, { "O....." }, { "O....." }, { "O..O.." }, { "OOO..." }, { "O..O.." }, { "O...O." }, { "......" } },{ { ".OO..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "OOOOO." }, { "......" } },{ { "......" }, { "......" }, { ".O.O.." }, { "O.O.O." }, { "O.O.O." }, { "O.O.O." }, { "O.O.O." }, { "......" } },{ { "OOOOO." }, { "......" }, { ".OOO.." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "......" } },{ { "......" }, { "......" }, { ".OOO.." }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { "......" } },{ { "......" }, { "......" }, { ".OOO.." }, { "O...O." }, { "O...O." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "......" }, { "......" }, { "OOOO.." }, { "O...O." }, { "O...O." }, { "OOOO.." }, { "O....." }, { "O....." } },{ { "......" }, { "......" }, { ".OOOO." }, { "O...O." }, { "O...O." }, { ".OOOO." }, { "....O." }, { "....O." } },{ { "......" }, { "......" }, { "O.OO.." }, { "OO..O." }, { "O....." }, { "O....." }, { "O....." }, { "......" } },{ { "......" }, { "......" }, { ".OOO.." }, { "O....." }, { ".OOO.." }, { "....O." }, { "OOOO.." }, { "......" } },{ { ".O...." }, { ".O...." }, { "OOOO.." }, { ".O...." }, { ".O...." }, { ".O..O." }, { "..OO.." }, { "......" } },{ { "......" }, { "......" }, { "O...O." }, { "O...O." }, { "O...O." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { "......" }, { "......" }, { "O...O." }, { "O...O." }, { "O...O." }, { ".O.O.." }, { "..O..." }, { "......" } },{ { "......" }, { "......" }, { "O...O." }, { "O...O." }, { "O.O.O." }, { "O.O.O." }, { ".O.O.." }, { "......" } },{ { "......" }, { "......" }, { "O...O." }, { ".O.O.." }, { "..O..." }, { ".O.O.." }, { "O...O." }, { "......" } },{ { "......" }, { "......" }, { "O...O." }, { "O...O." }, { "O...O." }, { ".OOOO." }, { "....O." }, { "OOOO.." } },{ { "......" }, { "......" }, { "OOOOO." }, { "...O.." }, { "..O..." }, { ".O...." }, { "OOOOO." }, { "......" } },{ { ".OOO.." }, { ".O...." }, { ".O...." }, { ".O...." }, { ".O...." }, { ".O...." }, { ".OOO.." }, { "......" } },{ { ".OOO.." }, { "...O.." }, { "...O.." }, { "...O.." }, { "...O.." }, { "...O.." }, { ".OOO.." }, { "......" } },{ { "..OO.." }, { ".O...." }, { ".O...." }, { ".O...." }, { ".O...." }, { ".O...." }, { "..OO.." }, { "......" } },{ { ".OO..." }, { "...O.." }, { "...O.." }, { "...O.." }, { "...O.." }, { "...O.." }, { ".OO..." }, { "......" } },{ { "..OO.." }, { ".O...." }, { ".O...." }, { "O....." }, { ".O...." }, { ".O...." }, { "..OO.." }, { "......" } },{ { ".OO..." }, { "...O.." }, { "...O.." }, { "....O." }, { "...O.." }, { "...O.." }, { ".OO..." }, { "......" } },{ { "......" }, { "......" }, { "......" }, { "......" }, { "OOOOO." }, { "......" }, { "......" }, { "......" } },{ { ".O...." }, { "..O..." }, { "...O.." }, { "....O." }, { "...O.." }, { "..O..." }, { ".O...." }, { "......" } },{ { "....O." }, { "...O.." }, { "..O..." }, { ".O...." }, { "..O..." }, { "...O.." }, { "....O." }, { "......" } },{ { "......" }, { "......" }, { "......" }, { "......" }, { "......" }, { "......" }, { "OOOOO." }, { "......" } },{ { "......" }, { "......" }, { "......" }, { "......" }, { "......" }, { "......" }, { "...O.." }, { ".OO..." } },{ { "......" }, { "O....." }, { ".O...." }, { "..O..." }, { "...O.." }, { "....O." }, { ".....O" }, { "......" } },{ { "......" }, { ".....O" }, { "....O." }, { "...O.." }, { "..O..." }, { ".O...." }, { "O....." }, { "......" } },{ { "......" }, { "......" }, { "..O..." }, { "..O..." }, { "OOOOO." }, { "..O..." }, { "..O..." }, { "......" } },{ { "......" }, { ".O.O.." }, { "..O..." }, { "OOOOO." }, { "..O..." }, { ".O.O.." }, { "......" }, { "......" } },{ { "......" }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "......" }, { "..O..." }, { "......" } },{ { "......" }, { "..O..." }, { "......" }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "......" } },{ { "......" }, { ".OOO.." }, { "O...O." }, { "...O.." }, { "..O..." }, { "......" }, { "..O..." }, { "......" } },{ { "......" }, { "..O..." }, { "......" }, { "..O..." }, { ".O...." }, { "O...O." }, { ".OOO.." }, { "......" } },{ { ".O.O.." }, { ".O.O.." }, { "......" }, { "......" }, { "......" }, { "......" }, { "......" }, { "......" } },{ { "...O.." }, { "..O..." }, { "......" }, { "......" }, { "......" }, { "......" }, { "......" }, { "......" } },{ { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..OOOO" }, { "..O..." }, { "..O..." }, { "..O..." } },{ { "......" }, { "......" }, { "......" }, { "......" }, { "OOOOOO" }, { "......" }, { "......" }, { "......" } },{ { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." }, { "..O..." } } }; static Uint8 * letters = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.:=%abcdefghijklmnopqrstuvwxyz[](){}-><_,\\/+*!?\"'\x01\x02\x03" ; static int fg, bg ; void gr_sys_putchar (GRAPH * map, int ox, int oy, Uint8 c) { Sint32 x, y ; static int corr[256] ; static int corr_init = 0 ; if (!corr_init) { Uint8 * ptr ; for (ptr = letters; *ptr; ptr++) corr[*ptr] = corr_init++ ; } #define PUTSYS(TYPE) \ for (y = oy ; y < oy+8 ; y++) \ { \ TYPE * ptr; Uint8 * cptr ; \ if (y < 0 || y >= (int)map->height) \ continue ; \ ptr = (TYPE *)((Uint8*)map->data + map->pitch*y) ; \ ptr += ox; \ cptr = (Uint8*)sysfont[c][y-oy]; \ for (x = ox ; x < ox+6 ; x++, cptr++) \ { \ if (x < 0 || x >= (int)map->width) \ { \ ptr++ ; \ continue ; \ } \ if (*cptr == 'O') \ *ptr++ = fg ; \ else if (bg) \ *ptr++ = bg ; \ else ptr++ ; \ } \ } if (map->depth == 8) { c = corr[c] ; PUTSYS(Uint8) } else { c = corr[c] ; PUTSYS(Uint16) } #undef PUTSYS } static int text_colors[] = { 0x404040, 0xC00000, 0x00C000, 0x0000C0, 0x00C0C0, 0xC000C0, 0xC0C000, 0xC0C0C0, 0x808080, 0xFF0000, 0x00FF00, 0x0000FF, 0x00FFFF, 0xFF00FF, 0xFFFF00, 0xFFFFFF } ; void gr_sys_puts (GRAPH * map, int x, int y, Uint8 * str, int len) { if (bg == 0 && fg != 0) { int ofg = fg; fg = 0; gr_sys_puts (map, x-1, y, str, len); gr_sys_puts (map, x+1, y, str, len); gr_sys_puts (map, x-1, y-1, str, len); gr_sys_puts (map, x+1, y+1, str, len); gr_sys_puts (map, x, y-1, str, len); gr_sys_puts (map, x, y+1, str, len); fg = ofg; } while (*str && len--) { if (*str == (Uint8)'') { Uint8 color = 0 ; str++ ; if (isdigit(*str)) color = *str++ - '0' ; if (isdigit(*str)) color = color*10 + *str++ - '0' ; if (color > 15) color = 15 ; if (fg != 0) gr_sys_color (text_colors[color], -1) ; if (!*str) { len++ ; break ; } } gr_sys_putchar (map, x, y, *str++) ; x += CHARWIDTH ; } while (len-- > 0) { gr_sys_putchar (map, x, y, ' ') ; x += CHARWIDTH ; } } void gr_sys_color (int cfg, int cbg) { if (cbg == 0) bg = 0; if (enable_16bits) { if (cfg > 0) fg = gr_rgb (((cfg & 0xFF0000) >> 16), ((cfg & 0x00FF00) >> 8), (cfg & 0x0000FF) ) ; if (cbg > 0) bg = gr_rgb (((cbg & 0xFF0000) >> 16), ((cbg & 0x00FF00) >> 8), (cbg & 0x0000FF) ) ; } else { if (!trans_table_updated) gr_make_trans_table() ; if (cfg > 0) fg = gr_find_nearest_color ( ((cfg & 0xFF0000) >> 16), ((cfg & 0x00FF00) >> 8), (cfg & 0x0000FF) ) ; if (cbg > 0) bg = gr_find_nearest_color ( ((cbg & 0xFF0000) >> 16), ((cbg & 0x00FF00) >> 8), (cbg & 0x0000FF) ) ; } } Fenix/fxi/src/fxi.ico0000644000000000000000000000627610607526740013506 0ustar rootroot ( @ DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDpP8x(l(d0lP|p証DDxH0t0x0|0x0t(p d\PH8d؀DDH(p0|8@@@880t(h \TLD@h࠴DD(d(l0|@@80x(h \TLDH؈DD \(l8|HPPH80x(l `TLHDЈDD(d0h@|HXhXPH80x(l `XPHPبDDX0h@|Xhx`XPH80|(p dXPHPxDD(`@xXpxh`XXH@8(p dXPHШDDp0l@`X((H@`p`XXP@8(p `TLhDDHx@|XP(0|`pt(@0|(l \P8hDD0hPh0HPLtX`0(|H80t dTTDD8pX `T@Pt\\0pP@0|(hX TDD``h(t`Xp 0xPH8(l \@pDDxH`8||hd`dp0h`XH8(p `hDDXl(|p`\\\TT\dx0xxhXP8(t `ؠDD0(th`PHHHLXdll(P8(tPDD0ph\PD8@LP`ptpP80xؘDD`lph\TH<HXTdpthH8؀DDhptl`XPHLTXhlppxHDDhx pd\XTTXdlhplpxhDD(@t`xp(t`H@llptpDD00h llhplp@DDx(0Hxphhlp@DDp0Pph(DDx`h0(DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDFenix/fxi/src/CVS/0000755000000000000000000000000010607745044012644 5ustar rootrootFenix/fxi/src/CVS/Repository0000644000000000000000000000001610601620506014730 0ustar rootrootFenix/fxi/src Fenix/fxi/src/CVS/Root0000644000000000000000000000007410601620506013500 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/fxi/src/CVS/Entries0000644000000000000000000000410210607745044014175 0ustar rootrootD/Be_compat//// /FXI.rc/1.1/Thu Apr 12 22:08:29 2007/-kb/ /Makefile.am/1.9/Thu Apr 12 22:08:30 2007// /Makefile.in/1.11/Thu Apr 12 22:08:31 2007// /dcbr.c/1.11/Thu Apr 12 22:08:31 2007// /f_bgload.c/1.4/Thu Apr 12 22:08:31 2007// /f_cd.c/1.5/Thu Apr 12 22:08:32 2007// /f_joystick.c/1.4/Thu Apr 12 22:08:32 2007// /f_sort.c/1.3/Thu Apr 12 22:08:32 2007// /fbm.c/1.3/Thu Apr 12 22:08:33 2007// /fgc.c/1.1.1.1/Thu Apr 12 22:08:33 2007// /fnc_exports.c/1.5/Thu Apr 12 22:08:34 2007// /fpl.c/1.3/Thu Apr 12 22:08:34 2007// /fxi.ico/1.1/Thu Apr 12 22:08:34 2007/-kb/ /g_blendop.c/1.6/Thu Apr 12 22:08:34 2007// /g_blit.c/1.18/Thu Apr 12 22:08:36 2007// /g_console.c/1.13/Thu Apr 12 22:08:38 2007// /g_draw.c/1.7/Thu Apr 12 22:08:40 2007// /g_flic.c/1.4/Thu Apr 12 22:08:40 2007// /g_font.c/1.6/Thu Apr 12 22:08:41 2007// /g_pal.c/1.7/Thu Apr 12 22:08:46 2007// /g_profiler.c/1.7/Thu Apr 12 22:08:47 2007// /g_systexts.c/1.3/Thu Apr 12 22:08:48 2007// /g_texts.c/1.6/Thu Apr 12 22:08:48 2007// /i_copy.c/1.2/Thu Apr 12 22:08:48 2007// /i_debug.c/1.8/Thu Apr 12 22:08:49 2007// /i_main.c/1.30/Thu Apr 12 22:08:56 2007// /i_saveload.c/1.3/Thu Apr 12 22:08:56 2007// /img_pcx.c/1.3/Thu Apr 12 22:08:57 2007// /img_png.c/1.3/Thu Apr 12 22:08:57 2007// /instance.c/1.18/Thu Apr 12 22:08:58 2007// /main.c/1.10/Thu Apr 12 22:08:58 2007// /mmx_hspan.c/1.5/Thu Apr 12 22:08:59 2007// /mmx_main.c/1.4/Thu Apr 12 22:08:59 2007// /pathfind.c/1.2/Thu Apr 12 22:09:00 2007// /resource.h/1.1/Thu Apr 12 22:09:00 2007// /scaler_hq2x.c/1.3/Thu Apr 12 22:09:01 2007// /scaler_normal.c/1.3/Thu Apr 12 22:09:01 2007// /scaler_scale2x.c/1.3/Thu Apr 12 22:09:02 2007// /scaler_scanline.c/1.3/Thu Apr 12 22:09:02 2007// /sound.c/1.8/Thu Apr 12 22:09:02 2007// /Makefile/1.30/Fri Apr 13 18:19:04 2007// /g_conversion.c/1.5/Fri Apr 13 18:19:04 2007// /g_fpg.c/1.4/Fri Apr 13 18:19:04 2007// /g_main.c/1.26/Fri Apr 13 18:19:04 2007// /g_maps.c/1.12/Fri Apr 13 18:19:05 2007// /g_mode7.c/1.8/Fri Apr 13 18:19:05 2007// /g_scroll.c/1.7/Fri Apr 13 18:19:05 2007// /i_func.c/1.29/Fri Apr 13 18:21:24 2007// /strings.c/1.7/Fri Apr 13 18:21:25 2007// Fenix/fxi/src/scaler_scale2x.c0000644000000000000000000006254510607526774015272 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : mmx_scale2x.cpp * DESCRIPTION : Scale2x effect * * HISTORY: 0.83 - First version from project 2xScale * * * * You can find an high level description of the effect at : * * http://scale2x.sourceforge.net/scale2x.html * * Alternatively at the previous license terms, you are allowed to use this * code in your program with these conditions: * - the program is not used in commercial activities. * - the whole source code of the program is released with the binary. * - derivative works of the program are allowed. */ #ifdef MMX_FUNCTIONS extern int MMX_available; #endif #include #include #include #include "fxi.h" /* Suggested in "Intel Optimization" for Pentium II */ #define ASM_JUMP_ALIGN ".p2align 4\n" static void internal_scale2x_16_def(Uint16 *dst0, Uint16* dst1, const Uint16* src0, const Uint16* src1, const Uint16* src2, unsigned count) { /* first pixel */ dst0[0] = src1[0]; dst1[0] = src1[0]; if (src1[1] == src0[0] && src2[0] != src0[0]) dst0[1] =src0[0]; else dst0[1] =src1[0]; if (src1[1] == src2[0] && src0[0] != src2[0]) dst1[1] =src2[0]; else dst1[1] =src1[0]; ++src0; ++src1; ++src2; dst0 += 2; dst1 += 2; /* central pixels */ count -= 2; while (count) { if (src1[-1] == src0[0] && src2[0] != src0[0] && src1[1] != src0[0]) dst0[0] = src0[0]; else dst0[0] = src1[0]; if (src1[1] == src0[0] && src2[0] != src0[0] && src1[-1] != src0[0]) dst0[1] =src0[0]; else dst0[1] =src1[0]; if (src1[-1] == src2[0] && src0[0] != src2[0] && src1[1] != src2[0]) dst1[0] =src2[0]; else dst1[0] =src1[0]; if (src1[1] == src2[0] && src0[0] != src2[0] && src1[-1] != src2[0]) dst1[1] =src2[0]; else dst1[1] =src1[0]; ++src0; ++src1; ++src2; dst0 += 2; dst1 += 2; --count; } /* last pixel */ if (src1[-1] == src0[0] && src2[0] != src0[0]) dst0[0] =src0[0]; else dst0[0] =src1[0]; if (src1[-1] == src2[0] && src0[0] != src2[0]) dst1[0] =src2[0]; else dst1[0] =src1[0]; dst0[1] =src1[0]; dst1[1] =src1[0]; } #if 0 static void internal_scale2x_32_def(Uint32* dst0, Uint32* dst1, const Uint32* src0, const Uint32* src1, const Uint32* src2, unsigned count) { /* first pixel */ dst0[0] = src1[0]; dst1[0] = src1[0]; if (src1[1] == src0[0] && src2[0] != src0[0]) dst0[1] = src0[0]; else dst0[1] = src1[0]; if (src1[1] == src2[0] && src0[0] != src2[0]) dst1[1] = src2[0]; else dst1[1] = src1[0]; ++src0; ++src1; ++src2; dst0 += 2; dst1 += 2; /* central pixels */ count -= 2; while (count) { if (src1[-1] == src0[0] && src2[0] != src0[0] && src1[1] != src0[0]) dst0[0] = src0[0]; else dst0[0] = src1[0]; if (src1[1] == src0[0] && src2[0] != src0[0] && src1[-1] != src0[0]) dst0[1] = src0[0]; else dst0[1] = src1[0]; if (src1[-1] == src2[0] && src0[0] != src2[0] && src1[1] != src2[0]) dst1[0] = src2[0]; else dst1[0] = src1[0]; if (src1[1] == src2[0] && src0[0] != src2[0] && src1[-1] != src2[0]) dst1[1] = src2[0]; else dst1[1] = src1[0]; ++src0; ++src1; ++src2; dst0 += 2; dst1 += 2; --count; } /* last pixel */ if (src1[-1] == src0[0] && src2[0] != src0[0]) dst0[0] = src0[0]; else dst0[0] = src1[0]; if (src1[-1] == src2[0] && src0[0] != src2[0]) dst1[0] = src2[0]; else dst1[0] = src1[0]; dst0[1] = src1[0]; dst1[1] = src1[0]; } #endif #ifdef MMX_FUNCTIONS static void internal_scale2x_16_mmx_single(Uint16* dst, const Uint16* src0, const Uint16* src1, const Uint16* src2, unsigned count) { /* always do the first and last run */ count -= 2*4; #ifdef __GNUC__ __asm__ __volatile__( /* first run */ /* set the current, current_pre, current_next registers */ "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */ "movq 0(%1),%%mm7\n" "movq 8(%1),%%mm1\n" "psrlq $48,%%mm0\n" "psllq $48,%%mm1\n" "movq %%mm7,%%mm2\n" "movq %%mm7,%%mm3\n" "psllq $16,%%mm2\n" "psrlq $16,%%mm3\n" "por %%mm2,%%mm0\n" "por %%mm3,%%mm1\n" /* current_upper */ "movq (%0),%%mm6\n" /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "movq %%mm0,%%mm3\n" "movq %%mm1,%%mm5\n" "pcmpeqw %%mm6,%%mm2\n" "pcmpeqw %%mm6,%%mm4\n" "pcmpeqw (%2),%%mm3\n" "pcmpeqw (%2),%%mm5\n" "pandn %%mm2,%%mm3\n" "pandn %%mm4,%%mm5\n" "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "pcmpeqw %%mm1,%%mm2\n" "pcmpeqw %%mm0,%%mm4\n" "pandn %%mm3,%%mm2\n" "pandn %%mm5,%%mm4\n" "movq %%mm2,%%mm3\n" "movq %%mm4,%%mm5\n" "pand %%mm6,%%mm2\n" "pand %%mm6,%%mm4\n" "pandn %%mm7,%%mm3\n" "pandn %%mm7,%%mm5\n" "por %%mm3,%%mm2\n" "por %%mm5,%%mm4\n" /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpcklwd %%mm4,%%mm2\n" "punpckhwd %%mm4,%%mm3\n" "movq %%mm2,(%3)\n" "movq %%mm3,8(%3)\n" /* next */ "addl $8,%0\n" "addl $8,%1\n" "addl $8,%2\n" "addl $16,%3\n" /* central runs */ "shrl $2,%4\n" "jz 1f\n" ASM_JUMP_ALIGN "0:\n" /* set the current, current_pre, current_next registers */ "movq -8(%1),%%mm0\n" "movq (%1),%%mm7\n" "movq 8(%1),%%mm1\n" "psrlq $48,%%mm0\n" "psllq $48,%%mm1\n" "movq %%mm7,%%mm2\n" "movq %%mm7,%%mm3\n" "psllq $16,%%mm2\n" "psrlq $16,%%mm3\n" "por %%mm2,%%mm0\n" "por %%mm3,%%mm1\n" /* current_upper */ "movq (%0),%%mm6\n" /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "movq %%mm0,%%mm3\n" "movq %%mm1,%%mm5\n" "pcmpeqw %%mm6,%%mm2\n" "pcmpeqw %%mm6,%%mm4\n" "pcmpeqw (%2),%%mm3\n" "pcmpeqw (%2),%%mm5\n" "pandn %%mm2,%%mm3\n" "pandn %%mm4,%%mm5\n" "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "pcmpeqw %%mm1,%%mm2\n" "pcmpeqw %%mm0,%%mm4\n" "pandn %%mm3,%%mm2\n" "pandn %%mm5,%%mm4\n" "movq %%mm2,%%mm3\n" "movq %%mm4,%%mm5\n" "pand %%mm6,%%mm2\n" "pand %%mm6,%%mm4\n" "pandn %%mm7,%%mm3\n" "pandn %%mm7,%%mm5\n" "por %%mm3,%%mm2\n" "por %%mm5,%%mm4\n" /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpcklwd %%mm4,%%mm2\n" "punpckhwd %%mm4,%%mm3\n" "movq %%mm2,(%3)\n" "movq %%mm3,8(%3)\n" /* next */ "addl $8,%0\n" "addl $8,%1\n" "addl $8,%2\n" "addl $16,%3\n" "decl %4\n" "jnz 0b\n" "1:\n" /* final run */ /* set the current, current_pre, current_next registers */ "movq -8(%1),%%mm0\n" "movq (%1),%%mm7\n" "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */ "psrlq $48,%%mm0\n" "psllq $48,%%mm1\n" "movq %%mm7,%%mm2\n" "movq %%mm7,%%mm3\n" "psllq $16,%%mm2\n" "psrlq $16,%%mm3\n" "por %%mm2,%%mm0\n" "por %%mm3,%%mm1\n" /* current_upper */ "movq (%0),%%mm6\n" /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "movq %%mm0,%%mm3\n" "movq %%mm1,%%mm5\n" "pcmpeqw %%mm6,%%mm2\n" "pcmpeqw %%mm6,%%mm4\n" "pcmpeqw (%2),%%mm3\n" "pcmpeqw (%2),%%mm5\n" "pandn %%mm2,%%mm3\n" "pandn %%mm4,%%mm5\n" "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "pcmpeqw %%mm1,%%mm2\n" "pcmpeqw %%mm0,%%mm4\n" "pandn %%mm3,%%mm2\n" "pandn %%mm5,%%mm4\n" "movq %%mm2,%%mm3\n" "movq %%mm4,%%mm5\n" "pand %%mm6,%%mm2\n" "pand %%mm6,%%mm4\n" "pandn %%mm7,%%mm3\n" "pandn %%mm7,%%mm5\n" "por %%mm3,%%mm2\n" "por %%mm5,%%mm4\n" /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpcklwd %%mm4,%%mm2\n" "punpckhwd %%mm4,%%mm3\n" "movq %%mm2,(%3)\n" "movq %%mm3,8(%3)\n" "emms\n" : "+r" (src0), "+r" (src1), "+r" (src2), "+r" (dst), "+r" (count) : : "cc" ); #else __asm { mov eax, src0; mov ebx, src1; mov ecx, src2; mov edx, dst; mov esi, count; /* first run */ /* set the current, current_pre, current_next registers */ pxor mm0,mm0; /* use a fake black out of screen */ movq mm7, qword ptr [ebx]; movq mm1, qword ptr [ebx + 8]; psrlq mm0, 48; psllq mm1, 48; movq mm2, mm7; movq mm3, mm7; psllq mm2, 16; psrlq mm3, 16; por mm0, mm2; por mm1, mm3; /* current_upper */ movq mm6, qword ptr [eax]; /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2, mm0; movq mm4, mm1; movq mm3, mm0; movq mm5, mm1; pcmpeqw mm2, mm6; pcmpeqw mm4, mm6; pcmpeqw mm3, qword ptr [ecx]; pcmpeqw mm5, qword ptr [ecx]; pandn mm3,mm2; pandn mm5,mm4; movq mm2,mm0; movq mm4,mm1; pcmpeqw mm2,mm1; pcmpeqw mm4,mm0; pandn mm2,mm3; pandn mm4,mm5; movq mm3,mm2; movq mm5,mm4; pand mm2,mm6; pand mm4,mm6; pandn mm3,mm7; pandn mm5,mm7; por mm2,mm3; por mm4,mm5; /* set *dst0 */ movq mm3,mm2; punpcklwd mm2,mm4; punpckhwd mm3,mm4; movq qword ptr [edx], mm2; movq qword ptr [edx + 8], mm3; /* next */ add eax, 8; add ebx, 8; add ecx, 8; add edx, 16; /* central runs */ shr esi, 2; jz label1; align 4; label0: /* set the current, current_pre, current_next registers */ movq mm0, qword ptr [ebx-8]; movq mm7, qword ptr [ebx]; movq mm1, qword ptr [ebx+8]; psrlq mm0,48; psllq mm1,48; movq mm2,mm7; movq mm3,mm7; psllq mm2,16; psrlq mm3,16; por mm0,mm2; por mm1,mm3; /* current_upper */ movq mm6, qword ptr [eax]; /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2,mm0; movq mm4,mm1; movq mm3,mm0; movq mm5,mm1; pcmpeqw mm2,mm6; pcmpeqw mm4,mm6; pcmpeqw mm3, qword ptr [ecx]; pcmpeqw mm5, qword ptr [ecx]; pandn mm3,mm2; pandn mm5,mm4; movq mm2,mm0; movq mm4,mm1; pcmpeqw mm2,mm1; pcmpeqw mm4,mm0; pandn mm2,mm3; pandn mm4,mm5; movq mm3,mm2; movq mm5,mm4; pand mm2,mm6; pand mm4,mm6; pandn mm3,mm7; pandn mm5,mm7; por mm2,mm3; por mm4,mm5; /* set *dst0 */ movq mm3,mm2; punpcklwd mm2,mm4; punpckhwd mm3,mm4; movq qword ptr [edx], mm2; movq qword ptr [edx+8], mm3; /* next */ add eax,8; add ebx,8; add ecx,8; add edx,16; dec esi; jnz label0; label1: /* final run */ /* set the current, current_pre, current_next registers */ movq mm0, qword ptr [ebx-8]; movq mm7, qword ptr [ebx]; pxor mm1,mm1; /* use a fake black out of screen */ psrlq mm0,48; psllq mm1,48; movq mm2,mm7; movq mm3,mm7; psllq mm2,16; psrlq mm3,16; por mm0,mm2; por mm1,mm3; /* current_upper */ movq mm6, qword ptr [eax]; /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2,mm0; movq mm4,mm1; movq mm3,mm0; movq mm5,mm1; pcmpeqw mm2,mm6; pcmpeqw mm4,mm6; pcmpeqw mm3, qword ptr [ecx]; pcmpeqw mm5, qword ptr [ecx]; pandn mm3,mm2; pandn mm5,mm4; movq mm2,mm0; movq mm4,mm1; pcmpeqw mm2,mm1; pcmpeqw mm4,mm0; pandn mm2,mm3; pandn mm4,mm5; movq mm3,mm2; movq mm5,mm4; pand mm2,mm6; pand mm4,mm6; pandn mm3,mm7; pandn mm5,mm7; por mm2,mm3; por mm4,mm5; /* set *dst0 */ movq mm3,mm2; punpcklwd mm2,mm4; punpckhwd mm3,mm4; movq qword ptr [edx], mm2; movq qword ptr [edx+8], mm3; mov src0, eax; mov src1, ebx; mov src2, ecx; mov dst, edx; mov count, esi; emms; } #endif } #if 0 static void internal_scale2x_32_mmx_single(Uint32* dst, const Uint32* src0, const Uint32* src1, const Uint32* src2, unsigned count) { /* always do the first and last run */ count -= 2*2; #ifdef __GNUC__ __asm__ __volatile__( /* first run */ /* set the current, current_pre, current_next registers */ "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */ "movq 0(%1),%%mm7\n" "movq 8(%1),%%mm1\n" "psrlq $32,%%mm0\n" "psllq $32,%%mm1\n" "movq %%mm7,%%mm2\n" "movq %%mm7,%%mm3\n" "psllq $32,%%mm2\n" "psrlq $32,%%mm3\n" "por %%mm2,%%mm0\n" "por %%mm3,%%mm1\n" /* current_upper */ "movq (%0),%%mm6\n" /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "movq %%mm0,%%mm3\n" "movq %%mm1,%%mm5\n" "pcmpeqd %%mm6,%%mm2\n" "pcmpeqd %%mm6,%%mm4\n" "pcmpeqd (%2),%%mm3\n" "pcmpeqd (%2),%%mm5\n" "pandn %%mm2,%%mm3\n" "pandn %%mm4,%%mm5\n" "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "pcmpeqd %%mm1,%%mm2\n" "pcmpeqd %%mm0,%%mm4\n" "pandn %%mm3,%%mm2\n" "pandn %%mm5,%%mm4\n" "movq %%mm2,%%mm3\n" "movq %%mm4,%%mm5\n" "pand %%mm6,%%mm2\n" "pand %%mm6,%%mm4\n" "pandn %%mm7,%%mm3\n" "pandn %%mm7,%%mm5\n" "por %%mm3,%%mm2\n" "por %%mm5,%%mm4\n" /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpckldq %%mm4,%%mm2\n" "punpckhdq %%mm4,%%mm3\n" "movq %%mm2,(%3)\n" "movq %%mm3,8(%3)\n" /* next */ "addl $8,%0\n" "addl $8,%1\n" "addl $8,%2\n" "addl $16,%3\n" /* central runs */ "shrl $1,%4\n" "jz 1f\n" ASM_JUMP_ALIGN "0:\n" /* set the current, current_pre, current_next registers */ "movq -8(%1),%%mm0\n" "movq (%1),%%mm7\n" "movq 8(%1),%%mm1\n" "psrlq $32,%%mm0\n" "psllq $32,%%mm1\n" "movq %%mm7,%%mm2\n" "movq %%mm7,%%mm3\n" "psllq $32,%%mm2\n" "psrlq $32,%%mm3\n" "por %%mm2,%%mm0\n" "por %%mm3,%%mm1\n" /* current_upper */ "movq (%0),%%mm6\n" /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "movq %%mm0,%%mm3\n" "movq %%mm1,%%mm5\n" "pcmpeqd %%mm6,%%mm2\n" "pcmpeqd %%mm6,%%mm4\n" "pcmpeqd (%2),%%mm3\n" "pcmpeqd (%2),%%mm5\n" "pandn %%mm2,%%mm3\n" "pandn %%mm4,%%mm5\n" "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "pcmpeqd %%mm1,%%mm2\n" "pcmpeqd %%mm0,%%mm4\n" "pandn %%mm3,%%mm2\n" "pandn %%mm5,%%mm4\n" "movq %%mm2,%%mm3\n" "movq %%mm4,%%mm5\n" "pand %%mm6,%%mm2\n" "pand %%mm6,%%mm4\n" "pandn %%mm7,%%mm3\n" "pandn %%mm7,%%mm5\n" "por %%mm3,%%mm2\n" "por %%mm5,%%mm4\n" /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpckldq %%mm4,%%mm2\n" "punpckhdq %%mm4,%%mm3\n" "movq %%mm2,(%3)\n" "movq %%mm3,8(%3)\n" /* next */ "addl $8,%0\n" "addl $8,%1\n" "addl $8,%2\n" "addl $16,%3\n" "decl %4\n" "jnz 0b\n" "1:\n" /* final run */ /* set the current, current_pre, current_next registers */ "movq -8(%1),%%mm0\n" "movq (%1),%%mm7\n" "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */ "psrlq $32,%%mm0\n" "psllq $32,%%mm1\n" "movq %%mm7,%%mm2\n" "movq %%mm7,%%mm3\n" "psllq $32,%%mm2\n" "psrlq $32,%%mm3\n" "por %%mm2,%%mm0\n" "por %%mm3,%%mm1\n" /* current_upper */ "movq (%0),%%mm6\n" /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "movq %%mm0,%%mm3\n" "movq %%mm1,%%mm5\n" "pcmpeqd %%mm6,%%mm2\n" "pcmpeqd %%mm6,%%mm4\n" "pcmpeqd (%2),%%mm3\n" "pcmpeqd (%2),%%mm5\n" "pandn %%mm2,%%mm3\n" "pandn %%mm4,%%mm5\n" "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" "pcmpeqd %%mm1,%%mm2\n" "pcmpeqd %%mm0,%%mm4\n" "pandn %%mm3,%%mm2\n" "pandn %%mm5,%%mm4\n" "movq %%mm2,%%mm3\n" "movq %%mm4,%%mm5\n" "pand %%mm6,%%mm2\n" "pand %%mm6,%%mm4\n" "pandn %%mm7,%%mm3\n" "pandn %%mm7,%%mm5\n" "por %%mm3,%%mm2\n" "por %%mm5,%%mm4\n" /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpckldq %%mm4,%%mm2\n" "punpckhdq %%mm4,%%mm3\n" "movq %%mm2,(%3)\n" "movq %%mm3,8(%3)\n" "emms\n" : "+r" (src0), "+r" (src1), "+r" (src2), "+r" (dst), "+r" (count) : : "cc" ); #else __asm { mov eax, src0; mov ebx, src1; mov ecx, src2; mov edx, dst; mov esi, count; /* first run */ /* set the current, current_pre, current_next registers */ pxor mm0,mm0; movq mm7,qword ptr [ebx]; movq mm1,qword ptr [ebx + 8]; psrlq mm0,32; psllq mm1,32; movq mm2,mm7; movq mm3,mm7; psllq mm2,32; psrlq mm3,32; por mm0,mm2; por mm1,mm3; /* current_upper */ movq mm6,qword ptr [eax]; /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2,mm0; movq mm4,mm1; movq mm3,mm0; movq mm5,mm1; pcmpeqd mm2,mm6; pcmpeqd mm4,mm6; pcmpeqd mm3,qword ptr [ecx]; pcmpeqd mm5,qword ptr [ecx]; pandn mm3,mm2; pandn mm5,mm4; movq mm2,mm0; movq mm4,mm1; pcmpeqd mm2,mm1; pcmpeqd mm4,mm0; pandn mm2,mm3; pandn mm4,mm5; movq mm3,mm2; movq mm5,mm4; pand mm2,mm6; pand mm4,mm6; pandn mm3,mm7; pandn mm5,mm7; por mm2,mm3; por mm4,mm5; /* set *dst0 */ movq mm3,mm2; punpckldq mm2,mm4; punpckhdq mm3,mm4; movq qword ptr [edx],mm2; movq qword ptr [edx+8],mm3; /* next */ add eax,8; add ebx,8; add ecx,8; add edx,16; /* central runs */ shr esi,1; jz label1; label0: /* set the current, current_pre, current_next registers */ movq mm0,qword ptr [ebx-8]; movq mm7,qword ptr [ebx]; movq mm1,qword ptr [ebx+8]; psrlq mm0,32; psllq mm1,32; movq mm2,mm7; movq mm3,mm7; psllq mm2,32; psrlq mm3,32; por mm0,mm2; por mm1,mm3; /* current_upper */ movq mm6,qword ptr[eax]; /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2,mm0; movq mm4,mm1; movq mm3,mm0; movq mm5,mm1; pcmpeqd mm2,mm6; pcmpeqd mm4,mm6; pcmpeqd mm3,qword ptr[ecx]; pcmpeqd mm5,qword ptr[ecx]; pandn mm3,mm2; pandn mm5,mm4; movq mm2,mm0; movq mm4,mm1; pcmpeqd mm2,mm1; pcmpeqd mm4,mm0; pandn mm2,mm3; pandn mm4,mm5; movq mm3,mm2; movq mm5,mm4; pand mm2,mm6; pand mm4,mm6; pandn mm3,mm7; pandn mm5,mm7; por mm2,mm3; por mm4,mm5; /* set *dst0 */ movq mm3,mm2; punpckldq mm2,mm4; punpckhdq mm3,mm4; movq qword ptr [edx],mm2; movq qword ptr [edx+8],mm3; /* next */ add eax,8; add ebx,8; add ecx,8; add edx,16; dec esi; jnz label0; label1: /* final run */ /* set the current, current_pre, current_next registers */ movq mm0,qword ptr [ebx-8]; movq mm7,qword ptr [ebx]; pxor mm1,mm1; psrlq mm0,32; psllq mm1,32; movq mm2,mm7; movq mm3,mm7; psllq mm2,32; psrlq mm3,32; por mm0,mm2; por mm1,mm3; /* current_upper */ movq mm6,qword ptr [eax]; /* compute the upper-left pixel for dst0 on %%mm2 */ /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2,mm0; movq mm4,mm1; movq mm3,mm0; movq mm5,mm1; pcmpeqd mm2,mm6; pcmpeqd mm4,mm6; pcmpeqd mm3,qword ptr [ecx]; pcmpeqd mm5,qword ptr [ecx]; pandn mm3,mm2; pandn mm5,mm4; movq mm2,mm0; movq mm4,mm1; pcmpeqd mm2,mm1; pcmpeqd mm4,mm0; pandn mm2,mm3; pandn mm4,mm5; movq mm3,mm2; movq mm5,mm4; pand mm2,mm6; pand mm4,mm6; pandn mm3,mm7; pandn mm5,mm7; por mm2,mm3; por mm4,mm5; /* set *dst0 */ movq mm3,mm2; punpckldq mm2,mm4; punpckhdq mm3,mm4; movq qword ptr [edx],mm2; movq qword ptr [edx+8],mm3; mov src0, eax; mov src1, ebx; mov src2, ecx; mov dst, edx; mov count, esi; emms; } #endif } #endif static void internal_scale2x_16_mmx(Uint16* dst0, Uint16* dst1, const Uint16* src0, const Uint16* src1, const Uint16* src2, unsigned count) { // assert( count >= 2*4 ); internal_scale2x_16_mmx_single(dst0, src0, src1, src2, count); internal_scale2x_16_mmx_single(dst1, src2, src1, src0, count); } #if 0 static void internal_scale2x_32_mmx(Uint32* dst0, Uint32* dst1, const Uint32* src0, const Uint32* src1, const Uint32* src2, unsigned count) { // assert( count >= 2*2 ); internal_scale2x_32_mmx_single(dst0, src0, src1, src2, count); internal_scale2x_32_mmx_single(dst1, src2, src1, src0, count); } #endif #endif void scale2x(Uint8 *srcPtr, Uint32 srcPitch, Uint8 *dstPtr, Uint32 dstPitch, int width, int height) { Uint16 *dst0 = (Uint16 *)dstPtr; Uint16 *dst1 = dst0 + (dstPitch/2); Uint16 *src0 = (Uint16 *)srcPtr; Uint16 *src1 = src0 + (srcPitch/2); Uint16 *src2 = src1 + (srcPitch/2); int count; #ifdef MMX_FUNCTIONS if(MMX_available) { internal_scale2x_16_mmx(dst0, dst1, src0, src0, src1, width); count = height; count -= 2; while(count) { dst0 += dstPitch; dst1 += dstPitch; internal_scale2x_16_mmx(dst0, dst1, src0, src1, src2, width); src0 = src1; src1 = src2; src2 += srcPitch/2; --count; } dst0 += dstPitch; dst1 += dstPitch; internal_scale2x_16_mmx(dst0, dst1, src0, src1, src1, width); } else { #endif internal_scale2x_16_def(dst0, dst1, src0, src0, src1, width); count = height; count -= 2; while(count) { dst0 += dstPitch; dst1 += dstPitch; internal_scale2x_16_def(dst0, dst1, src0, src1, src2, width); src0 = src1; src1 = src2; src2 += srcPitch/2; --count; } dst0 += dstPitch; dst1 += dstPitch; internal_scale2x_16_def(dst0, dst1, src0, src1, src1, width); #ifdef MMX_FUNCTIONS } #endif } #if 0 void scale2x32(Uint8 *srcPtr, Uint32 srcPitch, Uint8 *dstPtr, Uint32 dstPitch, int width, int height) { Uint32 *dst0 = (Uint32 *)dstPtr; Uint32 *dst1 = dst0 + (dstPitch/4); Uint32 *src0 = (Uint32 *)srcPtr; Uint32 *src1 = src0 + (srcPitch/4); Uint32 *src2 = src1 + (srcPitch/4); int count; #ifdef MMX_FUNCTIONS if(MMX_available) { internal_scale2x_32_mmx(dst0, dst1, src0, src0, src1, width); count = height; count -= 2; while(count) { dst0 += dstPitch/2; dst1 += dstPitch/2; internal_scale2x_32_mmx(dst0, dst1, src0, src1, src2, width); src0 = src1; src1 = src2; src2 += srcPitch/4; --count; } dst0 += dstPitch/2; dst1 += dstPitch/2; internal_scale2x_32_mmx(dst0, dst1, src0, src1, src1, width); } else { #endif internal_scale2x_32_def(dst0, dst1, src0, src0, src1, width); count = height; count -= 2; while(count) { dst0 += dstPitch/2; dst1 += dstPitch/2; internal_scale2x_32_def(dst0, dst1, src0, src1, src2, width); src0 = src1; src1 = src2; src2 += srcPitch/4; --count; } dst0 += dstPitch/2; dst1 += dstPitch/2; internal_scale2x_32_def(dst0, dst1, src0, src1, src1, width); #ifdef MMX_FUNCTIONS } #endif } #endif Fenix/fxi/src/scaler_scanline.c0000644000000000000000000000324010607526774015510 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* By Splinter 2007 */ #include #include #include #include "fxi.h" void scanline2x(Uint8 *srcPtr, Uint32 srcPitch, Uint8 *dstPtr, Uint32 dstPitch, int width, int height) { const Uint32 nextlineSrc = srcPitch / sizeof(Uint16); const Uint16 *p = (const Uint16 *)srcPtr; const Uint32 nextlineDst = dstPitch / sizeof(Uint16); Uint16 *q = (Uint16 *)dstPtr; while (height--) { int tmpWidth = width; while (tmpWidth--) { *q=*p; *(q+nextlineDst)=0; q++; *q=*p; *(q+nextlineDst)=0; q++; p++; } p += nextlineSrc - width; q += (nextlineDst - width) * 2; } } Fenix/fxi/src/g_maps.c0000644000000000000000000002762510607744630013637 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : g_maps.c * DESCRIPTION : bitmap & pixbuff functions * * HISTORY: 0.81 - patched bitmap_new to initializa to 0 values * 0.82 - added gr_save_map */ #ifdef TARGET_BEOS #include #else #include #endif #include #include #include "fxi.h" extern SDL_Surface * screen ; extern GRAPH * gr_read_png (const char * filename) ; extern GRAPH * gr_read_pcx (const char * filename) ; static int free_map_code = 1000 ; static GRAPH * first = NULL; /* Returns the code of a new system library graph (1000+). Searchs for free slots if the program creates too many system maps */ int bitmap_next_code() { int i; if (free_map_code > 2000) { for (i = free_map_code-1 ; i >= 1000 ; i--) { if (bitmap_get(0, i) == 0) return i; } } return free_map_code++; } GRAPH * bitmap_new (int code, int w, int h, int depth, int frames) { GRAPH * gr ; int bytesPerRow, wb ; if (depth != 8 && depth != 16 && depth != 1) { gr_con_printf ("Profundidad de color no soportada (new bitmap)\n") ; return NULL; } if (frames < 1) frames = 1; /* Calculate the row size (dword-aligned) */ wb = w * depth / 8; if (wb*8/depth < w) wb++; bytesPerRow = wb; if (bytesPerRow & 0x03) bytesPerRow = (bytesPerRow & ~3) + 4; /* Create and fill the struct */ gr = (GRAPH *) malloc (sizeof(GRAPH)) ; if (!gr) { gr_con_printf ("bitmap_new(%dx%dx%d): sin memoria", w, h, depth) ; ; return NULL; } memset (gr, 0, sizeof(GRAPH)); gr->width = w ; gr->widthb = wb ; gr->pitch = bytesPerRow ; gr->frames = frames; gr->height = h ; gr->depth = depth ; gr->code = code ; gr->data_start = (char *) malloc (h * gr->pitch * frames) ; gr->data = gr->data_start; gr->cpoints = NULL ; gr->blend_table = NULL ; gr->keyframes = (FBM_KEYFRAME *) malloc(sizeof(FBM_KEYFRAME)); gr->sequences = (FBM_SEQUENCE *) malloc(sizeof(FBM_SEQUENCE)); gr->next = first; gr->prev = NULL; gr->current_keyframe = -1; if (first) first->prev = gr; first = gr; if (!gr->data || !gr->keyframes || !gr->sequences) { if (gr->data) free(gr->data); if (gr->keyframes) free(gr->keyframes); if (gr->sequences) free(gr->sequences); free (gr); gr_con_printf ("bitmap_new: sin memoria en calloc(%d, %d)", h, gr->pitch) ; ; return NULL; } // Fills default data for the animation gr->keyframes->angle = 0; gr->keyframes->flags = 0; gr->keyframes->frame = 0; gr->keyframes->pause = 25; gr->sequences->first_keyframe = 0; gr->sequences->last_keyframe = 0; gr->sequences->next_sequence = 0; gr->sequences->name[0] = 0; return gr ; } GRAPH * bitmap_clone (GRAPH * map) { GRAPH * gr ; Uint32 y; gr = bitmap_new_syslib(map->width, map->height, map->depth, 1) ; if (gr == NULL) return NULL; for (y = 0 ; y < map->height ; y++) { memcpy ((Uint8*)gr->data_start + gr->pitch * y, (Uint8*)map->data + gr->pitch * y, gr->widthb); } if (map->cpoints) { gr->cpoints = malloc(4 * map->ncpoints) ; memcpy (gr->cpoints, map->cpoints, 4 * map->ncpoints) ; gr->ncpoints = map->ncpoints ; } gr->width = map->width; gr->blend_table = map->blend_table; gr->offset = map->offset ; gr->info_flags = map->info_flags ; gr->modified = map->modified ; memcpy (gr->name, map->name, sizeof(map->name)) ; return gr ; } void bitmap_add_cpoint (GRAPH * map, int x, int y) { map->cpoints = (CPOINT *) realloc (map->cpoints, (map->ncpoints+1) * sizeof(CPOINT)) ; map->cpoints[map->ncpoints].x = x ; map->cpoints[map->ncpoints].y = y ; map->ncpoints++; } /* * FUNCTION : bitmap_set_cpoint * * Set a control point in a graphic * * PARAMS : * map Pointer to the bitmap * point Control point index * x New X coordinate or CPOINT_UNDEFINED to unset * y New Y coordinate or CPOINT_UNDEFINED to unset * * RETURN VALUE : * None * */ void bitmap_set_cpoint (GRAPH * map, Uint32 point, int x, int y) { Uint32 n; if (point < 0) return; if (map->ncpoints <= point) { map->cpoints = (CPOINT *) realloc (map->cpoints, (point+1) * sizeof(CPOINT)) ; for (n = map->ncpoints; n < point; n++) { map->cpoints[n].x = CPOINT_UNDEFINED; map->cpoints[n].y = CPOINT_UNDEFINED; } map->ncpoints = point+1 ; } map->cpoints[point].x = x; map->cpoints[point].y = y; } void bitmap_destroy (GRAPH * map) { if (!map) return; if (map->prev) map->prev->next = map->next; if (map->next) map->next->prev = map->prev; /* if (map->next_time) map->next->prev = map->next; */ if (first == map) first = map->next; if (map->cpoints) free(map->cpoints) ; if (map->keyframes) free(map->keyframes); if (map->sequences) free(map->sequences); free (map->data) ; free (map) ; } static GRAPH * gr_read_map (file * fp) { char header[8] ; unsigned short int w, h, c ; Uint32 y ; int depth, code ; GRAPH * gr ; int len; /* Carga los datos de cabecera */ file_read (fp, header, 8) ; if (strcmp (header, M16_MAGIC) == 0) depth = 16 ; else if (strcmp (header, MAP_MAGIC) == 0) depth = 8 ; else if (strcmp (header, M01_MAGIC) == 0) depth = 1 ; else return 0 ; file_readUint16 (fp, &w) ; file_readUint16 (fp, &h) ; file_readSint32 (fp, &code) ; gr = bitmap_new (code, w, h, depth, 1) ; if (!gr) return 0 ; file_read (fp, gr->name, 32) ; gr->name[31] = 0 ; /* Datos de paleta */ if (gr->depth == 8) { if (palette_loaded) file_seek (fp, 576 + 768, SEEK_CUR) ; else if (!gr_read_pal (fp)) return 0 ; } /* Puntos de control */ file_readUint16 (fp, &c) ; gr->ncpoints = c ; if (gr->ncpoints) { gr->cpoints = (CPOINT *) malloc (c * sizeof(CPOINT)) ; if (!gr->cpoints) { free(gr) ; return 0 ; } for (c = 0 ; c < gr->ncpoints ; c++) { file_readUint16 (fp, &w) ; file_readUint16 (fp, &h) ; if ((short int) w == -1 && (short int) h == -1) { w = CPOINT_UNDEFINED; h = CPOINT_UNDEFINED; } gr->cpoints[c].x = w ; gr->cpoints[c].y = h ; } } else gr->cpoints = 0 ; len = gr->widthb; /* Datos del grfico */ for (y = 0 ; y < gr->height ; y++) { Uint8 * line = (Uint8 *)gr->data + gr->pitch*y; if (!file_read (fp, line, len)) { free (gr->data) ; free (gr) ; return 0 ; } if (gr->depth == 16) { ARRANGE_WORDS (line, len/2); if (scr_initialized) gr_convert16_565ToScreen ((Uint16 *)line, len/2); } } gr->modified = 1 ; return gr ; } /* Funciones de carga de nivel superior */ int gr_load_png (const char * mapname) { GRAPH * gr ; gr = gr_read_png (mapname) ; if (!gr) return -1 ; gr->code = bitmap_next_code() ; assert (syslib) ; grlib_add_map (0, gr) ; return gr->code ; } int gr_load_pcx (const char * mapname) { GRAPH * gr ; gr = gr_read_pcx (mapname) ; if (!gr) return -1 ; gr->code = bitmap_next_code() ; assert (syslib) ; grlib_add_map (0, gr) ; return gr->code ; } int gr_load_map (const char * mapname) { GRAPH * gr ; file * fp = file_open (mapname, "rb") ; if (!fp) { gr_con_printf ("Mapa %s no encontrado\n", mapname) ; return -1 ; } gr = fbm_load_from (fp, 0); if (!gr) { file_close(fp); fp = file_open(mapname, "rb"); if (fp) gr = gr_read_map (fp) ; } file_close (fp) ; if (!gr) return -1 ; gr->code = bitmap_next_code() ; assert (syslib) ; grlib_add_map (0, gr) ; return gr->code ; } GRAPH * bitmap_new_syslib (int w, int h, int depth, int frames) { GRAPH * gr ; gr = bitmap_new (0, w, h, depth, frames) ; gr->code = bitmap_next_code() ; assert (syslib) ; grlib_add_map (0, gr) ; return gr ; } /* Anlisis */ void bitmap_analize (GRAPH * bitmap) { Uint32 x, y; if (bitmap->modified > 0) bitmap->modified = 0 ; bitmap->info_flags = 0 ; /* Search for transparent pixels (value 0). * If none found, set the flag GI_NOCOLORKEY */ if (bitmap->depth == 8) { for (y = 0 ; y < bitmap->height ; y++) { Uint8 * ptr = memchr ((Uint8 *)bitmap->data + bitmap->pitch*y, 0, bitmap->width) ; if (ptr) break; } if (y == bitmap->height) bitmap->info_flags |= GI_NOCOLORKEY ; } else { Uint16 * ptr = (Uint16 *)bitmap->data ; for (y = 0 ; y < bitmap->height ; y++, ptr += bitmap->pitch/2) { for (x = 0 ; x < bitmap->width ; x++) if (ptr[x] == 0) break; if (x != bitmap->width) break; } if (y == bitmap->height) bitmap->info_flags |= GI_NOCOLORKEY ; } } /* Animacin */ void bitmap_animate_to (GRAPH * bitmap, int pos, int speed) { } /* * FUNCTION : bitmap_animate * * Update the current bitmap frame using the current_time global, * advancing the bitmap animation if needed * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * scrx, scry Pixel coordinates of the center on screen * gr Pointer to the graphic object to draw * * RETURN VALUE : * None * */ void bitmap_animate (GRAPH * map) { if (map->last_frame == frame_count || map->next_time > current_time || current_time == 0) return; // Check for internal error conditions that shouldn't happen if (map->current_keyframe > map->max_keyframe) map->current_keyframe = 0; if (map->current_sequence > map->max_sequence) map->current_sequence = 0; map->last_frame = frame_count; // Update the animation map->end_of_sequence = 0; // Advance to the next keyframe map->current_keyframe++; map->next_time += map->keyframes[map->current_keyframe].pause; // At end of sequence, move to the next sequence of mark the map // as if it is at the end of the animation if (map->current_keyframe > map->sequences[map->current_sequence].last_keyframe) { if (map->sequences[map->current_sequence].next_sequence >= 0) { map->current_sequence = map->sequences[map->current_sequence].next_sequence; if (map->current_sequence > map->max_sequence) map->current_sequence = 0; map->current_keyframe = map->sequences[map->current_sequence].first_keyframe; } else { map->current_keyframe--; map->end_of_sequence = 1; } } // This is an internal error condition; shouldn't happen if (map->current_keyframe > map->max_keyframe) map->current_keyframe = 0; map->current_frame = map->keyframes[map->current_keyframe].frame; if (map->current_frame > map->frames-1) map->current_frame = 0; // Calculate the next time, only if there was a long wait since // the last update map->next_time = current_time + map->keyframes[map->current_keyframe].pause; // Adjust the graphic data map->data = (Uint8*)map->data_start + map->height * map->pitch * map->current_frame; } /* * FUNCTION : bitmap_16bits_conversion * * When 16 bits mode is initialized for the first time, this * function will convert every 16 bit bitmap in memory to * the screen format * * PARAMS : * None * * RETURN VALUE : * None * */ void bitmap_16bits_conversion() { GRAPH * map = first; while (map) { if (map->depth == 16) gr_convert16_565ToScreen (map->data_start, map->width * map->height * map->frames); map = map->next; } } Fenix/fxi/src/pathfind.c0000644000000000000000000001464710607526772014173 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #ifdef TARGET_BEOS #include #else #include #endif #include #include "fxi.h" typedef struct _node { unsigned int x, y ; double f, g, h ; struct _node * parent ; struct _node * next ; } node ; static int * path_result = NULL ; static int * path_result_pointer = NULL ; static node * pf_open = NULL ; static node * pf_closed = NULL ; static node * found = NULL ; static int destination_x, destination_y ; static int startup_x, startup_y ; static GRAPH * map ; static int block_if = 1 ; double heuristic (int x, int y) { int dx, dy ; Uint8 block = ((Uint8*)map->data)[map->pitch*y+x] ; if (x == destination_x && y == destination_y) return 0 ; if (block >= block_if) return 1073741824.0 ; if (x < 0 || y < 0 || x >= (int)map->width || y >= (int)map->height) return 1073741824.0 ; dx = abs(destination_x - x) ; dy = abs(destination_y - y) ; return (double)block + (double)dx*dx + (double)dy*dy ; } int path_set_wall (int n) { if (n >= 1) block_if = n ; return block_if ; } /* ---------------------------------------------------------------- */ /* Uso: pf_open = add(pf_open, this) ; */ /* La lista permanecer ordenada */ node * node_add (node * list, node * this) { node * curr = list ; if (!curr) { this->next = NULL ; return this ; } if (curr->f > this->f) { this->next = curr ; return this ; } for (;;) { if (!curr->next) { curr->next = this ; this->next = NULL ; return list ; } if (curr->next->f > this->f) { this->next = curr->next ; curr->next = this ; return list ; } curr = curr->next ; } } /* Uso: pf_open = remove(pf_open, this) ; */ node * node_remove (node * list, node * this) { node * curr = list ; if (curr == this) return this->next ; while (curr) { if (curr->next == this) { curr->next = this->next ; return list ; } curr = curr->next ; } return list ; } node * node_find (node * list, int x, int y) { while (list) { if (list->x == (unsigned)x && list->y == (unsigned)y) return list ; list = list->next ; } return NULL ; } node * node_reset (node * list) { node * next ; while (list) { next = list->next ; free (list) ; list = next ; } return NULL ; } node * node_new (node * parent, int x, int y, int cost_inc) { node * curr ; curr = (node *) malloc(sizeof(node)) ; if (!curr) return NULL ; curr->x = x ; curr->y = y ; curr->g = (parent ? parent->g : 0) + cost_inc ; curr->h = heuristic (x, y) ; curr->f = curr->g + curr->h ; curr->parent = parent ; curr->next = NULL ; return curr ; } void node_push_succesor (node * parent, int ix, int iy, int cost) { node * curr, * f_op, * f_cl ; curr = node_new (parent, parent->x+ix, parent->y+iy, cost) ; if (curr->h > 131072) { free(curr); return ; } f_cl = node_find (pf_closed, curr->x, curr->y) ; if (f_cl) { free(curr); return ; } f_op = node_find (pf_open, curr->x, curr->y) ; if (f_op && f_op->f <= curr->f) { free(curr); return ; } if (f_op) pf_open = node_remove (pf_open, f_op) ; if (f_cl) pf_closed = node_remove (pf_closed, f_cl) ; pf_open = node_add (pf_open, curr) ; } void node_push_succesors (node * parent, int options) { node * prior = parent->parent ; if (!prior) prior = parent ; node_push_succesor (parent, 1, 0, prior->x < parent->x ? 9:10) ; node_push_succesor (parent, 0, 1, prior->x > parent->x ? 9:10) ; node_push_succesor (parent,-1, 0, prior->y < parent->y ? 9:10) ; node_push_succesor (parent, 0,-1, prior->y > parent->y ? 9:10) ; if (!(options & 1)) { node_push_succesor (parent, 1, 1, 12) ; node_push_succesor (parent,-1,-1, 12) ; node_push_succesor (parent,-1, 1, 12) ; node_push_succesor (parent, 1,-1, 12) ; } } /* ---------------------------------------------------------------- */ int path_get (int * x, int * y) { if (path_result_pointer) { (*x) = *path_result_pointer++ ; (*y) = *path_result_pointer++ ; if (*path_result_pointer == -1) path_result_pointer = NULL ; return 1 ; } return 0 ; } int path_find (GRAPH * bitmap, int sx, int sy, int dx, int dy, int options) { node * curr ; startup_x = sx ; startup_y = sy ; map = bitmap ; destination_x = dx ; destination_y = dy ; pf_open = node_reset (pf_open) ; pf_closed = node_reset (pf_closed) ; curr = node_new (NULL, startup_x, startup_y, 0) ; curr->f = curr->h = 1 ; pf_open = node_add (pf_open, curr) ; while (pf_open) { curr = pf_open ; pf_open = node_remove (pf_open, curr) ; if (curr->x == (unsigned)destination_x && curr->y == (unsigned)destination_y) { int count = 1 ; found = curr ; while (curr->parent) { count++ ; curr = curr->parent ; } if (path_result) free(path_result) ; path_result = malloc(sizeof(int) * 2 * (count+4)) ; if (!(options & 2)) { path_result_pointer = path_result + count*2 + 1; *path_result_pointer-- = -1 ; *path_result_pointer-- = -1 ; while (found) { *path_result_pointer-- = found->y ; *path_result_pointer-- = found->x ; found = found->parent ; } assert (path_result_pointer == path_result-1) ; } else { path_result_pointer = path_result ; while (found) { *path_result_pointer++ = found->x ; *path_result_pointer++ = found->y ; found = found->parent ; } *path_result_pointer++ = -1 ; *path_result_pointer++ = -1 ; } path_result_pointer = path_result ; return 1 ; } node_push_succesors (curr, options) ; pf_closed = node_add (pf_closed, curr) ; } return 0 ; } Fenix/fxi/src/Makefile.am0000644000000000000000000000225310607526736014254 0ustar rootrootbin_PROGRAMS = fxi .rc.o: $(WINDRES) $< -I../../include -o $@ INCLUDES = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I../../include -I../inc -DDEBUG fxi_LDADD = $(SDL_LIBS) $(COMMON_LIBS) -lz -lpng -lSDL_mixer fxi_LDFLAGS = --as-needed SOURCE_FILES = main.c dcbr.c instance.c strings.c \ i_main.c i_debug.c i_func.c \ g_main.c g_maps.c g_blit.c g_texts.c g_pal.c g_draw.c \ g_systexts.c g_console.c g_scroll.c g_flic.c g_mode7.c \ img_png.c img_pcx.c sound.c pathfind.c fnc_exports.c \ g_conversion.c g_font.c g_fpg.c g_blendop.c f_bgload.c \ f_cd.c f_sort.c fbm.c fgc.c fpl.c f_joystick.c i_copy.c \ ../../common/dirs.c ../../common/regex.c \ ../../common/files.c ../../common/xctype.c \ g_profiler.c i_saveload.c \ scaler_scanline.c scaler_normal.c scaler_hq2x.c scaler_scale2x.c \ mmx_main.c mmx_hspan.c #hacer un if con mmx para activarlo o no noinst_HEADERS = ../inc/fxi.h ../../include/files.h ../../include/xctype.h \ ../../include/offsets.h ../../include/pslang.h ../inc/fmath.h if HAVE_WINDRES fxi_SOURCES = $(SOURCE_FILES) fxi.rc else fxi_SOURCES = $(SOURCE_FILES) endif Fenix/fxi/src/g_blendop.c0000644000000000000000000002372110607526742014315 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : g_blendop.c * DESCRIPTION : Blendop (16-bits translucency substitutes) tables * * HISTORY: 0.82 - Blendops functions moved from g_pal.c */ #ifdef TARGET_BEOS #include #else #include #endif #include #include #include "fxi.h" /* Fast macros for color component extraction from a 16 bits value */ #define GETR(color) (((color & screen->format->Rmask) >> screen->format->Rshift) << screen->format->Rloss) #define GETG(color) (((color & screen->format->Gmask) >> screen->format->Gshift) << screen->format->Gloss) #define GETB(color) (((color & screen->format->Bmask) >> screen->format->Bshift) << screen->format->Bloss) /* Fast macros for color composition */ #define MAKERGB_SATURATE(r,g,b) \ ( \ ((int)(r) > 255 ? screen->format->Rmask : (((int)(r) >> screen->format->Rloss) << screen->format->Rshift)) | \ ((int)(g) > 255 ? screen->format->Gmask : (((int)(g) >> screen->format->Gloss) << screen->format->Gshift)) | \ ((int)(b) > 255 ? screen->format->Bmask : (((int)(b) >> screen->format->Bloss) << screen->format->Bshift)) \ ) #define MAKERGB(r,g,b) \ ( \ (((int)(r) >> screen->format->Rloss) << screen->format->Rshift) | \ (((int)(g) >> screen->format->Gloss) << screen->format->Gshift) | \ (((int)(b) >> screen->format->Bloss) << screen->format->Bshift) \ ) /* * FUNCTION : blend_create * * Create a new blendop table and initialize it with blend_init * A blendop table is a group of two tables that return intermediate * colors to a composite (+) operation that does no saturation: * * Src_param = Src_color * Dst_param = Dst_color * Dst_color = Src_param + Dst_param // No clamp! * * The other blend_x funcions change the Src_param and Dst_param formulas. * The Dst_color formula is immutable and embedded in the blitter * * PARAMS : * None * * RETURN VALUE : * Pointer to the new blendop table or NULL if not enough memory */ Sint16 * blend_create () { Sint16 * blend ; if (!scr_initialized) return NULL; blend = malloc(65536*2*sizeof(Sint16)) ; if (!blend) { gr_con_printf ("blend_create: sin memoria") ; return NULL; } blend_init (blend) ; return blend ; } /* * FUNCTION : blend_free * * Free the memory used by a blendop table * * PARAMS : * blend Pointer to the blend table * * RETURN VALUE : * None */ void blend_free (Sint16 * blend) { if (blend) free (blend) ; background_dirty = 1 ; // Temporal, hasta buscar una solucion mejor } /* * FUNCTION : blend_init * * Initialize a blend table as a copy operation * * Src_param = Src_color * Dst_param = 0 * * PARAMS : * blend Pointer to the blend table * ammount Color component factor (1.0f leaves source unchanged) * * RETURN VALUE : * None */ void blend_init (Sint16 * blend) { int i ; if (!blend) return; for (i = 0 ; i < 65536 ; i++) blend[i] = i ; blend += 65536 ; for (i = 0 ; i < 65536 ; i++) blend[i] = 0 ; background_dirty = 1 ; // Temporal, hasta buscar una solucion mejor } /* * FUNCTION : blend_intensity * * Modify a blend table as an intensity operation (changes the * color value of the source object as the factor ammount but * does no transparency or other operation with the background) * * Src_param = (previous Src_param) * ammount * * PARAMS : * blend Pointer to the blend table * ammount Color component factor (1.0f leaves source unchanged) * * RETURN VALUE : * None */ void blend_intensity (Sint16 * blend, float ammount) { int i, r, g, b ; if (!blend) return; if (ammount < 0.0f) ammount = 0.0f ; for (i = 0 ; i < 65536 ; i++) { r = (int)(GETR(blend[i]) * ammount) ; g = (int)(GETG(blend[i]) * ammount) ; b = (int)(GETB(blend[i]) * ammount) ; blend[i] = MAKERGB_SATURATE (r, g, b) ; } background_dirty = 1 ; // Temporal, hasta buscar una solucion mejor } /* * FUNCTION : blend_translucency * * Modify a blend table as a translucency combination operation * * Src_param = (previous Src_param) * ammount * Dst_param = Dst_color * (1.0 - ammount) * * PARAMS : * blend Pointer to the blend table * ammount Opacity factor (1.0f = opaque, 0.0f = transparent) * * RETURN VALUE : * None */ void blend_translucency (Sint16 * blend, float ammount) { int i, r, g, b ; if (!blend) return; if (ammount > 1.0f) ammount = 1.0f ; if (ammount < 0.0f) ammount = 0.0f ; ammount = 1.0f - ammount ; for (i = 0 ; i < 65536 ; i++) { r = (int)(GETR(blend[i]) * ammount) ; g = (int)(GETG(blend[i]) * ammount) ; b = (int)(GETB(blend[i]) * ammount) ; blend[i] = MAKERGB (r, g, b) ; } blend += 65536 ; ammount = 1.0f - ammount ; for (i = 0 ; i < 65536 ; i++) { r = (int)(GETR(i) * ammount) ; g = (int)(GETG(i) * ammount) ; b = (int)(GETB(i) * ammount) ; blend[i] = MAKERGB (r, g, b) ; } background_dirty = 1 ; // Temporal, hasta buscar una solucion mejor } /* * FUNCTION : blend_tint * * Modify a blend table as a tint operation (changes the * color value of the source object as a combination of a given * color and the source color with the factor given) * * Src_param = Const_color * ammount * + (previous Src_Param) * (1.0f-ammount) * * PARAMS : * blend Pointer to the blend table * ammount Color component factor (1.0f = Full Const color) * cr Constant color, red component (0-255) * cg Constant color, green component (0-255) * cb Constant color, blue component (0-255) * * RETURN VALUE : * None */ void blend_tint (Sint16 * blend, float ammount, Uint8 cr, Uint8 cg, Uint8 cb) { int i, r, g, b ; if (!blend) return; if (ammount > 1.0f) ammount = 1.0f ; if (ammount < 0.0f) ammount = 0.0f ; for (i = 0 ; i < 65536 ; i++) { r = (int)(ammount * cr + (1.0f - ammount) * GETR(blend[i])) ; g = (int)(ammount * cg + (1.0f - ammount) * GETG(blend[i])) ; b = (int)(ammount * cb + (1.0f - ammount) * GETB(blend[i])) ; blend[i] = MAKERGB_SATURATE (r, g, b) ; } background_dirty = 1 ; // Temporal, hasta buscar una solucion mejor } /* * FUNCTION : blend_grayscale * * Initialize a blend table as a grayscale operation (changes the * color value of the source object to grayscale). Three methods * of operation are supported: * * 1. Luminance: result = 0.3R + 0.59G + 0.11B * 2. Desaturate: result = (MAX(R,G,B)+MIN(R,G,B))/2 * 3. Maximum: result = MAX(R,G,B) * * * Src_param = Grayscale_operation(previous Src_param) * * PARAMS : * blend Pointer to the blend table * method Method of operation * * RETURN VALUE : * None */ void blend_grayscale (Sint16 * blend, int method) { int i, r, g, b, max, min ; if (!blend) return; if (method == 1) { for (i = 0 ; i < 65536 ; i++) { r = (int)(GETR(i) * 0.3) ; g = (int)(GETG(i) * 0.59) ; b = (int)(GETB(i) * 0.11) ; r = r+g+b; blend[i] = MAKERGB(r, r, r) ; } } else if (method == 2) { for (i = 0 ; i < 65536 ; i++) { r = GETR(i); g = GETG(i); b = GETB(i); max = r > g ? r > b ? r : g : g > b ? g : b ; min = r < g ? r < b ? r : g : g < b ? g : b ; r = (max+min)/2; blend[i] = MAKERGB(r, r, r) ; } } else if (method == 3) { for (i = 0 ; i < 65536 ; i++) { r = GETR(i); g = GETG(i); b = GETB(i); max = r > g ? r > b ? r : g : g > b ? g : b ; blend[i] = MAKERGB(max, max, max) ; } } blend += 65536 ; for (i = 0 ; i < 65536 ; i++) blend[i] = 0 ; background_dirty = 1 ; // Temporal, hasta buscar una solucion mejor } /* * FUNCTION : blend_swap * * Swaps a blendop table. That is, change the blend operation so * the Dst_color and Src_color are exchanged in the formulas. * * PARAMS : * blend Pointer to the blend table * * RETURN VALUE : * None */ void blend_swap (Sint16 * blend) { int i, j ; if (!blend) return; for (i = 0 ; i < 65536 ; i++) { j = blend[i] ; blend[i] = blend[65536+i] ; blend[65536+i] = j ; } background_dirty = 1 ; // Temporal, hasta buscar una solucion mejor } /* * FUNCTION : blend_assign * * Assign a blend operation to a graphic. The graphic will be * drawn using this blend operation thereafter. * * PARAMS : * map Pointer to the graphic * blend Pointer to the blend table * * RETURN VALUE : * None */ void blend_assign (GRAPH * map, Sint16 * blend) { map->blend_table = blend ; map->modified = 1 ; } /* * FUNCTION : blend_apply * * Apply a blend operation to the pixels of a graphic, as if it was * rendered into a black (color 0) background * * PARAMS : * map Pointer to the graphic * blend Pointer to the blend table * * RETURN VALUE : * None */ void blend_apply (GRAPH * map, Sint16 * blend) { Uint16 * ptr ; Uint32 x, y ; if (!blend) return; if (map->depth != 16) return ; for (y = 0 ; y < map->height ; y++) { ptr = (Uint16 *)map->data + map->pitch * y / 2 ; for (x = 0 ; x < map->width ; x++, ptr++) { if (*ptr) *ptr = blend[*ptr] + blend[65536+*ptr] ; } } map->modified = 1 ; } Fenix/fxi/src/g_main.c0000644000000000000000000020566110607744630013621 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * HISTORY: 0.81 - ALT+TAB patch at gr_unlock_screen * 0.81 - Added FULL_SCREEN variable * 0.76 - Patched DRAW_INSTANCE so XGRAPH does not rotate graphic * 0.76 - Patched DRAW_INSTANCE_AT so XGRAPH does not rotate graphic * 0.75 - Added icon WM capabilities on 8/16 bpp * 0.75 - New Keyboard system about 60/70% done * 0.74 - Added some more SDLK symbols to list * 0.74 - Added title WM capabilities... working in icon * 0.72 - Added SDLK_8 to keylistg */ #include #include #include #include #ifdef TARGET_BEOS #include #include "Be_compat/be_compat.h" #else #include #endif #include "fxi.h" #include "dcb.h" #include "grlib.h" extern int force_debug; SDL_Surface * screen = NULL ; GRAPH * background = NULL ; GRAPH * scrbitmap = NULL ; GRAPH * scrbitmap_extra = NULL ; GRAPH * background_8bits = NULL ; GRAPH * icono = NULL ; int background_8bits_used ; int enable_16bits = 0 ; int enable_filtering = 0 ; int enable_scale = 0 ; int scale_mode = SCALE_NONE; int background_is_black = 1 ; char * apptitle = NULL ; int scr_width = 320 ; int scr_height = 200 ; int scr_initialized = 0 ; int audio_initialized = 0 ; int full_screen = 1 ; int double_buffer = 0 ; int hardware_scr = 0 ; int grab_input = 0 ; int exit_status = 0 ; int frameless = 0 ; int window_status= 1 ; int focus_status = 1 ; int mouse_status = 1 ; int show_console = 0 ; static int scrbitmap_is_fake = 0 ; static int show_profile = 0 ; int report_graphics = 0 ; static REGION last_mouse_bbox = { -2, -2, -2, -2 }; #define MAX_JOYSTICKS 8 int joy_x[8] = { 0, 0, 0, 0, 0, 0, 0, 0 } ; int joy_y[8] = { 0, 0, 0, 0, 0, 0, 0, 0 } ; int joy_b[8] = { 0, 0, 0, 0, 0, 0, 0, 0 } ; static int sdl_equiv[SDLK_LAST+1] ; key_equiv key_table[127] ; /* Now we have a search table with equivs */ unsigned char * keystate ; /* Pointer to key states */ int keystate_size = 0 ; static int equivs[] = { SDLK_ESCAPE, 1, SDLK_1, 2, SDLK_KP1, 2, SDLK_2, 3, SDLK_KP2, 3, SDLK_3, 4, SDLK_KP3, 4, SDLK_4, 5, SDLK_KP4, 5, SDLK_5, 6, SDLK_KP5, 6, SDLK_6, 7, SDLK_KP6, 7, SDLK_7, 8, SDLK_KP7, 8, SDLK_8, 9, SDLK_KP8, 9, SDLK_9, 10, SDLK_KP9, 10, SDLK_0, 11, SDLK_KP0, 11, SDLK_MINUS, 12, SDLK_EQUALS, 13, SDLK_BACKSPACE, 14, SDLK_TAB, 15, SDLK_q, 16, SDLK_w, 17, SDLK_e, 18, SDLK_r, 19, SDLK_t, 20, SDLK_y, 21, SDLK_u, 22, SDLK_i, 23, SDLK_o, 24, SDLK_p, 25, SDLK_LEFTBRACKET, 26, SDLK_RIGHTBRACKET, 27, SDLK_RETURN, 28, SDLK_KP_ENTER, 28, SDLK_LCTRL, 96, SDLK_RCTRL, 94, SDLK_LCTRL, 29, SDLK_RCTRL, 29, SDLK_a, 30, SDLK_s, 31, SDLK_d, 32, SDLK_f, 33, SDLK_g, 34, SDLK_h, 35, SDLK_j, 36, SDLK_k, 37, SDLK_l, 38, SDLK_SEMICOLON, 39, SDLK_QUOTE, 40, SDLK_BACKQUOTE, 41, SDLK_LSHIFT, 42, SDLK_BACKSLASH, 43, SDLK_z, 44, SDLK_x, 45, SDLK_c, 46, SDLK_v, 47, SDLK_b, 48, SDLK_n, 49, SDLK_m, 50, SDLK_COMMA, 51, SDLK_PERIOD, 52, SDLK_KP_PERIOD, 52, SDLK_SLASH, 53, SDLK_KP_DIVIDE, 53, SDLK_RSHIFT, 54, /* SDLK_PRINT, 55,*/ SDLK_KP_MULTIPLY, 55, SDLK_LALT, 95, SDLK_RALT, 93, SDLK_MODE, 93, SDLK_LALT, 56, SDLK_RALT, 56, SDLK_MODE, 56, SDLK_RMETA, 56, SDLK_LMETA, 56, SDLK_SPACE, 57, SDLK_CAPSLOCK, 58, SDLK_F1, 59, SDLK_F2, 60, SDLK_F3, 61, SDLK_F4, 62, SDLK_F5, 63, SDLK_F6, 64, SDLK_F7, 65, SDLK_F8, 66, SDLK_F9, 67, SDLK_F10, 68, SDLK_NUMLOCK, 69, SDLK_SCROLLOCK, 70, SDLK_HOME, 71, SDLK_UP, 72, SDLK_PAGEUP, 73, SDLK_KP_MINUS, 74, SDLK_LEFT, 75, SDLK_RIGHT, 77, SDLK_KP_PLUS, 78, SDLK_END, 79, SDLK_DOWN, 80, SDLK_PAGEDOWN, 81, SDLK_INSERT, 82, SDLK_DELETE, 83, SDLK_F11, 87, SDLK_F12, 88, SDLK_LESS, 89, SDLK_PLUS, 90, SDLK_GREATER, 91, SDLK_QUESTION, 92, SDLK_CARET, 93, SDLK_SYSREQ, 55, SDLK_PAUSE, 95, SDLK_MENU, 97, SDLK_LSUPER, 98, SDLK_RSUPER, 99, SDLK_COMPOSE, 99, -1, -1 } ; int keytab_initialized = 0 ; int last_frame_ms = 0 ; Uint32 frame_count = 0 ; Uint32 current_time = 0 ; static int last_frame_ticks = 0 ; static int next_frame_ticks = 0 ; static int frame_ms = 40 ; static int max_jump = 2 ; static int current_jump = 0 ; static int jump = 0 ; static int timer_advance = 0 ; static int FPS_count = 0 ; static int FPS_curr = 0 ; static int FPS_init = 0 ; typedef struct _object { int z ; int id ; int (*info)(void * what, REGION * clip) ; void (*draw)(void * what, REGION * clip) ; void * what ; REGION bbox ; int changed ; } OBJECT ; typedef struct _dll_object { int id ; int hidden ; OBJECT x ; struct _dll_object * next ; } DLL_OBJECT ; static DLL_OBJECT * first_dll_object = NULL; static int last_dll_object_id = 0; static int dll_object_count = 0; static OBJECT * object_list = NULL; static int object_list_allocated = 0; static int object_count = 0; //static int object_id = 0; int object_list_dirty = 1; int object_list_unsorted = 0; int background_dirty = 0; static REGION updaterects[128]; static int updaterects_count = 0; static Uint8 zonearray[128/8]; extern int default_palette[]; /* ---------------------------------------------------------------------- */ /* Gestin de regiones */ /* ---------------------------------------------------------------------- */ REGION regions[32] ; #define MAX(a, b) (((a) > (b)) ? (a) : (b)) #define MIN(a, b) (((a) < (b)) ? (a) : (b)) /* * FUNCTION : region_define * * Sets one of the 32 regions visible from the fenix * language to the values given * * The region 0 is always equal to the whole screen * and cannot be changed * * PARAMS : * n Number of region to set (1 to 31) * x, y Top-Left coordinates * width Width in pixels * height Height in pixels * * RETURN VALUE : * None */ void region_define (int region, int x, int y, int width, int height) { if (region < 1 || region > 31) return ; regions[region].x = MAX (x, 0) ; regions[region].y = MAX (y, 0) ; regions[region].x2 = MIN (scr_width, x+width) - 1 ; regions[region].y2 = MIN (scr_height, y+height) - 1 ; } /* * FUNCTION : region_union * * Calculates a region as the intersection of another two * * PARAMS : * dest First region, and the one to contain the result * b Second region * * RETURN VALUE : * None. The result will be stored in the first region * used as parameter * */ void region_union (REGION * dest, REGION * b) { dest->x = MAX(dest->x, b->x) ; dest->y = MAX(dest->y, b->y) ; dest->y2 = MIN(dest->y2, b->y2) ; dest->x2 = MIN(dest->x2, b->x2) ; } /* * FUNCTION : region_is_empty * * Returns TRUE if the region contains no pixels * * PARAMS : * region Region to check * * RETURN VALUE : * 1 if the region is empty, 0 otherwise * */ int region_is_empty (REGION * a) { return (a->x2 < a->x) || (a->y2 < a->y) ; } /* * FUNCTION : region_is_out * * Returns TRUE if two regions overlap * * PARAMS : * a First region to check * b Second region to check * * RETURN VALUE : * 1 if there is at least one pixel in both regions, 0 otherwise * */ int region_is_out (REGION * a, REGION * b) { return (b->x > a->x2 || b->y > a->y2 || b->x2 < a->x || b->y2 < a->y); } /* * FUNCTION : region_new * * Create a new region object. Only rectangular regions * are supported in this library. * * PARAMS : * x, y Coordinates of the top-left pixel * width Width of the region in pixels * height Height of the region in pixels * * RETURN VALUE : * Returns a pointer to the new object * */ REGION * region_new (int x, int y, int width, int height) { REGION * region = malloc(sizeof(REGION)) ; region->x = MAX (x, 0) ; region->y = MAX (y, 0) ; region->x2 = MIN (scr_width, x+width) - 1 ; region->y2 = MIN (scr_height, y+height) - 1 ; return region ; } /* * FUNCTION : region_get * * Returns one of the 32 default regions visible from the fenix language * * PARAMS : * n Number of the region (0-31) * * RETURN VALUE : * Returns the region object * */ REGION * region_get (int n) { if (n < 0 || n > 31) return 0 ; return ®ions[n] ; } /* * FUNCTION : region_destroy * * Free the memory allocated by a region * * PARAMS : * region Pointer to the region object * * RETURN VALUE : * None * */ void region_destroy (REGION * region) { free (region); } /* ---------------------------------------------------------------------- */ /* Gestin de eventos (ratn, teclado) */ /* ---------------------------------------------------------------------- */ void add_key_equiv(int equiv, int keyconst) { key_equiv * curr = &key_table[keyconst] ; if (curr->next != NULL) while (curr->next!=NULL) curr=curr->next ; if (curr->sdlk_equiv!=0) { curr->next = malloc(sizeof(key_equiv)) ; curr = curr->next ; curr->next = NULL ; } curr->sdlk_equiv = equiv ; } /* FREE used key_equivs... note base 127 equivs are static not allocated... */ void keytab_free() { int i ; key_equiv * aux ; key_equiv * curr = key_table ; for (i=0;i<127;i++) { if (curr->next!=NULL) { curr = curr->next ; while (curr->next!=NULL) { aux = curr ; curr = curr->next; free(aux) ; } free(curr) ; } } } void keytab_init() { int * ptr = equivs ; memset (sdl_equiv, 0, sizeof(sdl_equiv)); memset (key_table, 0, sizeof(key_table)) ; while (*ptr != -1) { sdl_equiv[*ptr] = ptr[1] ; add_key_equiv(ptr[0],ptr[1]) ; ptr += 2 ; } if (keystate == NULL) { SDL_GetKeyState (&keystate_size) ; keystate = malloc(keystate_size) ; } memcpy (keystate, SDL_GetKeyState(NULL), keystate_size) ; SDL_EnableUNICODE(1); keytab_initialized = 1 ; } /* * FUNCTION : gr_key * * Returns the current status of a key (pressed or not) * * PARAMS : * key Fenix code of the key (see fxdll.h for #defines) * * RETURN VALUE : * A non-zero positive value if the key is pressed, 0 otherwise */ int gr_key (int code) { key_equiv * curr ; int found = 0 ; if (!keystate) return 0; curr = &key_table[code] ; if (keytab_initialized==0) keytab_init() ; while (curr!=NULL && found==0) { found = keystate[curr->sdlk_equiv] ; curr = curr->next ; } return found ; } /* * FUNCTION : do_events * * Process all pending SDL events, updating all global variables * and handling debug key presses * and cannot be changed * * PARAMS : * None * * RETURN VALUE : * None */ static void do_events () { SDL_Event e ; SDLMod m ; int k,asc ; int pressed ; key_equiv * curr ; int keypress ; static struct { int ascii ; int scancode ; } keyring [64] ; static int keyring_start = 0, keyring_tail = 0 ; static int last_mouse_x = -1, last_mouse_y = -1 ; if (!keytab_initialized) keytab_init() ; /* Actualizar eventos */ keypress = 0 ; m = SDL_GetModState() ; /* El cambio de mouse.x/y afecta directamente al ratn */ if (last_mouse_x != -1 && (GLODWORD(MOUSEX) != last_mouse_x || GLODWORD(MOUSEY) != last_mouse_y)) { SDL_WarpMouse ((Uint16)GLODWORD(MOUSEX), (Uint16)GLODWORD(MOUSEY)) ; } /* Procesa los eventos pendientes */ /* Reset ascii and scancode if last key was released... */ /* must check all the linked equivs */ if (show_console == 0) memcpy (keystate, SDL_GetKeyState(NULL), keystate_size) ; GLODWORD(MOUSEWHEELUP) = 0 ; GLODWORD(MOUSEWHEELDOWN) = 0 ; GLODWORD(EXIT_STATUS) = 0 ; pressed = 0 ; if (GLODWORD(SCANCODE)!=0) { curr = &key_table[GLODWORD(SCANCODE)] ; while (curr!=NULL && pressed == 0) { if (keystate[curr->sdlk_equiv]) pressed = 1 ; curr=curr->next ; } } if (pressed==0) { GLODWORD(ASCII) = 0 ; GLODWORD(SCANCODE) = 0 ; } while (SDL_PollEvent (&e)) { switch (e.type) { case SDL_MOUSEMOTION: GLODWORD(MOUSEX) = e.motion.x ; GLODWORD(MOUSEY) = e.motion.y ; break ; /* case SDL_JOYAXISMOTION: if (e.jaxis.which < MAX_JOYSTICKS && e.jaxis.axis == 0) { joy_x[e.jaxis.which] = e.motion.x ; joy_y[e.jaxis.which] = e.motion.y ; } break ; */ case SDL_MOUSEBUTTONDOWN: if (e.button.button == 1) GLODWORD(MOUSELEFT) = 1 ; if (e.button.button == 2) GLODWORD(MOUSEMIDDLE) = 1 ; if (e.button.button == 3) GLODWORD(MOUSERIGHT) = 1 ; if (e.button.button == 4) GLODWORD(MOUSEWHEELUP)++ ; if (e.button.button == 5) GLODWORD(MOUSEWHEELDOWN)++ ; break ; /* case SDL_JOYBUTTONDOWN: if (e.jbutton.which < MAX_JOYSTICKS) { joy_b[e.jbutton.which] |= (1 << e.jbutton.button) ; } break ; */ case SDL_MOUSEBUTTONUP: if (e.button.button == 1) GLODWORD(MOUSELEFT) = 0 ; if (e.button.button == 2) GLODWORD(MOUSEMIDDLE) = 0 ; if (e.button.button == 3) GLODWORD(MOUSERIGHT) = 0 ; break ; /* case SDL_JOYBUTTONUP: if (e.jbutton.which < MAX_JOYSTICKS) { joy_b[e.jbutton.which] &= ~(1 << e.jbutton.button) ; } break ; */ case SDL_KEYDOWN: /* Teclas del sistema ALT+... (slo modo debug) */ if (dcb.data.NID != 0 && (e.key.keysym.mod & KMOD_LALT)) { if (!full_screen && e.key.keysym.sym == SDLK_f) { GLODWORD(GRAPH_MODE) ^= MODE_FULLSCREEN; GLODWORD(FULL_SCREEN) = 1; gr_init (scr_width, scr_height); break; } if (full_screen && e.key.keysym.sym == SDLK_w) { GLODWORD(GRAPH_MODE) ^= MODE_FULLSCREEN; GLODWORD(FULL_SCREEN) = 0; gr_init (scr_width, scr_height); break; } if (e.key.keysym.sym == SDLK_z) { GLODWORD(GRAPH_MODE) ^= MODE_16BITS; gr_init (scr_width, scr_height); break; } if (e.key.keysym.sym == SDLK_x) { must_exit = 1 ; break; } if (e.key.keysym.sym == SDLK_c) { show_console = !show_console ; if (show_console) { show_profile = 0; force_debug = 1; } else { force_debug = 0; } background_dirty = 1; break ; } if (e.key.keysym.sym == SDLK_r) { gprof_reset(); break ; } if (e.key.keysym.sym == SDLK_p) { if (!show_console) show_profile = !show_profile; background_dirty = 1; break ; } if (e.key.keysym.sym == SDLK_s) { gprof_toggle(); break ; } if (e.key.keysym.sym == SDLK_g) { int shot_num = 0; GRAPH * shot = bitmap_new (0, scr_width, scr_height, enable_16bits ? 16:8, 1); if (!shot) break; gr_draw_screen (shot, 1, 1); for (shot_num = 0 ; shot_num < 9999 ; shot_num++) { char name[32] ; _snprintf (name, 32, "shot%04d.png", shot_num); if (!file_exists(name)) { shot->info_flags |= GI_NOCOLORKEY; gr_save_png (shot, name); gr_con_printf ("[FXI] Screenshot %s grabado", name); break; } } bitmap_destroy (shot); break ; } } /* Consola */ if (show_console) { if (e.key.keysym.mod & KMOD_RCTRL || e.key.keysym.mod & KMOD_LCTRL) { if (e.key.keysym.sym == SDLK_LEFT) { gr_con_lateral_scroll (1) ; break ; } if (e.key.keysym.sym == SDLK_RIGHT) { gr_con_lateral_scroll (-1) ; break ; } } if (e.key.keysym.sym == SDLK_PAGEUP) { gr_con_scroll (-1) ; break ; } if (e.key.keysym.sym == SDLK_PAGEDOWN) { gr_con_scroll (1) ; break ; } if (!(m & KMOD_LALT)) { gr_con_getkey (e.key.keysym.unicode,e.key.keysym.sym) ; break ; } } /* Almacena la pulsacin de la tecla */ k = sdl_equiv[e.key.keysym.sym]; if (k == 0) { gr_con_printf ("Warning: symbol %d not defined", e.key.keysym.sym); } m = e.key.keysym.mod ; if (!keypress) { GLODWORD(SCANCODE) = k ; if (e.key.keysym.unicode) { asc = win_to_dos[e.key.keysym.unicode & 0xFF] ; /* ascii mayusculas */ if (asc >= 0X61 && asc <= 0X7A && (m & KMOD_LSHIFT || m & KMOD_RSHIFT || keystate[SDLK_CAPSLOCK])) asc -= 0x20 ; } else asc = 0 ; GLODWORD(ASCII) = asc ; keypress = 1 ; } else { keyring[keyring_tail].scancode = k ; if (e.key.keysym.unicode) { asc = win_to_dos[e.key.keysym.unicode & 0x7F] ; /*ascii mayusculas */ if (asc >= 0X61 && GLODWORD(ASCII) <= 0X7A && (m & KMOD_LSHIFT || m & KMOD_RSHIFT || keystate[SDLK_CAPSLOCK])) asc -= 0x20 ; } else { asc = 0 ; /* NON PRINTABLE */ } keyring[keyring_tail].ascii = asc ; if (++keyring_tail == 64) keyring_tail = 0 ; } break ; case SDL_KEYUP: /* Do nothing, fenix is key_up unsensitive */ break ; /* WINDOW MANAGER EVENTS */ case SDL_QUIT: /* UPDATE exit status... initilized each frame */ GLODWORD(EXIT_STATUS) = 1 ; if (dcb.data.NID > 0) do_exit (-1); break ; case SDL_ACTIVEEVENT: if (e.active.state & SDL_APPACTIVE) GLODWORD(WINDOW_STATUS) = (e.active.gain)? 1 : 0 ; if (e.active.state & SDL_APPINPUTFOCUS) GLODWORD(FOCUS_STATUS) = (e.active.gain)? 1 : 0 ; if (e.active.state & SDL_APPMOUSEFOCUS) GLODWORD(MOUSE_STATUS) = (e.active.gain)? 1 : 0 ; /* ALLOW DLL EXPORT */ focus_status = GLODWORD(FOCUS_STATUS) ; mouse_status = GLODWORD(MOUSE_STATUS) ; window_status = GLODWORD(WINDOW_STATUS) ; break ; } } if (!keypress && keyring_start != keyring_tail) { GLODWORD(ASCII) = keyring[keyring_start].ascii ; GLODWORD(SCANCODE) = keyring[keyring_start].scancode ; if (++keyring_start == 64) keyring_start = 0 ; } /* Now actualized every frame... */ GLODWORD(SHIFTSTATUS) = ((m & KMOD_LSHIFT) ? 1 : 0) + ((m & KMOD_RSHIFT) ? 2 : 0) + ((m & KMOD_RCTRL) || (m & KMOD_LCTRL) ? 4 : 0) + ((m & KMOD_LALT) || (m & KMOD_RALT) ? 8 : 0) ; last_mouse_x = GLODWORD(MOUSEX) ; last_mouse_y = GLODWORD(MOUSEY) ; /* ALLOW DLL EXPORT */ exit_status = GLODWORD(EXIT_STATUS) ; } /* ---------------------------------------------------------------------- */ /* Inicializacin y controles de tiempo */ /* ---------------------------------------------------------------------- */ /* * FUNCTION : gr_set_fps * * Change the game fps and frameskip values * * PARAMS : * fps New number of frames per second * jump New value of maximum frameskip * * RETURN VALUE : * None */ void gr_set_fps(int fps, int jump) { frame_ms = fps ? 1000 / fps : 1 ; max_jump = jump ; next_frame_ticks = SDL_GetTicks() + frame_ms ; } /* * FUNCTION : gr_advance_timers * * Update the value of all global timers * * PARAMS : * None * * RETURN VALUE : * None */ void gr_advance_timers() { int * timer, i ; timer = &GLODWORD(TIMER) ; for (i = 0 ; i < 10 ; i++) timer[i] += timer_advance/10 ; } /* * FUNCTION : gr_wait_frame * * Wait for the next frame start. It also calls * string_coalesce() from some garbage collection * * PARAMS : * None * * RETURN VALUE : * None */ void gr_wait_frame() { int frame_ticks, delay ; if (!scr_initialized) gr_init(320,200) ; frame_ticks = SDL_GetTicks() ; timer_advance %= 10 ; timer_advance += frame_ticks - last_frame_ticks ; last_frame_ms = frame_ticks - last_frame_ticks ; GLODWORD(SPEED_GAUGE) = (frame_ticks-last_frame_ticks)*100/frame_ms ; *(float *)&GLODWORD(FRAME_TIME) = (frame_ticks - last_frame_ticks)/1000.0f; last_frame_ticks = frame_ticks ; if (!jump) FPS_count++ ; if (timer_advance > 9) FPS_curr += (int)100.0/(timer_advance/10) ; if (FPS_count && FPS_init < frame_ticks-1000) { GLODWORD(FPS) = FPS_count ; FPS_count = 0 ; FPS_curr = 0 ; FPS_init = frame_ticks ; } jump = 0 ; frame_count ++ ; if (frame_ticks > next_frame_ticks) { if (frame_ticks > next_frame_ticks + frame_ms) next_frame_ticks = frame_ticks + frame_ms ; else next_frame_ticks += frame_ms ; if (current_jump < max_jump) { current_jump++ ; last_frame_ticks = frame_ticks ; jump = 1 ; } else { //next_frame_ticks = frame_ticks + frame_ms ; current_jump = 0 ; } } else { delay = next_frame_ticks - frame_ticks ; GLODWORD(SPEED_GAUGE) = 100 - delay*100/frame_ms ; next_frame_ticks += frame_ms ; if (delay) SDL_Delay (delay) ; current_jump = 0 ; } string_coalesce() ; /* Libera cadenas temporales */ current_time = SDL_GetTicks(); } /* * FUNCTION : gr_timer * * Returns a milliseconds integer counter timer. This value * updates only once for frame and is constant. * * PARAMS : * None * * RETURN VALUE : * Integer value in milliseconds */ int gr_timer() { return last_frame_ticks; } /* Rutinas grficas de alto nivel */ void draw_instance_at (INSTANCE * proc_ptr, REGION * region, int x, int y) { INSTANCE * i = (INSTANCE *) proc_ptr ; GRAPH * map ; Sint16 * blend_table = NULL; int flags ; int scalex, scaley ; map = instance_graph (i) ; if (!map) return ; if (map->frames > 1) bitmap_animate(map) ; flags = (LOCDWORD(i, FLAGS) ^ LOCDWORD(i, XGRAPH_FLAGS)); if (LOCDWORD(i, ALPHA) != 255) { if (LOCDWORD(i, ALPHA) <= 0) return; else if (LOCDWORD(i, ALPHA) < 255) flags |= B_ALPHA | ( (LOCDWORD(i,ALPHA)) << B_ALPHA_SHIFT ); } scalex = LOCDWORD(i,GRAPHSIZEX); scaley = LOCDWORD(i,GRAPHSIZEY); if (scalex == 100 && scaley == 100) scalex = scaley = LOCDWORD(i,GRAPHSIZE); if (LOCDWORD(i,BLENDOP) != 0) { blend_table = map->blend_table; map->blend_table = (Sint16 *)LOCDWORD(i,BLENDOP); } // PATCH - XGRAPH DOES NOT ROTATE DESTINATION GRAPHIC if (LOCDWORD(i,ANGLE) || scalex != 100 || scaley != 100) { if (LOCDWORD(i,XGRAPH) && scalex == 100 && scaley == 100) { gr_blit (0, region, x, y, flags, map) ; } else { if (LOCDWORD(i,XGRAPH)) { gr_rotated_blit (0, region, x, y, flags, 0, scalex, scaley, map) ; } else { gr_rotated_blit (0, region, x, y, flags, LOCDWORD(i,ANGLE), scalex, scaley, map) ; } } } else { gr_blit (0, region, x, y, flags, map) ; } if (LOCDWORD(i,BLENDOP) != 0) map->blend_table = blend_table; } void draw_instance (INSTANCE * proc_ptr, REGION * clip) { INSTANCE * i = (INSTANCE *) proc_ptr ; GRAPH * map ; Sint16 * blend_table = NULL ; int x, y, r ; int flags; int scalex, scaley; REGION fclip; map = instance_graph (i) ; if (!map) return ; if (map->frames > 1) bitmap_animate(map) ; r = LOCDWORD(i,REGIONID); if (r < 1 || r > 31) r = 0 ; x = LOCDWORD(i, COORDX) ; y = LOCDWORD(i, COORDY) ; RESOLXY(i, x, y); flags = (LOCDWORD(i, FLAGS) ^ LOCDWORD(i, XGRAPH_FLAGS)); if (LOCDWORD(i, ALPHA) != 255) { if (LOCDWORD(i, ALPHA) <= 0) return; else if (LOCDWORD(i, ALPHA) < 255) flags |= B_ALPHA | ( (LOCDWORD(i,ALPHA)) << B_ALPHA_SHIFT ); } scalex = LOCDWORD(i,GRAPHSIZEX); scaley = LOCDWORD(i,GRAPHSIZEY); if (scalex == 100 && scaley == 100) scalex = scaley = LOCDWORD(i,GRAPHSIZE); if (LOCDWORD(i,BLENDOP) != 0) { blend_table = map->blend_table; map->blend_table = (Sint16 *)LOCDWORD(i,BLENDOP); } fclip = regions[r]; if (clip) region_union (&fclip, clip); if (LOCDWORD(i,ANGLE) || scalex != 100 || scaley != 100) { if (LOCDWORD(i,XGRAPH) && scalex == 100 && scaley == 100) { gr_blit (0, ®ions[r], x, y, flags, map) ; } else { if (LOCDWORD(i,XGRAPH)) { gr_rotated_blit (0, &fclip, x, y, flags, 0, scalex, scaley, map) ; } else { gr_rotated_blit (0, &fclip, x, y, flags, LOCDWORD(i,ANGLE), scalex, scaley, map) ; } } } else { gr_blit (0, &fclip, x, y, flags, map) ; } if (LOCDWORD(i,BLENDOP) != 0) map->blend_table = blend_table; } /* * FUNCTION : info_mouse * * Returns information about the mouse * * PARAMS : * ptr Void pointer, used for compatibility with DLL-type objects * clip Region to fill with bounding box * * RETURN VALUE : * 1 if the mouse has changed since last call */ int info_mouse (void * ptr, REGION * clip) { GRAPH * map ; map = bitmap_get (GLODWORD(MOUSEFILE), GLODWORD(MOUSEGRAPH)) ; if (!map) { clip->x = clip->x2 = -1; clip->y = clip->y2 = -1; return 0; } gr_get_bbox (&last_mouse_bbox, 0, GLODWORD(MOUSEX), GLODWORD(MOUSEY), GLODWORD(MOUSEFLAGS), GLODWORD(MOUSEANGLE), GLODWORD(MOUSESIZE), GLODWORD(MOUSESIZE), map) ; *clip = last_mouse_bbox; return 1; } /* * FUNCTION : draw_mouse * * Draws the mouse graphic at screen * * PARAMS : * ptr Void pointer, used for compatibility with DLL-type objects * clip Clipping region * * RETURN VALUE : * None */ void draw_mouse (void * ptr, REGION * clip) { GRAPH * map ; int r ; REGION region; map = bitmap_get (GLODWORD(MOUSEFILE), GLODWORD(MOUSEGRAPH)) ; if (!map) return ; if (map->frames > 1) bitmap_animate(map) ; r = GLODWORD(MOUSEREGION) ; if (r < 0 || r > 31) r = 0 ; region = regions[r]; if (clip) region_union (®ion, clip); if (GLODWORD(MOUSEANGLE) || GLODWORD(MOUSESIZE) != 100) gr_rotated_blit (0, ®ion, GLODWORD(MOUSEX), GLODWORD(MOUSEY), GLODWORD(MOUSEFLAGS), GLODWORD(MOUSEANGLE), GLODWORD(MOUSESIZE), GLODWORD(MOUSESIZE), map) ; else gr_blit (0, ®ion, GLODWORD(MOUSEX), GLODWORD(MOUSEY), GLODWORD(MOUSEFLAGS), map) ; } /* * FUNCTION : gr_new_object * * Register a visible object with a Z coordinate to be drawn * by an user-defined function. This is intended for DLL usage. * * If your DLL does some screen operations, you should register * a draw-type hook or an object. Any access to the screen * surface outside those are invalid. * * PARAMS : * z Z value of the object to be drawn * info Pointer to the object information function * (fills bounding box, returns 1 if changed since last frame) * draw Pointer to the object drawing function * what User-defined parameter that will be passed to "draw" * * RETURN VALUE : * An integer ID that uniquely identifies the object, or -1 * if not enough memory */ int gr_new_object (int z, int (*info)(void *, REGION *), void (*draw)(void *, REGION *), void * what) { DLL_OBJECT * object ; object = (DLL_OBJECT *) malloc(sizeof(DLL_OBJECT)); if (object == NULL) return -1; object_list_dirty = 1; object->id = ++last_dll_object_id ; object->next = first_dll_object ; object->hidden = 0 ; object->x.info = info; object->x.draw = draw; object->x.what = what; object->x.z = z; object->x.bbox.x = -2; object->x.bbox.y = -2; object->x.bbox.x2= -2; object->x.bbox.y2= -2; object->x.id = object->id; first_dll_object = object; dll_object_count++; return object->id; } /* * FUNCTION : gr_hide_object * * Toggle the visibility of an object created by gr_new_object. * * PARAMS : * id ID returned by gr_new_object * hidden 1 to hide the object, 0 to show it again * * RETURN VALUE : * None */ void gr_hide_object (int id, int hidden) { DLL_OBJECT * object = first_dll_object ; object_list_dirty = 1; background_dirty = 1; while (object != NULL) { if (object->id == id) { object->hidden = hidden; break; } object = object->next; } } /* * FUNCTION : gr_destroy_object * * Unregister and remove a given object created by gr_new_object from memory * * PARAMS : * id ID returned by gr_new_object * * RETURN VALUE : * None */ void gr_destroy_object (int id) { DLL_OBJECT * object = first_dll_object; DLL_OBJECT * next; object_list_dirty = 1; if (object->id == id) { first_dll_object = object->next; if (object->x.bbox.x == -2) (*object->x.info)(object->x.what, &object->x.bbox); gr_mark_rect (object->x.bbox.x, object->x.bbox.y, object->x.bbox.x2 - object->x.bbox.x + 1, object->x.bbox.y2 - object->x.bbox.y + 1); free (object); dll_object_count--; } else while (object->next != NULL) { if (object->next->id == id) { next = object->next; object->next = next->next; if (next->x.bbox.x == -2) (*next->x.info)(next->x.what, &next->x.bbox); gr_mark_rect (next->x.bbox.x, next->x.bbox.y, next->x.bbox.x2 - next->x.bbox.x + 1, next->x.bbox.y2 - next->x.bbox.y + 1); free (next); dll_object_count--; break; } object = object->next; } } int compare_actions (const OBJECT * a1, const OBJECT * a2) { return (a1->z == a2->z ? a1->id - a2->id : a2->z - a1->z) ; // return (a2->z - a1->z) ; } void draw_mode7 (void * ptr, REGION * clip) { gr_mode7_draw ((int)ptr) ; } int info_mode7 (void * ptr, REGION * bbox) { gr_mode7_bbox((int)ptr, bbox); return 1; } int info_scroll (void * ptr, REGION * bbox) { gr_scroll_bbox((int)ptr, bbox); return 1; } void draw_scroll (void * ptr, REGION * clip) { gr_scroll_draw ((int)ptr, 1, clip) ; } int info_fli (void * ptr, REGION * clip) { if (current_fli) { clip->x = current_fli_x ; clip->x2 = current_fli_x + current_fli->bitmap->width ; clip->y = current_fli_y ; clip->y2 = current_fli_y + current_fli->bitmap->height ; return 1; } clip->x = clip->x2 = -1; clip->y = clip->y2 = -1; return 0; } void draw_fli (void * ptr, REGION * clip) { if ( (current_fli = flic_do_frame (current_fli)) ) gr_blit ( 0, clip, current_fli_x + current_fli->bitmap->width/2, current_fli_y + current_fli->bitmap->height/2, 0, current_fli->bitmap ) ; } /* * FUNCTION : gr_mark_rect * * Updates the given rectangle as a dirty zone at the 128-bits array * * PARAMS : * x, y Top-left coordinate * width Width in pixels * height Height in pixels * * RETURN VALUE : * None */ void gr_mark_rect (int x, int y, int width, int height) { int cx, cy; int w, h; w = scr_width / 16; h = scr_height / 8; for (cx = x/w*w ; cx < x+width ; cx += w) { for (cy = y/h*h ; cy < y+height ; cy += h) { if (cx/w < 16 && cx/w >= 0) zonearray[cx/w] |= (1 << (cy / h)); } } } /* * FUNCTION : gr_mark_instance * * Marks the zone where an instance was drawn last frame as dirty * * PARAMS : * r Pointer to the instance * * RETURN VALUE : * None */ void gr_mark_instance (INSTANCE * r) { int x, y, w, h; w = scr_width / 16; h = scr_height / 8; for (x = LOCDWORD(r, BOX_X0)/w*w ; x <= LOCDWORD(r, BOX_X1) ; x += w) { for (y = LOCDWORD(r, BOX_Y0)/h*h ; y <= LOCDWORD(r, BOX_Y1) ; y += h) { if (x/w < 16 && x/w >= 0) zonearray[x/w] |= (1 << (y / h)); } } } /* * FUNCTION : gr_mark_instances * * Updates a 128-bits array of dirty screen zones, using the current object array. * Changes to 1 all zone bits corresponding to all visible objects (or only to * objects changed since the last frame). * * PARAMS : * onlychanged If 1, mark as dirty only changed or moved visible instances * * RETURN VALUE : * None */ void gr_mark_instances (int onlychanged) { int i = 0, x, y; int w, h; /* GRAPH * map = 0; static REGION mouser = { 0, 0, 0, 0 } ; */ REGION region; w = scr_width / 16; h = scr_height / 8; /* Mark all visible instances and DLL objects */ for (i = 0 ; i < object_count ; i++) { if (object_list[i].draw == draw_instance) { INSTANCE * r = (INSTANCE *)(object_list[i].what); /* We assume r is visible, because it is at the array */ if (onlychanged) { if ((LOCDWORD(r,CHANGED) = instance_poschanged(r)) == 0) continue; /* Mark the previous position */ for (x = LOCDWORD(r, BOX_X0)/w*w ; x <= LOCDWORD(r, BOX_X1) ; x += w) { for (y = LOCDWORD(r, BOX_Y0)/h*h ; y <= LOCDWORD(r, BOX_Y1) ; y += h) { if (x/w < 16 && x/w >= 0) zonearray[x/w] |= (1 << (y / h)); } } /* Update and mark the new position */ instance_posupdate(r); instance_update_bbox (r); for (x = LOCDWORD(r, BOX_X0)/w*w ; x <= LOCDWORD(r, BOX_X1) ; x += w) { for (y = LOCDWORD(r, BOX_Y0)/h*h ; y <= LOCDWORD(r, BOX_Y1) ; y += h) { if (x/w < 16 && x/w >= 0) zonearray[x/w] |= (1 << (y / h)); } } } else { /* Mark the current position (next frame, the next will be marked */ for (x = LOCDWORD(r, BOX_X0)/w*w ; x <= LOCDWORD(r, BOX_X1) ; x += w) { for (y = LOCDWORD(r, BOX_Y0)/h*h ; y <= LOCDWORD(r, BOX_Y1) ; y += h) { if (x/w < 16 && x/w >= 0) zonearray[x/w] |= (1 << (y / h)); } } /* Update the bounding box */ instance_update_bbox (r); } } else { region = object_list[i].bbox; object_list[i].changed = (*object_list[i].info)(object_list[i].what, &object_list[i].bbox); /* Mark previous object position */ if (!onlychanged || object_list[i].changed) { for (x = region.x/w*w ; x <= region.x2 ; x += w) for (y = region.y/h*h ; y <= region.y2 ; y += h) { if (x/w < 16 && x/w >= 0) zonearray[x/w] |= (1 << (y / h)); } } /* Mark updated object position */ if (object_list[i].changed) { for (x = object_list[i].bbox.x/w*w ; x <= object_list[i].bbox.x2 ; x += w) for (y = object_list[i].bbox.y/h*h ; y <= object_list[i].bbox.y2 ; y += h) { if (x/w < 16 && x/w >= 0) zonearray[x/w] |= (1 << (y / h)); } } } } /* Mark the mouse if (GLODWORD(MOUSEGRAPH)) map = bitmap_get (GLODWORD(MOUSEFILE), GLODWORD(MOUSEGRAPH)) ; if (map) { r = GLODWORD(MOUSEREGION) ; if (r < 0 || r > 31) r = 0 ; for (x = mouser.x/w*w ; x <= mouser.x2 ; x += w) { for (y = mouser.y/h*h ; y <= mouser.y2 ; y += h) { if (x/w < 16 && x/w >= 0) zonearray[x/w] |= (1 << (y/h)); } } gr_get_bbox (&mouser, ®ions[r], GLODWORD(MOUSEX), GLODWORD(MOUSEY), GLODWORD(MOUSEFLAGS), GLODWORD(MOUSEANGLE), GLODWORD(MOUSESIZE), GLODWORD(MOUSESIZE), map) ; } */ } /* * FUNCTION : gr_mark_rects * * Given a 128-bits array of dirty screen zones, create an array of SDL_Rect regions * * PARAMS : * zonearray Pointer to a 128-bits array with dirty screen zones = 1 * rects Pointer to a 128 REGION array * * RETURN VALUE : * Number of rects filled */ int gr_mark_rects (REGION * rects) { int count = 0, x, y; int w, h, cw, ch, x2; w = scr_width / 16; h = scr_height / 8; for (x = 0 ; x < 16 ; x++) { for (y = 0 ; y < 8 ; y++) { if (zonearray[x] & (1 << y)) { zonearray[x] &= ~(1 << y); for (cw = 1 ; x+cw < 16 ; cw++) { if (zonearray[x+cw] & (1 << y)) zonearray[x+cw] &= ~(1 << y); else break; } for (ch = 1 ; y+ch < 8 ; ch++) { /* Si hay algun hueco, entonces corto aca, ahora vuelve a entrar y esto entra en otra recta */ for (x2 = x ; x2 < x+cw ; x2++) if (!(zonearray[x2] & (1 << (y+ch)))) break; if (x2 < x+cw) break; for (x2 = x ; x2 < x+cw ; x2++) zonearray[x2] &= ~(1 << (y+ch)); } rects[count].x = w*x; rects[count].y = h*y; rects[count].x2 = w*cw + rects[count].x - 1 ; rects[count].y2 = h*ch + rects[count].y - 1 ; count++; } } } return count; } /* * FUNCTION : gr_draw_screen * * Draw the current screen, using the given restore_type / dump_type parameters * * PARAMS : * dest Destination graphic (MUST have a correct size) * * restore_type * -1 No background restore * 0 Partial (old process bounding box) background restore * 1 Full background restore * * dump_type * 0 Partial (new process bounding box) drawing * 1 Full drawing * * RETURN VALUE : * None */ void gr_draw_screen (GRAPH * dest, int restore_type, int dump_type) { INSTANCE * i ; int a, n ; DLL_OBJECT * object ; GRAPH * oldscrbitmap = scrbitmap; scrbitmap = dest; /* Create or update the object list */ if (object_list_dirty) { gprof_begin("Listing objects"); object_count = 0; i = first_instance ; while (i) { if ((LOCDWORD(i,GRAPHID) || LOCDWORD(i,XGRAPH)) && LOCDWORD(i,CTYPE) == 0 && ((LOCDWORD(i,STATUS) & ~STATUS_WAITING_MASK) == STATUS_RUNNING || (LOCDWORD(i,STATUS) & ~STATUS_WAITING_MASK) == STATUS_FROZEN)) { if (object_list_allocated == object_count) { object_list_allocated += 16 ; object_list = (OBJECT *) realloc (object_list, sizeof(OBJECT) * object_list_allocated) ; assert (object_list) ; } object_list[object_count].z = LOCDWORD(i,COORDZ) ; object_list[object_count].draw = draw_instance ; object_list[object_count].what = i ; object_list[object_count].bbox.x = -2 ; object_list[object_count].bbox.x2 = -2 ; object_list[object_count].bbox.y = -2 ; object_list[object_count].bbox.y2 = -2 ; object_count++ ; } i = i->next ; } /* Aade los objetos creados por DLLs */ if (object_list_allocated <= object_count+dll_object_count+32) { object_list_allocated = ((object_count+dll_object_count+32) & ~31) + 32 ; object_list = (OBJECT *) realloc (object_list, sizeof(OBJECT) * object_list_allocated) ; assert (object_list) ; } for (object = first_dll_object ; object != NULL ; object = object->next) { if (object->hidden == 0) object_list[object_count++] = object->x ; } /* Aade las acciones fijas internas, como dibujar textos */ if (GLODWORD(MOUSEGRAPH)) { object_list[object_count].z = GLODWORD(MOUSEZ) ; object_list[object_count].info = info_mouse; object_list[object_count].draw = draw_mouse ; object_list[object_count].bbox = last_mouse_bbox; object_count++ ; } if (current_fli) { object_list[object_count].z = 0 ; object_list[object_count].info = info_fli; object_list[object_count].draw = draw_fli ; object_list[object_count].bbox.x = -2 ; object_list[object_count].bbox.x2 = -2 ; object_list[object_count].bbox.y = -2 ; object_list[object_count].bbox.y2 = -2 ; object_count++ ; } /* Aade los planos de scroll que haya activos */ for (n = 0 ; n < 10 ; n++) { if (gr_scroll_active(n)) { object_list[object_count].z = *(int *)(&GLODWORD(SCROLLS) + 20*n + 4) ; object_list[object_count].draw = draw_scroll ; object_list[object_count].info = info_scroll ; object_list[object_count].what = (void *)n ; object_list[object_count].bbox.x = -2 ; object_list[object_count].bbox.x2 = -2 ; object_list[object_count].bbox.y = -2 ; object_list[object_count].bbox.y2 = -2 ; object_count++ ; } } for (n = 0 ; n < 10 ; n++) { if (gr_mode7_active(n)) { object_list[object_count].z = *(int *)(&GLODWORD(M7STRUCTS) + 10*n + 5) ; object_list[object_count].draw = draw_mode7 ; object_list[object_count].info = info_mode7 ; object_list[object_count].what = (void *)n ; object_list[object_count].bbox.x = -2 ; object_list[object_count].bbox.x2 = -2 ; object_list[object_count].bbox.y = -2 ; object_list[object_count].bbox.y2 = -2 ; object_count++ ; } } /* Ordena por Z la lista y ejecuta cada accin */ qsort (object_list, object_count, sizeof(OBJECT), compare_actions) ; object_list_dirty = 0; object_list_unsorted = 0; gprof_end("Listing objects"); } else if (object_list_unsorted) { /* Update Z value of instances */ for (a = 0 ; a < object_count ; a++) { if (object_list[a].draw == draw_instance) { object_list[a].z = LOCDWORD(((INSTANCE *)object_list[a].what), COORDZ); } } qsort (object_list, object_count, sizeof(OBJECT), compare_actions) ; object_list_unsorted = 0; } else { /* Check for unsorted entries, anyway */ for (a = 0 ; a < object_count ; a++) { if (a > 0 && object_list[a].z > object_list[a-1].z) { qsort (object_list, object_count, sizeof(OBJECT), compare_actions) ; break; } } } /* Restore the background */ gprof_begin("Background"); updaterects_count = 1; updaterects[0].x = 0; updaterects[0].y = 0; updaterects[0].x2 = scr_width-1; updaterects[0].y2 = scr_height-1; if (enable_16bits && GLODWORD(FADING)) restore_type = -1; if (!background_is_black) { if (enable_16bits && background_8bits_used) background_dirty = 1; else if (background->modified) background_dirty = 1; } if (restore_type == 1 || background_dirty) { /* COMPLETE_RESTORE */ if (background_is_black) { gr_clear (scrbitmap) ; } else if (enable_16bits && background_8bits_used) { gr_blit (scrbitmap, NULL, 0, 0, B_NOCOLORKEY, background_8bits); } else { gr_blit (scrbitmap, NULL, 0, 0, B_NOCOLORKEY, background); } if (restore_type != 1) { for (a = 0 ; a < object_count ; a++) if (object_list[a].draw != draw_instance) (*object_list[a].info)(object_list[a].what, &object_list[a].bbox); else instance_update_bbox(object_list[a].what); } /* Reset the zone-to-update array for the next frame */ memset (zonearray, 0, 128/8); } else if (restore_type == 0) { /* PARTIAL_RESTORE */ gr_mark_instances (dump_type == 0); n = updaterects_count = gr_mark_rects (updaterects); /* Reset the zone-to-update array for the next frame */ memset (zonearray, 0, 128/8); gr_setcolor (0); for (a = 0 ; a < n ; a++) { if (background_is_black) gr_box (dest, &updaterects[a], 0, 0, 9999, 9999) ; else if (enable_16bits && background_8bits_used) gr_blit (scrbitmap, &updaterects[a], 0, 0, B_NOCOLORKEY, background_8bits); else gr_blit (scrbitmap, &updaterects[a], 0, 0, B_NOCOLORKEY, background); } } gprof_end ("Background"); /* Dump the objects */ gprof_begin ("Objects"); if (dump_type == 0 && !background_dirty) { /* Dump only changed instances and other objects */ for (n = 0 ; n < updaterects_count ; n++) { for (a = 0 ; a < object_count ; a++) { if (object_list[a].draw == draw_instance) { INSTANCE * i = (INSTANCE *)object_list[a].what; if (LOCDWORD(i,BOX_X1) < updaterects[n].x || LOCDWORD(i,BOX_X0) > updaterects[n].x2 || LOCDWORD(i,BOX_Y1) < updaterects[n].y || LOCDWORD(i,BOX_Y0) > updaterects[n].y2) continue; } else { if (object_list[a].bbox.x2 < updaterects[n].x || object_list[a].bbox.x > updaterects[n].x2 || object_list[a].bbox.y2 < updaterects[n].y || object_list[a].bbox.y > updaterects[n].y2) continue; } (*object_list[a].draw) (object_list[a].what, &updaterects[n]) ; } } } else { /* Dump everything */ for (a = 0 ; a < object_count ; a++) { (*object_list[a].draw) (object_list[a].what, 0) ; } } background_dirty = 0; gprof_end ("Objects"); scrbitmap = oldscrbitmap; } void gr_draw_frame () { if (jump) { do_events() ; /* Recoge teclas y dems */ current_jump++ ; return ; } /* Actualiza la paleta */ if (palette_changed) gr_refresh_palette() ; /* Bloquea el bitmap de pantalla */ if (gr_lock_screen() < 0) return ; if ( !show_console ) { /* Dibuja la pantalla */ gr_draw_screen (scrbitmap, GLODWORD(RESTORETYPE), GLODWORD(DUMPTYPE)); /* Fading */ if (fade_on != 0) { gr_fade_step() ; background_dirty = 1; } } /* Visualiza la consola */ gr_con_show(show_console) ; gr_con_draw() ; if (show_profile) gprof_draw (scrbitmap); /* Actualiza la paleta y la pantalla */ gr_unlock_screen() ; do_events() ; /* Recoge teclas y dems */ } /* FUncin de inicializacin de la librera grfica */ static int screen_locked = 0 ; int gr_lock_screen() { if (screen_locked) return 1 ; screen_locked = 1 ; if (SDL_LockSurface (screen) < 0) return -1 ; if ( (!enable_scale && scale_mode == SCALE_NONE) && !double_buffer) { if (!scrbitmap) { scrbitmap = bitmap_new (0, screen->w, screen->h, enable_16bits ? 16:8, 1) ; bitmap_add_cpoint (scrbitmap, 0, 0) ; free (scrbitmap->data) ; } scrbitmap_is_fake = 1 ; scrbitmap->data = screen->pixels ; scrbitmap->height = screen->h ; if (enable_16bits) { scrbitmap->width = screen->w ; scrbitmap->pitch = screen->pitch ; scrbitmap->depth = 16 ; } else { scrbitmap->width = screen->w ; scrbitmap->pitch = screen->pitch ; scrbitmap->depth = 8 ; } } else { scrbitmap_is_fake = 0 ; if (!scrbitmap) { if (enable_scale || scale_mode != SCALE_NONE) scrbitmap = bitmap_new (0, screen->w/2, screen->h/2, enable_16bits ? 16:8, 1) ; else scrbitmap = bitmap_new (0, screen->w, screen->h, enable_16bits ? 16:8, 1) ; bitmap_add_cpoint (scrbitmap, 0, 0) ; } } return 1 ; } void gr_unlock_screen() { int a ; GRAPH * scr; if (!screen_locked) return ; screen_locked = 0 ; if (screen->pixels == 0) return ; if (enable_scale || scale_mode != SCALE_NONE) { int aux_scale_mode; if (enable_scale || GLODWORD(SCALE_MODE) != SCALE_NONE ) { scale_mode = GLODWORD(SCALE_MODE); } aux_scale_mode = (scale_mode != SCALE_NONE) ? scale_mode : SCALE_SCALE2X; if (scrbitmap->depth == 8) { Uint8 * original; Uint16 * extra; int length = scrbitmap->width * scrbitmap->height, n; if (scrbitmap_extra == NULL || scrbitmap_extra->width != scrbitmap->width || scrbitmap_extra->height != scrbitmap->height) { if (scrbitmap_extra) bitmap_destroy (scrbitmap_extra); scrbitmap_extra = bitmap_new (0, scrbitmap->width, scrbitmap->height, 16, 1); } original = scrbitmap->data; extra = scrbitmap_extra->data; for (n = 0 ; n < 256 ; n++) colorequiv[n] = SDL_MapRGB (screen->format,palette[n].r, palette[n].g, palette[n].b) ; while (length--) *extra++ = colorequiv[*original++]; scr=scrbitmap_extra; } else { scr=scrbitmap; } /* Esto podria ir en un modulo aparte */ switch ( aux_scale_mode ) { case SCALE_SCALE2X: scale2x (scr->data, scr->pitch, screen->pixels, screen->pitch, scr->width, scr->height); break; case SCALE_HQ2X: hq2x (scr->data, scr->pitch, screen->pixels, screen->pitch, scr->width, scr->height); break; case SCALE_SCANLINE2X: scanline2x (scr->data, scr->pitch, screen->pixels, screen->pitch, scr->width, scr->height); break; case SCALE_NOFILTER: scale_normal2x (scr->data, scr->pitch, screen->pixels, screen->pitch, scr->width, scr->height); break; case SCALE_NONE: /* No usado */ break; } SDL_UnlockSurface (screen) ; SDL_UpdateRect (screen, 0, 0, 0, 0) ; } else if (scrbitmap_is_fake) { SDL_UnlockSurface (screen) ; scrbitmap->data = 0 ; if (double_buffer) SDL_Flip(screen) ; else { if (updaterects_count == 0) /* Nothing to update! */ ; else { SDL_Rect rects[128]; int i; for (i = 0 ; i < updaterects_count ; i++) { rects[i].x = updaterects[i].x; rects[i].y = updaterects[i].y; rects[i].w = updaterects[i].x2 - rects[i].x + 1; rects[i].h = updaterects[i].y2 - rects[i].y + 1; } SDL_UpdateRects (screen, updaterects_count, rects) ; } SDL_UnlockSurface (screen) ; SDL_UpdateRect (screen, 0, 0, 0, 0) ; } } else { if (enable_16bits) { Uint16 * ptr, * orig ; orig = scrbitmap->data ; ptr = screen->pixels ; if (enable_filtering) { int n; for (a = 0 ; a < screen->h ; a++) { ptr = (Uint16 *)screen->pixels + screen->pitch * a / 2 ; for (n = 0 ; n < screen->w-1 ; n++) { *ptr = colorghost[orig[0]] + colorghost[orig[1]] ; ptr++, orig++ ; } *ptr++ = *orig++ ; } } else { for (a = 0 ; a < screen->h ; a++) { memcpy (ptr, orig, screen->w * 2) ; orig += scrbitmap->pitch / 2 ; ptr += screen->pitch / 2 ; } } } else { Uint8 * ptr, * orig ; orig = scrbitmap->data ; ptr = screen->pixels ; for (a = 0 ; a < screen->h ; a++) { memcpy (ptr, orig, screen->w) ; orig += scrbitmap->pitch ; ptr += screen->pitch ; } } SDL_UnlockSurface (screen) ; SDL_UpdateRect (screen, 0, 0, 0, 0) ; } } void gr_init(int width, int height) { int n ; int sdl_flags = 0; SDL_Surface *ico = NULL; if (globaldata) { /* Mode depth change! Background is no longer usable */ enable_16bits = (GLODWORD(GRAPH_MODE) & MODE_16BITS ) ? 1 : 0 ; enable_scale = (GLODWORD(GRAPH_MODE) & MODE_2XSCALE ) ? 1 : 0 ; full_screen = (GLODWORD(GRAPH_MODE) & MODE_FULLSCREEN ) ? 1 : 0 ; double_buffer = (GLODWORD(GRAPH_MODE) & MODE_DOUBLEBUFFER ) ? 1 : 0 ; hardware_scr = (GLODWORD(GRAPH_MODE) & MODE_HARDWARE ) ? 1 : 0 ; grab_input = (GLODWORD(GRAPH_MODE) & MODE_MODAL ) ? 1 : 0 ; frameless = (GLODWORD(GRAPH_MODE) & MODE_FRAMELESS ) ? 1 : 0 ; full_screen |= GLODWORD(FULL_SCREEN); scale_mode = GLODWORD(SCALE_MODE); } if (background) bitmap_destroy (background); if (background_8bits) bitmap_destroy (background_8bits); background = NULL; background_8bits = NULL; background_8bits_used = 0; /* Inicializa el modo grfico */ if (scr_initialized && scrbitmap) { if (scrbitmap_is_fake) free (scrbitmap) ; else bitmap_destroy (scrbitmap) ; scrbitmap = NULL ; } // Aqui las llamadas a SDL_WM funcs... SDL_WM_SetCaption(apptitle,"") ; // Icono... // Necesitamos crar una surface a partir de un MAP generico de 16x16... if (icono) { if (icono->depth == 8) { ico = SDL_CreateRGBSurfaceFrom(icono->data,32,32,8,32,0x00,0x00,0x00,0x00) ; SDL_SetPalette(ico, SDL_LOGPAL , palette, 0, 256); } else { ico = SDL_CreateRGBSurfaceFrom(icono->data,32,32,16,64,0xF800,0x07E0,0x001F,0x00) ; } SDL_SetColorKey(ico, SDL_SRCCOLORKEY, SDL_MapRGB(ico->format,0,0,0)) ; SDL_WM_SetIcon(ico, NULL); SDL_FreeSurface(ico) ; } if (width <= 400 && (enable_scale || scale_mode != SCALE_NONE)) { width *= 2; height *= 2; } else { enable_scale = 0 ; scale_mode = SCALE_NONE; } /* Setup the SDL Video Mode */ sdl_flags = SDL_HWPALETTE; if (double_buffer) sdl_flags |= SDL_DOUBLEBUF; if (full_screen) sdl_flags |= SDL_FULLSCREEN; if (frameless) sdl_flags |= SDL_NOFRAME; if (hardware_scr) sdl_flags |= SDL_HWSURFACE; else sdl_flags |= SDL_SWSURFACE; if (screen) SDL_FreeSurface(screen) ; screen = SDL_SetVideoMode (width, height,((enable_16bits || (enable_scale || scale_mode != SCALE_NONE)) ? 16:8), sdl_flags); if (grab_input) SDL_WM_GrabInput(SDL_GRAB_ON) ; else SDL_WM_GrabInput(SDL_GRAB_OFF) ; if ((enable_scale || scale_mode != SCALE_NONE)) { width /= 2; height /= 2; } if (!screen) { gr_con_printf ("Modo grafico %dx%d no disponible: %s\n", scr_width, scr_height, SDL_GetError()) ; do_exit(1); } if (enable_16bits) { if (screen->format->BytesPerPixel != 2) { printf ("Profundidad de color de 16 bits no soportada\n") ; do_exit(1) ; } for (n = 0 ; n < 65536 ; n++) { colorghost[n] = (((n & screen->format->Rmask) >> 1) & screen->format->Rmask) + (((n & screen->format->Gmask) >> 1) & screen->format->Gmask) + (((n & screen->format->Bmask) >> 1) & screen->format->Bmask) ; } if (!scr_initialized) { scr_initialized = 1; /* Para evitar reentradas dentro de la funcion bitmap_16bits_conversion */ bitmap_16bits_conversion(); } } for (n = 0 ; n < 256 ; n++) colorequiv[n] = SDL_MapRGB (screen->format,palette[n].r, palette[n].g, palette[n].b) ; if (!scr_initialized) scr_initialized = 1 ; if (report_graphics) gr_con_printf ("[GRAPH] Graphic mode started - %dx%d - %s\n", width, height, enable_16bits ? "16 bits":"8 bits") ; if (enable_16bits) { Uint32 m, Rbits = 0, Gbits = 0, Bbits = 0 ; for (m = screen->format->Rmask; m; m >>= 1) Rbits += (m&1) ; for (m = screen->format->Gmask; m; m >>= 1) Gbits += (m&1) ; for (m = screen->format->Bmask; m; m >>= 1) Bbits += (m&1) ; if (report_graphics) gr_con_printf ( "[GRAPH] RGB %d%d%d: " "Masks R=0x%04X G=0x%04X B=0x%04X\n", Rbits, Gbits, Bbits, screen->format->Rmask, screen->format->Gmask, screen->format->Bmask) ; } if (report_graphics && (screen->flags & SDL_DOUBLEBUF)) gr_con_printf ("[GRAPH] Doble buffer activo\n") ; SDL_ShowCursor (0) ; regions[0].x = 0 ; regions[0].y = 0 ; regions[0].x2 = width-1 ; regions[0].y2 = height-1 ; /* Bitmaps de fondo */ if (!background || scr_width != width || scr_height != height) { if (background) bitmap_destroy (background); background = bitmap_new (0, width, height, enable_16bits ? 16:8, 1) ; assert (background) ; gr_clear (background) ; bitmap_add_cpoint (background, 0, 0) ; background_is_black = 1 ; } if (enable_16bits) { if (!background_8bits || scr_width != width || scr_height != height) { if (background_8bits) bitmap_destroy (background_8bits) ; background_8bits = bitmap_new (0, width, height, 8, 1) ; assert (background_8bits) ; gr_clear (background_8bits) ; bitmap_add_cpoint (background_8bits, 0, 0) ; background_8bits_used = 0 ; } } scr_width = width ; scr_height = height ; /* Paleta de colores por defecto */ if (!palette_loaded) { for (n = 0 ; n < 256 ; n++) gr_set_rgb (n, default_palette[n*3]/4, default_palette[n*3+1]/4, default_palette[n*3+2]/4) ; } gr_refresh_palette() ; gr_make_trans_table(); next_frame_ticks = SDL_GetTicks() + frame_ms ; scr_initialized = 2 ; memset (zonearray, 255, sizeof(zonearray)); } #ifdef WIN32 #include #endif /* * FUNCTION : gr_error * * Display an error if something with the graphics library did not work and * force exit * * PARAMS : (VARARGS) * fmt printf like base string to show * * RETURN VALUE : * No value */ void gr_error (const char *fmt, ...) { char text[4000] ; va_list ap; va_start(ap, fmt); vsprintf(text, fmt, ap); va_end(ap); /* #ifdef WIN32 MessageBox (0, text, "FXI", MB_OK | MB_ICONERROR); #elif defined(TARGET_BEOS) if(!scr_initialized) fprintf(stderr, "%s\n", text); else { if(full_screen == 0) be_alert(text) ; else { GLODWORD(GRAPH_MODE) ^= MODE_FULLSCREEN; gr_init (scr_width, scr_height); be_alert(text) ; } } #else */ fprintf (stderr, "%s\n", text) ; /* #endif */ do_exit (1) ; } Fenix/fxi/src/g_profiler.c0000644000000000000000000003576610607526756014535 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : g_profiler.c * DESCRIPTION : Profiler module * * HISTORY: 0.81 - First version */ #include #include #ifdef TARGET_BEOS #include #else #include #endif #include #include #include typedef struct { const char * name; int valid; int active; int called; long start; long accumulator; long children; int parent; int parent_count; } PROFILE_SAMPLE; typedef struct { const char * name; int valid; double total; double average; double min; double max; double last; } PROFILE_HISTORY; static PROFILE_SAMPLE * samples = NULL; static PROFILE_HISTORY * history = NULL; static long gprof_frame_start = 0; static long gprof_frame_count = 0; static int gprof_allocated = 0; static int gprof_sample_count = 0; static int gprof_history_count = 0; static int gprof_active = 0; static int gprof_activate = 1; /* * FUNCTION : gprof_allocate * * Internal function used to allocate more profile samples. The number * of profile entries has no internal limit. * * PARAMS : * count New value for gprof_allocated * * RETURN VALUE : * None */ static int gprof_allocate (int count) { int i; assert (count > gprof_allocated); /* Alloc more dynamic memory */ samples = (PROFILE_SAMPLE *) realloc (samples, count * sizeof(PROFILE_SAMPLE)); history = (PROFILE_HISTORY *) realloc (history, count * sizeof(PROFILE_HISTORY)); if (samples == NULL || history == NULL) { gr_error ("gprof_allocate: sin memoria"); samples = NULL; history = NULL; return 0; } /* Initialize the new slots */ for (i = gprof_sample_count ; i < gprof_allocated ; i++) samples[i].valid = 0; for (i = gprof_history_count ; i < gprof_allocated ; i++) history[i].valid = 0; gprof_allocated = count; return 1; } /* * FUNCTION : gprof_compare * * Internal function used to sort the list of sample history. * A sample is drawn first if * * - Both are top-level samples and a < b * - Both are children of the same parent and a.average < b.average * - The parent of a should be drawn before b or its parent * * PARAMS : * a Pointer to a sample number * b Pointer to a sample number * * RETURN VALUE : * < 1 if sample a should be drawn first * 0 if it does not matter * > 1 if sample b should be drawn first */ static int gprof_compare (const int * a, const int * b) { if (samples[*b].parent == samples[*a].parent) { int timediff; /* Both are top level */ if (samples[*a].parent == -1) return *a - *b ; /* Children of the same parent */ timediff = (int)((history[*a].average - history[*b].average) * 100.0); if (timediff == 0) return strcmp (samples[*a].name, samples[*b].name); return -timediff; } /* Neither are top-level */ if (samples[*b].parent != -1 && samples[*a].parent != -1) { return samples[*a].parent - samples[*b].parent; } /* b is top level, a is not */ if (samples[*a].parent != -1) { if (*b == samples[*a].parent) return 1; return samples[*a].parent - *b; } /* a is top level, b is not */ if (samples[*b].parent != -1) { if (*a == samples[*b].parent) return -1; return *a - samples[*b].parent; } assert (!"Not reached"); return 0; } /* * FUNCTION : gprof_store * * Internal function used to store a sample into the history * * PARAMS : * sample Pointer to the sample object * total Time elapsed after frame start * * RETURN VALUE : * None */ static void gprof_store (int i, int total) { double value; PROFILE_SAMPLE * sample = &samples[i]; if (!gprof_active) return; assert (total > 0); /* Get a % */ assert (sample->accumulator >= 0); value = sample->accumulator * 100.0 / total; /* Initialize history */ if (!history[i].valid) { history[i].valid = 1; history[i].name = sample->name; history[i].total = 0; } /* Update history */ if (history[i].total == 0) { history[i].total = value; history[i].max = value; history[i].min = value; } else { history[i].total += value; if (history[i].min > value) history[i].min = value; if (history[i].max < value) history[i].max = value; } history[i].last = value; history[i].average = (double)history[i].total / gprof_frame_count; } /* * FUNCTION : gprof_init * * Initialize the profiler. This should be called at program startup once. * * PARAMS : * None * * RETURN VALUE : * None */ void gprof_init() { int i; samples = (PROFILE_SAMPLE *) malloc(32 * sizeof(PROFILE_SAMPLE)); history = (PROFILE_HISTORY *) malloc(32 * sizeof(PROFILE_HISTORY)); if (samples == NULL || history == NULL) { gr_error ("gprof_init: sin memoria"); return; } gprof_allocated = 32; for (i = 0 ; i < gprof_allocated ; i++) { samples[i].valid = 0; history[i].valid = 0; } } /* * FUNCTION : gprof_begin * * Starts the timing of a program block * * PARAMS : * name Name of the block (it must the same pointer each time, * use a constant string or a constant pointer) * * RETURN VALUE : * None */ void gprof_begin (const char * name) { static int last_entry = -1; int i, available = -1; if (!gprof_active) return; /* Search for already-existing profile */ for (i = 0 ; i < gprof_sample_count ; i++) { if (samples[i].valid) { if (strcmp(samples[i].name, name) == 0) { if (samples[i].active) { // gr_con_printf ("gprof_begin: bloque %s ya activo", name); return; } samples[i].called++; samples[i].active++; samples[i].start = SDL_GetTicks(); last_entry = i; return; } } else if (available == -1) { available = i; } } /* No available slot */ if (available == -1) { if (gprof_sample_count == gprof_allocated) { if (!gprof_allocate (gprof_allocated + 32)) return; } available = gprof_sample_count++; } samples[available].name = name; samples[available].valid = 1; samples[available].parent_count = 0; samples[available].children = 0; samples[available].start = SDL_GetTicks(); samples[available].active = 1; samples[available].parent = -1; samples[available].called = 1; /* Count parents (any active sample) */ for (i = 0 ; i < gprof_sample_count ; i++) { if (samples[i].active && i != available) { samples[available].parent_count++; if (samples[available].parent_count == 1) samples[available].parent = i; else if (samples[samples[available].parent].accumulator > samples[i].accumulator) samples[available].parent = i; } } } /* * FUNCTION : gprof_end * * End the timing of a program block * * PARAMS : * name Name of the block (same pointer used in gprof_start!) * * RETURN VALUE : * None */ void gprof_end (const char * name) { int i; long now; long elapsed; if (!gprof_active) return; /* Search the profile */ for (i = 0 ; i < gprof_sample_count ; i++) { if (samples[i].valid && strcmp (samples[i].name, name) == 0) { if (samples[i].active < 1) { // gr_con_printf ("gprof_end: bloque %s inactivo", name); return; } break; } } if (i == gprof_sample_count) { // gr_con_printf ("gprof_end: no se encontr el bloque %s", name); return; } /* Stop the timing */ now = SDL_GetTicks(); elapsed = now - samples[i].start; /* TODO: Fix this assert */ //assert (samples[i].children <= elapsed); samples[i].active--; samples[i].accumulator = elapsed ; /* - samples[i].children? */ /* Search for parents */ if (samples[i].parent != -1) { int parent = samples[i].parent; samples[parent].children += elapsed; } } /* * FUNCTION : gprof_frame * * Call this function at frame start time. It will close any opened * profile samples and update the profiler history. * * PARAMS : * None * * RETURN VALUE : * None */ void gprof_frame() { int i; int count; int min_parent_count; long now; long elapsed; if (gprof_activate != gprof_active) { if (gprof_activate != 0) { gprof_active = 1; if (gprof_activate < 0) gprof_activate++; } else gprof_active = 0; } if (!gprof_active) return; /* Close any open samples, childs first */ do { min_parent_count = -1; count = 0; /* Count active samples and find those with less parents */ for (i = 0 ; i < gprof_sample_count ; i++) { if (samples[i].valid && samples[i].active) { if (min_parent_count < samples[i].parent_count) min_parent_count = samples[i].parent_count; count++; } } if (min_parent_count == -1) break; /* Stop found samples */ for (i = 0 ; i < gprof_sample_count ; i++) { if (samples[i].valid && samples[i].active) { if (min_parent_count == samples[i].parent_count) { gprof_end (samples[i].name); count--; } } } } while (count > 0); /* First frame? */ if (gprof_frame_count == 0) { for (i = 0 ; i < gprof_sample_count ; i++) { samples[i].called = 0; samples[i].accumulator = 0; samples[i].children = 0; } gprof_frame_start = SDL_GetTicks(); gprof_frame_count++; return; } /* if (gprof_activate != gprof_active) { if (gprof_activate != 0) { gprof_active = 1; if (gprof_activate < 0) gprof_activate++; } else gprof_active = 0; } if (!gprof_active) return; */ /* Update frame information */ now = SDL_GetTicks(); elapsed = now - gprof_frame_start; if (elapsed < 1) return; gprof_frame_start = now; gprof_frame_count++; /* Store sample history */ for (i = 0 ; i < gprof_sample_count ; i++) { if (samples[i].called) { gprof_store (i, elapsed); samples[i].called = 0; samples[i].accumulator = 0; samples[i].children = 0; } } } /* * FUNCTION : gprof_dump * * Dumps profiler history to a text file (in append mode) * * PARAMS : * filename Name of the file * * RETURN VALUE : * None */ void gprof_dump (const char * filename) { int i = 0; int n; int parents_of = -1; FILE * f = fopen (filename, "a"); if (f == NULL) return; fputs ("\n", f); fputs ("-------------------------------------------------------\n", f); fputs (" Avg : Min : Max : Last : Profile name \n", f); fputs ("-------------------------------------------------------\n", f); for (;;) { if (i == gprof_sample_count) { if (parents_of == -1) break; i = parents_of; parents_of = samples[i].parent; i++; continue; } if (samples[i].parent != parents_of) { i++; continue; } /* Write the history information */ fprintf (f, "%6.02f :%6.02f :%6.02f :%6.02f : ", history[i].average, history[i].min, history[i].max, history[i].last); for (n = 0 ; n < samples[i].parent_count ; n++) fputs (" ", f); fputs (samples[i].name, f); fputs ("\n", f); /* Now, search children */ parents_of = i; i = 0; } fputs ("-------------------------------------------------------\n", f); fclose (f); } /* * FUNCTION : gprof_reset * * Reset the profile history * * PARAMS : * None * * RETURN VALUE : * None */ void gprof_reset () { int i; for (i = 0 ; i < gprof_sample_count ; i++) history[i].valid = 0; gprof_frame_count = 0; if (!gprof_active) { gprof_activate = -2; } } /* * FUNCTION : gprof_draw * * Draw the current profile history to a bitmap * * PARAMS : * dest Destination graphic * * RETURN VALUE : * None */ #define CHARWIDTH 6 #define CHARHEIGHT 8 /* This macro is used to find worthless samples. A worthless sample is one * that could be ignored if there is not enough screen space the full list */ #define ISWORTHLESS(i) (samples[i].parent != -1) void gprof_draw (GRAPH * dest) { int x, y; int i, c; int n; char buffer[100]; int count; int count_worthless = 0; int show_worthless = 0; int * list; if (!gprof_active) return; /* Count total history lines */ for (i = count = count_worthless = 0 ; i < gprof_sample_count ; i++) { if (history[i].valid) { count++; if (ISWORTHLESS(i)) count_worthless++; } } if (count == 0) return; gprof_begin ("Profiler"); x = (dest->width - 50*CHARWIDTH)/2 ; y = 5; /* Sort the list */ list = malloc(sizeof(int) * count); if (list == NULL) return; for (i = c = 0 ; i < gprof_sample_count ; i++) { if (history[i].valid) list[c++] = i; } assert (c == count); qsort (list, count, sizeof(int), gprof_compare); show_worthless = (dest->height/CHARHEIGHT - 7) - (count - count_worthless); /* Draw the header */ gr_sys_color (0xFFFFFF, 0x404040); gr_sys_puts (dest, x, y+=CHARHEIGHT, "\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02",50); gr_sys_puts (dest, x, y+=CHARHEIGHT, " Avg Min Max Last : Profile name ",50); gr_sys_puts (dest, x, y+=CHARHEIGHT, "\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02",50); /* Draw the profiler information box */ for (c = 0 ; c < count ; c++) { i = list[c]; if (!history[i].valid) continue; if (show_worthless > 0 || !ISWORTHLESS(i)) { if (ISWORTHLESS(i)) show_worthless--; /* Write the history information */ _snprintf (buffer, 100, "%5.01f %5.01f %5.01f %5.01f : ", history[i].average, history[i].min, history[i].max, history[i].last); for (n = 0 ; n < samples[i].parent_count ; n++) strncat (buffer, " ", 99-strlen(buffer)); strncat (buffer, samples[i].name, 99-strlen(buffer)); gr_sys_puts (dest, x, y+=CHARHEIGHT, buffer, 50); } else if (ISWORTHLESS(i)) { if (show_worthless == 0) gr_sys_puts (dest, x, y+=CHARHEIGHT, " - - - - : ....... ",50); show_worthless--; } } gr_sys_puts (dest, x, y+=CHARHEIGHT, "\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02",50); free (list); gprof_end ("Profiler"); } /* * FUNCTION : gprof_toggle * * Toggles the profiler * * PARAMS : * dest Destination graphic * * RETURN VALUE : * None */ void gprof_toggle() { background_dirty = 1; gprof_activate = !gprof_activate; } Fenix/fxi/src/g_conversion.c0000644000000000000000000002426610607744630015062 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : g_conversion.c * DESCRIPTION : Functions to convert bitmap data between formats * * HISTORY: 0.83 - Alpha operations and tables * 0.82 - First version */ #include #include "fxi.h" /* Conversion tables - used by 16 bits conversions - 256K */ static Uint16 * convert565ToScreen ; static Uint16 * convertScreenTo565 ; static int conversion_tables_ok = 0 ; /* Alpha multiplication tables - multiply a color by its alpha. * There will be less than 256 levels */ static Uint16 * alpha16[256]; static Uint8 * alpha8[256]; static int alpha16_tables_ok = 0 ; static int alpha8_tables_ok = 0 ; /* * FUNCTION : init_alpha16_tables * * Init the 16 bit alpha tables (create as many tables as the parameter) * Each alpha table has a 128K memory footprint. Having many alpha tables * provides more transparency values. * * PARAMS : * count Number of tables * * RETURN VALUE : * None * */ static void init_alpha16_tables (int count) { int i, color, inc, next = 0, factor; Uint16 * table16 = NULL; if (alpha16_tables_ok == count) return; if (count <= 0 || count > 128) return; inc = 256/count; /* Destroy existing tables */ if (alpha16_tables_ok != 0) { for (table16 = NULL, i = 0 ; i < 256 ; i++) { if (alpha16[i] != table16) { table16 = alpha16[i]; free(table16); } alpha16[i] = NULL; } } /* Make new ones */ for (i = 0 ; i < 256 ; i++) { if (i == next) { table16 = malloc(131072); factor = next+inc/2; next += inc; if (factor > 255) factor = 256; for (color = 0 ; color < 65536 ; color++) { int r = ((color & screen->format->Rmask) >> screen->format->Rshift << screen->format->Rloss) ; int g = ((color & screen->format->Gmask) >> screen->format->Gshift << screen->format->Gloss) ; int b = ((color & screen->format->Bmask) >> screen->format->Bshift << screen->format->Bloss) ; table16[color] = ((((r * factor) >> 8) >> screen->format->Rloss) << screen->format->Rshift) | ((((g * factor) >> 8) >> screen->format->Gloss) << screen->format->Gshift) | ((((b * factor) >> 8) >> screen->format->Bloss) << screen->format->Bshift) ; } } alpha16[i] = table16; } alpha16_tables_ok = count; } /* * FUNCTION : init_alpha8_tables * * Init the 8 bit alpha tables (create as many tables as the parameter) * Each alpha table has a 64K memory footprint. Having many alpha tables * provides more transparency values. Those tables should be updated * when the palette changes. * * PARAMS : * count Number of tables * * RETURN VALUE : * None * */ extern Uint8 nearest_table[64][64][64] ; static void init_alpha8_tables (int count) { int i, color, color2, inc, next = 0, factor; Uint8 * table8 = NULL; if (alpha8_tables_ok == count) return; if (count <= 0 || count > 128) return; inc = 256/count; gr_fill_nearest_table(); /* Destroy existing tables */ if (alpha8_tables_ok != 0) { for (table8 = NULL, i = 0 ; i < 256 ; i++) { if (alpha8[i] != table8) { table8 = alpha8[i]; free(table8); } alpha8[i] = NULL; } } /* Make new ones */ for (i = 0 ; i < 256 ; i++) { if (i == next) { table8 = malloc(65536); factor = next+inc/2; next += inc; if (factor > 255) factor = 256; for (color = 0 ; color < 256 ; color++) { for (color2 = 0 ; color2 < 256 ; color2++) { int r = (palette[color].r * factor + palette[color2].r * (255-factor)); int g = (palette[color].g * factor + palette[color2].g * (255-factor)); int b = (palette[color].b * factor + palette[color2].b * (255-factor)); table8[(color << 8) + color2] = nearest_table[r >> 10][g >> 10][b >> 10]; } table8[color] = color; } } alpha8[i] = table8; } alpha8_tables_ok = count; } /* * FUNCTION : init_conversion_tables * * Static routine used to initialize the 16 bits conversion * tables (this only needs to be done once) * * PARAMS : * None * * RETURN VALUE : * None * */ static void init_conversion_tables() { Uint8 r, g, b ; int n ; /* Alloc space for the lookup tables */ convert565ToScreen = (Uint16 *) malloc(sizeof(Uint16) * 65536); convertScreenTo565 = (Uint16 *) malloc(sizeof(Uint16) * 65536); if (convert565ToScreen == NULL && convertScreenTo565 == NULL) { gr_error ("init_conversion_tables: sin memoria"); return; } if (!scr_initialized) gr_init(320,200); conversion_tables_ok = 1; /* Special case if screen already in 565 format */ if (screen->format->Rmask == 0xF800 && screen->format->Gmask == 0x07E0 && screen->format->Bmask == 0x001F) { for (n = 0 ; n < 65536 ; n++) { convert565ToScreen[n] = n; convertScreenTo565[n] = n; } return; } /* Create a fast lookup array */ for (n = 0 ; n < 65536 ; n++) { /* Calculate conversion from 565 to screen format */ r = ((n >> 8) & 0xF8) >> screen->format->Rloss ; g = ((n >> 3) & 0xFC) >> screen->format->Gloss ; b = ((n << 3) & 0xF8) >> screen->format->Bloss ; convert565ToScreen[n] = (r << screen->format->Rshift) | (g << screen->format->Gshift) | (b << screen->format->Bshift) ; /* Calculate conversion from 565 to screen format */ r = (((n & screen->format->Rmask) >> screen->format->Rshift) << screen->format->Rloss); g = (((n & screen->format->Gmask) >> screen->format->Gshift) << screen->format->Gloss); b = (((n & screen->format->Bmask) >> screen->format->Bshift) << screen->format->Bloss); convertScreenTo565[n] = ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | ((b & 0xF8) >> 3) ; } } /* * FUNCTION : gr_convert16_565ToScreen * * Convert a sequence of 16 bits pixels from 5:6:5 format to * the format used by the screen (usually 5:5:5 or 5:6:5) * * PARAMS : * ptr Pointer to the first pixel * len Number of pixels (not bytes!) * * RETURN VALUE : * None * */ void gr_convert16_565ToScreen (Uint16 * ptr, int len) { if (!conversion_tables_ok) init_conversion_tables(); while (len--) { *ptr = convert565ToScreen[*ptr] ; ptr++; } } /* * FUNCTION : gr_convert16_ScreenTo565 * * Convert a sequence of 16 bits pixels in screen format * (usually 5:5:5 or 5:6:5) to the 5:6:5 format used to * store 16 bits pixel values to files in disk * * PARAMS : * ptr Pointer to the first pixel * len Number of pixels (not bytes!) * * RETURN VALUE : * None * */ void gr_convert16_ScreenTo565 (Uint16 * ptr, int len) { if (!conversion_tables_ok) init_conversion_tables(); while (len--) { *ptr = convertScreenTo565[*ptr] ; ptr++; } } /* * FUNCTION : gr_fade16 * * Fade a 16-bit graphic a given ammount. Fading values are given in percent * (0% = black, 100% = original color, 200% = full color value) * * PARAMS : * graph Pointer to the graphic object * r Percent of Red component * g Percent of Green component * b Percent of Blue component * * RETURN VALUE : * None * */ void gr_fade16 (GRAPH * graph, int r, int g, int b) { Uint16 Rtable[32]; Uint16 Gtable[32]; Uint16 Btable[32]; Uint32 x, y; Uint32 Rmask; Uint32 Rshift; Uint32 Gmask; Uint32 Gshift; Uint32 Bmask; Uint32 Bshift; for (x = 0 ; x < 32 ; x++) { int c = 8*x+7; if (r <= 100) Rtable[x] = (c * r / 100) >> screen->format->Rloss << screen->format->Rshift; else Rtable[x] = (c + (255-c) * (r-100) / 100) >> screen->format->Rloss << screen->format->Rshift; if (g <= 100) Gtable[x] = (c * g / 100) >> screen->format->Gloss << screen->format->Gshift; else Gtable[x] = (c + (255-c) * (g-100) / 100) >> screen->format->Gloss << screen->format->Gshift; if (b <= 100) Btable[x] = (c * b / 100) >> screen->format->Bloss << screen->format->Bshift; else Btable[x] = (c + (255-c) * (b-100) / 100) >> screen->format->Bloss << screen->format->Bshift; } Rmask = screen->format->Rmask; Gmask = screen->format->Gmask; Bmask = screen->format->Bmask; Rshift = screen->format->Rshift - screen->format->Rloss + 3; Gshift = screen->format->Gshift - screen->format->Gloss + 3; Bshift = screen->format->Bshift - screen->format->Bloss + 3; for (y = 0 ; y < graph->height ; y++) { Uint16 * ptr = (Uint16 *)graph->data + graph->pitch*y/2; for (x = 0 ; x < graph->width ; x++, ptr++) { *ptr = ( Rtable[((*ptr & Rmask) >> Rshift)] | Gtable[((*ptr & Gmask) >> Gshift)] | Btable[((*ptr & Bmask) >> Bshift)] ); } } } /* * FUNCTION : gr_alpha16 * * Get an alpha multiplication table (a table that, given a 16 bit color, * returns the color multiplied by the alpha value) * * PARAMS : * alpha Alpha value for the requested table * * RETURN VALUE : * None * */ Uint16 * gr_alpha16 (int alpha) { if (alpha16_tables_ok == 0) init_alpha16_tables(GLODWORD(ALPHA_STEPS)); return alpha16[alpha]; } /* * FUNCTION : gr_alpha8 * * Get an alpha translation table (a table that, given two 8 bit color, * returns the composite color given the alpha value) * * PARAMS : * alpha Alpha value for the requested table * * RETURN VALUE : * None * */ Uint8 * gr_alpha8 (int alpha) { if (alpha8_tables_ok == 0) init_alpha8_tables(GLODWORD(ALPHA_STEPS)); return (Uint8 *) alpha8[alpha]; } Fenix/fxi/src/fnc_exports.c0000644000000000000000000010133410607526740014711 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : fnc_exports.c * DESCRIPTION : Symbol table management (symbol export/import) * Also includes * * HISTORY: 0.82 - Performance improvements (hash table), cleaning, * and ability to export DLL symbols */ #include #include #include #include static int global_count = 0; static int global_notfound = 0; typedef struct _symbol { const char * name; void * addr; int count; struct _symbol * next; } symbol; /* The following struct includes all the symbols exported by default */ /* This macro is used to export a function */ #define FNC(a) { #a, a } /* This macro is used to export a data pointer */ #define DAT(a) { #a, (void *) &a } static symbol default_symbols[] = { { "file_open" , file_open }, { "file_read" , file_read }, { "file_write" , file_write }, { "file_gets" , file_gets }, { "file_puts" , file_puts }, { "file_size" , file_size }, { "file_pos" , file_pos }, { "file_seek" , file_seek }, { "file_addp" , file_addp }, { "file_close" , file_close }, { "file_exists" , file_exists }, { "file_add_xfile" , file_add_xfile }, { "file_eof" , file_eof }, { "file_fp" , file_fp }, { "string_init" , string_init }, { "string_get" , (void*)string_get }, { "string_dump" , string_dump }, { "string_load" , string_load }, { "string_new" , string_new }, { "string_newa" , string_newa }, { "string_use" , string_use }, { "string_discard" , string_discard }, { "string_add" , string_add }, { "string_itoa" , string_itoa }, { "string_ftoa" , string_ftoa }, { "string_ptoa" , string_ptoa }, { "string_comp" , string_comp }, { "string_char" , string_char }, { "string_substr" , string_substr }, { "string_find" , string_find }, { "string_ucase" , string_ucase }, { "string_lcase" , string_lcase }, { "string_strip" , string_strip }, { "string_casecmp" , string_casecmp }, { "string_pad" , string_pad }, { "string_format" , string_format }, { "string_coalesce" , string_coalesce }, { "string_concat" , string_concat }, { "dos_chars" , &dos_chars }, { "c_type" , &c_type }, { "c_upper" , &c_upper }, { "c_lower" , &c_lower }, { "convert" , convert }, { "init_c_type" , init_c_type }, { "dos_to_win" , &dos_to_win }, { "win_to_dos" , &win_to_dos }, { "flic_open" , flic_open }, { "flic_destroy" , flic_destroy }, { "flic_do_frame" , flic_do_frame }, { "flic_reset" , flic_reset }, { "current_fli" , ¤t_fli }, { "current_fli_x" , ¤t_fli_x }, { "current_fli_y" , ¤t_fli_y }, { "debug" , &debug }, { "fxi" , &fxi }, { "enable_16bits" , &enable_16bits }, { "enable_filtering" , &enable_filtering }, { "report_string" , &report_string }, { "report_graphics" , &report_graphics }, { "gr_error" , gr_error }, { "do_exit" , do_exit }, { "dcb_load" , dcb_load }, { "getid" , getid }, { "path_find" , path_find }, { "path_get" , path_get }, { "path_set_wall" , path_set_wall }, { "scr_initialized" , &scr_initialized }, { "regions" , ®ions }, { "background" , &background }, { "scrbitmap" , &scrbitmap }, { "syslib" , &syslib }, { "icono" , &icono }, { "last_frame_ms" , &last_frame_ms }, { "apptitle" , &apptitle }, { "key_table" , &key_table }, { "keystate" , &keystate }, { "keytab_initialized" , &keytab_initialized }, { "scr_width" , &scr_width }, { "scr_height" , &scr_height }, { "full_screen" , &full_screen }, { "double_buffer" , &double_buffer }, { "gr_init" , gr_init }, { "gr_set_fps" , gr_set_fps }, { "gr_wait_frame" , gr_wait_frame }, { "gr_advance_timers" , gr_advance_timers }, { "gr_draw_frame" , gr_draw_frame }, { "gr_draw_screen" , gr_draw_screen }, { "keytab_init" , keytab_init }, { "keytab_free" , keytab_free }, { "vpalette" , &vpalette }, { "palette" , &palette }, { "colorequiv" , &colorequiv }, { "colorghost" , &colorghost }, { "background_8bits" , &background_8bits }, { "background_8bits_used" , &background_8bits_used }, { "background_is_black" , &background_is_black }, { "trans_table" , &trans_table }, { "trans_table_updated" , &trans_table_updated }, { "gr_make_trans_table" , gr_make_trans_table }, { "palette_loaded" , &palette_loaded }, { "palette_changed" , &palette_changed }, { "fade_on" , &fade_on }, /* { "fade_step" , &fade_step },*/ { "gr_read_pal" , gr_read_pal }, { "gr_refresh_palette" , gr_refresh_palette }, { "gr_fade_init" , gr_fade_init }, { "gr_fade_step" , gr_fade_step }, { "gr_roll_palette" , gr_roll_palette }, { "gr_find_nearest_color" , gr_find_nearest_color }, { "gr_set_rgb" , gr_set_rgb }, { "gr_rgb" , gr_rgb }, { "gr_get_rgb" , gr_get_rgb }, { "gr_set_colors" , gr_set_colors }, { "gr_get_colors" , gr_get_colors }, { "blend_create" , blend_create }, { "blend_free" , blend_free }, { "blend_init" , blend_init }, { "blend_translucency" , blend_translucency }, { "blend_intensity" , blend_intensity }, { "blend_tint" , blend_tint }, { "blend_swap" , blend_swap }, { "blend_assign" , blend_assign }, { "blend_apply" , blend_apply }, { "blend_grayscale" , blend_grayscale }, { "gr_load_map" , gr_load_map }, { "gr_load_png" , gr_load_png }, { "gr_load_pcx" , gr_load_pcx }, { "gr_load_fpg" , gr_load_fpg }, { "gr_load_pal" , gr_load_pal }, { "gr_save_pal" , gr_save_pal }, { "gr_save_png" , gr_save_png }, { "grlib_new" , grlib_new }, { "grlib_destroy" , grlib_destroy }, { "grlib_add_map" , grlib_add_map }, { "grlib_unload_map" , grlib_unload_map }, { "bitmap_new" , bitmap_new }, { "bitmap_clone" , bitmap_clone }, { "bitmap_new_syslib" , bitmap_new_syslib }, { "bitmap_get" , bitmap_get }, { "bitmap_destroy" , bitmap_destroy }, { "bitmap_add_cpoint" , bitmap_add_cpoint }, { "bitmap_analize" , bitmap_analize }, { "bitmap_animate" , bitmap_animate }, { "bitmap_animate_to" , bitmap_animate_to }, { "region_define" , region_define }, { "region_union" , region_union }, { "region_is_empty" , region_is_empty }, { "region_is_out" , region_is_out }, { "draw_instance_at" , draw_instance_at }, { "draw_instance" , draw_instance }, { "instance_update_bbox" , instance_update_bbox }, { "instance_graph" , instance_graph }, { "scroll_region" , scroll_region }, { "gr_font_get" , gr_font_get }, { "gr_font_load" , gr_font_load }, { "gr_load_bdf" , gr_load_bdf }, { "gr_font_save" , gr_font_save }, { "gr_font_new" , gr_font_new }, { "gr_font_newfrombitmap" , gr_font_newfrombitmap }, { "gr_font_systemfont" , gr_font_systemfont }, { "gr_font_destroy" , gr_font_destroy }, { "gr_text_setcolor" , gr_text_setcolor }, { "gr_text_getcolor" , gr_text_getcolor }, { "gr_text_new" , gr_text_new }, { "gr_text_new_var" , gr_text_new_var }, { "gr_text_move" , gr_text_move }, { "gr_text_destroy" , gr_text_destroy }, { "gr_text_width" , gr_text_width }, { "gr_text_widthn" , gr_text_widthn }, { "gr_text_height" , gr_text_height }, { "gr_text_margintop" , gr_text_margintop }, { "gr_text_put" , gr_text_put }, { "gr_text_bitmap" , gr_text_bitmap }, { "gr_lock_screen" , gr_lock_screen }, { "gr_unlock_screen" , gr_unlock_screen }, { "gr_clear" , gr_clear }, { "gr_clear_as" , gr_clear_as }, { "gr_put_pixel" , gr_put_pixel }, { "gr_get_pixel" , gr_get_pixel }, { "gr_setcolor" , gr_setcolor }, { "gr_vline" , gr_vline }, { "gr_hline" , gr_hline }, { "gr_line" , gr_line }, { "gr_box" , gr_box }, { "gr_rectangle" , gr_rectangle }, { "gr_circle" , gr_circle }, { "gr_fcircle" , gr_fcircle }, { "gr_blit" , gr_blit }, { "gr_get_bbox" , gr_get_bbox }, { "gr_rotated_blit" , gr_rotated_blit }, { "gr_scroll_start" , gr_scroll_start }, { "gr_scroll_stop" , gr_scroll_stop }, { "gr_scroll_draw" , gr_scroll_draw }, { "gr_scroll_active" , gr_scroll_active }, { "gr_scroll_is_fullscreen" , gr_scroll_is_fullscreen }, { "gr_mode7_start" , gr_mode7_start }, { "gr_mode7_stop" , gr_mode7_stop }, { "gr_mode7_draw" , gr_mode7_draw }, { "gr_mode7_active" , gr_mode7_active }, { "gr_sys_color" , gr_sys_color }, { "gr_sys_puts" , gr_sys_puts }, { "gr_sys_putchar" , gr_sys_putchar }, { "gr_convert16_ScreenTo565" , gr_convert16_ScreenTo565 }, { "gr_convert16_565ToScreen" , gr_convert16_565ToScreen }, { "gr_fade16" , gr_fade16 }, { "gr_con_printf" , gr_con_printf }, { "gr_con_putline" , gr_con_putline }, { "gr_con_show" , gr_con_show }, { "gr_con_draw" , gr_con_draw }, { "gr_con_getkey" , gr_con_getkey }, { "gr_con_scroll" , gr_con_scroll }, { "gr_con_do" , gr_con_do }, { "local_strings" , &local_strings }, { "localstr" , &localstr }, { "mainproc" , &mainproc }, { "procdef_get" , procdef_get }, { "sysproc_get" , sysproc_get }, { "sysproc_add" , sysproc_add }, { "sysproc_init" , sysproc_init }, { "globaldata" , &globaldata }, { "localdata" , &localdata }, { "local_size" , &local_size }, { "first_instance" , &first_instance }, { "last_instance" , &last_instance }, { "must_exit" , &must_exit }, { "instance_getid" , instance_getid }, { "instance_get" , instance_get }, { "instance_getfather" , instance_getfather }, { "instance_getson" , instance_getson }, { "instance_getbigbro" , instance_getbigbro }, { "instance_getsmallbro" , instance_getsmallbro }, { "instance_new" , instance_new }, { "instance_duplicate" , instance_duplicate }, { "instance_destroy" , instance_destroy }, { "instance_dump" , instance_dump }, { "instance_dump_all" , instance_dump_all }, { "instance_go" , instance_go }, { "instance_go_all" , instance_go_all }, { "instance_posupdate" , instance_posupdate }, { "instance_poschanged" , instance_poschanged }, { "sound_active" , &sound_active }, { "sound_init" , sound_init }, { "sound_close" , sound_close }, { "load_song" , load_song }, { "play_song" , play_song }, { "unload_song" , unload_song }, { "stop_song" , stop_song }, { "pause_song" , pause_song }, { "resume_song" , resume_song }, { "is_playing_song" , is_playing_song }, { "set_song_volume" , set_song_volume }, { "load_wav" , load_wav }, { "play_wav" , play_wav }, { "unload_wav" , unload_wav }, { "stop_wav" , stop_wav }, { "pause_wav" , pause_wav }, { "resume_wav" , resume_wav }, { "is_playing_wav" , is_playing_wav }, { "set_wav_volume" , set_wav_volume }, { "set_channel_volume" , set_channel_volume }, { "reserve_channels" , reserve_channels }, { "screen" , &screen }, { "fnc_export" , fnc_export }, { "gr_new_object" , gr_new_object }, { "gr_hide_object" , gr_hide_object }, { "gr_destroy_object" , gr_destroy_object }, /* Drawing */ DAT( syscolor16 ), DAT( syscolor8 ), DAT( fntcolor16 ), DAT( fntcolor8 ), FNC( gr_setalpha ), FNC( gr_bezier ), FNC( gr_drawing_new ), FNC( gr_drawing_destroy ), FNC( gr_drawing_move ), DAT( drawing_stipple ), DAT( frame_count ), /* Palette */ DAT( nearest_table ), FNC( gr_fill_nearest_table ), /* Low-level conversion/alpha */ FNC( gr_alpha16 ), FNC( gr_alpha8 ), /* Profiler */ FNC(gprof_init), FNC(gprof_begin), FNC(gprof_end), FNC(gprof_frame), FNC(gprof_dump), FNC(gprof_reset), FNC(gprof_draw), FNC(gprof_toggle), /* Utility internal functions */ FNC(gr_key), FNC(gr_timer), /* Regions */ FNC(region_destroy), FNC(region_new), FNC(region_get), /* DUMP_TYPE support */ FNC(gr_mark_rect), FNC(gr_mark_instance), /* WM related */ DAT(grab_input) , DAT(exit_status) , DAT(window_status) , DAT(focus_status) , DAT(mouse_status) , { NULL , NULL } } ; #undef FNC #undef DAT /* Scatter array for hash calculations */ #define HASH_MAX 1023 static int scatter[HASH_MAX+1] = { 288, 547, 970, 673, 985, 434, 359, 956, 760, 890, 960, 223, 712, 173, 1008, 182, 579, 587, 700, 20, 745, 926, 120, 71, 292, 7, 707, 709, 722, 733, 989, 832, 147, 520, 73, 23, 482, 873, 892, 249, 413, 470, 819, 484, 639, 527, 469, 488, 455, 934, 715, 631, 629, 243, 487, 949, 371, 271, 804, 497, 686, 426, 66, 209, 635, 64, 28, 950, 987, 933, 955, 398, 559, 720, 648, 1007, 523, 420, 952, 914, 995, 5, 573, 101, 34, 158, 169, 25, 793, 815, 346, 72, 4, 69, 268, 764, 727, 657, 829, 78, 666, 68, 794, 105, 706, 589, 656, 295, 58, 219, 40, 188, 566, 148, 653, 768, 10, 380, 285, 293, 37, 406, 613, 417, 59, 825, 967, 50, 30, 253, 618, 550, 828, 824, 590, 258, 728, 529, 865, 461, 378, 753, 427, 1005, 939, 647, 866, 411, 123, 643, 561, 576, 471, 467, 575, 684, 35, 615, 545, 705, 564, 893, 779, 432, 911, 823, 581, 901, 106, 403, 474, 797, 280, 18, 319, 861, 999, 525, 962, 964, 490, 210, 165, 395, 774, 667, 773, 638, 230, 453, 654, 161, 47, 877, 333, 711, 135, 634, 307, 393, 650, 560, 343, 628, 889, 908, 1016, 788, 644, 0, 697, 265, 339, 298, 791, 166, 944, 902, 672, 572, 450, 419, 306, 8, 846, 945, 662, 305, 382, 136, 694, 191, 363, 856, 372, 174, 195, 328, 204, 623, 767, 178, 616, 375, 364, 235, 896, 31, 762, 181, 602, 231, 923, 830, 348, 299, 850, 754, 676, 556, 526, 637, 577, 121, 543, 895, 717, 757, 953, 668, 352, 186, 775, 906, 534, 221, 863, 565, 75, 798, 65, 574, 2, 583, 626, 475, 702, 56, 24, 325, 445, 198, 226, 301, 96, 217, 1010, 972, 203, 431, 102, 207, 598, 812, 917, 110, 452, 532, 124, 424, 567, 251, 867, 276, 171, 982, 356, 857, 542, 864, 1000, 899, 11, 335, 677, 412, 86, 546, 404, 224, 738, 459, 89, 273, 978, 772, 1020, 256, 541, 881, 749, 442, 477, 103, 267, 43, 358, 386, 151, 721, 321, 849, 729, 778, 283, 41, 163, 92, 837, 449, 81, 980, 242, 289, 229, 433, 687, 530, 799, 805, 642, 983, 162, 337, 679, 703, 664, 1002, 327, 996, 355, 862, 1023, 503, 145, 274, 735, 898, 582, 36, 190, 884, 836, 841, 347, 153, 633, 512, 167, 341, 234, 255, 27, 391, 502, 212, 897, 366, 67, 941, 554, 518, 781, 742, 976, 473, 143, 515, 678, 74, 879, 244, 146, 367, 189, 61, 659, 516, 447, 751, 1009, 936, 505, 334, 741, 713, 544, 304, 127, 510, 536, 507, 465, 894, 496, 392, 905, 218, 537, 927, 245, 732, 436, 111, 817, 396, 640, 389, 152, 261, 180, 951, 714, 658, 122, 282, 826, 743, 683, 548, 820, 860, 495, 46, 44, 622, 6, 318, 324, 14, 966, 553, 407, 384, 840, 132, 761, 795, 150, 125, 957, 883, 806, 977, 476, 834, 878, 454, 965, 172, 535, 405, 607, 336, 98, 710, 441, 220, 948, 479, 872, 154, 323, 630, 259, 279, 539, 82, 551, 748, 435, 149, 16, 937, 584, 997, 448, 342, 246, 994, 552, 22, 555, 612, 140, 605, 1004, 641, 570, 920, 843, 875, 83, 494, 701, 726, 766, 275, 853, 156, 586, 107, 423, 533, 277, 508, 60, 97, 311, 76, 1012, 54, 415, 53, 185, 909, 569, 139, 880, 606, 813, 519, 38, 718, 1018, 935, 876, 682, 971, 816, 609, 272, 724, 485, 157, 524, 131, 215, 1003, 531, 286, 260, 1011, 690, 930, 322, 900, 159, 344, 213, 785, 617, 932, 818, 770, 201, 137, 810, 814, 170, 266, 808, 308, 723, 486, 100, 254, 206, 759, 142, 763, 809, 973, 549, 869, 907, 646, 649, 636, 401, 802, 670, 852, 868, 397, 222, 931, 975, 353, 262, 141, 309, 1019, 838, 747, 1001, 887, 463, 155, 752, 704, 1006, 361, 498, 990, 444, 882, 627, 596, 578, 916, 592, 418, 108, 480, 400, 278, 90, 922, 739, 294, 340, 655, 193, 365, 558, 126, 129, 540, 594, 514, 736, 42, 52, 331, 45, 608, 784, 744, 800, 62, 765, 164, 192, 969, 451, 625, 57, 410, 248, 699, 239, 287, 661, 571, 499, 269, 822, 79, 509, 408, 330, 77, 263, 685, 698, 312, 771, 776, 284, 117, 313, 187, 130, 457, 521, 491, 848, 114, 252, 388, 991, 688, 492, 979, 200, 1022, 478, 513, 362, 94, 211, 379, 821, 610, 21, 168, 93, 716, 326, 351, 859, 33, 777, 783, 790, 562, 281, 214, 756, 675, 439, 95, 593, 88, 85, 216, 297, 399, 740, 428, 924, 599, 483, 961, 374, 787, 369, 51, 870, 755, 517, 619, 674, 80, 264, 481, 769, 921, 915, 588, 409, 39, 580, 730, 350, 437, 443, 302, 888, 257, 652, 708, 383, 91, 963, 680, 247, 940, 446, 70, 394, 645, 903, 179, 99, 731, 737, 993, 464, 144, 472, 317, 310, 665, 746, 986, 26, 918, 528, 315, 115, 835, 199, 425, 595, 1, 691, 290, 112, 603, 871, 585, 456, 232, 402, 184, 947, 354, 506, 422, 959, 981, 796, 15, 368, 504, 954, 237, 557, 177, 725, 296, 621, 421, 376, 9, 827, 440, 138, 460, 128, 414, 208, 855, 851, 489, 87, 522, 240, 943, 357, 913, 12, 493, 1021, 320, 429, 32, 988, 968, 462, 373, 416, 387, 854, 693, 227, 385, 109, 858, 84, 119, 604, 807, 611, 568, 238, 696, 381, 49, 291, 624, 1014, 750, 13, 500, 912, 316, 591, 430, 370, 839, 842, 758, 202, 938, 48, 669, 803, 1017, 250, 998, 600, 695, 458, 601, 175, 466, 671, 197, 300, 885, 233, 689, 847, 538, 160, 651, 833, 17, 925, 303, 844, 910, 3, 632, 919, 55, 780, 360, 992, 205, 563, 29, 134, 974, 663, 660, 1013, 390, 501, 845, 874, 332, 891, 886, 228, 597, 786, 113, 63, 984, 801, 614, 719, 681, 620, 734, 958, 692, 377, 116, 928, 789, 183, 831, 438, 176, 314, 349, 236, 811, 241, 929, 946, 270, 345, 225, 133, 19, 104, 194, 904, 196, 782, 338, 942, 118, 1015, 468, 511, 792, 329 }; /* The hash table itself */ symbol * hash_table[HASH_MAX+1]; /* * FUNCTION : symbol_hash * * Calculate a hash value for a given symbol. This should be fast. * * PARAMS : * name ASCIIZ string with the symbol name * * RETURN VALUE : * Integer hash value from 0 to HASH_MAX * */ static int symbol_hash (const char * name) { int result = 0; while (*name) result ^= scatter[(int)*name++]; return result; } /* * FUNCTION : fnc_export * * Add a new symbol to the symbol tables * * PARAMS : * name Name of the symbol to search * addr Symbol address (to be returned by fnc_import) * * RETURN VALUE : * None * */ void fnc_export (const char * name, void * addr) { symbol * s = malloc(sizeof(symbol)); int hash = symbol_hash(name); if (s != NULL) { s->name = name; s->count = 0; s->addr = addr; s->next = hash_table[hash]; hash_table[hash] = s; } } /* * FUNCTION : fnc_import * * Search for a symbol in the symbol table and return its address * This search is case sensitive and all characters are meaningful * * PARAMS : * name Name of the symbol to search * * RETURN VALUE : * The symbol pointer or NULL if the symbol was not found * */ void * fnc_import (const char * name) { symbol * ptr = hash_table[symbol_hash(name)] ; while (ptr != NULL) { if (strcmp (ptr->name, name) == 0) { ptr->count++; global_count++; return ptr->addr; } ptr = ptr->next; } global_notfound++; gr_con_printf ("[FXI] Warning: symbol '%s' not found!", name); return NULL; } /* * FUNCTION : fnc_init * * Initialize the exported symbol table with all the default * symbols. This function must be called before any call to fnc_export * * PARAMS : * None * * RETURN VALUE : * None * */ void fnc_init() { int n; int v; symbol * ptr = default_symbols; for (n = 0 ; n <= HASH_MAX ; n++) hash_table[n] = 0; while (ptr->name) { v = symbol_hash (ptr->name); ptr->next = hash_table[v]; hash_table[v] = ptr; ptr++; } } /* * FUNCTION : fnc_show_information * * Examine the export information collected by fnc_export and * show in the console any debug information that could be * useful about non-found symbols and symbols not used by the DLLs * * PARAMS : * None * * RETURN VALUE : * None * */ void fnc_show_information() { int n, m, count; int max_use = 0; int bucket_use[HASH_MAX+1]; /* If no symbol imported by any DLL, do nothing */ if (global_count == 0) return; /* Report all symbols that were not imported by DLL * because we are importing all symbols currently and * this helps to find exporting symbols missing from fxdll.h. * In the future this should not be done */ memset (bucket_use, 0, sizeof(bucket_use)); for (n = 0 ; n <= HASH_MAX ; n++) { symbol * ptr = hash_table[n]; while (ptr != NULL) { if (ptr->count == 0) gr_con_printf ("[FXI] Warning: '%s' not imported!", ptr->name); bucket_use[n]++; if (max_use < bucket_use[n]) max_use = bucket_use[n]; ptr = ptr->next; } } gr_con_printf ("[FXI] %4d symbols imported by DLL", global_count); /* Show information about hash table proficiency */ for (n = 1 ; n <= max_use ; n++) { for (m = count = 0 ; m <= HASH_MAX ; m++) { if (bucket_use[m] == n) count++; } if (count > 0) gr_con_printf ("[FXI] %4d buckets of size %d", count, n); } /* Not found symbols are reported by fnc_import */ if (global_notfound) gr_con_printf ("[FXI] %4d symbols not found", global_notfound); } Fenix/fxi/src/img_pcx.c0000644000000000000000000000667010607526770014017 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : img_pcx.c * DESCRIPTION : PCX Loading functions * * HISTORY: * */ /* * INCLUDES */ #ifdef TARGET_BEOS #include #else #include #endif #include #include #include "fxi.h" /* * GLOBAL VARIABLES */ extern SDL_Surface * screen ; /* * TYPE DEFINITIONS */ typedef struct { Uint8 Manufacturer; Uint8 Version; Uint8 Encoding; Uint8 BitsPerPixel; Sint16 Xmin, Ymin, Xmax, Ymax; Sint16 HDpi, VDpi; Uint8 Colormap[48]; Uint8 Reserved; Uint8 NPlanes; Sint16 BytesPerLine; Sint16 PaletteInfo; Sint16 HscreenSize; Sint16 VscreenSize; Uint8 Filler[54]; } PCXheader ; /* * FUNCTION : gr_read_pcx * * Returns GRAPH newly created from FILENAME. GRAPH is created in LIB 0 * * PARAMS: * CONST CHAR * filename: File to be read * * RETURN VALUE: * pointer to the newly created GRAPH * */ GRAPH * gr_read_pcx (const char * filename) { PCXheader header ; file * file ; int width, height, x, y, p, count ; GRAPH * bitmap ; Uint8 * ptr, ch ; file = file_open (filename, "rb") ; if (!file) gr_error ("%s: Could not open the file\n", filename) ; file_read (file, &header, sizeof(header)) ; /* Arrange the data for big-endian machines */ ARRANGE_WORD (&header.Xmax); ARRANGE_WORD (&header.Xmin); ARRANGE_WORD (&header.Ymax); ARRANGE_WORD (&header.Ymin); ARRANGE_WORD (&header.BytesPerLine); ARRANGE_WORD (&header.PaletteInfo); ARRANGE_WORD (&header.HDpi); ARRANGE_WORD (&header.VDpi); ARRANGE_WORD (&header.HscreenSize); ARRANGE_WORD (&header.VscreenSize); width = header.Xmax - header.Xmin + 1 ; height = header.Ymax - header.Ymin + 1 ; bitmap = bitmap_new (0, width, height, header.BitsPerPixel == 8 ? 8:16, 1) ; if (!bitmap) gr_error ("%s: Could not allocate required memory\n", filename) ; assert (width <= header.BytesPerLine) ; if (header.BitsPerPixel == 8) { for (y = 0 ; y < height ; y++) for (p = 0 ; p < header.NPlanes ; p++) { ptr = (Uint8 *)bitmap->data + bitmap->pitch * y ; for (x = 0 ; x < header.BytesPerLine ; ) { if (file_read (file, &ch, 1) < 1) gr_error ("%s: Truncated file", filename) ; if ((ch & 0xC0) == 0xC0) { count = (ch & 0x3F) ; file_read (file, &ch, 1) ; } else { count = 1 ; } while (count--) { *ptr = ch ; x++ ; ptr += header.NPlanes ; } } } } else { gr_error ("%s: Non supported color depth\n", filename) ; } bitmap->modified = 1 ; return bitmap ; } Fenix/fxi/src/g_console.c0000644000000000000000000015366510607526746014353 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifdef TARGET_BEOS #include #else #include #endif #include #include #include #include #include "fxi.h" #include "dcb.h" /* ---------------------------------------------------------------------- */ #define MAXTEXT 5000 #define CHARWIDTH 6 #define CHARHEIGHT 8 #define CONSOLE_HISTORY 512 #define CONSOLE_LINES 16 #define CONSOLE_COLUMNS 52 #define COMMAND_HISTORY 64 #define HELPTXT \ "02Process Info07\n" \ "04INSTANCES 07 List all running processes\n" \ "04GLOBALS 07 Show global vars with values\n" \ "04LOCALS proc 07 Show a process's local vars\n" \ "04PRIVATES proc 07 Show a process's private vars\n" \ "04PUBLICS proc 07 Show a process's public vars\n" \ "\n" \ "02Debugging Commands07\n" \ "04TRACE 07 Execute one instruction and Debug\n" \ "04BREAK 07 List breakpoints\n" \ "04BREAK proc 07 Add a breakpoint on process execution\n"\ "04DELETE proc 07 Delete a breakpoint\n" \ "04CONTINUE 07 Continue the execution\n" \ "04DOFRAME 07 Continue to next frame\n" \ "\n" \ "02Misc07\n" \ "04SHOW expression07 Evaluate and show some expression\n" \ "04STRINGS 07 Show all strings in memory\n" \ "04VARS 07 Show internals vars\n" \ "04QUIT 07 Kill the program and exit\n\n" \ "\n" \ "02Process Interaction07\n" \ "04RUN proc [args]07 Run a process\n" \ "04KILL proc 07 Kill a process\n" \ "04WEAKUP proc 07 Weakup a process\n" \ "04SLEEP proc 07 Sleep a process\n" \ "04FREEZE proc 07 Freeze a process\n" \ "04KILLALL proc 07 Kill all process with criteria\n" \ "04WEAKUPALL proc 07 Weakup all process with criteria\n" \ "04SLEEPALL proc 07 Sleep all process with criteria\n" \ "04FREEZEALL proc 07 Freeze all process with criteria\n" \ "\n" \ "You can evaluate free expressions in the console,\n" \ "and you can see/change local, public and private vars\n" \ "using the '.' operator (pe: 65535.X, MAIN.X, etc.)\n" /* ---------------------------------------------------------------------- */ static void eval_immediate() ; static void eval_value() ; static void eval_factor() ; static void eval_subexpression() ; static char * eval_expression(const char * here, int interactive); static int type_size (DCB_TYPEDEF orig) ; static DCB_TYPEDEF reduce_type (DCB_TYPEDEF orig) ; static void var2const() ; /* Console contents */ static int console_lines = CONSOLE_LINES ; static int console_columns = CONSOLE_COLUMNS ; static char * console[CONSOLE_HISTORY] ; static int console_initialized = 0 ; static int console_head = 0 ; static int console_tail = 0 ; static char * command[COMMAND_HISTORY] ; static int command_initialized = 0 ; static int command_head = 0 ; static int command_tail = 0 ; static int command_count = 0 ; static char * show_expression = 0; static int console_showcolor = 0xffffff; /* Trace */ extern int force_debug; extern int debug_next; extern int debug_on_frame; extern int trace_sentence; extern INSTANCE * trace_instance; /* ---------------------------------------------------------------------- */ /* Tipos de token */ #define IDENTIFIER 1 #define STRING 2 #define NUMBER 3 #define OPERATOR 4 #define NOTOKEN 5 struct { int type ; DCB_VAR var ; double value ; void * data ; char name[256] ; } result, lvalue ; struct { enum { T_ERROR, T_VARIABLE, T_NUMBER, T_CONSTANT, T_STRING } type ; char name[128] ; double code ; } token ; static const char * token_ptr ; /* ---------------------------------------------------------------------- */ #define N_CONSOLE_VARS (sizeof(console_vars)/sizeof(console_vars[0])) #define CON_DWORD 0x0001 #define CON_DWORD_HEX 0x8001 struct { char * name ; void * value ; int type ; } console_vars[] = { { "ENABLE_FILTERING", &enable_filtering, CON_DWORD }, #ifdef MMX_FUNCTIONS { "MMX", &MMX_available, CON_DWORD }, #endif { "REPORT_GRAPHICS", &report_graphics, CON_DWORD }, { "REPORT_STRING", &report_string, CON_DWORD }, { "DEBUG", &debug, CON_DWORD }, { "CONSOLE_LINES", &console_lines, CON_DWORD }, { "CONSOLE_COLUMNS", &console_columns, CON_DWORD }, { "SHOW_COLOR", &console_showcolor, CON_DWORD_HEX }, { "FILES", &opened_files, CON_DWORD }, } ; static char * describe_type (DCB_TYPEDEF type, int from) ; static char * show_value (DCB_TYPEDEF type, void * data) ; static void show_struct (int num, char * title, int indent, void * data) ; static void show_var (DCB_VAR var, char * name, void * data, char * title, int indent) ; /* ---------------------------------------------------------------------- */ void gr_con_printf (const char *fmt, ...) { char text[MAXTEXT], * ptr, * iptr ; va_list ap; va_start(ap, fmt); _vsnprintf(text, sizeof(text), fmt, ap); va_end(ap); text[sizeof(text)-1] = 0; if (*text == '[') { memmove (text+3, text, strlen(text)+1) ; memmove (text, "08", 3) ; ptr = strchr(text, ']') ; if (ptr) { ptr++ ; memmove (ptr+3, ptr, strlen(ptr)+1) ; memmove (ptr, "07", 3) ; } } iptr = text ; ptr = text ; while (*ptr) { if (*ptr == '\n') { *ptr = 0 ; gr_con_putline(iptr) ; iptr = ptr+1 ; } if (*ptr == '') { ptr++ ; if (isdigit(*ptr)) ptr++ ; if (isdigit(*ptr)) ptr++ ; continue ; } ptr++ ; } if (ptr > iptr) { gr_con_putline(iptr) ; } } void gr_con_putline (char * text) { if (!console_initialized) { memset (console, 0, sizeof(console)) ; console_initialized = 1 ; } if (console[console_tail]) free(console[console_tail]) ; console[console_tail] = strdup(text) ; console_tail++ ; if (console_tail == CONSOLE_HISTORY) console_tail = 0 ; if (console_tail == console_head) { console_head++ ; if (console_head == CONSOLE_HISTORY) console_head = 0 ; } } void gr_con_putcommand (const char * commandline) { if (!command_initialized) { memset (command, 0, sizeof(command)); command_initialized = 1; } if (command[command_tail]) free(command[command_tail]); command[command_tail++] = strdup(commandline); if (command_tail == COMMAND_HISTORY) command_tail = 0; if (command_tail == command_head) { if (++command_head == COMMAND_HISTORY) command_head = 0; } else command_count++; } const char * gr_con_getcommand (int offset) { if (offset >= 0 || offset < -command_count) return NULL; offset = command_tail + offset; while (offset < 0) offset = COMMAND_HISTORY + offset; return command[offset]; } static int console_showing = 0 ; static int console_scroll_pos = 0 ; static int console_scroll_lateral_pos = 0 ; static char console_input[128] ; void gr_con_getkey(int key, int sym) { static int history_offset = 0; char buffer[2] ; const char * command; if (key == 0 && sym == 273) { command = gr_con_getcommand(--history_offset); if (command == NULL) history_offset++; else strncpy (console_input, command, 127); } if (key == 0 && sym == 274) { if (history_offset == -1) { *console_input = 0; history_offset++; } else { command = gr_con_getcommand(++history_offset); if (command == NULL) history_offset--; else strncpy (console_input, command, 127); } } if (key == 8 && *console_input) console_input[strlen(console_input)-1] = 0 ; if (key == 27) *console_input = 0 ; if (key == 13 && *console_input) { console_scroll_pos = 0 ; gr_con_printf ("15> %s", console_input) ; gr_con_putcommand (console_input); gr_con_do (console_input) ; *console_input = 0 ; history_offset = 0; } if (key >= 32 && key <= 255) { buffer[0] = key ; buffer[1] = 0 ; strcat (console_input, buffer) ; } } void gr_con_show(int doit) { /* Slo se puede mostrar la consola si hay informacin de debug */ if (dcb.data.NID > 0) { console_showing = doit ; } } void gr_con_draw() { int x, y, line, count ; static int con_y = 0 ; static int vy = CHARHEIGHT ; if (!console_initialized) return ; if (console_showing) { if (con_y < console_lines*CHARHEIGHT) { con_y += vy ; if (vy > 4) vy-- ; } if (con_y > console_lines*CHARHEIGHT) con_y = console_lines*CHARHEIGHT, vy = CHARHEIGHT ; } else { if (con_y > 0) { con_y -= vy, vy++ ; background_dirty = 1; } if (con_y < 0) { con_y = 0 ; vy = CHARHEIGHT ; return ; } } if ( scrbitmap->width < console_columns * CHARWIDTH ) { console_columns = scrbitmap->width / CHARWIDTH ; } if ( scrbitmap->height < console_lines * CHARHEIGHT ) { console_lines = ( scrbitmap->height - CHARHEIGHT * 2 ) / CHARHEIGHT ; } x = (scrbitmap->width - console_columns*CHARWIDTH)/2 ; y = -console_lines*CHARHEIGHT + con_y ; if (show_expression != 0) { char * result = eval_expression (show_expression, 0); if (result == 0) { free (show_expression); show_expression = 0; } else { gr_sys_color (console_showcolor, 0) ; gr_sys_puts (scrbitmap, (scrbitmap->width - strlen(result)*CHARWIDTH)/2, con_y <= 0 ? 2:con_y+CHARHEIGHT, result, strlen(result)); gr_mark_rect (0, con_y <= 0 ? 2:con_y+CHARHEIGHT, scr_width, CHARHEIGHT); } } if (con_y <= 0) return ; line = console_tail ; for (count = 0 ; count < console_lines+console_scroll_pos ; count++) { if (line == console_head) break ; line-- ; if (line < 0) line = CONSOLE_HISTORY-1 ; } console_scroll_pos = count-console_lines ; if (console_scroll_pos < 0) console_scroll_pos = 0 ; gr_mark_rect (x, y, console_columns * CHARWIDTH, console_lines * CHARHEIGHT + CHARHEIGHT*2); for (count = 0 ; count < console_lines ; count++) { gr_sys_color (0xC0C0C0, 0x402040) ; if (!console[line] || console_scroll_lateral_pos >= strlen(console[line])) gr_sys_puts (scrbitmap, x, y, "", console_columns) ; else { int pos = 0 ; int off = 0; do { if (console[line][pos] == '') { off += 3; } pos++; } while (pos-off> 24]) { gr_con_printf("[%s(%d):%d]\n%s", (trace_instance->inproc ? trace_instance->inproc : trace_instance->proc)->name, LOCDWORD(trace_instance, PROCESS_ID), trace_sentence & 0xFFFFFF, dcb.sourcelines [trace_sentence >> 24] [(trace_sentence & 0xFFFFFF)-1]) ; } debug_on_frame = 0; force_debug = 0; debug_next = 0; trace_sentence = -1; } gr_sys_color (0xFFFFFF, 0x404040) ; gr_sys_puts (scrbitmap, x, y, ">", 2) ; strcat(console_input, "_") ; gr_sys_puts (scrbitmap, x+CHARWIDTH*2, y, console_input, console_columns-2) ; console_input[strlen(console_input)-1] = 0 ; } void gr_con_scroll (int direction) { if (direction > 0) { console_scroll_pos -= console_lines ; if (console_scroll_pos < 0) console_scroll_pos = 0 ; } else { console_scroll_pos += console_lines ; if (console_scroll_pos > CONSOLE_HISTORY) console_scroll_pos = CONSOLE_HISTORY ; } } void gr_con_lateral_scroll (int direction) { if (direction > 0) { console_scroll_lateral_pos-- ; if (console_scroll_lateral_pos < 0) console_scroll_lateral_pos = 0 ; } else { console_scroll_lateral_pos++ ; if (console_scroll_lateral_pos > MAXTEXT) console_scroll_lateral_pos = MAXTEXT ; } } /* ---------------------------------------------------------------------- */ static char * describe_type (DCB_TYPEDEF type, int from) { static char buffer[512] ; int i ; if (!from) buffer[0] = 0 ; switch (type.BaseType[from]) { case TYPE_ARRAY: for (i = from ; type.BaseType[i] == TYPE_ARRAY; i++) ; describe_type (type, i) ; for (i = from ; type.BaseType[i] == TYPE_ARRAY; i++) _snprintf (buffer+strlen(buffer), 512-strlen(buffer), "[%d]", type.Count[i]-1) ; break ; case TYPE_STRUCT: strcat (buffer, "STRUCT") ; break ; case TYPE_DWORD: strcat (buffer, "DWORD") ; break ; case TYPE_INT: strcat (buffer, "INT") ; break ; case TYPE_SHORT: strcat (buffer, "SHORT") ; break ; case TYPE_WORD: strcat (buffer, "WORD") ; break ; case TYPE_BYTE: strcat (buffer, "BYTE") ; break ; case TYPE_SBYTE: strcat (buffer, "SIGNED BYTE") ; break ; case TYPE_CHAR: strcat (buffer, "CHAR") ; break ; case TYPE_STRING: strcat (buffer, "STRING") ; break ; case TYPE_FLOAT: strcat (buffer, "FLOAT") ; break ; case TYPE_POINTER: describe_type (type, from+1) ; strcat (buffer, " POINTER") ; break ; } return buffer ; } static char * show_value (DCB_TYPEDEF type, void * data) { static char buffer[256] ; char * newbuffer ; int subsize; unsigned int n ; unsigned int count ; switch (type.BaseType[0]) { case TYPE_ARRAY: count = type.Count[0]; type = reduce_type(type) ; subsize = type_size(type) ; if (type.BaseType[0] == TYPE_STRUCT) { return "" ; } newbuffer = (char *) malloc(256) ; strcpy (newbuffer, "= (") ; for (n = 0 ; n < count ; n++) { if (n) strcat (newbuffer, ", ") ; show_value (type, data) ; if (strlen(newbuffer) + strlen(buffer) > 30) { strcat (newbuffer, "...") ; break ; } strcat (newbuffer, buffer + 2) ; data = (Uint8*)data + subsize ; } strcat (newbuffer, ")") ; strcpy (buffer, newbuffer) ; free(newbuffer) ; return buffer ; case TYPE_STRUCT: return "" ; case TYPE_STRING: _snprintf (buffer, 512, "= \"%s\"", string_get(*(Uint32 *)data)) ; return buffer ; case TYPE_BYTE: _snprintf (buffer, 512, "= %d", *(Uint8 *)data) ; return buffer ; case TYPE_SBYTE: _snprintf (buffer, 512, "= %d", *(Sint8 *)data) ; return buffer ; case TYPE_CHAR: if (*(Uint8 *)data >= 32) _snprintf (buffer, 512, "= '%c'", *(Uint8 *)data) ; else _snprintf (buffer, 512, "= '\\x%02X'", *(Uint8 *)data) ; return buffer ; case TYPE_FLOAT: _snprintf (buffer, 512, "= %g", *(float *)data) ; return buffer ; case TYPE_WORD: _snprintf (buffer, 512, "= %d", *(Uint16 *)data) ; return buffer ; case TYPE_DWORD: _snprintf (buffer, 512, "= %ud", *(Uint32 *)data) ; return buffer ; case TYPE_SHORT: _snprintf (buffer, 512, "= %d", *(Sint16 *)data) ; return buffer ; case TYPE_INT: _snprintf (buffer, 512, "= %d", *(Sint32 *)data) ; return buffer ; case TYPE_POINTER: _snprintf (buffer, 512, "= 0x%08X", *(Uint32 *)data) ; return buffer ; default: return "?" ; } } static void show_struct (int num, char * title, int indent, void * data) { int n, count ; DCB_VAR * vars ; vars = dcb.varspace_vars[num] ; count = dcb.varspace[num].NVars ; for (n = 0 ; n < count ; n++) { show_var (vars[n], 0, data ? (Uint8*)data + vars[n].Offset : 0, title, indent) ; } } static void show_var (DCB_VAR var, char * name, void * data, char * title, int indent) { char spaces[256] ; strncpy (spaces, " ", indent) ; spaces[indent] = 0 ; if (!name) { unsigned int code ; name = "?" ; for (code = 0 ; code < dcb.data.NID ; code++) { if (dcb.id[code].Code == var.ID) { name = dcb.id[code].Name ; break ; } } } if (data) { gr_con_printf ("%s%s %s %s %s\n", title, spaces, describe_type(var.Type, 0), name, show_value(var.Type, data)) ; } else { gr_con_printf ("%s%s %s %s\n", title, spaces, describe_type(var.Type, 0), name) ; } if (var.Type.BaseType[0] == TYPE_STRUCT) { show_struct (var.Type.Members, title, indent+3, data) ; gr_con_printf ("%s%s END STRUCT", title, spaces) ; } } /* ---------------------------------------------------------------------- */ /* Very simple tokenizer */ static void get_token() { char * ptr ; unsigned int n ; while (isspace(*token_ptr)) token_ptr++ ; if (!*token_ptr) { token.type = NOTOKEN ; return ; } /* Numbers */ if (ISNUM(*token_ptr)) { const char * ptr ; double num = 0, dec ; int base = 10 ; /* Hex/Bin/Octal numbers with the h/b/o sufix */ ptr = token_ptr ; while (*ptr == '1' || *ptr == '0') ptr++ ; if ((*ptr == 'b' || *ptr == 'B') && !ISALNUM(ptr[1])) base = 2 ; else { ptr = token_ptr ; while (ISALNUM(*ptr)) ptr++ ; if (*ptr == 'h' || *ptr == 'H') base = 16 ; if (*ptr == 'o' || *ptr == 'O') base = 8 ; } /* Calculate the number value */ while (ISNUM(*token_ptr) || (base > 10 && ISALNUM(*token_ptr))) { if (ISNUM(*token_ptr)) num = num * base + (*token_ptr++ - '0') ; if (*token_ptr >= 'a' && *token_ptr <= 'f' && base > 10) num = num * base + (*token_ptr++ - 'a' + 10) ; if (*token_ptr >= 'A' && *token_ptr <= 'F' && base > 10) num = num * base + (*token_ptr++ - 'A' + 10) ; } token.type = NUMBER ; token.code = num ; /* We have the integer part now - convert to int/float */ if ((*token_ptr) == '.' && base == 10) { token_ptr++ ; if (!ISNUM(*token_ptr)) token_ptr-- ; else { dec = 1.0 / (double)base ; while (ISNUM(*token_ptr) || (base > 100 && ISALNUM(*token_ptr))) { if (ISNUM(*token_ptr)) num = num + dec * (*token_ptr++ - '0') ; if (*token_ptr >= 'a' && *token_ptr <= 'f' && base > 10) num = num + dec * (*token_ptr++ - 'a' + 10) ; if (*token_ptr >= 'A' && *token_ptr <= 'F' && base > 10) num = num + dec * (*token_ptr++ - 'A' + 10) ; dec /= (double)base ; } token.code = num ; } } /* Skip the base sufix */ if (base == 16 && *token_ptr == 'h') token_ptr++; if (base == 8 && *token_ptr == 'o') token_ptr++; if (base == 2 && *token_ptr == 'b') token_ptr++; _snprintf (token.name, sizeof(token.name), "%g", token.code) ; return ; } if (*token_ptr == '"' || *token_ptr == '\'') /* Cadena */ { char c = *token_ptr++ ; token.type = STRING ; ptr = token.name; while (*token_ptr && *token_ptr != c) *ptr++ = *token_ptr++ ; if (*token_ptr == c) token_ptr++ ; *ptr = 0 ; return ; } ptr = token.name ; *ptr++ = TOUPPER(*token_ptr) ; if (ISWORDCHAR(*token_ptr++)) { while (ISWORDCHAR(*token_ptr)) *ptr++ = TOUPPER(*token_ptr++) ; } *ptr = 0 ; for (n = 0 ; n < dcb.data.NID ; n++) { if (strcmp(dcb.id[n].Name, token.name) == 0) { token.type = IDENTIFIER ; token.code = dcb.id[n].Code ; strcpy (token.name, dcb.id[n].Name) ; return ; } } token.type = OPERATOR ; } static DCB_TYPEDEF reduce_type (DCB_TYPEDEF orig) { int n ; for (n = 0 ; n < MAX_TYPECHUNKS-1 ; n++) { orig.BaseType[n] = orig.BaseType[n+1] ; orig.Count[n] = orig.Count[n+1] ; } return orig ; } static void var2const() { while (result.type == T_VARIABLE && result.var.Type.BaseType[0] == TYPE_ARRAY) result.var.Type = reduce_type(result.var.Type) ; if (result.type == T_VARIABLE && result.var.Type.BaseType[0] == TYPE_STRING) { result.type = T_STRING ; strncpy (result.name, string_get(*(Sint32 *)(result.data)), 127) ; result.name[127] = 0 ; } if (result.type == T_VARIABLE && result.var.Type.BaseType[0] == TYPE_FLOAT) { result.type = T_CONSTANT ; result.value = *(float *)(result.data) ; } if (result.type == T_VARIABLE && (result.var.Type.BaseType[0] == TYPE_DWORD || result.var.Type.BaseType[0] == TYPE_INT)) { result.type = T_CONSTANT ; result.value = *(Sint32 *)(result.data) ; } if (result.type == T_VARIABLE && (result.var.Type.BaseType[0] == TYPE_WORD || result.var.Type.BaseType[0] == TYPE_SHORT)) { result.type = T_CONSTANT ; result.value = *(Sint16 *)(result.data) ; } if (result.type == T_VARIABLE && (result.var.Type.BaseType[0] == TYPE_BYTE || result.var.Type.BaseType[0] == TYPE_SBYTE)) { result.type = T_CONSTANT ; result.value = *(Sint8 *)(result.data) ; } if (result.type == T_VARIABLE && result.var.Type.BaseType[0] == TYPE_CHAR) { result.type = T_STRING ; if (*(Uint8 *)result.data >= 32) _snprintf (result.name, sizeof(result.name), "%c", *(Uint8 *)result.data) ; else _snprintf (result.name, sizeof(result.name), "\\x%02X", *(Uint8 *)result.data) ; } } static int type_size (DCB_TYPEDEF orig) { unsigned int n, total ; switch (orig.BaseType[0]) { case TYPE_ARRAY: return orig.Count[0] * type_size(reduce_type(orig)) ; case TYPE_POINTER: case TYPE_STRING: case TYPE_DWORD: case TYPE_FLOAT: case TYPE_INT: return 4 ; case TYPE_WORD: case TYPE_SHORT: return 2 ; case TYPE_BYTE: case TYPE_SBYTE: case TYPE_CHAR: return 1 ; case TYPE_STRUCT: total = 0 ; for (n = 0 ; n < dcb.varspace[orig.Members].NVars ; n++) total += type_size (dcb.varspace_vars[orig.Members][n].Type) ; return total ; default: return 0 ; } } /* ---------------------------------------------------------------------- */ void eval_local (DCB_PROC * proc, INSTANCE * i) { unsigned int n ; for (n = 0 ; n < dcb.data.NGloVars ; n++) { if (dcb.locvar[n].ID == token.code) { strcpy (result.name, token.name) ; result.type = T_VARIABLE ; result.var = dcb.locvar[n] ; result.data = (Uint8*)i->locdata + dcb.locvar[n].Offset ; get_token() ; return ; } } for (n = 0 ; n < proc->data.NPriVars ; n++) { if (proc->privar[n].ID == token.code) { strcpy (result.name, token.name) ; result.type = T_VARIABLE ; result.var = proc->privar[n] ; result.data = (Uint8*)i->pridata + proc->privar[n].Offset ; get_token() ; return ; } } for (n = 0 ; n < proc->data.NPubVars ; n++) { if (proc->pubvar[n].ID == token.code) { strcpy (result.name, token.name) ; result.type = T_VARIABLE ; result.var = proc->pubvar[n] ; result.data = (Uint8*)i->pubdata + proc->pubvar[n].Offset ; get_token() ; return ; } } gr_con_printf ("Local or private or public variable not found") ; result.type = T_ERROR ; } void eval_immediate() { unsigned int n ; if (token.type == NUMBER) { result.type = T_CONSTANT ; result.value = token.code ; get_token() ; return ; } if (token.type == STRING) { result.type = T_STRING ; _snprintf (result.name, sizeof(result.name), "%s", token.name) ; get_token() ; return ; } if (token.type != IDENTIFIER) { gr_con_printf ("Not a valid expression") ; result.type = T_ERROR ; return ; } if (token.name[0] == '(') { get_token() ; eval_subexpression() ; if (token.name[0] != ')') { gr_con_printf ("Unbalanced parens") ; result.type = T_ERROR ; return ; } get_token() ; return ; } if (token.name[0] == '-') { get_token() ; eval_immediate() ; var2const() ; if (result.type != T_CONSTANT) { result.type = T_ERROR ; gr_con_printf ("Operand is not a number\n") ; return ; } result.value = -result.value ; _snprintf (result.name, sizeof(result.name), "%g", result.value) ; return ; } for (n = 0 ; n < dcb.data.NGloVars ; n++) { if (dcb.glovar[n].ID == token.code) { strcpy (result.name, token.name) ; result.type = T_VARIABLE ; result.var = dcb.glovar[n] ; result.data = (Uint8*)globaldata + dcb.glovar[n].Offset ; get_token() ; return ; } } if (strcmp(token.name, "MAIN") == 0) token.code = dcb.proc[0].data.ID ; for (n = 0 ; n < dcb.data.NProcs ; n++) { if (dcb.proc[n].data.ID == token.code) { INSTANCE * i = first_instance ; while (i) { if (i->proc->type == (int)n) break ; i = i->next ; } if (!i) { gr_con_printf ("No instance of process %s is active", token.name) ; result.type = T_ERROR ; return ; } get_token() ; if (token.name[0] != '.') { result.type = T_ERROR ; gr_con_printf ("Invalid use of a process name") ; return ; } get_token() ; eval_local(&dcb.proc[n], i) ; return ; } } gr_con_printf ("Variable does not exist (%s)", token.name) ; result.type = T_ERROR ; return ; } void eval_value() { eval_immediate() ; if (result.type == T_ERROR) return ; for (;;) { if (token.name[0] == '.') { DCB_VARSPACE * v ; DCB_VAR * var ; unsigned int n ; var2const() ; if (result.type == T_CONSTANT) { INSTANCE * i ; i = instance_get((int)result.value) ; if (!i) { result.type = T_ERROR ; gr_con_printf ("No existe instancia %d\n", (int)result.value) ; return ; } get_token() ; eval_local (&dcb.proc[i->proc->type], i) ; continue; } if (result.type != T_VARIABLE || result.var.Type.BaseType[0] != TYPE_STRUCT) { gr_con_printf ("%s is not an struct", result.name); result.type = T_ERROR ; return ; } get_token() ; if (token.type != IDENTIFIER) { gr_con_printf ("%s is not a member", token.name) ; result.type = T_ERROR ; return ; } v = &dcb.varspace[result.var.Type.Members] ; var = dcb.varspace_vars[result.var.Type.Members] ; for (n = 0 ; n < v->NVars ; n++) { if (var[n].ID == token.code) break ; } if (n == v->NVars) { gr_con_printf ("%s is not a member", token.name) ; result.type = T_ERROR ; return ; } result.type = T_VARIABLE ; result.var = var[n] ; result.data = (Uint8 *)result.data + var[n].Offset ; strcat (result.name, ".") ; strcat (result.name, token.name) ; get_token() ; continue ; } if (token.name[0] == '[') { DCB_VAR i = result.var ; void * i_data = result.data ; char name[256] ; if (result.type != T_VARIABLE || result.var.Type.BaseType[0] != TYPE_ARRAY) { gr_con_printf ("%s is not an array", result.name) ; result.type = T_ERROR ; return ; } strcpy (name, result.name) ; get_token() ; eval_subexpression() ; if (result.type == T_ERROR) return ; if (token.name[0] == ']') get_token() ; var2const() ; if (result.type != T_CONSTANT) { gr_con_printf ("%s is not an integer", result.name) ; result.type = T_ERROR ; return ; } if (result.value < 0) { gr_con_printf ("Index (%d) less than zero", result.value) ; result.type = T_ERROR ; return ; } if (result.value >= i.Type.Count[0]) { gr_con_printf ("Index (%d) out of bounds", result.value) ; result.type = T_ERROR ; return ; } result.type = T_VARIABLE ; result.var = i ; result.var.Type = reduce_type(i.Type) ; result.data = (Uint8 *)i_data + (int)result.value * type_size(result.var.Type) ; _snprintf (result.name, sizeof(result.name), "%s[%d]", name, (int)result.value) ; continue ; } break ; } } void eval_factor() { double base = 1 ; int op = 0 ; for (;;) { eval_value() ; if (result.type == T_ERROR) return ; if (!strchr ("*/%", token.name[0]) && !op) return ; var2const() ; if (result.type != T_CONSTANT) { result.type = T_ERROR ; gr_con_printf ("Operand is not a number\n") ; return ; } if (!op) op = 1 ; if (op > 1 && !result.value) { result.type = T_ERROR ; gr_con_printf ("Divide by zero\n") ; return ; } if (op == 1) base *= result.value ; if (op == 2) base /= result.value ; if (op == 3) base = (int)base % (int)result.value ; if (!strchr ("*/%", token.name[0])) { result.type = T_CONSTANT ; result.value = base ; _snprintf (result.name, sizeof(result.name), "%g", base) ; return ; } op = token.name[0] == '*' ? 1: token.name[0] == '/' ? 2:3 ; get_token() ; } } static void eval_subexpression() { double base = 0 ; int op = 0 ; for (;;) { eval_factor() ; if (result.type == T_ERROR) return ; if (token.name[0] != '+' && token.name[0] != '-' && !op) return ; var2const() ; if (result.type != T_CONSTANT) { result.type = T_ERROR ; gr_con_printf ("Operand is not a number\n") ; return ; } if (!op) op = 1 ; base += op * result.value ; if (token.name[0] != '+' && token.name[0] != '-') { result.type = T_CONSTANT ; result.value = base ; _snprintf (result.name, sizeof(result.name), "%g", base) ; return ; } op = token.name[0] == '+' ? 1:-1 ; get_token() ; } } static char * eval_expression(const char * here, int interactive) { static char buffer[1024]; static char part[1024]; while (*here == ' ') here++; token_ptr = here ; get_token() ; eval_subexpression() ; if (token.type != NOTOKEN && token.name[0] != ',' && token.name[0] != '=') { if (result.type != T_ERROR) { gr_con_printf ("Invalid expression"); result.type = T_ERROR; } return 0; } memset (part, 0, sizeof(buffer)); strncpy (part, here, token_ptr - here - (token.type != NOTOKEN ? 1:0)); if (result.type == T_CONSTANT) { _snprintf (buffer, 1024, "%s = %g\n", part, result.value); if (interactive) gr_con_printf ("%s", buffer) ; } else if (result.type == T_STRING) { gr_con_printf ("%s = \"%s\"\n", part, result.name) ; } else if (result.type == T_VARIABLE) { lvalue = result ; if (token.name[0] == '=') { if (lvalue.type != T_VARIABLE) { strcpy (buffer, "Not an lvalue") ; if (interactive) gr_con_printf ("%s", buffer) ; return buffer ; } get_token() ; eval_subexpression() ; if (result.type == T_ERROR) return "" ; var2const() ; if ((lvalue.var.Type.BaseType[0] == TYPE_DWORD || lvalue.var.Type.BaseType[0] == TYPE_INT) && result.type == T_CONSTANT) *(Sint32 *)(lvalue.data) = (Sint32)result.value ; else if ((lvalue.var.Type.BaseType[0] == TYPE_WORD || lvalue.var.Type.BaseType[0] == TYPE_SHORT) && result.type == T_CONSTANT) *(Uint16 *)(lvalue.data) = (Uint16)result.value ; else if ((lvalue.var.Type.BaseType[0] == TYPE_BYTE || lvalue.var.Type.BaseType[0] == TYPE_SBYTE) && result.type == T_CONSTANT) *(Uint8 *)(lvalue.data) = (Uint8)result.value ; else if (lvalue.var.Type.BaseType[0] == TYPE_CHAR && result.type == T_STRING) { if (*result.name=='\\' && *(result.name+1)=='x') *(Uint8 *)(lvalue.data) = (Uint8)strtol(result.name+2, NULL, 16); else *(Uint8 *)(lvalue.data) = (Uint8)*(result.name); } else if (lvalue.var.Type.BaseType[0] == TYPE_FLOAT && result.type == T_CONSTANT) *(float *)(lvalue.data) = (float)result.value ; else if (lvalue.var.Type.BaseType[0] == TYPE_STRING && result.type == T_STRING) { string_discard (*(Uint32 *) lvalue.data) ; *(Uint32 *)(lvalue.data) = string_new (result.name) ; string_use (*(Uint32 *) lvalue.data) ; } else { strcpy (buffer, "Invalid assignation") ; if (interactive) gr_con_printf ("%s", buffer) ; return buffer ; } } if (interactive) { show_var (lvalue.var, lvalue.name, lvalue.data, "", 0) ; } else { strcpy (buffer, part) ; strcat (buffer, " ") ; strcat (buffer, show_value (lvalue.var.Type, lvalue.data)); } } if (token.name[0] == ',') { char * temporary = strdup(buffer); int size = strlen(temporary); if (eval_expression (token_ptr, interactive) == 0) { free (temporary); return 0; } if (strlen(buffer) + size < 1020 && !interactive) { memmove (buffer+size+2, buffer, strlen(buffer)+1); memcpy (buffer, temporary, size); memcpy (buffer+size, ", ", 2); } free (temporary); return buffer; } return buffer; } /* ---------------------------------------------------------------------- */ extern void freestrings(PROCDEF * proc, int * data); INSTANCE * findproc(INSTANCE * last, char * action, char * ptr) { INSTANCE * i = NULL; char * aptr; int procno; int n; if (*ptr) { if (*ptr >= '0' && *ptr <= '9') { if (last) return NULL; procno = atoi(ptr); for (i = first_instance ; i ; i = i->next) if (LOCDWORD(i, PROCESS_ID) == procno) break; if (!i) { gr_con_printf ("Instance %d does not exist", procno); return NULL; } } else { aptr = action; while (ISWORDCHAR(*ptr)) { *aptr++ = TOUPPER(*ptr); ptr++; } *aptr = 0; for (n = 0 ; n < (int)dcb.data.NID ; n++) if (strcmp(dcb.id[n].Name, action) == 0) break; for (procno = 0 ; procno < (int)dcb.data.NProcs ; procno++) if (dcb.proc[procno].data.ID == dcb.id[n].Code) break; if (procno == (int)dcb.data.NProcs) { gr_con_printf ("Unknown process %s", action); return NULL; } for (i = last ? last->next : first_instance ; i ; i = i->next) if (i->proc->type == procno) break; if (!i && !last) { gr_con_printf ("No instance of process %s created\n", action); return NULL; } } } return (i); } void gr_con_do (const char * command) { const char * ptr ; char * aptr ; char action[256] ; unsigned int var ; int n ; int procno ; PROCDEF * p = NULL ; INSTANCE * i = NULL ; ptr = command ; while (*ptr && *ptr != ' ') ptr++ ; strncpy (action, command, ptr - command) ; action[ptr - command] = 0 ; while (*ptr == ' ') ptr++ ; aptr = action ; while (*aptr) { *aptr = TOUPPER(*aptr); aptr++; } /* Comandos */ if (strcmp (action, "HELP") == 0) { gr_con_printf ( HELPTXT ); return; } if (strcmp (action, "CONTINUE") == 0) { show_console = 0; force_debug = 0; debug_next = 0; return ; } if (strcmp (action, "DOFRAME") == 0) { show_console = 0; debug_on_frame = 1; force_debug = 0; debug_next = 0; return ; } if (strcmp (action, "TRACE") == 0) { show_console = 0; debug_on_frame = 0; force_debug = 0; debug_next = 1; return ; } if (strncmp (action, "BREAK", 5) == 0) { if (*ptr) { if (*ptr >= '0' && *ptr <= '9') { procno = atoi(ptr); for (i = first_instance ; i ; i = i->next) if (LOCDWORD(i, PROCESS_ID) == procno) break; if (!i) { gr_con_printf ("Instance %d does not exist", procno); } else { i->breakpoint = 1; gr_con_printf ("Ok"); } } else { aptr = action; while (ISWORDCHAR(*ptr)) { *aptr++ = TOUPPER(*ptr); ptr++; } *aptr = 0; if (*action) { p = procdef_get_by_name(action); if (!p) { gr_con_printf ("Process type %d does not exist", procno); } else { p->breakpoint = 1; gr_con_printf ("Ok"); } } } } else { int f=0; for (n = 0 ; n < procdef_count; n++) { if (procs[n].breakpoint) { if (!f) { gr_con_printf("02Process type breakpoints07\n"); f = 1; } gr_con_printf("%s\n", procs[n].name); } } if (f) gr_con_printf("\n"); f = 0; for (i = first_instance ; i ; i = i->next) { if (i->breakpoint) { if (!f) { gr_con_printf("02Process breakpoints07\n"); f = 1; } gr_con_printf("%d\n", LOCDWORD(i, PROCESS_ID)); } } if (f) gr_con_printf("\n"); } return ; } if (strncmp (action, "DELETE", 6) == 0) { if (*ptr) { if (*ptr >= '0' && *ptr <= '9') { procno = atoi(ptr); for (i = first_instance ; i ; i = i->next) if (LOCDWORD(i, PROCESS_ID) == procno) break; if (!i) { gr_con_printf ("Instance %d does not exist", procno); } else { i->breakpoint = 0; gr_con_printf ("Ok"); } } else { aptr = action; while (ISWORDCHAR(*ptr)) { *aptr++ = TOUPPER(*ptr); ptr++; } *aptr = 0; p = procdef_get_by_name(action); if (!p) { gr_con_printf ("Process type %d does not exist", procno); } else { p->breakpoint = 0; gr_con_printf ("Ok"); } } } return ; } if (strcmp (action, "STRINGS") == 0) { string_dump() ; return ; } if (strcmp (action, "INSTANCES") == 0) { instance_dump_all() ; return ; } if (strcmp (action, "GLOBALS") == 0) { for (var = 0 ; var < dcb.data.NGloVars ; var++) { DCB_VAR * v = &dcb.glovar[var] ; show_var (*v, 0, (Uint8*)globaldata + v->Offset, "[GLOBAL]", 0) ; } return ; } if (strncmp (action, "LOCAL", 5) == 0 || strncmp (action, "PRIVATE", 7) == 0 || strncmp (action, "PUBLIC", 6) == 0) { int show_locals = action[0] == 'L'; int show_public = action[0] == 'P' && action[1] == 'U' ; i = findproc(NULL, action, ptr); if (show_locals) { for (var = 0 ; var < dcb.data.NLocVars ; var++) { DCB_VAR * v = &dcb.locvar[var] ; show_var (*v, 0, i ? (char*)i->locdata + v->Offset : 0, "[LOCAL]", 0) ; } } else if (show_public) { if (!i) { gr_con_printf ("Use: PUBLICS process"); return; } for (var = 0 ; var < dcb.proc[i->proc->type].data.NPubVars ; var++) { DCB_VAR * v = &dcb.proc[i->proc->type].pubvar[var] ; /* Unnamed private vars are temporary params and loop counters, and are ignored by this command */ if ((int)v->ID >= 0) { show_var (*v, 0, (char*)i->pubdata + v->Offset, "[PUBLIC]", 0) ; } } } else { if (!i) { gr_con_printf ("Use: PRIVATES process"); return; } for (var = 0 ; var < dcb.proc[i->proc->type].data.NPriVars ; var++) { DCB_VAR * v = &dcb.proc[i->proc->type].privar[var] ; /* Unnamed private vars are temporary params and loop counters, and are ignored by this command */ if ((int)v->ID >= 0) { show_var (*v, 0, (char*)i->pridata + v->Offset, "[PRIVATE]", 0) ; } } } return ; } if (strcmp (action, "SHOW") == 0) { if (show_expression) free(show_expression); show_expression = *ptr ? strdup(ptr) : 0; return; } if (strcmp (action, "VARS") == 0) { for (var = 0 ; var < N_CONSOLE_VARS ; var++) { switch (console_vars[var].type) { case CON_DWORD: gr_con_printf ("[FXI] %s = %d\n", console_vars[var].name, *(int *)console_vars[var].value) ; break; case CON_DWORD_HEX: gr_con_printf ("[FXI] %s = %08Xh\n", console_vars[var].name, *(int *)console_vars[var].value) ; break; } } return ; } if (strncmp (action, "RUN", 3) == 0) { if (*ptr) { aptr = action; while (ISWORDCHAR(*ptr)) { *aptr++ = TOUPPER(*ptr); ptr++; } *aptr = 0; if (*action) { int i; INSTANCE * inst ; p = procdef_get_by_name(action); if (p) { token_ptr = ptr ; gr_con_printf ("%s\n", ptr ); inst = instance_new (p, NULL); for ( i=0; i < p->params; i++ ){ int type = dcb.proc[p->type].privar[i].Type.BaseType[0]; get_token() ; eval_subexpression() ; if (result.type == T_VARIABLE) var2const(); switch(result.type){ case T_CONSTANT: switch(type){ case TYPE_FLOAT: PRIDWORD(inst, 4*i) = *(int *)&result.value ; break; case TYPE_INT: case TYPE_DWORD: case TYPE_POINTER: case TYPE_SHORT: case TYPE_WORD: case TYPE_BYTE: case TYPE_SBYTE: case TYPE_CHAR: PRIDWORD(inst, 4*i) = (int) result.value ; break; case TYPE_STRING: default: freestrings(p, inst->pridata); instance_destroy(inst); gr_con_printf("Invalid argument %d\n", i); return; } break; case T_STRING: PRIDWORD(inst, 4*i) = (int) string_new(result.name) ; string_use(PRIDWORD(inst, 4*i)); break; case T_VARIABLE: default: freestrings(p, inst->pridata); instance_destroy(inst); gr_con_printf("Invalid argument %d\n", i); return; } } gr_con_printf("Process %s is executed!\n", p->name ); } else { gr_con_printf("Process %s not found!\n", p->name ); } return; } } } if (strncmp (action, "KILLALL", 7) == 0 || strncmp (action, "SLEEPALL", 8) == 0 || strncmp (action, "WEAKUPALL", 9) == 0 || strncmp (action, "FREEZEALL", 9) == 0 ) { char act = *action; int found = 0; char * oaction = strdup(action); char * optr = ptr; i = NULL; while ((i = findproc(i, action, ptr))) { found = 1; switch (act) { case 'K': LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_KILLED ; break; case 'W': LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_RUNNING ; break ; case 'S': LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_SLEEPING ; break ; case 'F': LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_FROZEN ; break; } strcpy(action, oaction); ptr = optr; } if(oaction) free(oaction); if(found) gr_con_printf ("Ok\n"); return ; } if (strncmp (action, "KILL", 4) == 0 || strncmp (action, "SLEEP", 5) == 0 || strncmp (action, "WEAKUP", 6) == 0 || strncmp (action, "FREEZE", 6) == 0 ) { char act=*action; i = findproc(NULL, action, ptr); if (!i) return; switch (act) { case 'K': LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_KILLED ; break; case 'W': LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_RUNNING ; break ; case 'S': LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_SLEEPING ; break ; case 'F': LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_FROZEN ; break; } gr_con_printf ("Ok\n"); return ; } if (strcmp (action, "QUIT") == 0) { do_exit(1) ; return ; } /* Variables FXI */ for (var = 0 ; var < N_CONSOLE_VARS ; var++) { if (strcmp(console_vars[var].name, action) == 0) { switch (console_vars[var].type) { case CON_DWORD: if (*ptr) { while (*ptr == '=' || *ptr == ' ') ptr++; eval_expression (ptr, 0); if (result.type != T_ERROR) *(int *)console_vars[var].value = (int) result.value ; } gr_con_printf ("[FXI] %s = %d", console_vars[var].name, *(int *)console_vars[var].value) ; return ; case CON_DWORD_HEX: if (*ptr) { while (*ptr == '=' || *ptr == ' ') ptr++; eval_expression (ptr, 0); if (result.type != T_ERROR) *(int *)console_vars[var].value = (int) result.value ; } gr_con_printf ("[FXI] %s = %08Xh\n", console_vars[var].name, *(int *)console_vars[var].value) ; return ; } } } /* Expresiones */ eval_expression (command, 1) ; } /* ---------------------------------------------------------------------- */ Fenix/fxi/src/sound.c0000644000000000000000000003555510607526776013533 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* HISTORY * * REWRITEN ALL SOUND CODE USING SDL_MIXER * * * */ #pragma comment (lib, "SDL_mixer") #include #include #include #include "fxi.h" int sound_active=0; //variable para comprobar si el sonido est activado. /* ------------------------------------- */ /* Interfaz SDL_RWops Fenix */ /* ------------------------------------- */ static int SDLCALL fenix_seek(SDL_RWops *context, int offset, int whence) { if (file_seek(context->hidden.unknown.data1, offset, whence)<0) { return (-1); } return(file_pos(context->hidden.unknown.data1)); } static int SDLCALL fenix_read(SDL_RWops *context, void *ptr, int size, int maxnum) { int ret = file_read(context->hidden.unknown.data1, ptr, size*maxnum); if (ret>0) ret /= size; return(ret); } static int SDLCALL fenix_write(SDL_RWops *context, const void *ptr, int size, int num) { int ret = file_write(context->hidden.unknown.data1, (void *)ptr, size*num); if (ret>0) ret /= size; return(ret); } static int SDLCALL fenix_close(SDL_RWops *context) { if ( context ) { file_close(context->hidden.unknown.data1); SDL_FreeRW(context); } return(0); } SDL_RWops *SDL_RWFromFenixFP(file *fp) { SDL_RWops *rwops = NULL; rwops = SDL_AllocRW(); if ( rwops != NULL ) { rwops->seek = fenix_seek; rwops->read = fenix_read; rwops->write = fenix_write; rwops->close = fenix_close; rwops->hidden.unknown.data1 = fp; } return(rwops); } /* * FUNCTION : sound_init * * Set the SDL_Mixer library * * PARAMS: * no params * * RETURN VALUE: * * no return */ void sound_init () { int audio_rate; Uint16 audio_format; int audio_channels; int audio_buffers; int audio_mix_channels ; if (!audio_initialized) { audio_initialized = 1; if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) { gr_con_printf ("[SOUND] Sonido no disponible: %s", SDL_GetError()) ; return; } /* Initialize variables: but limit quality to some fixed options */ audio_rate = GLODWORD(SOUND_FREQ); if (audio_rate > 22050) audio_rate = 44100; else if (audio_rate > 11025) audio_rate = 22050; else audio_rate = 11025; audio_format = AUDIO_S16; audio_channels = GLODWORD(SOUND_MODE)+1; audio_buffers = 1024*audio_rate/22050; /* Open the audio device */ if (Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) < 0) { gr_con_printf ("[SOUND] No se pudo inicializar el audio: %s\n",SDL_GetError()) ; sound_active=0; return; } else { GLODWORD(SOUND_CHANNELS)<=32?Mix_AllocateChannels(GLODWORD(SOUND_CHANNELS)):Mix_AllocateChannels(32) ; Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels); audio_mix_channels = Mix_AllocateChannels(-1) ; GLODWORD(SOUND_CHANNELS) = audio_mix_channels ; gr_con_printf ("Opened audio at %d Hz %d bit %s, %d bytes audio buffer\n", audio_rate, (audio_format&0xFF), (audio_channels > 1) ? "stereo" : "mono", audio_buffers ); gr_con_printf ("Allocated %i audio mixing channels\n", audio_mix_channels) ; // Set mixing channels sound_active=1; /* ini_musiccd(); */ return; } } } /* * FUNCTION : sound_close * * Close all the audio set * * PARAMS: * no params * * RETURN VALUE: * * no return */ void sound_close() { if (audio_initialized == 0) sound_init(); if (sound_active==0) return; //falta por comprobar que todo est descargado Mix_CloseAudio(); sound_active=0; } /* ------------------ */ /* Sonido MOD y OGG */ /* ------------------ */ /* * FUNCTION : load_song * * Load a MOD/OGG from a file * * PARAMS: * file name * * RETURN VALUE: * * mod pointer * */ int load_song (const char * filename) { Mix_Music *music = NULL; file *fp; if (audio_initialized == 0) sound_init(); if (sound_active==0) return(-1); fp=file_open(filename, "rb0"); if (!fp) return (-1); music = Mix_LoadMUS_RW(SDL_RWFromFenixFP(fp)); if ( music == NULL ) { file_close(fp); gr_con_printf("Couldn't load %s: %s\n",filename, SDL_GetError()); return(-1); } else { return ((int)music); } } /* * FUNCTION : play_song * * Play a MOD/OGG * * PARAMS: * mod pointer * number of loops (-1 infinite loops) * * RETURN VALUE: * * -1 if there is any error * */ int play_song (int id, int loops) { if (audio_initialized == 0) sound_init(); if (sound_active==0) { gr_error ("Sound is not active"); return (-1); } if (((Mix_Music *)id!=NULL)){ int result = Mix_PlayMusic((Mix_Music *)id,loops); if (result == -1) { gr_error ("%s", Mix_GetError()); } return result; } else { gr_error ("Play song called with invalid handle"); return(-1); } } /* * FUNCTION : fade_music_in * * Play a MOD/OGG fading in it * * PARAMS: * mod pointer * number of loops (-1 infinite loops) * ms microsends of fadding * * RETURN VALUE: * * -1 if there is any error * */ int fade_music_in (int id, int loops, int ms) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if (((Mix_Music *)id!=NULL)){ return(Mix_FadeInMusic((Mix_Music *)id,loops, ms)); } else { return(-1); } } /* * FUNCTION : fade_music_off * * Stop the play of a mod * * PARAMS: * * ms microsends of fadding * * RETURN VALUE: * * -1 if there is any error * */ int fade_music_off (int ms) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); return (Mix_FadeOutMusic(ms)); } /* * FUNCTION : unload_song * * Play a MOD * * PARAMS: * * mod id * * RETURN VALUE: * * -1 if there is any error * */ int unload_song (int id) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if ((Mix_Music *)id!=NULL) { Mix_FreeMusic((Mix_Music *)id); return (0) ; } else { return (-1); } } /* * FUNCTION : stop_song * * Stop the play of a mod * * PARAMS: * * no params * * RETURN VALUE: * * -1 if there is any error * */ int stop_song (void) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); return (Mix_HaltMusic()); } /* * FUNCTION : pause_song * * Pause the mod in curse, you can resume it after * * PARAMS: * * no params * * RETURN VALUE: * * -1 if there is any error * */ int pause_song (void) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); Mix_PauseMusic(); return (0) ; } /* * FUNCTION : resume_song * * Resume the mod, paused before * * PARAMS: * * no params * * RETURN VALUE: * * -1 if there is any error * */ int resume_song (void) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); Mix_ResumeMusic(); return(0) ; } /* * FUNCTION : is_playing_song * * Check if there is any mod playing * * PARAMS: * * no params * * RETURN VALUE: * * -1 if there is any error * TRUE OR FALSE if there is no error */ int is_playing_song(void) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); return Mix_PlayingMusic(); } /* * FUNCTION : is_paused_song * THIS FUNCTION IS INTENDED FOR FENIX INTERNAL USAGE ONLY * * Check if there is a paused song * * PARAMS: * * no params * * RETURN VALUE: * * -1 if there is any error * TRUE OR FALSE if there is no error */ int is_paused_song(void) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); return Mix_PlayingMusic(); } /* * FUNCTION : set_song_volume * * Set the volume for mod playing (0-128) * * PARAMS: * * int volume * * RETURN VALUE: * * -1 if there is any error * 0 if there is no error */ int set_song_volume (int volume) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if (volume<0) volume=0; if (volume>128) volume=128; Mix_VolumeMusic(volume); return 0; } /* ------------ */ /* Sonido WAV */ /* ------------ */ /* * FUNCTION : load_wav * * Load a WAV from a file * * PARAMS: * file name * * RETURN VALUE: * * wav pointer * */ int load_wav (const char * filename) { Mix_Chunk *music = NULL; file *fp; if (audio_initialized == 0) sound_init(); if (sound_active==0) return(-1); fp=file_open(filename, "rb0"); if (!fp) return (-1); music = Mix_LoadWAV_RW(SDL_RWFromFenixFP(fp),1); if ( music == NULL ) { gr_con_printf("Couldn't load %s: %s\n",filename, SDL_GetError()); return(0); } else { return ((int)music); } } /* * FUNCTION : play_wav * * Play a WAV * * PARAMS: * wav pointer; * number of loops (-1 infinite loops) * channel (-1 any channel) * * RETURN VALUE: * * -1 if there is any error * else channel where the music plays */ int play_wav (int id, int loops, int channel) { int canal; if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if ((Mix_Chunk *)id!=NULL) { canal=Mix_PlayChannel(channel,(Mix_Chunk *)id,loops); return(canal); } else { return (-1); } } /* * FUNCTION : unload_wav * * Frees the resources from a wav, unloading it * * PARAMS: * * wav pointer * * RETURN VALUE: * * -1 if there is any error * */ int unload_wav (int id) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if ((Mix_Chunk *)id!=NULL) { Mix_FreeChunk((Mix_Chunk *)id); return (0) ; } else return (-1); } /* * FUNCTION : stop_wav * * Stop a wav playing * * PARAMS: * * int channel * * RETURN VALUE: * * -1 if there is any error * */ int stop_wav (int canal) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if (Mix_Playing(canal)) return(Mix_HaltChannel(canal)); return (-1) ; } /* * FUNCTION : pause_wav * * Pause a wav playing, you can resume it after * * PARAMS: * * int channel * * RETURN VALUE: * * -1 if there is any error * */ int pause_wav (int canal) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if (Mix_Playing(canal)) { Mix_Pause(canal); return (0) ; } return (-1) ; } /* * FUNCTION : resume_wav * * Resume a wav playing, paused before * * PARAMS: * * int channel * * RETURN VALUE: * * -1 if there is any error * */ int resume_wav (int canal) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if (Mix_Playing(canal)) { Mix_Resume(canal); return (0) ; } return (-1) ; } /* * FUNCTION : is_playing_wav * * Check a wav playing * * PARAMS: * * int channel * * RETURN VALUE: * * -1 if there is any error * TRUE OR FALSE if there is no error */ int is_playing_wav(int canal) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); return(Mix_Playing(canal)); } /* * FUNCTION : set_wav_volume * * Set the volume for wav playing (0-128) IN SAMPLE * * PARAMS: * * channel id * int volume * * RETURN VALUE: * * -1 if there is any error * */ int set_wav_volume (int sample,int volume) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if (volume<0) volume=0; if (volume>128) volume=128; if ((Mix_Chunk *)sample!=NULL) return(Mix_VolumeChunk((Mix_Chunk *)sample,volume)); else return -1 ; } /* * FUNCTION : set_channel_volume * * Set the volume for wav playing (0-128) IN CHANNEL * * PARAMS: * * channel id * int volume * * RETURN VALUE: * * -1 if there is any error * */ int set_channel_volume (int canal,int volume) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if (volume<0) volume=0; if (volume>128) volume=128; return(Mix_Volume(canal,volume)); } /* * FUNCTION : reserve_channels * * Reserve the first channels (0 -> n-1) for the application, i.e. don't allocate * them dynamically to the next sample if requested with a -1 value below. * * PARAMS: * number of channels to reserve. * * RETURN VALUE: * number of reserved channels. * -1 if there is any error * */ int reserve_channels (int canales) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); return Mix_ReserveChannels(canales); } /* * FUNCTION : set_panning * * Set the panning for a wav channel * * PARAMS: * * channel * left volume (0-255) * right volume (0-255) */ int set_panning(int canal, int left, int right) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if (Mix_Playing(canal)) { Mix_SetPanning(canal,(Uint8)left,(Uint8)right); return (0) ; } return (-1) ; } /* * FUNCTION : set_position * * Set the position of a channel. (angle) is an integer from 0 to 360 * * PARAMS: * * channel * angle (0-360) * distance (0-255) * * * * */ int set_position(int canal, int angle, int dist) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if (Mix_Playing(canal)) { Mix_SetPosition(canal,(Sint16)angle,(Uint8)dist); return (0) ; } return (-1) ; } /* * FUNCTION : set_distance * * Set the "distance" of a channel. (distance) is an integer from 0 to 255 * that specifies the location of the sound in relation to the listener. * * PARAMS: * * channel * * distance (0-255) * * * * */ int set_distance(int canal, int dist) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if (Mix_Playing(canal)) { Mix_SetDistance(canal,(Uint8)dist); return (0) ; } return (-1) ; } /* * FUNCTION : reverse_stereo * * Causes a channel to reverse its stereo. * * PARAMS: * * channel * flip 0 normal != reverse * * * * * */ int reverse_stereo(int canal, int flip) { if (audio_initialized == 0) sound_init(); if (sound_active==0) return (-1); if (Mix_Playing(canal)) { Mix_SetReverseStereo(canal,flip); return (0) ; } return (-1) ; } Fenix/fxi/src/g_flic.c0000644000000000000000000002260610607526746013614 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include #ifdef TARGET_BEOS #include #else #include #endif #include "fxi.h" extern SDL_Color palette[256] ; /* --------------------------------------------------------------------- */ /* Librera para reproducir ficheros FLI directamente desde el disco */ /* --------------------------------------------------------------------- */ void flic_destroy (FLIC * flic) { file_close (flic->fp) ; if (flic->bitmap) bitmap_destroy (flic->bitmap) ; free (flic->frame) ; free (flic) ; flic = NULL ; } FLIC * flic_open (const char * filename) { FLIC * flic ; flic = (FLIC *) malloc (sizeof(FLIC)) ; if (!flic) return 0 ; flic->fp = file_open (filename, "rb") ; if (!flic->fp) { free (flic) ; return 0 ; } flic->frame_reserved = 8192 ; flic->frame = (FLIC_FRAME *) malloc(8192) ; if (!flic->frame) { file_close (flic->fp) ; free (flic) ; return 0 ; } if (!file_read (flic->fp, &flic->header, sizeof(FLIC_HEADER))) { flic_destroy (flic) ; return 0 ; } if (flic->header.type != 0xAF11 && flic->header.type != 0xAF12) { /* Tipo de FLIC no reconocido */ flic_destroy (flic) ; return 0 ; } flic->bitmap = bitmap_new (0, flic->header.width, flic->header.height, 8, 1) ; if (!flic->bitmap) { /* Tamao incorrecto */ flic_destroy (flic) ; return 0 ; } if (!flic->header.oframe1) flic->header.oframe1 = file_pos (flic->fp) ; flic->current_frame = 0 ; flic->finished = 0 ; flic->last_frame_ms = SDL_GetTicks() ; if (flic->header.type == 0xAF11) flic->speed_ms = (int)((1000.0F/70.0F) * flic->header.speed) ; else flic->speed_ms = flic->header.speed ; return flic ; } static FLIC * flic_do_delta (FLIC * flic) { GRAPH * bitmap = flic->bitmap ; int first_line, line_count ; Uint8 * ptr, * optr, * loptr, packet_count ; int size; first_line = flic->chunk->delta_fli.first_line ; line_count = flic->chunk->delta_fli.line_count ; ptr = flic->chunk->delta_fli.data ; loptr = (Uint8 *)bitmap->data + bitmap->pitch * first_line ; while (line_count-- > 0) { optr = loptr ; loptr += bitmap->pitch ; packet_count = *ptr++ ; while (packet_count--) { optr += *ptr++ ; size = *(Sint8 *)ptr++ ; if (size > 0) { memcpy (optr, ptr, size) ; ptr += size ; } else if (size < 0) { size = -size ; memset (optr, *ptr++, size) ; } optr += size ; } } return flic ; } static FLIC * flic_do_delta_flc (FLIC * flic) { GRAPH * bitmap = flic->bitmap ; int line_count ; Uint16 * ptr, opcode ; Uint8 * optr, * loptr ; Sint8 data_count ; ptr = (Uint16 *)flic->chunk->raw.data ; line_count = *ptr++ ; optr = bitmap->data ; while (line_count > 0) { opcode = *ptr++ ; switch (opcode & 0xC000) { case 0x0000: loptr = optr ; while (opcode-- > 0) { optr += *(Uint8 *)ptr ; data_count = *((Sint8 *)ptr + 1) ; ptr++ ; if (data_count > 0) { memcpy (optr, ptr, (int)data_count * 2) ; ptr += data_count ; optr += data_count * 2 ; } else if (data_count < 0) { data_count = -data_count ; while (data_count--) { *optr++ = (*ptr & 0xFF) ; *optr++ = (*ptr >> 8) ; } ptr++ ; } } optr = loptr ; optr += bitmap->width ; line_count-- ; break ; case 0x4000: flic_destroy (flic) ; return 0 ; case 0x8000: optr[bitmap->width-1] = (opcode & 0xFF) ; break ; case 0xC000: optr += bitmap->pitch * -(Sint16)opcode; break ; } } return flic ; } static FLIC * flic_do_color (FLIC * flic) { Uint8 * ptr ; int packet_count ; int copy_count ; SDL_Color * color ; ptr = flic->chunk->raw.data ; packet_count = *(Uint16 *)ptr ; ptr += 2 ; while (packet_count-- > 0) { color = &palette[*ptr++] ; copy_count = *ptr++ ; if (copy_count < 1) copy_count = 256 ; if (flic->chunk->header.type == CHUNK_COLOR_64) { while (copy_count--) { color->r = (*ptr++ << 2) ; color->g = (*ptr++ << 2) ; color->b = (*ptr++ << 2) ; color++ ; } } else { while (copy_count--) { color->r = *ptr++ ; color->g = *ptr++ ; color->b = *ptr++ ; color++ ; } } } palette_loaded = 1 ; palette_changed = 1 ; return flic ; } static FLIC * flic_do_brun (FLIC * flic) { GRAPH * bitmap = flic->bitmap ; int line_count ; Uint8 * ptr, * optr, * loptr ; Uint16 remaining_width ; int size; ptr = flic->chunk->raw.data ; loptr = bitmap->data ; line_count = bitmap->height ; while (line_count--) { optr = loptr; loptr += bitmap->pitch ; ptr++ ; remaining_width = bitmap->width ; while (remaining_width > 0) { size = *(Sint8 *)ptr++; if (size < 0) { size = -size; memcpy (optr, ptr, size) ; ptr += size ; } else if (size > 0) { memset (optr, *ptr++, size) ; } optr += size ; remaining_width -= size ; } } return flic ; } static FLIC * flic_do_chunk (FLIC * flic) { Uint32 y; /* Procesa el contenido del chunk actual */ switch (flic->chunk->header.type) { case CHUNK_BLACK: for (y = 0 ; y < flic->bitmap->height ; y++) { memset ((Uint8 *)flic->bitmap->data + flic->bitmap->pitch * y, 0, flic->bitmap->pitch) ; } break ; case CHUNK_FLI_COPY: for (y = 0 ; y < flic->bitmap->height ; y++) { memcpy ((Uint8 *)flic->bitmap->data + flic->bitmap->pitch * y, flic->chunk->raw.data + flic->bitmap->width * y, flic->bitmap->width) ; } break ; case CHUNK_DELTA_FLI: if (!flic_do_delta(flic)) return 0 ; break ; case CHUNK_DELTA_FLC: if (!flic_do_delta_flc(flic)) return 0 ; break ; case CHUNK_BYTE_RUN: if (!flic_do_brun(flic)) return 0 ; break ; case CHUNK_COLOR_256: case CHUNK_COLOR_64: if (!flic_do_color(flic)) return 0 ; break ; case CHUNK_STAMP: break ; default: /* Tipo de chunk desconocido */ flic_destroy (flic) ; return 0 ; } return flic ; } FLIC * flic_do_frame (FLIC * flic) { int chunkno = 0 ; int ms ; ms = SDL_GetTicks() ; if (flic->last_frame_ms + flic->speed_ms > ms || flic->finished) return flic ; /* Cuenta el frame y vuelve al inicio si es necesario */ flic->current_frame++ ; if (flic->current_frame >= flic->header.frames) { file_seek (flic->fp, flic->header.oframe1, SEEK_SET) ; flic->current_frame = 1 ; flic->finished = 1 ; return flic ; } else { do { /* Recupera informacin del siguiente chunk del fichero */ if (!file_read (flic->fp, flic->frame, sizeof(FLIC_FRAME))) { flic_destroy (flic) ; return 0 ; } if (flic->frame->type != CHUNK_FRAME && flic->frame->type != CHUNK_PREFIX) { /* Tipo de frame incorrecto */ flic_destroy (flic) ; return 0 ; } if (flic->frame->size < sizeof(FLIC_FRAME)) { /* Fichero corrupto */ flic_destroy (flic) ; return 0; } /* Reserva la memoria necesaria y carga el chunk */ if (flic->frame_reserved < flic->frame->size) { flic->frame_reserved = flic->frame->size ; flic->frame = (FLIC_FRAME *) realloc (flic->frame, flic->frame_reserved) ; if (!flic->frame) { /* Error: sin memoria */ file_close (flic->fp) ; free (flic) ; return 0 ; } } /* If it's a prefix frame, skip it. */ if (flic->frame->size > sizeof(FLIC_FRAME)) { if (!file_read (flic->fp, &flic->frame[1], flic->frame->size - sizeof(FLIC_FRAME))) { flic_destroy (flic) ; return 0 ; } } } while (flic->frame->type != CHUNK_FRAME) ; /* Procesa cada sub-chunk */ flic->chunk = (FLIC_CHUNK *) &flic->frame[1] ; for (chunkno = 0 ; chunkno < flic->frame->chunks ; chunkno++) { if (!flic_do_chunk(flic)) return 0 ; flic->chunk = (FLIC_CHUNK *) (((Uint8 *)flic->chunk) + flic->chunk->header.size) ; } flic->last_frame_ms += flic->speed_ms ; return flic ; } } void flic_reset (FLIC * flic) { flic->current_frame = 0 ; flic->finished = 0 ; file_seek (flic->fp, flic->header.oframe1, SEEK_SET) ; } Fenix/fxi/src/g_fpg.c0000644000000000000000000002160510607744630013443 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : g_fpg.c * DESCRIPTION : Graphic library (FPG) functions * * HISTORY: 0.82 - First version */ #include #include #ifdef WIN32 #include #endif #include "fxi.h" #define MAXLIBS 128 static GRLIB * libs[MAXLIBS] ; GRLIB * syslib = 0 ; static int lib_nextid = 0 ; int lib_count = 0 ; /* * FUNCTION : grlib_new * * Create a new FPG library * * PARAMS : * None * * RETURN VALUE : * ID of the new library or -1 if error */ static GRLIB * grlib_create (); int grlib_new () { GRLIB * lib = grlib_create(); int i ; if (lib_nextid == MAXLIBS && lib_count == lib_nextid) return -1 ; lib_count++ ; if (lib_nextid == MAXLIBS) { for (i = 0 ; i < lib_nextid ; i++) { if (!libs[i]) break ; } if (i == lib_nextid) { gr_error ("grlib_new: sin memoria"); return -1; } libs[i] = lib ; return i ; } libs[lib_nextid] = lib ; return lib_nextid++ ; } /* Static convenience function */ static GRLIB * grlib_create () { GRLIB * lib ; lib = (GRLIB *) malloc (sizeof(GRLIB)) ; if (!lib) return 0 ; lib->maps = (GRAPH **) malloc (16 * sizeof(GRAPH *)) ; lib->name[0] = 0; if (!lib->maps) return 0 ; lib->map_reserved = 16 ; memset (lib->maps, 0, 16 * sizeof(GRAPH *)); return lib ; } /* * FUNCTION : grlib_get * * Get a pointer to an FPG in memory given the internal ID * returned by gr_load_fpg * * PARAMS : * libid Library code * * RETURN VALUE : * Pointer to the object required or NULL if it does not exist */ GRLIB * grlib_get (int libid) { if (libid < 0 || libid >= lib_nextid) return 0 ; return libs[libid] ; } /* * FUNCTION : grlib_destroy * * Remove a FPG and all its maps from memory * * PARAMS : * libid ID of the library * * RETURN VALUE : * 0 if there wasn't a map with this code, 1 otherwise */ void grlib_destroy (int libid) { int i ; GRLIB * lib = grlib_get (libid) ; if (lib == 0) return ; libs[libid] = 0 ; if (lib_nextid == libid+1) lib_nextid-- ; lib_count-- ; if (!lib_count) lib_nextid = 0 ; for (i = 0 ; i < lib->map_reserved ; i++) if (lib->maps[i] != NULL) bitmap_destroy (lib->maps[i]) ; free (lib->maps) ; free (lib) ; } /* * FUNCTION : grlib_unload_map * * Remove a map from a library, if present * * PARAMS : * libid ID of the library * mapcode ID of the map * * RETURN VALUE : * 0 if there wasn't a map with this code, 1 otherwise */ int grlib_unload_map (int libid, int mapcode) { GRLIB * lib; if (libid == 0 && mapcode > 999) lib = syslib; else lib = grlib_get(libid); if (lib == NULL) return 0; if (lib->map_reserved <= mapcode) return 0; if (lib->maps[mapcode] == 0) return 0; bitmap_destroy (lib->maps[mapcode]) ; lib->maps[mapcode] = 0 ; return 1 ; } /* * FUNCTION : grlib_add_map * * Add a map to a graphic library. If any map with the same code * is in the library, it will be unload first * * PARAMS : * lib Pointer to the FPG * map Pointer to the graphic * (fill map->code first!) * * RETURN VALUE : * -1 if error, a number >= 0 otherwise */ int grlib_add_map (int libid, GRAPH * map) { GRLIB * lib = grlib_get(libid); if (map->code > 999) lib = syslib; if (!lib) return -1 ; if (map->code < 0) return -1 ; grlib_unload_map (libid, map->code); if (lib->map_reserved <= map->code) { int new_reserved = (map->code & ~0x001F) + 32; lib->maps = (GRAPH **) realloc (lib->maps, sizeof(GRAPH*) * new_reserved) ; if (!lib->maps) gr_error ("grlib_add_map: sin memoria\n") ; memset (lib->maps + lib->map_reserved, 0, (new_reserved - lib->map_reserved) * sizeof(GRAPH *)); lib->map_reserved = new_reserved; } lib->maps[map->code] = map ; return map->code ; } /* * FUNCTION : bitmap_get * * Get a bitmap using the DIV syntax (libcode, mapcode) * * PARAMS : * libid Library code or 0 for system/global bitmap * mapcode Code of the bitmap * * RETURN VALUE : * Pointer to the graphic required or NULL if not found * * (0, -1) gets the scrbitmap graphic (undocumented!) * (0, 0) gets the background * */ GRAPH * bitmap_get (int libid, int mapcode) { GRLIB * lib ; /* Invalid map code used */ if (libid == 0 || mapcode > 999) { /* Using (0, 0) we can get the background map */ if (mapcode == 0) { background_is_black = 0 ; if (enable_16bits && background_8bits_used) return background_8bits ; return background ; } /* Using (0, -1) we can get the screen bitmap (undocumented bug/feature) */ if (mapcode == -1) { if (!scr_initialized) gr_init(320,200) ; if (!scrbitmap) gr_lock_screen() ; return scrbitmap ; } /* Get the map from the system library * (the only one that can have more than 1000 maps) */ if (syslib && syslib->map_reserved > mapcode && syslib->maps[mapcode]) return syslib->maps[mapcode] ; } /* Get the map from a FPG */ lib = grlib_get(libid) ; if (lib && lib->map_reserved > mapcode) return lib->maps[mapcode]; return 0 ; } /* * FUNCTION : gr_load_fpg * * Load a FPG file * * PARAMS : * libname Name of the file * * RETURN VALUE : * Internal ID of the library or -1 if invalid file * */ static int gr_read_lib (file * fp); int gr_load_fpg (const char * libname) { int libid ; file * fp = file_open (libname, "rb") ; if (!fp) { #ifdef WIN32 char buffer[2048]; GetCurrentDirectory(2048, buffer); gr_error ("Libreria %s no encontrada en %s\n", libname, buffer) ; #else gr_error ("Libreria %s no encontrada\n", libname) ; #endif return -1 ; } libid = gr_read_lib (fp) ; file_close (fp) ; return libid ; } /* Static convenience function */ static int gr_read_lib (file * fp) { char header[8] ; short int px, py ; int bpp, libid, len; Uint32 y ; unsigned c; GRLIB * lib ; GRAPH * gr ; struct { int code ; int regsize ; char name[32] ; char fpname[12] ; int width ; int height ; int flags ; } chunk ; libid = grlib_new() ; if (libid < 0) return 0 ; lib = libs[libid] ; if (lib == 0) return 0; file_read (fp, header, 8) ; if (strcmp (header, "f16\x1A\x0D\x0A") == 0) bpp = 16 ; else if (strcmp (header, "fpg\x1A\x0D\x0A") == 0) bpp = 8 ; else if (strcmp (header, "f01\x1A\x0D\x0A") == 0) bpp = 1 ; else return 0 ; if (bpp == 8) { if (palette_loaded) file_seek (fp, 576 + 768, SEEK_CUR) ; else if (!gr_read_pal (fp)) return 0 ; } while (!file_eof(fp)) { if (!file_read (fp, &chunk, 64)) break ; ARRANGE_DWORD (&chunk.code); ARRANGE_DWORD (&chunk.regsize); ARRANGE_DWORD (&chunk.width); ARRANGE_DWORD (&chunk.height); ARRANGE_DWORD (&chunk.flags); /* Cabecera del grfico */ gr = bitmap_new (chunk.code, chunk.width, chunk.height, bpp, 1); if (!gr) return 0 ; memcpy (gr->name, chunk.name, 32) ; gr->name[31] = 0 ; gr->ncpoints = chunk.flags ; gr->modified = 1 ; /* Puntos de control */ if (gr->ncpoints) { gr->cpoints = (CPOINT *) malloc(gr->ncpoints * sizeof(CPOINT)) ; if (!gr->cpoints) { free(gr) ; return 0 ; } for (c = 0 ; c < gr->ncpoints ; c++) { file_readSint16 (fp, &px) ; file_readSint16 (fp, &py) ; if (px == -1 && py == -1) { gr->cpoints[c].x = CPOINT_UNDEFINED; gr->cpoints[c].y = CPOINT_UNDEFINED; } else { gr->cpoints[c].x = px ; gr->cpoints[c].y = py ; } } } else gr->cpoints = 0 ; /* Datos del grfico */ len = gr->widthb; for (y = 0 ; y < gr->height ; y++) { Uint8 * ptr = (Uint8 *)gr->data + gr->pitch*y; if (!file_read (fp, ptr, len)) { free (gr) ; break ; } if (bpp == 16) { ARRANGE_WORDS (ptr, len/2); if (scr_initialized) gr_convert16_565ToScreen ((Uint16 *)ptr, len/2); } } grlib_add_map (libid, gr) ; } return libid ; } /* * FUNCTION : grlib_init * * Create the system library. This should be called at program startup. * * PARAMS : * None * * RETURN VALUE : * None * */ void grlib_init() { if (!syslib) { syslib = grlib_create() ; } } Fenix/fxi/src/main.c0000644000000000000000000001672610607526772013322 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : main.c * DESCRIPTION : Main entry point for FXI * * HISTORY: 0.81 - Removed -w option * */ /* * INCLUDES */ #ifdef TARGET_BEOS #include #else #include #endif #include #include #include #include #include "fxi.h" #include "font.h" #include "dcb.h" /* os versions */ #ifdef WIN32 #define OS_ID 0 #endif #ifdef TARGET_Linux #define OS_ID 1 #endif #ifdef TARGET_BEOS #define OS_ID 2 #endif #ifdef TARGET_MAC #define OS_ID 3 #endif #ifdef TARGET_GP32 #define OS_ID 4 #endif #ifdef TARGET_DC #define OS_ID 5 #endif #ifdef TARGET_BSD #define OS_ID 6 #endif #ifdef WIN32 #include #endif #define DCB_MAGIC "DCB Stub\x1A\x0D\x0A" /* * GLOBAL VARIABLES */ int debug = 0; /* 1 if running in debug mode */ int fxi = 0; /* 1 only if this is an standalone interpreter */ int embedded = 0; /* 1 only if this is a stub with an embedded DCB */ #ifdef TARGET_MAC int current_file = 0; char files[][256]; #endif extern int full_screen, double_buffer ; extern char *apptitle; /* * FUNCTION : do_exit * * Exits from the program cleanly ending operations * * PARAMS: * INT n: ERROR LEVEL to return to OS * * RETURN VALUE: * No value * */ void do_exit(int n) { int i; if (keytab_initialized) keytab_free() ; for (i=0;i argv[0] && ptr[-1] != '\\' && ptr[-1] != '/') ptr-- ; fxi = (strncmp(ptr,"fxi",3) == 0) || (strncmp(ptr,"FXI",3) == 0) ; /* Init RAND generator */ srand (time(NULL)) ; /* Init SDL */ if ( SDL_Init (SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_CDROM) < 0 ) { printf ("SDL Init Error: %s\n", SDL_GetError()) ; do_exit(1) ; } SDL_JoystickEventState (SDL_ENABLE) ; gr_con_printf ("15" FXI_VERSION) ; if (fxi) { /* Standalone interpreter, dump some info */ sdl_version = SDL_Linked_Version(); gr_con_printf ("14SDL: %d.%d.%d (DLL loaded: %d.%d.%d)", SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL, sdl_version->major, sdl_version->minor, sdl_version->patch) ; } else { /* Hand-made interpreter: search for DCB at EOF */ if (!file_exists(argv[0])) { #ifdef WIN32 char exepath[MAX_PATH]; GetModuleFileName(NULL, exepath, sizeof(exepath)); fp = file_open(exepath, "rb0"); #endif } else fp = file_open(argv[0], "rb0"); if (fp != NULL) { file_seek (fp, -(int)sizeof(dcb_signature), SEEK_END); file_read (fp, &dcb_signature, sizeof(dcb_signature)); if (strcmp(dcb_signature.magic, DCB_MAGIC) == 0) { ARRANGE_DWORD (&dcb_signature.dcb_offset); filename = argv[0]; embedded = 1; } } if (!embedded) { /* No embedded DCB; search for a DCB with similar name */ filename = ptr ; while (*ptr && *ptr != '.') ptr++ ; *ptr = 0 ; } } if (fxi) { /* Calling FXI.EXE so we must get all command line params */ for (i = 1 ; i < argc ; i++) { if (argv[i][0] == '-') { j = 1 ; while (argv[i][j]) { if (argv[i][j] == 'd') debug = 1 ; if (argv[i][j] == 'r') norun = 1 ; //if (argv[i][j] == 'b') double_buffer = 1 ; if (argv[i][j] == 'f') enable_filtering = 1 ; if (argv[i][j] == 'i') { if (argv[i][j+1] == 0) { if (i == argc-1) gr_error ("You must provide a directory") ; file_addp (argv[i+1]); i++ ; break ; } file_addp (argv[i]+j+1) ; break ; } j++ ; } } else { if (!filename) { filename = argv[i] ; if (i < argc-1) memmove (&argv[i], &argv[i+1], sizeof(char*) * (argc-i-1)) ; argc-- ; i-- ; } } } if (!filename) { gr_error ( FXI_VERSION "\nCopyright(C) 2002 Fenix Team\nCopyright (C)1999 Jose Luis Cebrian\n" "Fenix comes with ABSOLUTELY NO WARRANTY; see COPYING for details\n\n" "Usage: %s [options] file.dcb\n\n" " -d Activate DEBUG mode\n" " -f 16bpp Filter ON (only 16bpp color mode)\n" "This program is free software dsitributed under.\n\n" "GNU General Public License published by Free Software Foundation.\n" "Permission granted to distribute and/or modify as stated in the license\n" "agreement (GNU GPL version 2 or later).\n" "See COPYING for license details.\n", argv[0]) ; return 0 ; } } /* Initialization (modules needed before dcb_load) */ gprof_init () ; string_init () ; init_c_type() ; /* Init application title for windowed modes */ strcpy (dcbname, filename) ; apptitle = strdup(filename) ; #ifdef TARGET_MAC strcpy (files[current_file], filename); #endif if (!embedded) { /* First try to load directly (we expect fxi myfile.dcb) */ if (!dcb_load(dcbname)) { /* not successful... try for DCB */ strcat (dcbname, ".dcb") ; if (!dcb_load(dcbname)) { /* not successful... try for DAT */ strcpy (dcbname, filename) ; strcat (dcbname, ".dat") ; if (!dcb_load(dcbname)) { gr_error ("%s: no existe o no es un DCB version %d o compatible", filename, DCB_VERSION >> 8) ; return -1 ; } } } } else { dcb_load_from(fp, dcb_signature.dcb_offset); /* file_close (fp); */ } /* If the dcb is not in debug mode, switch off the profiler */ if (dcb.data.NID == 0) { gprof_toggle(); debug = 0; } /* Initialization (modules needed after dcb_load) */ fnc_init(); #ifdef MMX_FUNCTIONS MMX_init(); #endif grlib_init () ; sysproc_init () ; gr_font_systemfont (default_font); if (argc > 32) argc = 32 ; for (i = 0 ; i < argc ; i++) { int * ptr = &GLODWORD(ARGV_TABLE+i*4) ; *ptr = string_new(argv[i]) ; string_use (*ptr) ; } GLODWORD(ARGC) = argc-1 ; GLODWORD(FXI_OS) = OS_ID ; if (mainproc) { mainproc_running = instance_new (mainproc, 0) ; instance_go_all () ; } //if (cd_playing()) cd_stop() ; //string_dump() ; //gprof_dump ("profile.txt"); do_exit(0); return 0; } Fenix/fxi/src/fgc.c0000644000000000000000000001571710607526740013127 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : fgc.c * DESCRIPTION : Fenix Graphic Collection handling functions * * HISTORY: 0.85 - first version */ #include #include #ifdef TARGET_BEOS #include #else #include #endif #include "fxi.h" #include "fbm.h" #include "fgc.h" const char * fgc_error = ""; /* * FUNCTION : fgc_load * * Loads an FGC file, given its name. * * PARAMS : * filename Name of the file * * RETURN VALUE : * Number (identifier) of the new library * -1 if error (fgc_error will have a description in this case) * */ int fgc_load (const char * filename) { file * fp; int id; GRLIB * lib; GRAPH * graph; FGC_HEADER header; Uint32 * offsets; Uint32 i; // Open the file and check the header and version fp = file_open(filename, "rb"); if (!fp) { fgc_error = "Error al abrir el fichero"; return -1; } if (file_read (fp, &header, sizeof(FGC_HEADER)) != sizeof(FGC_HEADER)) { fgc_error = "Fichero FGC corrupto o truncado"; file_close(fp); return -1; } ARRANGE_DWORD(&header.version); ARRANGE_DWORD(&header.depth); ARRANGE_DWORD(&header.count); ARRANGE_DWORD(&header.palette); if (strcmp (header.magic, FGC_MAGIC) != 0 || (header.version & 0xFF00) != 0x0100) { fgc_error = "No es un fichero FGC o compatible"; file_close(fp); return -1; } // Create the new graphic library id = grlib_new(); lib = grlib_get(id); offsets = (Uint32 *)malloc(4*header.count); if (offsets == NULL) { fgc_error = "No hay memoria libre suficiente"; file_close(fp); return -1; } if (file_read (fp, offsets, 4*header.count) != 4*(int)header.count) { fgc_error = "Fichero FGC corrupto o truncado"; free(offsets); file_close(fp); return -1; } ARRANGE_DWORDS(offsets, header.count); // Load the graphic palette if (header.depth == 8) { static char color_palette[768]; file_seek(fp, header.palette, SEEK_SET); if (file_read(fp, color_palette, 768) != 768) { fgc_error = "PALETA - Fichero FGC truncado"; free(offsets); file_close(fp); return -1; } if (!palette_loaded) { for (i = 0 ; i < 256 ; i++) { palette[i].r = color_palette[3*i + 0]; palette[i].g = color_palette[3*i + 1]; palette[i].b = color_palette[3*i + 2]; } palette_loaded = 1 ; palette_changed = 1 ; } } // Load the individual graphics for (i = 0 ; i < header.count ; i++) { file_seek(fp, offsets[i], SEEK_SET); graph = fbm_load_from(fp, header.depth); if (graph == NULL) { fgc_error = fbm_error; break; } grlib_add_map (id, graph); } free(offsets); file_close(fp); return (i == header.count ? id : -1); } /* * FUNCTION : fgc_save * * Save a FGC file, given its name. * * PARAMS : * id ID of the library (must be > 0) * filename Name of the file * * RETURN VALUE : * 1 if error, 0 otherwise (fgc_error will have a description in this case) * */ int fgc_save (int id, const char * filename) { GRLIB * lib; FGC_HEADER header; file * fp; int i, n; Uint32 * offsets; // Check the parameters lib = grlib_get(id); if (lib == NULL || !lib->maps) { fgc_error = "Nmero de librera incorrecta"; return 0; } // Check the library and prepare the header data strcpy (header.magic, FGC_MAGIC); strncpy (header.name, lib->name, 64); header.version = 0x0100; header.depth = 0; header.count = 0; for (i = 0 ; i < lib->map_reserved ; i++) { if (lib->maps[i] == NULL) continue; // Maps with code > 999 are not inside a collection if (lib->maps[i]->code > 999) continue; header.count++; if (header.depth == 0) { header.depth = lib->maps[i]->depth; continue; } if (header.depth != lib->maps[i]->depth) { fgc_error = "La librera contiene mapas de diferente profundidad"; return 0; } } // Corrected palette_offset information header.palette = sizeof(FGC_HEADER) + 4 * header.count ; // Create the file fp = file_open (filename, "wb9"); if (fp == NULL) { fgc_error = "Error al crear fichero FGC"; return 0; } offsets = (Uint32 *)malloc(4*header.count + 4); if (offsets == NULL) { fgc_error = "No hay memoria libre suficiente"; file_close(fp); return -1; } // Calculate the offsets for (i = n = 0 ; i < lib->map_reserved ; i++) { if (lib->maps[i] == NULL) continue; // Maps with code > 999 are not inside a collection if (lib->maps[i]->code > 999) continue; if (n == 0) { offsets[n] = sizeof(FGC_HEADER) + 4*header.count; if (header.depth == 8) offsets[n] += 768; } offsets[n+1] = offsets[n] + fbm_size(lib->maps[i], 0, 0); n++; } // Write the FGC file header ARRANGE_DWORDS(offsets, header.count); ARRANGE_DWORD(&header.depth); ARRANGE_DWORD(&header.version); ARRANGE_DWORD(&header.count); ARRANGE_DWORD(&header.palette); if (file_write(fp, &header, sizeof(FGC_HEADER)) != sizeof(FGC_HEADER)) { fgc_error = "Error escribiendo en fichero FGC"; file_close (fp); return 0; } ARRANGE_DWORD(&header.count); ARRANGE_DWORD(&header.depth); if (file_write(fp, offsets, 4*header.count) != 4*(int)header.count) { fgc_error = "Error escribiendo en fichero FGC"; file_close (fp); return 0; } // Write the graphic palette if (header.depth == 8) { static char color_palette[768]; for (i = 0 ; i < 256 ; i++) { color_palette[3*i + 0] = palette[i].r; color_palette[3*i + 1] = palette[i].g; color_palette[3*i + 2] = palette[i].b; } if (file_write(fp, color_palette, 768) != 768) { fgc_error = "Error al escribir, FGC truncado"; free(offsets); file_close(fp); return -1; } } // Write each graphic for (i = n = 0 ; i < lib->map_reserved ; i++) { if (lib->maps[i] == NULL) continue; // Maps with code > 999 are not inside a collection if (lib->maps[i]->code > 999) continue; assert (file_pos(fp) == (int)offsets[n]); if (!fbm_save_to (lib->maps[i], fp, 0)) { fgc_error = fbm_error; free(offsets); file_close(fp); return 0; } n++; } free(offsets); file_close(fp); return 1; } Fenix/fxi/src/f_joystick.c0000644000000000000000000001033110607526736014524 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.85 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : f_joystick.c * DESCRIPTION : FXI functions for joystick handling */ #include "fxi.h" SDL_Joystick * _joysticks[MAX_JOYS]; SDL_Joystick * selected_joystick=NULL; /* Internals by Splinter 2007 */ static int _open_joy(int njoy) { if (njoy >= 0 && njoy < MAX_JOYS) { if (!_joysticks[njoy]) { // Open new _joysticks[njoy] = SDL_JoystickOpen(njoy) ; if (_joysticks[njoy]) { selected_joystick = _joysticks[njoy]; SDL_JoystickUpdate() ; return njoy ; } } else { return njoy; } } return -1; } /** * NUM_JOY (int CD) * Returns the number of joysticks present in the system **/ int fxi_joy_num (INSTANCE * my, int * params) { return SDL_NumJoysticks() ; } /** * JOY_NAME (int JOY) * Returns the name for a given joystick present in the system **/ int fxi_joy_name (INSTANCE * my, int * params) { int result; result = string_new(SDL_JoystickName(params[0])); string_use(result); return result; } /** * JOY_SELECT (int JOY) * Returns the selected joystick number **/ int fxi_joy_select (INSTANCE * my, int * params) { return ( _open_joy(params[0]) ); } /* Funciones que pueden usarse especificando joystick en particular */ /** * JOY_BUTTONS (int JOY) * Returns the selected joystick total buttons **/ int fxi_joy_buttons (INSTANCE * my, int * params) { if ( selected_joystick ){ return SDL_JoystickNumButtons(selected_joystick) ; } return -1 ; } int fxi_joy_buttons_specific (INSTANCE * my, int * params) { if ( _open_joy(params[0]) != -1){ return SDL_JoystickNumButtons(_joysticks[params[0]]) ; } return -1 ; } /** * JOY_AXIS (int JOY) * Returns the selected joystick total axes **/ int fxi_joy_axes (INSTANCE * my, int * params) { if ( selected_joystick ){ return SDL_JoystickNumAxes(selected_joystick) ; } return -1 ; } int fxi_joy_axes_specific (INSTANCE * my, int * params) { if ( _open_joy(params[0]) != -1){ return SDL_JoystickNumAxes(_joysticks[params[0]]) ; } return -1 ; } /** * JOY_GET_BUTTON (int JOY) * Returns the selected joystick state for the given button **/ int fxi_joy_get_button (INSTANCE * my, int * params) { if ( selected_joystick && params[0]>=0 && params[0]<=SDL_JoystickNumButtons(selected_joystick) ){ return SDL_JoystickGetButton(selected_joystick,params[0]) ; } return -1 ; } int fxi_joy_get_button_specific (INSTANCE * my, int * params) { if ( _open_joy(params[0]) != -1){ if ( params[1]>=0 && params[1]<=SDL_JoystickNumButtons(_joysticks[params[0]])){ return SDL_JoystickGetButton(_joysticks[params[0]],params[1]) ; } } return -1 ; } /** * JOY_GET_POSITION (int JOY) * Returns the selected joystick state for the given axis **/ int fxi_joy_get_position (INSTANCE * my, int * params) { if ( selected_joystick && params[0]>=0 && params[0]<=SDL_JoystickNumAxes(selected_joystick)){ return SDL_JoystickGetAxis(selected_joystick,params[0]) ; } return -1 ; } int fxi_joy_get_position_specific (INSTANCE * my, int * params) { if ( _open_joy(params[0]) != -1){ if ( params[1]>=0 && params[1]<=SDL_JoystickNumAxes(_joysticks[params[0]])){ return SDL_JoystickGetAxis(_joysticks[params[0]],params[1]) ; } } return -1 ; } Fenix/fxi/src/i_func.c0000644000000000000000000036013110607745042013622 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : i_func.c * DESCRIPTION : Implements FENIX language function handlers * * HISTORY: 0.83 - Added FILE_EXISTS * 0.83 - Added DIRECTORY functions * 0.83 - Added SAVE_PNG, new string functions * 0.82 - Added some new functions * 0.81 - Moved MOD to SONG in soundlib * 0.81 - Introduced some casts to remove Visual C++ warnings * 0.80 - div_ prefix substituted with fxi_ * 0.80 - Added DLL support * 0.80 - Added flag param in map_block_copy * 0.80 - Removed region 0 clipper from map_put/map_xput * 0.76 - Patched SAVE to real BYTE size on saving * 0.76 - Corrected a clipper bug in MAP_BLOCK_COPY * 0.76 - DRAW_AT patched to avoid XGRAPH rotation * 0.75 - SET_ICON second WM fenix function to set window/taskbar icon * 0.74 - SET_TITLE first WM fenix function to set window title * 0.74 - WRITE_VAR, WRITE_INT, WRITE_FLOAT, WRITE_STRING * 0.74 - Collision now accepts TYPE or PROCESS ID * 0.73 - Corrected advance & xadvance to init cos_tables * 0.73 - Added some Win32 patches due to non-portable * strftime formats * 0.73 - Corrected fxi_set_center * 0.73 - Added fxi_memory_free & fxi_memory_total * 0.72 - Corrected fxi_get_real_point */ #include #include #include #include #include #include "fxi.h" #include "fmath.h" #include "dirs.h" #include "sysprocs_p.h" /* WIN32 INCLUDES */ #ifdef WIN32 #include #include #include #include #endif /* BeOS INCLUDES */ #ifdef TARGET_BEOS #include #include #include #include #include #include #include #include #include #endif /* LINUX INCLUDES */ #ifdef TARGET_Linux #include #include #include #include #include #include #include #include #define KERNELC_V_1 2 #define KERNELC_V_2 3 #define KERNELC_V_3 16 #endif /* Mac OS X INCLUDES */ #ifdef TARGET_MAC #include #include #include //#include #include #include #include #include #endif /* BSD INCLUDES */ #ifdef TARGET_BSD #include #include #include #include #include #include #include #endif #include #include "dcb.h" fixed cos_table[90001] ; int cos_table_initialized = 0 ; /* ---------------------------------------------------------------------- */ /* Funciones del sistema */ /* ---------------------------------------------------------------------- */ /* Funciones incompatibles con DIV */ static int fxi_say (INSTANCE * my, int * params) { /* Show debugging info also in stdout */ printf ("%s\n", string_get(params[0])); fflush(stdout); gr_con_printf("%s\n", string_get(params[0])) ; string_discard(params[0]) ; return 1 ; } /* Funciones matemticas */ static int fxi_rand (INSTANCE * my, int * params) { int num1 = params[0] ; int num2 = params[1] ; return num1 + (int)(((double)(num2-num1+1) * rand()) / (RAND_MAX+1.0)) ; } static int fxi_rand_seed (INSTANCE * my, int * params) { srand (params[0]) ; return 1 ; } static int fxi_abs (INSTANCE * my, int * params) { float num = *(float *)¶ms[0] ; float res = num < 0 ? -num:num ; return *(int *)&res ; } static int fxi_pow (INSTANCE * my, int * params) { float res = (float)pow (*(float *)¶ms[0], *(float *)¶ms[1]) ; return *(int *)&res ; } static int fxi_fget_angle (INSTANCE * my, int * params) { double dx = params[2] - params[0] ; double dy = params[3] - params[1] ; int angle ; if (dx == 0) return dy > 0 ? 270000 : 90000 ; angle = (int) (atan(dy / dx) * 180000.0 / M_PI) ; return dx > 0 ? -angle:-angle+180000 ; } static int fxi_fget_dist (INSTANCE * my, int * params) { double dx = params[2] - params[0] ; double dy = params[3] - params[1] ; return (int)sqrt (dx*dx + dy*dy) ; } static int fxi_near_angle (INSTANCE * my, int * params) { int angle = params[0] ; int dest = params[1] ; int incr = params[2] ; if (angle < dest && dest-angle > 180000) angle += 360000 ; if (angle > dest && angle-dest > 180000) angle -= 360000 ; if (angle < dest) { angle += incr ; if (angle > dest) angle = dest ; } else { angle -= incr ; if (angle < dest) angle = dest ; } if (angle < 0) return angle + 360000 ; if (angle >= 360000) return angle - 360000 ; return angle ; } static int fxi_advance (INSTANCE * my, int * params) { int angle ; angle = LOCDWORD(my,ANGLE) ; if (!cos_table_initialized) init_cos_tables() ; LOCDWORD(my,COORDX) += fixtoi(fixceil(fmul(fcos(angle), itofix(params[0])))) ; LOCDWORD(my,COORDY) -= fixtoi(fixceil(fmul(fsin(angle), itofix(params[0])))) ; return 1 ; } static int fxi_xadvance (INSTANCE * my, int * params) { int angle ; angle = params[0] ; if (!cos_table_initialized) init_cos_tables() ; LOCDWORD(my,COORDX) += fixtoi(fixceil(fmul(fcos(angle), itofix(params[1])))) ; LOCDWORD(my,COORDY) -= fixtoi(fixceil(fmul(fsin(angle), itofix(params[1])))) ; return 1 ; } static int fxi_sqrt (INSTANCE * my, int * params) { float res = (float)sqrt(*(float *)¶ms[0]) ; return *(int *)&res ; } /* Funciones matemticas con floats */ static int fxi_cos (INSTANCE * my, int * params) { float param = *(float *)¶ms[0] ; float result = (float)cos((double)(param*M_PI/180000.0)) ; return *(int *)&result ; } static int fxi_sin (INSTANCE * my, int * params) { float param = *(float *)¶ms[0] ; float result = (float)sin((double)(param*M_PI/180000.0)) ; return *(int *)&result ; } static int fxi_tan (INSTANCE * my, int * params) { float param = *(float *)¶ms[0] ; float result = (float)tan((double)(param*M_PI/180000.0)) ; return *(int *)&result ; } static int fxi_acos (INSTANCE * my, int * params) { float param = *(float *)¶ms[0] ; float result = (float)(acos((double)param)*180000.0/M_PI) ; return *(int *)&result ; } static int fxi_asin (INSTANCE * my, int * params) { float param = *(float *)¶ms[0] ; float result = (float)(asin((double)param)*180000.0/M_PI) ; return *(int *)&result ; } static int fxi_atan (INSTANCE * my, int * params) { float param = *(float *)¶ms[0] ; float result = (float)(atan((double)param)*180000.0/M_PI) ; return *(int *)&result ; } /* Interaccin entre procesos */ /** EXIT () * Leaves the program at next frame (two parameters accepted for compatibility) */ static int fxi_exit (INSTANCE * my, int * params) { INSTANCE * i = first_instance ; while (i) { LOCDWORD(i,STATUS) = STATUS_KILLED ; i = i->next ; } must_exit = 1 ; return must_exit ; } static int fxi_exit_0 (INSTANCE * my, int * params) { return fxi_exit (my, params); } static int fxi_exit_1 (INSTANCE * my, int * params) { return fxi_exit (my, params); } static int fxi_running (INSTANCE * my, int * params) { INSTANCE * i; if (params[0] == 0) return 0; if (params[0] >= FIRST_INSTANCE_ID) { i = instance_get (params[0]) ; if (i && (LOCDWORD(i, STATUS) & ~STATUS_WAITING_MASK) >= STATUS_RUNNING) return 1; return 0; } for (i = first_instance ; i ; i = i->next) { if (LOCDWORD(i,PROCESS_TYPE) == params[0] && (LOCDWORD(i, STATUS) & ~STATUS_WAITING_MASK) >= STATUS_RUNNING) return 1; } return 0; } static int fxi_signal (INSTANCE * my, int * params) { INSTANCE * i = instance_get (params[0]) ; int subcall[2] ; if (!params[0]) return 0 ; if (!i && params[0] < FIRST_INSTANCE_ID) { i = first_instance ; subcall[1] = params[1] ; while (i) { if (LOCDWORD(i,PROCESS_TYPE) == params[0]) { subcall[0] = LOCDWORD(i, PROCESS_ID) ; fxi_signal (my, subcall) ; } i = i->next ; } return 0 ; } if (i) { if ((LOCDWORD(i,STATUS) & ~STATUS_WAITING_MASK) != STATUS_DEAD) { object_list_dirty = 1; if (instance_visible(i)) gr_mark_instance(i); switch (params[1] >= 100 ? params[1]-100 : params[1]) { case 0: /* S_KILL */ LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_KILLED ; break ; case 1: /* S_WAKEUP */ LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_RUNNING ; break ; case 2: /* S_SLEEP */ LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_SLEEPING ; break ; case 3: /* S_FREEZE */ LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_FROZEN ; break ; default: gr_error ("Tipo de seal desconocida") ; } if (instance_visible(i)) { instance_update_bbox(i); gr_mark_instance(i); } } if (params[1] >= 100) { i = instance_getson(i) ; while (i) { subcall[0] = LOCDWORD(i, PROCESS_ID) ; subcall[1] = params[1] ; fxi_signal (my, subcall) ; i = instance_getbigbro(i) ; } } } return 1 ; } static int fxi_let_me_alone (INSTANCE * my, int * params) { INSTANCE * i = first_instance ; while (i) { if (i != my && (LOCDWORD(i, STATUS) & ~STATUS_WAITING_MASK) != STATUS_DEAD) LOCDWORD(i, STATUS) = (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) | STATUS_KILLED ; i = i->next ; } LOCDWORD(my, STATUS) = STATUS_RUNNING; return 1 ; } static int fxi_get_angle (INSTANCE * my, int * params) { INSTANCE * b = instance_get (params[0]) ; int subcall[4] ; if (my && b) { subcall[0] = LOCDWORD(my, COORDX) ; subcall[1] = LOCDWORD(my, COORDY) ; subcall[2] = LOCDWORD(b, COORDX) ; subcall[3] = LOCDWORD(b, COORDY) ; return fxi_fget_angle (my, subcall) ; } return -1 ; } static int fxi_get_distx (INSTANCE * my, int * params) { double angle = params[0] * M_PI / 180000.0 ; return (int)(params[1] * cos(angle)) ; } static int fxi_get_disty (INSTANCE * my, int * params) { double angle = params[0] * M_PI / 180000.0 ; return (int)(params[1] * -sin(angle)) ; } static int fxi_get_dist (INSTANCE * a, int * params) { INSTANCE * b = instance_get (params[0]) ; int subcall[4] ; if (a && b) { subcall[0] = LOCDWORD(a, COORDX) ; subcall[1] = LOCDWORD(a, COORDY) ; RESOLXY(a, subcall[0], subcall[1]); subcall[2] = LOCDWORD(b, COORDX) ; subcall[3] = LOCDWORD(b, COORDY) ; RESOLXY(b, subcall[2], subcall[3]); if (LOCDWORD(a, RESOLUTION)>0) return fxi_fget_dist(a, subcall) * LOCDWORD(a, RESOLUTION) ; else if (LOCDWORD(a, RESOLUTION)<0) return fxi_fget_dist(a, subcall) / -LOCDWORD(a, RESOLUTION) ; return fxi_fget_dist (a, subcall) ; } return -1 ; } static int fxi_get_id (INSTANCE * my, int * params) { INSTANCE * ptr = first_instance ; if (!params[0]) { if (LOCDWORD(my, ID_SCAN)) { ptr = instance_get (LOCDWORD(my,ID_SCAN)) ; if (ptr) ptr = ptr->next ; } while (ptr) { if ((LOCDWORD(ptr, STATUS) & ~STATUS_WAITING_MASK) >= STATUS_RUNNING) { LOCDWORD(my,ID_SCAN) = LOCDWORD(ptr, PROCESS_ID) ; return LOCDWORD(ptr, PROCESS_ID) ; } ptr = ptr->next ; } LOCDWORD(my,ID_SCAN) = 0 ; return 0 ; } if (LOCDWORD(my,TYPE_SCAN)) { ptr = instance_get (LOCDWORD(my,TYPE_SCAN)) ; if (LOCDWORD(ptr,PROCESS_TYPE) != params[0]) ptr = first_instance ; else if (ptr) ptr = ptr->next ; } while (ptr) { if (LOCDWORD(ptr,PROCESS_TYPE) == params[0]) { if ((LOCDWORD(ptr, STATUS) & ~STATUS_WAITING_MASK) >= STATUS_RUNNING) { LOCDWORD(my,TYPE_SCAN) = LOCDWORD(ptr,PROCESS_ID); return LOCDWORD(ptr,PROCESS_ID) ; } } ptr = ptr->next ; } LOCDWORD(my,TYPE_SCAN) = 0 ; return 0 ; } static int fxi_set_point (INSTANCE * my, int * params) { GRAPH * bmp = bitmap_get (params[0], params[1]) ; if (!bmp || params[2] < 0 || params[2] > 999) return -1 ; bitmap_set_cpoint (bmp, (Uint32)params[2], params[3], params[4]); return 1 ; } static int fxi_set_center (INSTANCE * my, int * params) { GRAPH * bmp = bitmap_get (params[0], params[1]) ; if (!bmp) return -1 ; bitmap_set_cpoint(bmp, 0, params[2], params[3]); return 1 ; } static int fxi_get_point (INSTANCE * my, int * params) { GRAPH * bmp ; bmp = bitmap_get (params[0], params[1]) ; if (!bmp) return 0 ; /* Use the center as control point if it is not there */ if (params[2] == 0 && (bmp->ncpoints == 0 || bmp->cpoints[0].x == CPOINT_UNDEFINED)) { *(int *)params[3] = bmp->width/2; *(int *)params[4] = bmp->height/2; return 1 ; } if ((Uint32)params[2] >= bmp->ncpoints || params[2] < 0) return 0 ; if (bmp->cpoints[params[2]].x == CPOINT_UNDEFINED && bmp->cpoints[params[2]].y == CPOINT_UNDEFINED) return 0; *(int *)params[3] = bmp->cpoints[params[2]].x ; *(int *)params[4] = bmp->cpoints[params[2]].y ; return 1 ; } static int fxi_get_real_point (INSTANCE * my, int * params) { GRAPH * b ; int x, y, r, centerx, centery, px = 0, py = 0, rx = 0, ry = 0 ; double angle ; 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)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 = LOCDWORD(my,REGIONID) ; if (r < 0 || r > 31) r = 0 ; if (b->cpoints[0].x >= 0 && 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 (b->cpoints[params[0]].x >= 0) { if (LOCDWORD(my,FLAGS) & B_HMIRROR) px = centerx - b->cpoints[params[0]].x - 1 ; else px = b->cpoints[params[0]].x - centerx ; if (LOCDWORD(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 (LOCDWORD(my,GRAPHSIZEX)==100 && LOCDWORD(my,GRAPHSIZEY)==100) { if (LOCDWORD(my,GRAPHSIZE) > 0) { // Corrected a bug from the casting that rounded to 0 px = (int)(px * (LOCDWORD(my,GRAPHSIZE) / 100.0F)) ; py = (int)(py * (LOCDWORD(my,GRAPHSIZE) / 100.0F)) ; } } else { // Adding size_x/size_y control if (LOCDWORD(my,GRAPHSIZEX) > 0) px = (int)(px * (LOCDWORD(my,GRAPHSIZEX) / 100.0F)) ; if (LOCDWORD(my,GRAPHSIZEY) > 0) py = (int)(py * (LOCDWORD(my,GRAPHSIZEY) / 100.0F)) ; } if (LOCDWORD(my,ANGLE) != 0 && !LOCDWORD(my,XGRAPH)) { angle = LOCDWORD(my,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 = LOCDWORD(my,COORDX) ; y = LOCDWORD(my,COORDY) ; RESOLXY(my, x, y); rx = x+px ; ry = y+py ; if (LOCDWORD(my,RESOLUTION)>0) { rx *= LOCDWORD(my,RESOLUTION); ry *= LOCDWORD(my,RESOLUTION); } else if (LOCDWORD(my, RESOLUTION)<0) { rx /= -LOCDWORD(my, RESOLUTION); ry /= -LOCDWORD(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 = LOCDWORD(i,GRAPHSIZEX); scaley = LOCDWORD(i,GRAPHSIZEY); if (scalex == 100 && scaley == 100) scalex = scaley = LOCDWORD(i,GRAPHSIZE); map = instance_graph (i) ; if (!map) return ; // PATCH - XGRAPH DOES NOT ROTATE DESTINATION GRAPHIC if (LOCDWORD(i,ANGLE) || scaley != 100 || scalex != 100) { if (LOCDWORD(i,XGRAPH) && scalex == 100 && scaley == 100) { gr_blit (dest, r, x, y, LOCDWORD(i,FLAGS), map) ; } else { if (LOCDWORD(i,XGRAPH)) { gr_rotated_blit (dest, r, x, y, LOCDWORD(i,FLAGS), 0, scalex, scaley, map) ; } else { gr_rotated_blit (dest, r, x, y, LOCDWORD(i,FLAGS), LOCDWORD(i,ANGLE), scalex, scaley, map) ; } } } else { gr_blit (dest, r, x, y, LOCDWORD(i,FLAGS), map) ; } } static void get_pos (INSTANCE * proc, int *x, int *y) { *x = LOCDWORD(proc,COORDX) ; *y = LOCDWORD(proc,COORDY) ; RESOLXY(proc, *x, *y); } 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 = LOCDWORD(proc,GRAPHSIZEX); scaley = LOCDWORD(proc,GRAPHSIZEY); if (scalex == 100 && scaley == 100) scalex = scaley = LOCDWORD(proc,GRAPHSIZE); get_pos (proc, &x, &y) ; gr_get_bbox (bbox, 0, x, y, LOCDWORD(proc,FLAGS), LOCDWORD(proc,ANGLE), scalex, scaley, b) ; return 1 ; } /* Colisiones */ static int check_collision_with_mouse (INSTANCE * proc1) { REGION bbox1 ; int x, y, mx, my, i ; static GRAPH * bmp ; mx = GLODWORD(MOUSEX) ; my = GLODWORD(MOUSEY) ; /* Checks the process's bounding box to optimize checking (only for screen-type objects) */ if (LOCDWORD(proc1,CTYPE) == 0) { if (!get_bbox (&bbox1, proc1)) return 0 ; if (bbox1.x > mx || bbox1.x2 < mx || bbox1.y > my || bbox1.y2 < my) return 0 ; } /* Creates a temporary bitmap (only once) */ if (!bmp) bmp = bitmap_new (0, 2, 2, enable_16bits ? 16:8, 1) ; if (!bmp) return 0 ; memset (bmp->data, 0, 2) ; /* Retrieves process information */ bbox1.x = 0 ; bbox1.x2 = 1 ; bbox1.y = 0 ; bbox1.y2 = 1 ; get_pos (proc1, &x, &y) ; /* Scroll-type process: check for each region */ if (LOCDWORD(proc1,CTYPE) == 1) { int cflags = LOCDWORD(proc1,CFLAGS); if (!cflags) cflags = 0xFFFFFFFF ; for (i = 0 ; i < 10 ; i++) { if (scrolls[i].active && (cflags & (1 << i))) { REGION * r = scrolls[i].region; if (r->x > mx || r->x2 < mx || r->y > my || r->y2 < my) continue; draw_at (bmp, x+r->x-mx-scrolls[i].posx0, y+r->y-my-scrolls[i].posy0, &bbox1, proc1); if (enable_16bits ? *(Uint16 *)bmp->data : *(Uint8 *)bmp->data) return 1; } } return 0; } /* Collision check (blits into temporary space and checks the resulting pixel) */ draw_at (bmp, x-mx, y-my, &bbox1, proc1) ; return enable_16bits ? *(Uint16 *)bmp->data : *(Uint8 *)bmp->data ; } static int check_collision (INSTANCE * proc1, INSTANCE * proc2) { REGION bbox1, bbox2 ; int x, y, w, h ; GRAPH * bmp, * bmp2 ; int depth ; if (!get_bbox (&bbox1, proc1)) return 0 ; if (!get_bbox (&bbox2, proc2)) return 0 ; 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 ; depth = (enable_16bits ? 16:8) ; bmp = bitmap_new (0, w, h, depth, 1) ; // Splinter (jj_arg@yahoo.com) 06/11/07 08:48pm if (!bmp) return 0; bmp2 = bitmap_new (0, w, h, depth, 1) ; // Splinter (jj_arg@yahoo.com) 06/11/07 08:48pm if (!bmp2) { bitmap_destroy (bmp) ; return 0; } memset (bmp->data, 0, w*h*(depth == 16?2:1)) ; memset (bmp2->data, 0, w*h*(depth == 16?2:1)) ; get_pos (proc1, &x, &y) ; x -= bbox1.x ; y -= bbox1.y ; draw_at (bmp, x, y, &bbox2, proc1) ; get_pos (proc2, &x, &y) ; x -= bbox1.x ; y -= bbox1.y ; draw_at (bmp2, x, y, &bbox2, proc2) ; if (depth == 16) { Uint16 * ptr, * ptr2 ; for (y = 0 ; y < h ; y++) { ptr = (Uint16 *)bmp->data + w*y ; ptr2 = (Uint16 *)bmp2->data + w*y ; for (x = 0 ; x < w ; x++, ptr++, ptr2++) { if (*ptr && *ptr2) { bitmap_destroy (bmp) ; bitmap_destroy (bmp2) ; return 1; } } } } else { Uint8 * ptr, * ptr2 ; for (y = 0 ; y < h ; y++) { ptr = (Uint8 *)bmp->data + w*y ; ptr2 = (Uint8 *)bmp2->data + w*y ; for (x = 0 ; x < w ; x++, ptr++, ptr2++) { if (*ptr && *ptr2) { bitmap_destroy (bmp) ; bitmap_destroy (bmp2) ; return 1; } } } } bitmap_destroy (bmp) ; bitmap_destroy (bmp2) ; return 0; } static int fxi_collision (INSTANCE * my, int * params) { INSTANCE * ptr = instance_get(params[0]) ; if (params[0] == -1) return check_collision_with_mouse(my) ? 1:0 ; /* ADDED IN 0.74 - Checks only for a single instance */ /*DEBUG*/ if (params[0] >= FIRST_INSTANCE_ID && ptr) return check_collision(my,ptr) ; /* we must use full list of instances or get types from it */ ptr = first_instance ; if (!params[0]) { if (LOCDWORD(my, ID_SCAN)) { ptr = instance_get (LOCDWORD(my, ID_SCAN)) ; if (ptr) ptr = ptr->next ; } while (ptr) { if (ptr == my) { ptr = ptr->next ; continue ; } if (((LOCDWORD(ptr, STATUS) & ~STATUS_WAITING_MASK) == STATUS_RUNNING || (LOCDWORD(ptr, STATUS) & ~STATUS_WAITING_MASK) == STATUS_FROZEN) && check_collision (my, ptr)) { LOCDWORD(my, ID_SCAN) = LOCDWORD(ptr, PROCESS_ID) ; return LOCDWORD(ptr, PROCESS_ID) ; } ptr = ptr->next ; } LOCDWORD (my, ID_SCAN) = 0 ; return 0 ; } if (LOCDWORD(my,TYPE_SCAN)) { ptr = instance_get (LOCDWORD(my,TYPE_SCAN)) ; if (ptr && LOCDWORD(ptr,PROCESS_TYPE) != params[0]) ptr = first_instance ; else if (ptr) ptr = ptr->next ; } while (ptr) { if (LOCDWORD(ptr,PROCESS_TYPE) == params[0] && ptr != my) { if (((LOCDWORD(ptr, STATUS) & ~STATUS_WAITING_MASK) == STATUS_RUNNING || (LOCDWORD(ptr, STATUS) & ~STATUS_WAITING_MASK) == STATUS_FROZEN ) && check_collision (my, ptr)) { LOCDWORD(my, TYPE_SCAN) = LOCDWORD(ptr, PROCESS_ID) ; return LOCDWORD(ptr, PROCESS_ID) ; } } ptr = ptr->next ; } LOCDWORD(my,TYPE_SCAN) = 0 ; return 0 ; } /* Entrada/salida */ static int fxi_key (INSTANCE * my, int * params) { key_equiv * curr ; int found = 0 ; if (params[0] > 126 || params[0] < 0) return 0; curr = &key_table[params[0]] ; if (keytab_initialized==0) keytab_init() ; while (curr!=NULL && found==0) { found = keystate[curr->sdlk_equiv] ; curr = curr->next ; } return found ; } /* Funciones de inicializacin y carga */ static int fxi_set_mode (INSTANCE * my, int * params) { if (params[0] < 3200200 || params[0] > 16001400) gr_error ("Modo grfico no soportado") ; gr_init(params[0]/10000, params[0]%10000) ; return 1 ; } static int fxi_set_mode_2 (INSTANCE * my, int * params) { if (params[0]>1600 || params[1]>1400) gr_error ("Modo grfico no soportado") ; gr_init(params[0], params[1]) ; return 1 ; } static int fxi_set_mode_3 (INSTANCE * my, int * params) { if (params[0]>1600 || params[1]>1400) gr_error ("Modo grfico no soportado"); GLODWORD(GRAPH_MODE) = ((GLODWORD(GRAPH_MODE) & 0xFF) | params[2]); gr_init(params[0], params[1]) ; return 1 ; } static int fxi_set_mode_4 (INSTANCE * my, int * params) { if (params[0]>1600 || params[1]>1400) gr_error ("Modo grfico no soportado"); GLODWORD(GRAPH_MODE) = (params[2] | params[3]); gr_init(params[0], params[1]) ; return 1 ; } static int fxi_set_fps (INSTANCE * my, int * params) { gr_set_fps (params[0], params[1]) ; return params[0]; } static int fxi_load_png (INSTANCE * my, int * params) { int r; r = gr_load_png (string_get(params[0])) ; string_discard(params[0]) ; return r ; } static int fxi_load_pcx (INSTANCE * my, int * params) { int r; if (!scr_initialized) gr_init (320, 200) ; r = gr_load_pcx (string_get(params[0])) ; string_discard(params[0]) ; return r ; } static int fxi_save_png (INSTANCE * my, int * params) { int r; r = gr_save_png (bitmap_get(params[0],params[1]),string_get(params[2])) ; string_discard(params[2]) ; return r ; } static int fxi_load_map (INSTANCE * my, int * params) { int r; r = gr_load_map (string_get(params[0])) ; string_discard(params[0]) ; return r ; } static int fxi_load_fpg (INSTANCE * my, int * params) { int r; r = gr_load_fpg (string_get(params[0])) ; string_discard(params[0]) ; return r ; } static int fxi_unload_map (INSTANCE * my, int * params) { GRAPH * map ; map = bitmap_get (params[0], params[1]) ; if (!map) return 0 ; grlib_unload_map (params[0], params[1]) ; return 1 ; } static int fxi_unload_fpg (INSTANCE * my, int * params) { grlib_destroy (params[0]) ; if (my && LOCDWORD(my,FILEID)) LOCDWORD(my,FILEID) = 0 ; return 1 ; } /* Regiones */ static int fxi_define_region (INSTANCE * my, int * params) { REGION * orig = region_get (params[0]); gr_mark_rect (MIN(orig->x,params[1]), MIN(orig->y,params[2]), MAX(orig->x2,params[1]+params[3]), MAX(orig->y2,params[2]+params[4])); region_define (params[0], params[1], params[2], params[3], params[4]) ; return params[0] ; } static int fxi_out_region (INSTANCE * my, int * params) { INSTANCE * proc = instance_get (params[0]) ; int region = params[1], nscroll ; REGION bbox ; if (region < 0 || region > 31 || proc == 0) return 0 ; if (!get_bbox (&bbox, proc)) return 0 ; if (LOCDWORD(proc,CTYPE) == 1) { nscroll = 0 ; if (LOCDWORD(proc,CFLAGS)) { nscroll = 1 ; while (!(LOCDWORD(proc,CFLAGS) & (1 << nscroll))) nscroll++ ; nscroll-- ; } scroll_region (nscroll, &bbox) ; } return region_is_out (®ions[region], &bbox) ; } /* Paleta de colores */ static int fxi_load_fpl (INSTANCE * my, int * params) { const char * palname = string_get (params[0]) ; int r = palname ? fpl_load(palname) : 0 ; string_discard (params[0]) ; return r ; } static int fxi_save_fpl (INSTANCE * my, int * params) { const char * palname = string_get(params[0]); int r = palname ? fpl_save(palname) : 0; string_discard(params[0]); return r; } static int fxi_load_pal (INSTANCE * my, int * params) { const char * palname = string_get (params[0]) ; int r = palname ? gr_load_pal(palname) : 0 ; string_discard (params[0]) ; return r ; } static int fxi_save_pal (INSTANCE * my, int * params) { const char * palname = string_get(params[0]); int r = palname ? gr_save_pal(palname) : 0; string_discard(params[0]); return r; } static int fxi_convert_palette (INSTANCE * my, int * params) { GRAPH * map = bitmap_get (params[0], params[1]) ; int * newpal = (int *) params[2]; Uint32 x, y ; Uint8 * orig, * ptr ; if (!map) return -1 ; if (map->depth != 8) { gr_error ("Intento de usar convert_palette con un grfico de 16 bits") ; return 0; } orig = (Uint8 *)map->data_start ; for (y = 0 ; y < map->height * map->frames; y++) { ptr = orig + map->pitch * y ; for (x = 0 ; x < map->width ; x++, ptr++) *ptr = newpal[*ptr] ; } map->modified = 1; return 1 ; } static int fxi_set_colors (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; gr_set_colors (params[0], params[1], (Uint8 *)params[2]) ; return 1 ; } static int fxi_get_colors (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; gr_get_colors (params[0], params[1], (Uint8 *)params[2]) ; return 1 ; } static int fxi_roll_palette (INSTANCE * my, int * params) { gr_roll_palette (params[0], params[1], params[2]) ; return 1 ; } static int fxi_fade (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; gr_fade_init (params[0], params[1], params[2], params[3]); return 1 ; } static int fxi_fade_on (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; gr_fade_init (100, 100, 100, 16) ; return 1 ; } static int fxi_fade_off (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; gr_fade_init (0, 0, 0, 16) ; while (GLODWORD(FADING)) { gr_wait_frame() ; gr_draw_frame() ; } return 1; } static int fxi_find_color (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; return gr_find_nearest_color (params[0], params[1], params[2]) ; } static int fxi_get_rgb (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; gr_get_rgb (params[0], (int *)params[1], (int *)params[2], (int *)params[3]) ; return 1 ; } static int fxi_rgb (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; return enable_16bits ? gr_rgb (params[0], params[1], params[2]) : gr_find_nearest_color (params[0], params[1], params[2]) ; } extern int fade_step ; /* Blendops */ static int fxi_create_blendop (INSTANCE * my, int * params) { return (int) blend_create() ; } static int fxi_blendop_apply (INSTANCE * my, int * params) { GRAPH * graph = bitmap_get (params[0], params[1]) ; if (graph) blend_apply(graph, (Sint16 *)params[2]) ; return 1 ; } static int fxi_blendop_assign (INSTANCE * my, int * params) { GRAPH * graph = bitmap_get (params[0], params[1]) ; if (graph) blend_assign(graph, (Sint16 *)params[2]) ; return 1 ; } static int fxi_destroy_blendop (INSTANCE * my, int * params) { blend_free((Sint16 *)params[0]) ; return 1 ; } static int fxi_blendop_identity (INSTANCE * my, int * params) { blend_init ((Sint16 *)params[0]) ; return 1 ; } static int fxi_blendop_grayscale (INSTANCE * my, int * params) { blend_grayscale((Sint16 *)params[0], params[1]) ; return 1 ; } static int fxi_blendop_translucency (INSTANCE * my, int * params) { blend_translucency ((Sint16 *)params[0], *(float *)(¶ms[1])) ; return 1 ; } static int fxi_blendop_intensity (INSTANCE * my, int * params) { blend_intensity ((Sint16 *)params[0], *(float *)(¶ms[1])) ; return 1 ; } static int fxi_blendop_swap (INSTANCE * my, int * params) { blend_swap ((Sint16 *)params[0]) ; return 1 ; } static int fxi_blendop_tint (INSTANCE * my, int * params) { blend_tint ((Sint16 *)params[0], *(float *)(¶ms[1]), (Uint8) params[2], (Uint8) params[3], (Uint8) params[4]) ; return 1 ; } /* Primitivas */ static GRAPH * drawing_graph = NULL; static int drawing_z = -512 ; /* Extern */ extern int background_is_black ; static int fxi_drawing_map (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; if (params[0] == 0 && params[1] == 0) { drawing_graph = (enable_16bits && background_8bits_used) ? background_8bits : background ; background_is_black = 0 ; } else drawing_graph = bitmap_get (params[0], params[1]) ; return 1 ; } static int fxi_drawing_at (INSTANCE * my, int * params) { drawing_graph = NULL; drawing_z = params[0]; return 1 ; } static int fxi_drawing_stipple (INSTANCE * my, int * params) { drawing_stipple = params[0]; return 1; } static int fxi_delete_drawing (INSTANCE * my, int * params) { gr_drawing_destroy (params[0]); return 1; } static int fxi_move_drawing (INSTANCE * my, int * params) { gr_drawing_move (params[0], params[1], params[2]); return 1; } static int fxi_drawing_color (INSTANCE * my, int * params) { gr_setcolor (params[0]) ; return 1 ; } static int fxi_set_text_color (INSTANCE * my, int * params) { gr_text_setcolor (params[0]) ; return 1 ; } static int fxi_get_text_color (INSTANCE * my, int * params) { return (gr_text_getcolor()) ; } static int fxi_drawing_alpha (INSTANCE * my, int * params) { gr_setalpha(params[0]); return 1; } static int fxi_box (INSTANCE * my, int * params) { if (!drawing_graph) { DRAWING_OBJECT dr; dr.type = DRAWOBJ_BOX; dr.x1 = params[0]; dr.y1 = params[1]; dr.x2 = params[2]; dr.y2 = params[3]; return gr_drawing_new (dr, drawing_z); } else { gr_box (drawing_graph, 0, params[0], params[1], params[2]-params[0], params[3]-params[1]) ; return 1 ; } } static int fxi_rect (INSTANCE * my, int * params) { if (!drawing_graph) { DRAWING_OBJECT dr; dr.type = DRAWOBJ_RECT; dr.x1 = params[0]; dr.y1 = params[1]; dr.x2 = params[2]; dr.y2 = params[3]; return gr_drawing_new (dr, drawing_z); } else { gr_rectangle (drawing_graph, 0, params[0], params[1], params[2]-params[0], params[3]-params[1]) ; return 1 ; } } static int fxi_line (INSTANCE * my, int * params) { if (!drawing_graph) { DRAWING_OBJECT dr; dr.type = DRAWOBJ_LINE; dr.x1 = params[0]; dr.y1 = params[1]; dr.x2 = params[2]; dr.y2 = params[3]; return gr_drawing_new (dr, drawing_z); } else { gr_line (drawing_graph, 0, params[0], params[1], params[2]-params[0], params[3]-params[1]) ; return 1 ; } } static int fxi_circle (INSTANCE * my, int * params) { if (!drawing_graph) { DRAWING_OBJECT dr; dr.type = DRAWOBJ_CIRCLE; dr.x1 = params[0]; dr.y1 = params[1]; dr.x2 = params[2]; return gr_drawing_new (dr, drawing_z); } else { gr_circle (drawing_graph, 0, params[0], params[1], params[2]) ; return 1 ; } } static int fxi_fcircle (INSTANCE * my, int * params) { if (!drawing_graph) { DRAWING_OBJECT dr; dr.type = DRAWOBJ_FCIRCLE; dr.x1 = params[0]; dr.y1 = params[1]; dr.x2 = params[2]; return gr_drawing_new (dr, drawing_z); } else { gr_fcircle (drawing_graph, 0, params[0], params[1], params[2]) ; return 1 ; } } static int fxi_bezier (INSTANCE * my, int * params) { if (!drawing_graph) { DRAWING_OBJECT dr; dr.type = DRAWOBJ_CURVE; dr.x1 = params[0]; dr.y1 = params[1]; dr.x2 = params[2]; dr.y2 = params[3]; dr.x3 = params[4]; dr.y3 = params[5]; dr.x4 = params[6]; dr.y4 = params[7]; dr.level = params[8]; return gr_drawing_new (dr, drawing_z); } else { gr_bezier (drawing_graph, 0, params); return 1; } } /* Funciones grficas */ static int fxi_get_pixel (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; if (enable_16bits && background_8bits_used) return gr_get_pixel (background_8bits, params[0], params[1]) ; else return gr_get_pixel (background, params[0], params[1]) ; } static int fxi_graphic_set (INSTANCE * my, int * params) { GRAPH * map ; map = bitmap_get (params[0], params[1]) ; if (!map) return 0 ; switch (params[2]) { case 2: /* g_center_x */ bitmap_set_cpoint (map, 0, params[3], (map->ncpoints)?(map->cpoints[0].y):(map->height/2)) ; return 1 ; case 3: /* g_center_y */ bitmap_set_cpoint (map, 0, (map->ncpoints)?(map->cpoints[0].x):(map->width/2), params[3]) ; return 1 ; } return 1 ; } static int fxi_graphic_info (INSTANCE * my, int * params) { GRAPH * map ; if (params[0] || params[1]) map = bitmap_get (params[0], params[1]) ; else if (enable_16bits && background_8bits_used) map = background_8bits ; else map = background ; if (!map) return 0 ; switch (params[2]) { case 0: /* g_wide */ return map->width ; case 1: /* g_height */ return map->height ; case 2: /* g_center_x */ if (map->ncpoints > 0) if (map->cpoints[0].x != CPOINT_UNDEFINED) return map->cpoints[0].x ; return map->width/2 ; case 3: /* g_center_y */ if (map->ncpoints > 0) if (map->cpoints[0].y != CPOINT_UNDEFINED) return map->cpoints[0].y ; return map->height/2 ; case 4: /* g_pitch */ return map->pitch ; case 5: /* g_depth */ return map->depth ; } return 1 ; } static int fxi_put (INSTANCE * my, int * params) { GRAPH * map = bitmap_get (params[0], params[1]) ; if (!map) return 0 ; if (!scr_initialized) gr_init (320, 200) ; if (enable_16bits && (background_is_black || background_8bits_used) && map->depth == 8) { background_8bits_used = 1 ; gr_blit (background_8bits, 0, params[2], params[3], 0, map) ; } else if (enable_16bits && background_8bits_used && map->depth == 16) { background_8bits_used = 0; gr_blit (background, 0, 0, 0, 0, background_8bits); gr_blit (background, 0, params[2], params[3], 0, map) ; } else gr_blit (background, 0, params[2], params[3], 0, map) ; background_is_black = 0 ; return 1 ; } static int fxi_xput (INSTANCE * my, int * params) { GRAPH * map = bitmap_get (params[0], params[1]) ; int r ; if (!map) return 0 ; if (!scr_initialized) gr_init (320, 200) ; r = params[7] ; if (r < 0 || r > 31) r = 0 ; background_is_black = 0 ; if (enable_16bits && background_8bits_used) { gr_blit (background, 0, 0, 0, 0, background_8bits); background_8bits_used = 0; } if (params[4] == 0 && params[5] == 100) { gr_blit (background, ®ions[r], params[2], params[3], params[6], map) ; return 0 ; } gr_rotated_blit (background, ®ions[r], params[2], params[3], params[6], params[4], params[5], params[5], map) ; return 0 ; } static int fxi_put_screen (INSTANCE * my, int * params) { GRAPH * map = bitmap_get (params[0], params[1]) ; GRAPH * bg ; int x, y ; if (!map) { gr_con_printf ("Mapa %d no disponible en el fichero %d", params[1], params[0]) ; return 0; } if (!scr_initialized) gr_init (320, 200) ; if (enable_16bits && map->depth == 8) { background_8bits_used = 1 ; bg = background_8bits; } else { bg = background; } x = bg->width/2; y = bg->height/2; if (map->ncpoints > 0 && map->cpoints[0].x >= 0) { x = x - map->width/2 + map->cpoints[0].x ; y = y - map->height/2 + map->cpoints[0].y ; } gr_clear (bg) ; gr_blit (bg, 0, x, y, 0, map) ; background_is_black = 0; return 1 ; } static int fxi_put_pixel (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; if (enable_16bits && background_8bits_used) gr_put_pixel (background_8bits, params[0], params[1], params[2]) ; else gr_put_pixel (background, params[0], params[1], params[2]) ; background_is_black = 0 ; return 1 ; } static int fxi_clear_screen (INSTANCE * my, int * params) { if (!scr_initialized) gr_init (320, 200) ; gr_clear (background) ; if (enable_16bits && background_8bits_used) { gr_clear (background_8bits) ; background_8bits_used = 0 ; } background_is_black = 1 ; background_dirty = 1 ; return 1 ; } static int fxi_map_buffer (INSTANCE * my, int * params) { GRAPH * map ; if (params[0] || params[1]) map = bitmap_get (params[0], params[1]) ; else { background_is_black = 0 ; if (enable_16bits && background_8bits_used) map = background_8bits ; else { if (!background) { background = bitmap_new (0, scr_width, scr_height, enable_16bits ? 16:8, 1) ; assert (background) ; gr_clear (background) ; bitmap_add_cpoint (background, 0, 0) ; } map = background ; } } return map ? (int)map->data : 0 ; } static int fxi_map_clear (INSTANCE * my, int * params) { GRAPH *map = bitmap_get (params[0], params[1]) ; if (map) gr_clear_as (map, params[2]) ; return 1 ; } static int fxi_new_map (INSTANCE * my, int * params) { GRAPH * map ; if (!scr_initialized) gr_init (320, 200) ; map = bitmap_new_syslib (params[0], params[1], params[2], 1) ; if (map) gr_clear (map); return map ? map->code : 0 ; } static int fxi_get_screen (INSTANCE * my, int * params) { GRAPH * map ; if (!scr_initialized) gr_init (320, 200) ; map = bitmap_new_syslib (scr_width, scr_height, enable_16bits ? 16:8, 1) ; if (map) { gr_draw_screen (map, 1, 1); if (map->modified > 0) map->modified = 0; } return map ? map->code : 0 ; } static int fxi_map_clone (INSTANCE * my, int * params) { GRAPH * origin, * map = NULL ; if (!scr_initialized) gr_init (320, 200) ; origin = bitmap_get (params[0], params[1]) ; if (origin) map = bitmap_clone (origin) ; return map ? map->code : 0 ; } /* static int fxi_map_clone_scale (INSTANCE * my, int * params) { GRAPH * origin, * map = NULL ; if (!scr_initialized) gr_init (320, 200) ; origin = bitmap_get (params[0], params[1]) ; if (origin) map = bitmap_clone_scale (origin, params[2]) ; return map ? map->code : 0 ; } */ static int fxi_map_get_pixel (INSTANCE * my, int * params) { GRAPH * map = bitmap_get (params[0], params[1]) ; if (map) return gr_get_pixel (map, params[2], params[3]) ; return 1 ; } static int fxi_map_put (INSTANCE * my, int * params) { GRAPH * dest = bitmap_get (params[0], params[1]) ; GRAPH * orig = bitmap_get (params[0], params[2]) ; if (!dest) gr_error ("map_put: mapa de destino no vlido") ; if (!orig) gr_error ("map_put: mapa de origen no vlido") ; gr_blit (dest, 0, params[3], params[4], 0, orig) ; return 1 ; } /** MAP_XPUT (FILE, GRAPH_DEST, GRAPH_SRC, X, Y, ANGLE, SIZE, FLAGS) * Draws a map into another one, with most blitter options including flags and alpha */ static int fxi_map_xput (INSTANCE * my, int * params) { GRAPH * dest = bitmap_get (params[0], params[1]) ; GRAPH * orig = bitmap_get (params[0], params[2]) ; if (params[5] == 0 && params[6] == 100) gr_blit (dest, 0, params[3], params[4], params[7], orig) ; else gr_rotated_blit (dest, 0, params[3], params[4], params[7], params[5], params[6], params[6], orig) ; return 1 ; } /** MAP_XPUTNP (FILE_DST, GRAPH_DST, FILE_SRC, GRAPH_SRC, X, Y, ANGLE, SCALE_X, SCALE_Y, FLAGS) * Enhanced MAP_XPUT with all parametes and different FPG file and non-proportional scale */ static int fxi_map_xputnp (INSTANCE * my, int * params) { GRAPH * dest = bitmap_get (params[0], params[1]) ; GRAPH * orig = bitmap_get (params[2], params[3]) ; if (params[6] == 0 && params[7] == 100 && params[8] == 100) gr_blit (dest, 0, params[4], params[5], params[9], orig) ; else gr_rotated_blit (dest, 0, params[4], params[5], params[9], params[6], params[7], params[8], orig) ; return 1 ; } static int fxi_map_name (INSTANCE * my, int * params) { GRAPH * map = bitmap_get (params[0], params[1]); int result; if (!map) return 0; result = string_new (map->name); string_use(result); return result; } static int fxi_map_set_name (INSTANCE * my, int * params) { GRAPH * map = bitmap_get (params[0], params[1]); const char * ptr = string_get (params[2]) ; if (map) { strncpy (map->name, ptr, sizeof(map->name)); map->name[sizeof(map->name)-1] = 0; } string_discard (params[2]); return 0; } static int fxi_map_exists (INSTANCE * my, int * params) { GRAPH * map = bitmap_get (params[0], params[1]); return map == NULL ? 0:1 ; } static int fxi_fpg_exists (INSTANCE * my, int * params) { GRLIB * lib = grlib_get (params[0]); return lib == NULL ? 0:1; } static int fxi_map_put_pixel (INSTANCE * my, int * params) { GRAPH * map = bitmap_get (params[0], params[1]) ; if (map) gr_put_pixel (map, params[2], params[3], params[4]) ; else gr_error ("Mapa %d no disponible en el fichero %d", params[1], params[0]) ; return 1 ; } static int fxi_map_block_copy (INSTANCE * my, int * params) { GRAPH * dest = bitmap_get (params[0], params[1]) ; GRAPH * orig = bitmap_get (params[0], params[4]) ; REGION clip ; int centerx, centery, flag ; Uint32 x, y, w, h, dx, dy ; if (!dest) gr_error ("Mapa %d no disponible en el fichero %d", params[1], params[0]) ; if (!orig) { if (!params[4]) { orig = background ; if (enable_16bits && background_8bits_used) orig = background_8bits ; } else gr_error ("Mapa %d no disponible en el fichero %d", params[4], params[0]) ; } x = params[5] ; y = params[6] ; w = params[7] ; h = params[8] ; dx = params[2] ; dy = params[3] ; flag = params[9] ; centery = orig->height/2 ; centerx = orig->width/2 ; if (orig->ncpoints > 0) { if (orig->cpoints[0].x != CPOINT_UNDEFINED) { centerx = orig->cpoints[0].x ; centery = orig->cpoints[0].y ; } if (flag & B_HMIRROR) centerx = orig->width - 1 - centerx; if (flag & B_VMIRROR) centery = orig->height - 1 - centery; } if (x < 0) { dx += x ; w += x ; x = 0 ; } if (y < 0) { dy += y ; h += y ; y = 0 ; } if (dx < 0) { x += dx ; w += dx ; dx = 0 ; } if (dy < 0) { y += dy ; h += dy ; dy = 0 ; } if (x + w > orig->width) w = orig->width - x ; if (y + h > orig->height) h = orig->height - y ; if (dx + w > dest->width) w = dest->width - dx ; if (dy + h > dest->height) h = dest->height - dy ; if (x >= orig->width || y >= orig->height || dx >= dest->width || dy >= dest->height || w <= 0 || h <= 0) return 0 ; clip.x = dx ; clip.y = dy ; clip.x2 = dx + w - 1 ; clip.y2 = dy + h - 1 ; gr_blit (dest, &clip, dx-x+centerx, dy-y+centery, flag, orig) ; return 1 ; } /* Funciones de FPG */ static int fxi_fpg_add (INSTANCE * my, int * params) { GRAPH * orig = bitmap_get (params[2], params[3]); GRAPH * dest ; if (orig == NULL) return 0; dest = bitmap_clone(orig) ; dest->code = params[1] ; return grlib_add_map (params[0], dest); } static int fxi_fpg_new (INSTANCE * my, int * params) { return grlib_new(); } /* Funciones de bsqueda de caminos */ static int fxi_path_find (INSTANCE * my, int * params) { GRAPH * dest = bitmap_get (params[0], params[1]) ; if (!dest) gr_error ("Mapa %d-%d no existe%d", params[0], params[1]) ; return path_find (dest, params[2], params[3], params[4], params[5], params[6]) ; } static int fxi_path_getxy (INSTANCE * my, int * params) { return path_get ((int *)params[0], (int *)params[1]) ; } static int fxi_path_wall (INSTANCE * my, int * params) { return path_set_wall (params[0]) ; } /* Funciones de visualziacin de textos */ /** LOAD_FNT (STRING FILENAME) * Load a .FNT font from disk (returns the font ID) */ static int fxi_load_fnt (INSTANCE * my, int * params) { char * text ; int r ; if (!scr_initialized) gr_init (320, 200) ; text = (char *)string_get (params[0]) ; r = text ? gr_font_load (text) : 0 ; string_discard (params[0]) ; return r ; } /** LOAD_BDF (STRING FILENAME) * Load a .BDF font from disk (returns the font ID) */ static int fxi_load_bdf (INSTANCE * my, int * params) { char * text = (char *)string_get (params[0]) ; int r = text ? gr_load_bdf (text) : 0 ; string_discard (params[0]) ; return r ; } /** UNLOAD_FNT (FONT) * Destroys a font in memory */ static int fxi_unload_fnt (INSTANCE * my, int * params) { gr_font_destroy (params[0]); return 0; } /** FNT_NEW (DEPTH) * Create a new font in memory (returns the font ID) */ static int fxi_fnt_new (INSTANCE * my, int * params) { int result = gr_font_new(); FONT * font = gr_font_get(result); if (font && (params[0] == 8 || params[0] == 16)) font->bpp = params[0]; return result; } /** GET_GLYPH (FONT, GLYPH) * Create a system map as a copy of one of the font glyphs (returns the map ID) */ static int fxi_get_glyph (INSTANCE * my, int * params) { FONT * font = gr_font_get(params[0]); GRAPH * map ; unsigned char c = params[1]; if (font->charset == CHARSET_CP850) c = win_to_dos[c]; if (!scr_initialized) gr_init (320, 200) ; if (!font) return 0; if(!font->glyph[c].bitmap) return 0; map = bitmap_clone (font->glyph[c].bitmap); if (!map) return 0; if (!map->ncpoints) bitmap_add_cpoint (map, map->width/2, map->height/2); bitmap_add_cpoint (map, font->glyph[c].xoffset, font->glyph[c].yoffset); bitmap_add_cpoint (map, font->glyph[c].xadvance, font->glyph[c].yadvance); return map->code; } /** SET_GLYPH (FONT, GLYPH, LIBRARY, GRAPHIC) * Change one of the font's glyphs */ static int fxi_set_glyph (INSTANCE * my, int * params) { FONT * font = gr_font_get(params[0]); GRAPH * map = bitmap_get(params[2], params[3]); unsigned char c = params[1]; if (font->charset == CHARSET_CP850) c = win_to_dos[c]; if (font && map) { if (font->glyph[c].bitmap) bitmap_destroy (font->glyph[c].bitmap); font->glyph[c].bitmap = bitmap_clone(map); if (map->ncpoints >= 3 && map->cpoints) { font->glyph[c].xoffset = map->cpoints[1].x; font->glyph[c].yoffset = map->cpoints[1].y; font->glyph[c].xadvance = map->cpoints[2].x; font->glyph[c].yadvance = map->cpoints[2].y; } else { font->glyph[c].xoffset = 0; font->glyph[c].yoffset = 0; font->glyph[c].xadvance = map->width + map->width / 5 ; font->glyph[c].yadvance = map->height + map->height / 5 ; bitmap_add_cpoint (font->glyph[c].bitmap, 0, 0) ; } } return 0; } /** SAVE_FNT (FONT, STRING FILENAME) * Saves a font to disk */ static int fxi_save_fnt (INSTANCE * my, int * params) { char * text ; int r ; text = (char *)string_get (params[1]) ; r = text ? gr_font_save (params[0], text) : 0 ; string_discard (params[1]) ; return r ; } /* Funciones de visualizacin de textos */ static int fxi_write (INSTANCE * my, int * params) { const char * text = string_get (params[4]) ; int r = text ? gr_text_new (params[0], params[1], params[2], params[3], text) : 0 ; string_discard (params[4]) ; return r ; } static int fxi_write_in_map (INSTANCE * my, int * params) { const char * text = string_get (params[1]) ; GRAPH * gr ; if (!text) return 0 ; gr = gr_text_bitmap (params[0], text, params[2]) ; string_discard (params[1]) ; if (!gr) return 0 ; return gr->code ; } /* * FUNCTION : fxi_write_var * * Creates a new text associated with a variable * * FENIX LANG PARAMS: * params[0] : fnt to use * params[1] : X * params[2] : Y * params[3] : align * params[4] : pointer * params[5] : DCB_TYPE * * FENIX RETURN VALUE: * Text ID for the newly created text * */ static int fxi_write_var (INSTANCE * my, int * params) { DCB_TYPEDEF * var = (DCB_TYPEDEF *)params[5] ; int t = 0 ; switch (var->BaseType[0]) { case TYPE_FLOAT: t = TEXT_FLOAT ; break ; case TYPE_DWORD: t = TEXT_DWORD ; break ; case TYPE_WORD: t = TEXT_WORD ; break ; case TYPE_BYTE: t = TEXT_BYTE ; break ; case TYPE_STRING: t = TEXT_STRING ; break ; case TYPE_ARRAY: if (var->BaseType[1] == TYPE_CHAR) { t = TEXT_CHARARRAY; break; } case TYPE_SBYTE: t = TEXT_SBYTE; break; case TYPE_CHAR: t = TEXT_CHAR; break; case TYPE_SHORT: t = TEXT_SHORT; break; case TYPE_INT: t = TEXT_INT; break; default: gr_error ("No es un tipo de dato vlido"); break ; } return gr_text_new_var (params[0], params[1], params[2], params[3], (void *)params[4], t) ; } /* * Same as fxi_write_var, but param[5] not given and always set to VAR_STRING */ static int fxi_write_string (INSTANCE * my, int * params) { return gr_text_new_var (params[0], params[1], params[2], params[3], (void *)params[4], 2) ; } /* * Same as fxi_write_var, but param[5] not given and always set to VAR_INT */ static int fxi_write_int (INSTANCE * my, int * params) { return gr_text_new_var (params[0], params[1], params[2], params[3], (void *)params[4], 3) ; } /* * Same as fxi_write_var, but param[5] not given and always set to VAR_FLOAT */ static int fxi_write_float (INSTANCE * my, int * params) { return gr_text_new_var (params[0], params[1], params[2], params[3], (void *)params[4], 4) ; } static int fxi_move_text (INSTANCE * my, int * params) { gr_text_move (params[0], params[1], params[2]) ; return 1; } static int fxi_delete_text (INSTANCE * my, int * params) { gr_text_destroy (params[0]) ; return 1; } static int fxi_text_height (INSTANCE * my, int * params) { const char * str = string_get (params[1]) ; int result = gr_text_height (params[0], str) ; string_discard (params[1]) ; return result ; } static int fxi_text_width (INSTANCE * my, int * params) { const char * str = string_get (params[1]) ; int result = gr_text_width (params[0], str) ; string_discard (params[1]) ; return result ; } /* Funciones de acceso a ficheros */ static int fxi_save (INSTANCE * my, int * params) { file * fp ; const char * filename ; int result = 0 ; filename = string_get (params[0]) ; if (!filename) return 0 ; fp = file_open (filename, "wb0") ; if (fp) { result = savetypes (fp, (void *)params[1], (void *)params[2], params[3]); file_close (fp) ; } string_discard (params[0]) ; return result ; } static int fxi_load (INSTANCE * my, int * params) { file * fp ; const char * filename ; int result = 0 ; filename = string_get (params[0]) ; if (!filename) return 0 ; fp = file_open (filename, "rb0") ; if (fp) { result = loadtypes (fp, (void *)params[1], (void *)params[2], params[3]); file_close (fp) ; } string_discard(params[0]) ; return result ; } static int fxi_fopen (INSTANCE * my, int * params) { static char * ops[] = { "rb0", "r+b0", "wb0", "rb", "wb6" } ; int r ; if (params[1] < 0 || params[1] > 4) params[0] = 0 ; r = (int) file_open (string_get(params[0]), ops[params[1]]) ; string_discard (params[0]) ; return r ; } static int fxi_fclose (INSTANCE * my, int * params) { file_close ((file *)params[0]) ; return 1 ; } static int fxi_fread (INSTANCE * my, int * params) { return loadtypes ((file *)params[0], (void *)params[1], (void *)params[2], params[3]); } static int fxi_fwrite (INSTANCE * my, int * params) { return savetypes ((file *)params[0], (void *)params[1], (void *)params[2], params[3]); } static int fxi_fseek (INSTANCE * my, int * params) { return file_seek ((file *)params[0], params[1], params[2]) ; } static int fxi_ftell (INSTANCE * my, int * params) { return file_pos ((file *)params[0]) ; } static int fxi_filelength (INSTANCE * my, int * params) { return file_size ((file *)params[0]) ; } static int fxi_fputs (INSTANCE * my, int * params) { int r = file_puts ((file *)params[0], string_get(params[1])) ; string_discard(params[1]) ; return r ; } static int fxi_file (INSTANCE * my, int * params) { char buffer[1024] ; int str = string_new("") ; file * f ; int l; f = file_open (string_get(params[0]), "rb") ; string_discard(params[0]) ; if (!f) return 0 ; while (!file_eof(f)) { if (!(l=file_read (f, buffer, sizeof(buffer)))) break ; buffer[l]='\0'; string_concat (str, buffer) ; buffer[0]='\0'; } string_concat (str, buffer) ; string_use (str) ; file_close (f) ; return str ; } static int fxi_fgets (INSTANCE * my, int * params) { char buffer[1024] ; int str, str2 = 0, str3 ; int len, sigue ; for (;;) { file_gets ((file *)params[0], buffer, sizeof(buffer)) ; len = strlen(buffer) ; if (len > 1 && buffer[len-1] == '\n' && buffer[len-2] == '\\') { buffer[len-2] = 0 ; sigue = 1 ; } else sigue = 0 ; str = string_new (buffer) ; if (str2) { str3 = string_add (str2, str) ; string_discard (str) ; string_discard (str2) ; str2 = str3 ; } else str2 = str ; if (!sigue) break ; } string_use (str2) ; return str2 ; } static int fxi_feof (INSTANCE * my, int * params) { return file_eof ((file *)params[0]) ; } static int fxi_file_exists (INSTANCE * my, int * params) { int r ; r = file_exists (string_get(params[0])) ; string_discard (params[0]) ; return r ; } /* Sonido */ /* * FUNCTION : fxi_load_song * * Load a MOD from a file * * PARAMS: * file name * * RETURN VALUE: * * mod id * */ static int fxi_load_song (INSTANCE * my, int * params) { int var; const char * filename ; filename = string_get (params[0]) ; if (!filename) return (-1) ; var=(load_song(filename)); string_discard(params[0]); return (var); } /* * FUNCTION : fxi_play_song * * Play a MOD * * PARAMS: * mod id; * number of loops (-1 infinite loops) * * RETURN VALUE: * * -1 if there is any error * 0 if all goes ok */ static int fxi_play_song (INSTANCE * my, int * params) { if (params[0] == -1) return -1; return(play_song(params[0],params[1])); } /* * FUNCTION : fxi_unload_song * * Frees the resources from a MOD and unloads it * * PARAMS: * mod id; * * RETURN VALUE: * * -1 if there is any error * 0 if all goes ok */ static int fxi_unload_song (INSTANCE * my, int * params) { if (params[0]<0) return (-1); return(unload_song(params[0])); } /* * FUNCTION : fxi_stop_song * * Stop the play of a mod * * PARAMS: * * no params * * RETURN VALUE: * * -1 if there is any error * 0 if all goes ok */ int fxi_stop_song (INSTANCE * my, int * params) { return(stop_song()); } /* * FUNCTION : fxi_pause_song * * Pause the mod in curse, you can resume it after * * PARAMS: * * no params * * RETURN VALUE: * * -1 if there is any error * 0 if all goes ok */ int fxi_pause_song (INSTANCE * my, int * params) { return(pause_song()); } /* * FUNCTION : fxi_resume_song * * Resume the mod, paused before * * PARAMS: * * no params * * RETURN VALUE: * * -1 if there is any error * 0 if all goes ok */ int fxi_resume_song (INSTANCE * my, int * params) { return(resume_song()); } /* * FUNCTION : fxi_is_playing_song * * Check if there is any mod playing * * PARAMS: * * no params * * RETURN VALUE: * * -1 if there is any error * TRUE OR FALSE if there is no error */ static int fxi_is_playing_song(INSTANCE * my, int * params) { return (is_playing_song()); } /* * FUNCTION : fxi_set_song_volume * * Set the volume for mod playing (0-128) * * PARAMS: * * int volume * * RETURN VALUE: * * -1 if there is any error * 0 if there is no error */ static int fxi_set_song_volume (INSTANCE * my, int * params) { return (set_song_volume(params[0])); } /* * FUNCTION : fxi_fade_music_in * * Play a MOD/OGG fading in it * * PARAMS: * mod pointer * number of loops (-1 infinite loops) * ms microsends of fadding * * RETURN VALUE: * * -1 if there is any error * */ static int fxi_fade_music_in (INSTANCE * my, int * params) { if (params[0] == -1) return -1; return (fade_music_in(params[0],params[1],params[2])); } /* * FUNCTION : fxi_fade_music_off * * Stop the play of a mod * * PARAMS: * * ms microsends of fadding * * RETURN VALUE: * * -1 if there is any error * */ static int fxi_fade_music_off (INSTANCE * my, int * params) { return (fade_music_off(params[0])); } /* * FUNCTION : fxi_load_wav * * Load a WAV from a file * * PARAMS: * file name * * RETURN VALUE: * * wav id * */ static int fxi_load_wav (INSTANCE * my, int * params) { int var; const char * filename ; filename = string_get (params[0]) ; if (!filename) return (-1) ; var=(load_wav(filename)); string_discard(params[0]); return (var); } /* * FUNCTION : fxi_play_wav * * Play a WAV * * PARAMS: * wav id; * number of loops (-1 infinite loops) * * RETURN VALUE: * * -1 if there is any error * 0 if all goes ok */ static int fxi_play_wav (INSTANCE * my, int * params) { if (params[0] == -1) return -1; return(play_wav(params[0],params[1],-1)); } /* * FUNCTION : fxi_play_wav_channel * * Play a WAV * * PARAMS: * wav id; * number of loops (-1 infinite loops) * channel (-1 like fxi_play_wav) * * RETURN VALUE: * * -1 if there is any error * 0 if all goes ok */ static int fxi_play_wav_channel (INSTANCE * my, int * params) { if (params[0] == -1) return -1; return(play_wav(params[0],params[1],params[2])); } /* * FUNCTION : fxi_unload_wav * * Frees the resources from a wav, unloading it * * PARAMS: * * mod id * * RETURN VALUE: * * -1 if there is any error * 0 if all goes ok */ static int fxi_unload_wav (INSTANCE * my, int * params) { if (params[0] == -1) return -1; return(unload_wav(params[0])); } /* * FUNCTION : fxi_stop_wav * * Stop a wav playing * * PARAMS: * * wav id * * RETURN VALUE: * * -1 if there is any error * 0 if all goes ok */ static int fxi_stop_wav (INSTANCE * my, int * params) { return(stop_wav(params[0])); } /* * FUNCTION : fxi_pause_wav * * Pause a wav playing, you can resume it after * * PARAMS: * * wav id * * RETURN VALUE: * * -1 if there is any error * 0 if all goes ok */ static int fxi_pause_wav (INSTANCE * my, int * params) { return (pause_wav(params[0])); } /* * FUNCTION : resume_wav * * Resume a wav playing, paused before * * PARAMS: * * wav id * * RETURN VALUE: * * -1 if there is any error * 0 if all goes ok */ static int fxi_resume_wav (INSTANCE * my, int * params) { return (resume_wav(params[0])); } /* * FUNCTION : is_playing_wav * * Check a wav playing * * PARAMS: * * wav id * * RETURN VALUE: * * -1 if there is any error * TRUE OR FALSE if there is no error */ static int fxi_is_playing_wav(INSTANCE * my, int * params) { return (is_playing_wav(params[0])); } /* * FUNCTION : fxi_set_channel_volume * * Set the volume for a wav playing (0-128) * * PARAMS: * * wav id * int volume * * RETURN VALUE: * * -1 if there is any error * 0 if there is no error */ static int fxi_set_channel_volume(INSTANCE * my, int * params) { return(set_channel_volume(params[0],params[1])); } /* * FUNCTION : fxi_reserve_channels * * Reserve the first channels (0 -> n-1) for the application, i.e. don't allocate * them dynamically to the next sample if requested with a -1 value below. * * PARAMS: * number of channels to reserve. * * RETURN VALUE: * number of reserved channels. * -1 if there is any error * */ static int fxi_reserve_channels(INSTANCE * my, int * params) { return (reserve_channels(params[0])); } /* * FUNCTION : fxi_set_wav_volume * * Set the volume for a wav playing (0-128) * * PARAMS: * * wav id * int volume * * RETURN VALUE: * * -1 if there is any error * 0 if there is no error */ static int fxi_set_wav_volume(INSTANCE * my, int * params) { return(set_wav_volume(params[0],params[1])); } /* * FUNCTION : fxi_set_panning * * Set the panning for a wav channel * * PARAMS: * * channel * left volume (0-255) * right volume (0-255) * * * * */ static int fxi_set_panning(INSTANCE * my, int * params) { return(set_panning(params[0],params[1],params[2])); } /* * FUNCTION : fxi_set_position * * Set the position of a channel. (angle) is an integer from 0 to 360 * * PARAMS: * * channel * angle (0-360) * distance (0-255) * * * * */ static int fxi_set_position(INSTANCE * my, int * params) { return(set_position(params[0],params[1],params[2])); } /* * FUNCTION : fxi_set_distance * * Set the "distance" of a channel. (distance) is an integer from 0 to 255 * that specifies the location of the sound in relation to the listener. * * PARAMS: * * channel * * distance (0-255) * * * * */ static int fxi_set_distance(INSTANCE * my, int * params) { return(set_distance(params[0],params[1])); } /* * FUNCTION : fxi_reverse_stereo * * Causes a channel to reverse its stereo. * * * PARAMS: * * channel * * flip 0 normal != reverse * * * * */ static int fxi_reverse_stereo(INSTANCE * my, int * params) { return(reverse_stereo(params[0],params[1])); } /* Mode 7 */ static int fxi_start_mode7 (INSTANCE * my, int * params) { gr_mode7_start (params[0], params[1], params[2], params[3], params[4], params[5]) ; return 1 ; } static int fxi_stop_mode7 (INSTANCE * my, int * params) { gr_mode7_stop (params[0]) ; return 1 ; } /* Scroll */ static int fxi_start_scroll (INSTANCE * my, int * params) { object_list_dirty = 1; gr_scroll_start (params[0], params[1], params[2], params[3], params[4], params[5]) ; return 1 ; } static int fxi_stop_scroll (INSTANCE * my, int * params) { object_list_dirty = 1; gr_scroll_stop (params[0]) ; return 1 ; } static int fxi_move_scroll (INSTANCE * my, int * params) { gr_scroll_draw (params[0], 0, 0) ; return 1 ; } /* Reproduccin de FLI */ FLIC * current_fli = 0 ; int current_fli_x = 0 ; int current_fli_y = 0 ; /* * FUNCTION : fxi_start_fli * * Load & start playing a FLI/FLC animation * * PARAMS: * * file : filename/path for the FLI/FLC file * x,y : screen position * */ static int fxi_start_fli (INSTANCE * my, int * params) { const char * str = string_get(params[0]) ; if (!str) return 0 ; if (current_fli) flic_destroy (current_fli) ; current_fli = flic_open (str) ; current_fli_x = params[1] ; current_fli_y = params[2] ; object_list_dirty = 1; string_discard (params[0]) ; if (current_fli) return current_fli->header.frames ; return 1 ; } /* * FUNCTION : fxi_reset_fli * * Reset current FLI/FLC animation to frame 0 * * PARAMS: * * No params * */ static int fxi_reset_fli (INSTANCE * my, int * params) { if (current_fli) flic_reset (current_fli) ; return 1 ; } /* * FUNCTION : fxi_end_fli * * Stop current FLI/FLC animation * * PARAMS: * * No params * */ static int fxi_end_fli (INSTANCE * my, int * params) { if (current_fli) { object_list_dirty = 1; flic_destroy (current_fli) ; current_fli = 0 ; } return 1 ; } /* * FUNCTION : fxi_frame_fli * * Check status for the current FLI/FLC animation * * RETURN VALUE: * * Current frame or 0 if animation has ended * * PARAMS: * * No params * */ static int fxi_frame_fli (INSTANCE * my, int * params) { if (current_fli) return current_fli->finished ? 0 : current_fli->current_frame ; return 0 ; } /* STRINGS */ /** LEN (STRING SOURCE) * Returns the size of a string */ static int fxi_strlen (INSTANCE * my, int * params) { const char * str = string_get(params[0]) ; int r = str ? strlen(str) : 0 ; string_discard (params[0]) ; return r ; } /** STRING UCASE (STRING SOURCE) * Converts a string to upper-case */ static int fxi_strupper (INSTANCE * my, int * params) { int r = string_ucase(params[0]) ; string_discard (params[0]) ; string_use (r) ; return r ; } /** STRING LCASE (STRING SOURCE) * Converts a string to lower-case */ static int fxi_strlower (INSTANCE * my, int * params) { int r = string_lcase(params[0]) ; string_discard (params[0]) ; string_use (r) ; return r ; } /** STRCASECMP (STRING S1, STRING S2) * Compares two strings, case-insensitive */ static int fxi_strcasecmp (INSTANCE * my, int * params) { int r = string_casecmp(params[0],params[1]) ; string_discard (params[0]) ; string_discard (params[1]) ; return r ; } /** SUBSTR (STRING SOURCE, INT FIRST_CHARACTER, INT COUNT) * Returns part of a given string, starting at the given character position * and returning a string limited to COUNT characters */ static int fxi_substr (INSTANCE * my, int * params) { int r = string_substr(params[0],params[1],(params[2]<0)?(params[2]-1):params[2]) ; string_discard (params[0]) ; string_use (r) ; return r ; } /** SUBSTR (STRING SOURCE, INT FIRST_CHARACTER) * Returns a substring, from the character given to the end of the source string */ static int fxi_substr2 (INSTANCE * my, int * params) { int r = string_substr(params[0],params[1],-1) ; string_discard (params[0]) ; string_use (r) ; return r ; } /** FIND (STRING SOURCE, STRING SUBSTRING) * Searchs a substring in a string, and returns its position */ static int fxi_strfind (INSTANCE * my, int * params) { int r = string_find(params[0],params[1], 0) ; string_discard (params[0]) ; string_discard (params[1]) ; return r ; } /** FIND (STRING SOURCE, STRING SUBSTRING, INT FIRST) * Searchs a substring in a string, starting from the given position, and returns its position */ static int fxi_strfindSSI (INSTANCE * my, int * params) { int r = string_find(params[0],params[1], params[2]) ; string_discard (params[0]) ; string_discard (params[1]) ; return r ; } /** STRING LPAD (STRING SOURCE, LENGTH) * Expands the string up to the given length, adding spaces at the left */ static int fxi_lpad (INSTANCE * my, int * params) { int r = string_pad(params[0], params[1], 0); string_discard(params[0]); string_use(r); return r; } /** STRING RPAD (STRING SOURCE, LENGTH) * Expands the string up to the given length, adding spaces at the right */ static int fxi_rpad (INSTANCE * my, int * params) { int r = string_pad(params[0], params[1], 1); string_discard(params[0]); string_use(r); return r; } /** ITOA (INT VALUE) * Converts an integer to string */ static int fxi_itos (INSTANCE * my, int * params) { int r = string_itoa (params[0]) ; string_use(r) ; return r ; } /** FTOA (FLOAT VALUE) * Converts a floating-point number to string */ static int fxi_ftos (INSTANCE * my, int * params) { int r = string_ftoa (*(float *)¶ms[0]) ; string_use(r) ; return r ; } /** ATOI (STRING VALUE) * Converts a string to integer */ static int fxi_stoi (INSTANCE * my, int * params) { const char * str = string_get(params[0]) ; int r = str ? atoi(str) : 0 ; string_discard (params[0]) ; return r ; } /** ATOF (STRING VALUE) * Converts a string to floating-point number */ static int fxi_stof (INSTANCE * my, int * params) { const char * str = string_get(params[0]) ; float res = (float)(str ? atof(str) : 0 ); string_discard (params[0]) ; return *(Sint32 *)&res ; } /** ASC(STRING C) * Return the ASCII code of the first character at the string */ static int fxi_asc (INSTANCE * my, int * params) { const Uint8 * str = string_get(params[0]) ; int r = str ? *str : 0 ; string_discard (params[0]) ; return r ; } /** CHR(ASCII) * Returns a string of length 1, with the character of the given ASCII code */ static int fxi_chr (INSTANCE * my, int * params) { char buffer[2] = " " ; int r ; buffer[0] = params[0] ; r = string_new (buffer) ; string_use (r) ; return r ; } /** STRING TRIM(STRING SOURCE) * Returns the given string, stripping any space characters at the beginning or the end */ static int fxi_trim (INSTANCE * my, int * params) { int r = string_strip (params[0]) ; string_discard (params[0]) ; string_use (r) ; return r; } #ifndef WIN32 extern char *strrev(char *); #endif /** STRING STRREV (STRING SOURCE) * Returns the reverse of the source string */ static int fxi_strrev (INSTANCE * my, int * params) { int r = string_new (string_get(params[0])); string_discard (params[0]) ; string_use (r) ; strrev ((char *) string_get(r)); return r; } /** FORMAT (INT VALUE) * Converts a given integer value to string form */ static int fxi_formatI (INSTANCE * my, int * params) { int r = string_format (params[0], 0, '.', ','); string_use(r) ; return r; } /** FORMAT (FLOAT VALUE) * Converts a given value to string form */ static int fxi_formatF (INSTANCE * my, int * params) { int r = string_format (*(float *)¶ms[0], -1, '.', ','); string_use(r) ; return r; } /** FORMAT (INT VALUE, INT DECIMALS) * Converts a given integer value to string form. Uses a fixed number * of decimals, as given with the second parameter. */ static int fxi_formatFI (INSTANCE * my, int * params) { int r = string_format (*(float *)¶ms[0], params[1], '.', ','); string_use(r) ; return r; } /* * Dynamic memory */ /* Linux utility function */ #ifdef TARGET_Linux int kernel_version_type(void) { struct utsname sysinf; int kernel_v[3]; int i,t,fv = 0; if(uname(&sysinf) == -1) return -1; bzero((int*)kernel_v, sizeof(int)*3); for(i=0, t=0; i<=2; i++) { if(sysinf.release[t]) { kernel_v[i] = atoi(&sysinf.release[t]); while (sysinf.release[++t] && sysinf.release[t] != '.') ; t++; } } if(!fv && kernel_v[0] > KERNELC_V_1) fv = 1; if(!fv && kernel_v[0] < KERNELC_V_1) fv = 2; if(!fv && kernel_v[1] > KERNELC_V_2) fv = 1; if(!fv && kernel_v[1] < KERNELC_V_2) fv = 2; if(!fv && kernel_v[2] > KERNELC_V_3) fv = 1; if(!fv && kernel_v[2] < KERNELC_V_3) fv = 2; return fv; } #endif /* MEMORY_FREE() * Returns the number of free bytes (physycal memory only) * This value is intended only for informational purposes * and may or may not be an approximation. */ static int fxi_memory_free (INSTANCE * my, int * params) { #if defined(WIN32) MEMORYSTATUS mem ; GlobalMemoryStatus(&mem) ; return mem.dwAvailPhys ; #elif defined(TARGET_BEOS) system_info info; get_system_info(&info); return B_PAGE_SIZE * (info.max_pages-info.used_pages); #elif !defined(TARGET_MAC) /* Linux and other Unix (?) */ struct sysinfo meminf; int fv; if(sysinfo(&meminf) == -1) return -1; if(!(fv = kernel_version_type())) return -1; if(fv == 1) { gr_con_printf ("Returning %d", meminf.freeram * meminf.mem_unit); return meminf.freeram * meminf.mem_unit; } else { gr_con_printf ("Returning %d", meminf.freeram); return meminf.freeram; } return -1; #else return 0; //TODO #endif } /* MEMORY_TOTAL(); * Return total number of bytes of physical memory */ static int fxi_memory_total (INSTANCE * my, int * params) { #if defined(WIN32) MEMORYSTATUS mem ; GlobalMemoryStatus(&mem) ; return mem.dwTotalPhys ; #elif defined(TARGET_BEOS) system_info info; get_system_info(&info); return B_PAGE_SIZE * (info.max_pages); #elif !defined(TARGET_MAC) /* Linux and other Unix (?) */ struct sysinfo meminf; int fv; if(sysinfo(&meminf) == -1) return -1; if(!(fv = kernel_version_type())) return -1; if(fv == 1) return meminf.totalram * meminf.mem_unit; else return meminf.totalram; return -1; #else return 0; //TODO #endif } static int fxi_memcmp (INSTANCE * my, int * params) { return (memcmp ((void *)params[0], (void *)params[1], params[2])) ; } static int fxi_memcopy (INSTANCE * my, int * params) { memmove ((void *)params[0], (void *)params[1], params[2]) ; return 1 ; } static int fxi_memset (INSTANCE * my, int * params) { memset ((void *)params[0], params[1], params[2]) ; return 1 ; } static int fxi_memsetw (INSTANCE * my, int * params) { Uint16 * ptr = (Uint16 *)params[0] ; const Uint16 b = params[1] ; int n ; for (n = params[2] ; n ; n--) *ptr++ = b ; return 1 ; } static int fxi_alloc (INSTANCE * my, int * params) { void * ptr = malloc (params[0]) ; if (!ptr) gr_error ("ALLOC: no hay memoria libre suficiente") ; return (int)ptr ; } static int fxi_realloc (INSTANCE * my, int * params) { void * ptr = realloc ((void *)params[0], params[1]) ; if (!ptr) gr_error ("REALLOC: no hay memoria libre suficiente") ; return (int)ptr ; } static int fxi_free (INSTANCE * my, int * params) { free ((void *)params[0]) ; return 1 ; } static int fxi_get_timer (INSTANCE * my, int * params) { return SDL_GetTicks() ; } /* Hora del da */ static int fxi_time (INSTANCE * my, int * params) { return time(0) ; } /* * FUNCTION : fxi_ftime * * Returns parts of the date * * PARAMS: * no params * * RETURN VALUE: * pointer to a float value... * */ static int fxi_ftime (INSTANCE * my, int * params) { char buffer[128] ; char * format ; struct tm * t ; int ret ; time_t tim ; char * base ; #ifdef TARGET_Win32 /* aux buffer to make all changes... */ char aux[128] ; unsigned char pos ; #endif format = base = strdup(string_get(params[0])) ; #ifdef TARGET_Win32 /* Addapting win32 strftime formats to linux formats */ /* HEAVY PATCH... :( */ pos=0 ; while (*format && pos<127) { switch (*format) { case '%': /* MIGHT NEED CONVERSION... */ aux[pos] = *format ; pos++ ; format++ ; switch (*format) { case 'e': aux[pos] = '#' ; pos++ ; aux[pos] = 'd' ; break ; case 'l': aux[pos] = '#' ; pos++ ; aux[pos] = 'I' ; break ; case 'k': aux[pos]='#' ; pos++ ; aux[pos] = 'H' ; break ; case 'P': aux[pos] = 'p' ; break ; case 'C': aux[pos++] = '%' ; aux[pos++] = *format ; aux[pos++] = '%' ; aux[pos] = 'Y' ; break ; case 'u': aux[pos++] = '%' ; aux[pos++] = *format ; aux[pos++] = '%' ; aux[pos] = 'w' ; break ; case '%': //MUST BE %%%% TO KEEP 2 IN POSTPROCESS aux[pos++] = '%' ; aux[pos++] = '%' ; aux[pos] = '%' ; break ; default: aux[pos] = *format ; break ; } break ; default: aux[pos] = *format ; break ; } format++ ; pos++ ; } aux[pos]=0 ; free(base) ; format = aux ; #endif tim = (time_t) params[1] ; t = localtime(&tim) ; strftime (buffer, 128, format, t) ; string_discard(params[0]) ; #ifdef TARGET_Win32 /* win32 postprocess */ aux[0] = '\0' ; format = buffer ; pos = 0 ; while (*format) { switch (*format) { case '%': format++ ; switch (*format) { case 'u': format++ ; if (*format=='0') *format='7' ; aux[pos] = *format ; break ; case 'C': format++ ; aux[pos] = *format ; pos++ ; format++ ; aux[pos] = *format ; format++ ; format++ ; break ; default: aux[pos] = *format ; break ; } break ; default: aux[pos] = *format ; break ; } format++ ; pos++; } aux[pos] = '\0' ; strcpy(buffer,aux) ; #endif ret = string_new(buffer) ; string_use(ret) ; return ret ; } /* Window Manager */ static int fxi_set_title (INSTANCE * my, int * params) { apptitle = strdup(string_get(params[0])) ; return 1 ; } static int fxi_set_icon (INSTANCE * my, int * params) { icono = bitmap_get(params[0],params[1]) ; return 1 ; } static int fxi_minimize (INSTANCE * my, int * params) { // Patch: mouse button states are not reset on minimization GLODWORD(MOUSELEFT) = 0 ; GLODWORD(MOUSEMIDDLE) = 0 ; GLODWORD(MOUSERIGHT) = 0 ; GLODWORD(MOUSEWHEELUP) = 0 ; GLODWORD(MOUSEWHEELDOWN)= 0 ; return SDL_WM_IconifyWindow(); } static int fxi_move_window(INSTANCE * my, int * params) { int res ; SDL_SysWMinfo wminfo ; /* only usable in window mode */ if (full_screen) return 0 ; SDL_VERSION(&wminfo.version); if (!SDL_GetWMInfo(&wminfo) > 0) return 0 ; #ifdef WIN32 /* typedef struct { SDL_version version; HWND window; HGLRC hglrc; } SDL_SysWMinfo; */ /* Set the new window position */ res = SetWindowPos( wminfo.window, // handle to window HWND_NOTOPMOST , // Possibly will have no effect... it stays below top-most params[0], // horizontal position params[1], // vertical position 0, // keep the old window width 0, // keep the old window height SWP_SHOWWINDOW | SWP_NOSIZE // Make it visible and retain size ) ; #endif #ifdef TARGET_Linux Window root; Window parent; Window *children; unsigned int children_count; /* typedef struct { SDL_version version; SDL_SYSWM_TYPE subsystem; union { struct { Display *display; Window window; void (*lock_func)(void); void (*unlock_func)(void); Window fswindow; Window wmwindow; } x11; } info; } SDL_SysWMinfo; */ XQueryTree( wminfo.info.x11.display, wminfo.info.x11.window, &root, &parent, &children, &children_count); wminfo.info.x11.lock_func(); res = XMoveWindow( wminfo.info.x11.display, parent, params[0], params[1]); wminfo.info.x11.unlock_func(); if( children ) XFree(children); #endif // Missing BeOS & MAC support return res ; } /* * Auxiliary QSort functions * */ double GetData(Uint8 *Data,int pos,int *params) { if(params[4]==sizeof(Uint8)) return Data[pos*params[1]+params[3]]; if(params[4]==sizeof(Uint16)) return *(Uint16 *)(&Data[pos*params[1]+params[3]]); if(params[4]==sizeof(int) && params[5]==0) return *(int *)(&Data[pos*params[1]+params[3]]); if(params[4]==sizeof(float) && params[5]==1) return *(float *)(&Data[pos*params[1]+params[3]]); return 1 ; } void QuickSort(Uint8 *Data,int inf, int sup, int *params) { register int izq,der; double mitad; Uint8* x=(Uint8*)malloc(params[1]); izq=inf; der=sup; mitad=GetData(Data,(izq+der)>>1,params); do { while(GetData(Data,izq,params) < mitad && izqinf) der--; if(izq<=der) { memcpy(x,&Data[izq*params[1]],params[1]); memcpy(&Data[izq*params[1]],&Data[der*params[1]],params[1]); memcpy(&Data[der*params[1]],x,params[1]); izq++; der--; } } while(izq<=der); if (infdepth != 16) { gr_con_printf ("Intento de usar filter con un grfico de 8 bits") ; return 0; } map2 = bitmap_clone(map); r1=0;g1=0;b1=0;c=0; for(i=0;iwidth;i++) { for(j=0;jheight;j++) { color = gr_get_pixel(map,i,j); if (!color) continue; for(y=j-1;y map->width-1) ? map->width-1 : x,(y < 0)? 0 : (y > map->height-1) ? map->height-1 : y); if (!color) { /* Si es transparente, repetimos el ultimo color */ r1+=(float)(r2*tabla[c]); g1+=(float)(g2*tabla[c]); b1+=(float)(b2*tabla[c]); continue; } gr_get_rgb(color,&r2,&g2,&b2); r1+=(float)(r2*tabla[c]); g1+=(float)(g2*tabla[c]); b1+=(float)(b2*tabla[c]); } } r1/=tabla[9];g1/=tabla[9];b1/=tabla[9]; r=((int)r1)>255?255:(int)r1; g=((int)g1)>255?255:(int)g1; b=((int)b1)>255?255:(int)b1; if(r<0)r=0; if(g<0)g=0; if(b<0)b=0; if(!r && !g && !b) c=0; else c=gr_rgb(r,g,b); gr_put_pixel(map2,i,j,c); r1=0;g1=0;b1=0;c=0; } } memcpy(map->data,map2->data,map->height*map->pitch); bitmap_destroy(map2); return 1 ; } static int fxi_blur (INSTANCE *my, int *params) // fpg,map,tipo { GRAPH * map = bitmap_get (params[0], params[1]), *map2; int x,y,i,j,c; int r,g,b,r2,g2,b2; int color; if (!map) return 0; if (map->depth != 16) { gr_con_printf ("Intento de usar blur con un grfico de 8 bits") ; return 0; } switch(params[2]) { case 0: //METODO 1 "RAPIDO" izq y arriba for(i=0;iwidth;i++) for(j=0;jheight;j++) { color = gr_get_pixel(map,i,j) ; if(!color) continue; gr_get_rgb(color,&r,&g,&b); if(i>0){ gr_get_rgb(gr_get_pixel(map,i-1,j),&r2,&g2,&b2); } else { gr_get_rgb(gr_get_pixel(map,i+1,j),&r2,&g2,&b2); } r+=r2;g+=g2;b+=b2; if(j>0){ gr_get_rgb(gr_get_pixel(map,i,j-1),&r2,&g2,&b2); } else { gr_get_rgb(gr_get_pixel(map,i,j+1),&r2,&g2,&b2); } r+=r2;g+=g2;b+=b2; r/=3;g/=3;b/=3; gr_put_pixel(map,i,j,gr_rgb(r,g,b)); } break; case 1: // METODO2 LENTO 3x3 r=0;g=0;b=0;c=0; for(i=0;iwidth;i++) for(j=0;jheight;j++) { color = gr_get_pixel(map,i,j) ; if(!color) continue; gr_get_rgb(color,&r,&g,&b); c++; for(x=i-1;xmap->width-1 || y<0 || y>map->height-1) continue; gr_get_rgb(gr_get_pixel(map,x,y),&r2,&g2,&b2); r+=r2;g+=g2;b+=b2; c++; } } if (!c) continue; r/=c;g/=c;b/=c; gr_put_pixel(map,i,j,gr_rgb(r,g,b)); r=0;g=0;b=0;c=0; } break; case 2: // METODO3 aun mas LENTO 5x5 r=0;g=0;b=0;c=0; for(i=0;iwidth;i++) { for(j=0;jheight;j++) { color = gr_get_pixel(map,i,j) ; if(!color) continue; gr_get_rgb(color,&r,&g,&b); c++; for(x=i-2;xmap->width-1 || y<0 || y>map->height-1) continue; gr_get_rgb(gr_get_pixel(map,x,y),&r2,&g2,&b2); r+=r2;g+=g2;b+=b2; c++; } } if (!c) continue; r/=c;g/=c;b/=c; gr_put_pixel(map,i,j,gr_rgb(r,g,b)); r=0;g=0;b=0;c=0; } } break; case 3: // METODO4 5x5 mapa adicional map2 = bitmap_clone(map); r=0;g=0;b=0;c=0; for(i=0;iwidth;i++) { for(j=0;jheight;j++) { color = gr_get_pixel(map,i,j) ; if(!color) continue; gr_get_rgb(color,&r,&g,&b); c++; for(x=i-2;xmap->width-1 || y<0 || y>map->height-1) continue; gr_get_rgb(gr_get_pixel(map,x,y),&r2,&g2,&b2); r+=r2;g+=g2;b+=b2; c++; } } if (!c) continue; r/=c;g/=c;b/=c; gr_put_pixel(map2,i,j,gr_rgb(r,g,b)); r=0;g=0;b=0;c=0; } } memcpy(map->data,map2->data,map->height*map->pitch); bitmap_destroy(map2); break; default: break; } return 1 ; } static int fxi_grayscale (INSTANCE *my, int *params) //fpg,map,tipo { GRAPH * map = bitmap_get (params[0], params[1]) ; Uint32 i,j,c; int r,g,b; if (!map) return -1 ; if (map->depth != 16) { gr_con_printf ("Intento de usar grayscale con un grfico de 8 bits") ; return -1 ; } for(i=0;iheight;i++) for(j=0;jwidth;j++){ gr_get_rgb(gr_get_pixel(map,j,i),&r,&g,&b); if(!r && !g && !b)continue; c=(int)(0.3*r + 0.59*g + 0.11*b); switch(params[2]){ case 0: // RGB c=gr_rgb(c,c,c); break; case 1: // R c=gr_rgb(c,0,0); break; case 2: // G c=gr_rgb(0,c,0); break; case 3: // B c=gr_rgb(0,0,c); break; case 4: // RG c=gr_rgb(c,c,0); break; case 5: // RB c=gr_rgb(c,0,c); break; case 6: // GB c=gr_rgb(0,c,c); break; default: c=gr_rgb(r,g,b); } gr_put_pixel(map,j,i,c); } return 1 ; } static int fxi_rgbscale (INSTANCE *my, int *params) //fpg, map, r, g, b { GRAPH * map = bitmap_get (params[0], params[1]) ; Uint32 i,j,c; int r,g,b; if (!map) return -1 ; if (map->depth != 16) gr_error ("Intento de usar rgbscale con un grfico de 8 bits") ; for(i=0;iheight;i++) for(j=0;jwidth;j++){ gr_get_rgb(gr_get_pixel(map,j,i),&r,&g,&b); if(!r && !g && !b)continue; c=(int)(0.3*r + 0.59*g + 0.11*b); c=gr_rgb((int)(c**(float *)(¶ms[2])), (int)(c**(float *)(¶ms[3])), (int)(c**(float *)(¶ms[4]))); gr_put_pixel(map,j,i,c); } return 1 ; } #include "regex.h" /** REGEX (STRING pattern, STRING string) * Match a regular expresion to the given string. Fills the * REGEX_REG global variables and returns the character position * of the match or -1 if none found. */ static int fxi_regex (INSTANCE * my, int * params) { const char * reg = string_get(params[0]); const char * str = string_get(params[1]); int result = -1; unsigned n; struct re_pattern_buffer pb; struct re_registers re; int start[16]; int end[16]; /* Alloc the pattern resources */ memset (&pb, 0, sizeof(pb)); memset (&re, 0, sizeof(re)); pb.buffer = malloc(4096); pb.allocated = 4096; pb.fastmap = malloc(256); pb.regs_allocated = 16; re.num_regs = 16; re.start = start; re.end = end; re_syntax_options = RE_SYNTAX_POSIX_MINIMAL_EXTENDED | REG_ICASE; /* Match the regex */ if (re_compile_pattern (reg, strlen(reg), &pb) == 0) { result = re_search (&pb, str, strlen(str), 0, strlen(str), &re); if (result != -1) { /* Fill the regex_reg global variables */ for (n = 0 ; n < 16 && n <= pb.re_nsub ; n++) { string_discard (GLODWORD(REGEX_REG + 4*n)); GLODWORD(REGEX_REG + 4*n) = string_newa ( str + re.start[n], re.end[n] - re.start[n]); string_use (GLODWORD(REGEX_REG + 4*n)); } } } /* Free the resources */ free (pb.buffer); free (pb.fastmap); string_discard(params[0]); string_discard(params[1]); return result; } /** REGEX_REPLACE (STRING pattern, STRING string, STRING replacement) * Match a regular expresion to the given string. For each * match, substitute it with the given replacement. \0 - \9 * escape sequences are accepted in the replacement. * Returns the resulting string. REGEX_REG variables are * filled with information about the first match. */ static int fxi_regex_replace (INSTANCE * my, int * params) { const char * reg = string_get(params[0]); const char * rep = string_get(params[1]); const char * str = string_get(params[2]); unsigned reg_len = strlen(reg); unsigned str_len = strlen(str); unsigned rep_len = strlen(rep); char * replacement; unsigned replacement_len; int fixed_replacement = strchr(rep, '\\') ? 0:1; struct re_pattern_buffer pb; struct re_registers re; int start[16]; int end[16]; unsigned startpos = 0; unsigned nextpos; int regex_filled = 0; char * result = 0; unsigned result_allocated = 0; int result_string = 0; unsigned n; /* Alloc a buffer for the resulting string */ result = malloc(128); result_allocated = 128; *result = 0; /* Alloc the pattern resources */ memset (&pb, 0, sizeof(pb)); memset (&re, 0, sizeof(re)); pb.buffer = malloc(4096); pb.allocated = 4096; pb.used = 0; pb.fastmap = malloc(256); pb.translate = NULL; pb.fastmap_accurate = 0; pb.regs_allocated = 16; re.start = start; re.end = end; re_syntax_options = RE_SYNTAX_POSIX_MINIMAL_EXTENDED; /* Run the regex */ if (re_compile_pattern (reg, reg_len, &pb) == 0) { startpos = 0; while (startpos < str_len) { nextpos = re_search (&pb, str, str_len, startpos, str_len - startpos, &re); if ((int)nextpos < 0) break; /* Fill the REGEX_REG global variables */ if (regex_filled == 0) { regex_filled = 1; for (n = 0 ; n < 16 && n <= pb.re_nsub ; n++) { string_discard (GLODWORD(REGEX_REG + 4*n)); GLODWORD(REGEX_REG + 4*n) = string_newa ( str + re.start[n], re.end[n] - re.start[n]); string_use (GLODWORD(REGEX_REG + 4*n)); } } /* Prepare the replacement string */ if (fixed_replacement == 0) { int total_length = rep_len; const char * bptr; char * ptr; /* Count the size */ ptr = strchr(rep, '\\'); while (ptr) { if (ptr[1] >= '0' && ptr[1] <= '9') total_length += re.end[ptr[1]-'0'] - re.start[ptr[1]-'0'] - 2; ptr = strchr(ptr+1, '\\'); } /* Fill the replacement string */ replacement = calloc (total_length+1, 1); bptr = rep; ptr = strchr(rep, '\\'); while (ptr) { if (ptr[1] >= '0' && ptr[1] <= '9') { strncpy (replacement+strlen(replacement), bptr, ptr-bptr); strncpy (replacement+strlen(replacement), str + re.start[ptr[1]-'0'], re.end[ptr[1]-'0'] - re.start[ptr[1]-'0']); bptr = ptr+2; } ptr = strchr (ptr+1, '\\'); } strcat (replacement, bptr); replacement_len = strlen(replacement); } else { replacement = (char *)rep; replacement_len = rep_len; } /* Fill the resulting string */ if (result_allocated < strlen(result)+(nextpos-startpos)+1+replacement_len) { result_allocated += ((nextpos-startpos+1+replacement_len) & ~127) + 128; result = realloc(result, result_allocated); } result[strlen(result)+(nextpos-startpos)] = 0; memcpy (result + strlen(result), str+startpos, nextpos-startpos); strcat (result, replacement); if (fixed_replacement == 0) free (replacement); /* Continue the search */ startpos = nextpos+re_match(&pb, str, str_len, nextpos, 0); if (startpos < nextpos) break; if (startpos == nextpos) startpos++; } } /* Copy remaining characters */ nextpos = str_len; if (result_allocated < strlen(result)+(nextpos-startpos)+1) { result_allocated += ((nextpos-startpos+1) & ~127) + 128; result = realloc(result, result_allocated); } result[strlen(result)+(nextpos-startpos)] = 0; memcpy (result + strlen(result), str+startpos, nextpos-startpos); /* Free resources */ free (pb.buffer); free (pb.fastmap); string_discard(params[0]); string_discard(params[1]); string_discard(params[2]); /* Return the new string */ result_string = string_new(result); string_use(result_string); free(result); return result_string; } /** SPLIT (STRING regex, STRING string, STRING POINTER array, INT array_size) * Fills the given array with sections of the given string, using * the given regular expression as separators. Returns the number * of elements filled in the array. * */ int fxi_split (INSTANCE * my, int * params) { const char * reg = string_get(params[0]); const char * str = string_get(params[1]); int * result_array = (int *)params[2]; int result_array_size = params[3]; int count = 0; int pos, lastpos = 0; struct re_pattern_buffer pb; struct re_registers re; int start[16]; int end[16]; /* Alloc the pattern resources */ memset (&pb, 0, sizeof(pb)); memset (&re, 0, sizeof(re)); pb.buffer = malloc(4096); pb.allocated = 4096; pb.fastmap = malloc(256); pb.regs_allocated = 16; re.num_regs = 16; re.start = start; re.end = end; re_syntax_options = RE_SYNTAX_POSIX_MINIMAL_EXTENDED; /* Match the regex */ if (re_compile_pattern (reg, strlen(reg), &pb) == 0) { for (;;) { pos = re_search (&pb, str, strlen(str), lastpos, strlen(str), &re); if (pos == -1) break; *result_array = string_newa (str + lastpos, pos-lastpos); string_use(*result_array); result_array++; count++; result_array_size--; if (result_array_size == 0) break; lastpos = pos + re_match (&pb, str, strlen(str), pos, 0); if (lastpos < pos) break; if (lastpos == pos) lastpos++; } if (result_array_size > 0) { *result_array = string_new (str + lastpos); string_use (*result_array); count++; } } /* Free the resources */ free (pb.buffer); free (pb.fastmap); string_discard(params[0]); string_discard(params[1]); return count; } /** JOIN (STRING separator, STRING POINTER array, INT array_size) * Joins an array of strings, given a separator. Returns the * resulting string. */ int fxi_join (INSTANCE * my, int * params) { const char * sep = string_get(params[0]); int * string_array = (int *)params[1]; int count = params[2] ; int total_length = 0; int sep_len = strlen(sep); int n; char * buffer; char * ptr; int result; for (n = 0 ; n < count ; n++) { total_length += strlen(string_get(string_array[n])); if (n < count-1) total_length += sep_len; } buffer = malloc(total_length+1); ptr = buffer; for (n = 0 ; n < count ; n++) { memcpy (ptr, string_get(string_array[n]), strlen(string_get(string_array[n]))); ptr += strlen(string_get(string_array[n])); if (n < count-1) { memcpy (ptr, sep, sep_len); ptr += sep_len; } } *ptr = 0; result = string_new(buffer); free(buffer); string_use(result); return result; } /* DIRECTORY FUNCTIONS */ static int fxi_cd(INSTANCE * my, int * params) { char *d = dir_current() ; int r = string_new(d) ; string_use(r) ; if (d) free(d) ; return r ; } static int fxi_chdir(INSTANCE * my, int * params) { const char *d = string_get(params[0]) ; int r = dir_change(d) ; return r ; } static int fxi_mkdir(INSTANCE * my, int * params) { const char *d = string_get(params[0]) ; int r = dir_create(d) ; return r ; } static int fxi_rmdir(INSTANCE * my, int * params) { const char *d = string_get(params[0]) ; int r = dir_delete(d) ; return r ; } static int fxi_rm(INSTANCE * my, int * params) { const char *d = string_get(params[0]) ; int r = dir_deletefile(d) ; return r ; } /* string GLOB (STRING path) * * Given a path with wildcards ('*' or '?' characters), returns the first * file that matches and, in every next call, all matching files found * until no more files exists. It then returns NIL. */ static int fxi_glob (INSTANCE * my, int * params) { #ifdef WIN32 static int last_call = 0; static HANDLE handle; const char * path = string_get(params[0]); WIN32_FIND_DATA data; SYSTEMTIME time; int result; char realpath[MAX_PATH]; char fullname[MAX_PATH]; char buffer[128]; char * ptr; if (!path) { if (handle) FindClose(handle); string_discard (params[0]); last_call = 0; handle = NULL; return 0; } if ( handle && (last_call == params[0] || strcmp(string_get(last_call), path) == 0)) { /* Continue last search */ if (!FindNextFile (handle, &data)) { FindClose(handle); /* No more matches found */ string_discard (params[0]); last_call = 0; handle = NULL; return 0; } } else { if (handle) FindClose(handle); /* New search */ handle = FindFirstFile (path, &data); if (handle == INVALID_HANDLE_VALUE) { /* No matches found */ string_discard (params[0]); last_call = 0; return 0; } last_call = params[0]; } /* Fill the FILEINFO struct */ strcpy (fullname, path); ptr = fullname + strlen(fullname); while (ptr >= fullname) { if (*ptr == '\\' || *ptr == '/') { ptr[1] = 0; break; } ptr--; } strcat (fullname, data.cFileName); GetFullPathName (fullname, MAX_PATH, realpath, &ptr); if (ptr) * ptr = '\0'; /* Store the file path */ if (GLODWORD(FILE_PATH)) string_discard (GLODWORD(FILE_PATH)); GLODWORD(FILE_PATH) = string_new (realpath); string_use (GLODWORD(FILE_PATH)); /* Store the file name */ if (GLODWORD(FILE_NAME)) string_discard (GLODWORD(FILE_NAME)); GLODWORD(FILE_NAME) = string_new (data.cFileName); result = GLODWORD(FILE_NAME); string_use (result); // 1 Por la variable de la estructura global string_use (result); // 1 Por el return /* Store integer and boolean variables */ GLODWORD(FILE_DIRECTORY) = ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? 1:0); GLODWORD(FILE_HIDDEN) = ((data.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) ? 1:0); GLODWORD(FILE_READONLY) = ((data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? 1:0); GLODWORD(FILE_SIZE) = data.nFileSizeLow; /* Format and store the creation time */ FileTimeToSystemTime (&data.ftCreationTime, &time); sprintf (buffer, "%02d/%02d/%4d %02d:%02d", time.wDay, time.wMonth, time.wYear, time.wHour, time.wMinute); if (GLODWORD(FILE_CREATED)) string_discard(GLODWORD(FILE_CREATED)); GLODWORD(FILE_CREATED) = string_new(buffer); string_use (GLODWORD(FILE_CREATED)); /* Format and store the last write time */ FileTimeToSystemTime (&data.ftLastWriteTime, &time); sprintf (buffer, "%02d/%02d/%4d %02d:%02d", time.wDay, time.wMonth, time.wYear, time.wHour, time.wMinute); if (GLODWORD(FILE_MODIFIED)) string_discard(GLODWORD(FILE_MODIFIED)); GLODWORD(FILE_MODIFIED) = string_new(buffer); string_use (GLODWORD(FILE_MODIFIED)); string_discard (params[0]); return result; #else const char * path = string_get(params[0]); char * path_final; const char * ptr; char * fptr; static int lastPath = 0; static int currentFile = 0; static glob_t globd; struct stat s; int result; char buffer[128]; char realpath[MAX_PATH]; /* Clean the path creating a case-insensitive match pattern */ path_final = malloc(strlen(path)*4); fptr = path_final; ptr = path; while (*ptr) { if (*ptr == '\\') *fptr++ = '/'; else if (*ptr >= 'a' && *ptr <= 'z') { *fptr++ = '['; *fptr++ = *ptr; *fptr++ = toupper(*ptr); *fptr++ = ']'; } else if (*ptr >= 'A' && *ptr <= 'Z') { *fptr++ = '['; *fptr++ = tolower(*ptr); *fptr++ = *ptr; *fptr++ = ']'; } else *fptr++ = *ptr; ptr++; } *fptr = 0; if (lastPath != params[0] && strcasecmp(path_final, string_get(lastPath)) != 0) { /* Using a different path */ if (lastPath) { string_discard(lastPath); globfree (&globd); } // Convert *.* to * if (fptr > path_final+2 && fptr[-1] == '*' && fptr[-2] == '.' && fptr[-3] == '*') fptr[-2] = 0; lastPath = params[0]; string_use(params[0]); #if defined(TARGET_MAC) glob (path_final, GLOB_ERR | GLOB_NOSORT, NULL, &globd); #elif defined(TARGET_BEOS) glob (path_final, GLOB_ERR | GLOB_NOSORT, NULL, &globd); #else glob (path_final, GLOB_ERR | GLOB_PERIOD | GLOB_NOSORT, NULL, &globd); #endif currentFile = 0; } if (currentFile == globd.gl_pathc) { /* Last file reached */ lastPath = 0; string_discard (params[0]); free (path_final); return 0; } stat (globd.gl_pathv[currentFile], &s); gr_con_printf ("%s (size %d) es un %s", globd.gl_pathv[currentFile], s.st_size, S_ISDIR(s.st_mode) ? "directorio":"fichero"); /* Store the file name and path */ if (GLODWORD(FILE_NAME)) string_discard (GLODWORD(FILE_NAME)); if (GLODWORD(FILE_PATH)) string_discard (GLODWORD(FILE_PATH)); ptr = strrchr (globd.gl_pathv[currentFile], '/'); if (!ptr) { result = string_new (ptr = globd.gl_pathv[currentFile]); GLODWORD(FILE_NAME) = result; string_use(result); GLODWORD(FILE_PATH) = string_new(getcwd(realpath,sizeof(realpath))); string_use(GLODWORD(FILE_PATH)); } else { GLODWORD(FILE_NAME) = result = string_new(ptr+1); string_use(GLODWORD(FILE_NAME)); fptr = globd.gl_pathv[currentFile]; GLODWORD(FILE_PATH) = string_newa(fptr, (ptr-fptr)+1); string_use(GLODWORD(FILE_PATH)); ptr++; } /* Store integer and boolean variables */ GLODWORD(FILE_DIRECTORY) = (S_ISDIR(s.st_mode) ? 1:0); GLODWORD(FILE_HIDDEN) = (*ptr == '.'); GLODWORD(FILE_READONLY) = !(s.st_mode & 0444); GLODWORD(FILE_SIZE) = s.st_size; /* Store file times */ strftime (buffer, 100, "%d/%m/%Y %H:%M", localtime(&s.st_mtime)); if (GLODWORD(FILE_MODIFIED)) string_discard(GLODWORD(FILE_MODIFIED)); GLODWORD(FILE_MODIFIED) = string_new(buffer); string_use (GLODWORD(FILE_MODIFIED)); strftime (buffer, 100, "%d/%m/%Y %H:%M", localtime(&s.st_ctime)); if (GLODWORD(FILE_CREATED)) string_discard(GLODWORD(FILE_CREATED)); GLODWORD(FILE_CREATED) = string_new(buffer); string_use (GLODWORD(FILE_CREATED)); /* Return */ currentFile++; string_use(result); string_discard (params[0]); free (path_final); return result; #endif } /** * POINTER #COPY# (POINTER DEST, POINTER SRC, POINTER VARSPACE, INT VARS) * * Copy struct data from src to dst, using the information varspace given **/ static int fxi_copy_struct (INSTANCE * my, int * params) { return (int) copytypes ((void *)params[0], (void *)params[1], (DCB_TYPEDEF *)params[2], params[3], params[4]); } /** * int LOAD_FBM(string filename) * * Load a FBM file as new system graphic and return its ID **/ static int fxi_load_fbm (INSTANCE * my, int * params) { const char * filename = string_get(params[0]); GRAPH * graph = fbm_load(filename); if (graph == NULL) gr_error("Error al abrir \"%s\":\n%s", filename, fbm_error); else { graph->code = bitmap_next_code(); grlib_add_map (0, graph); } string_discard(params[0]); return graph ? graph->code : 0; } /** * int SAVE_FBM(int file, int graph, string filename) * * Save a graph as a new FBM file **/ static int fxi_save_fbm (INSTANCE * my, int * params) { GRAPH * graph = bitmap_get(params[0], params[1]); if (graph == NULL) { gr_error("Intento de grabar un grfico inexistente\n(Librara %d, grfico %d)", params[0], params[1]); } else { if (!fbm_save (graph, string_get(params[2]))) gr_error("Error al grabar \"%s\":\n%s", string_get(params[2]), fbm_error); } string_discard(params[2]); return graph ? graph->code : 0; } /** * int LOAD_FGC(string filename) * * Load a FGC colletion and return its code (0 for the first FGC loaded) **/ static int fxi_load_fgc (INSTANCE * my, int * params) { const char * filename = string_get(params[0]); int result = fgc_load(filename); if (result < 0) gr_error("Error al cargar \"%s\":\n%s", string_get(params[0]), fgc_error); string_discard(params[0]); return result; } /** * int SAVE_FGC(int file, string filename) * * Save a FGC collection to a file **/ static int fxi_save_fgc (INSTANCE * my, int * params) { const char * filename = string_get(params[1]); int result = fgc_save(params[0], filename); if (!result) gr_error("Error al grabar \"%s\":\n%s", string_get(params[2]), fgc_error); string_discard(params[1]); return result; } static int fxi_getenv (INSTANCE * my, int * params) { char *e ; int str ; if (!(e=getenv(string_get(params[0])))){ str=string_new("") ; } else { str=string_new(e) ; } string_discard(params[0]) ; string_use (str) ; return str ; } /* ---------------------------------------------------------------------- */ #include "sysprocs.h" static SYSPROC * sysproc_tab[256+MAX_SYSPROCS] ; int sysproc_add (char * name, char * paramtypes, int type, void * func) { static SYSPROC * last = 0 ; static int sysproc_count = 0 ; if (!last) { last = sysprocs ; sysproc_count++ ; while (last[1].func) last++, sysproc_count++ ; } last[1].code = last[0].code + 1 ; last[1].name = name ; last[1].paramtypes = paramtypes ; last[1].params = strlen(paramtypes) ; last[1].type = type ; last[1].func = func ; last[1].id = 0 ; last++ ; sysproc_count++ ; if (sysproc_count == MAX_SYSPROCS) gr_error ("Demasiadas funciones del sistema") ; last[1].func = 0 ; return last->code ; } SYSPROC * sysproc_get (int code) { return sysproc_tab[code] ; } void sysproc_init() { SYSPROC * proc = sysprocs ; void * library ; dlfunc RegisterFunctions ; const char * filename; unsigned int n ; #ifndef TARGET_Win32 char soname[1024]; char * ptr; #endif for (n = 0 ; n < dcb.data.NImports ; n++) { filename = string_get(dcb.imports[n]) ; #if defined(TARGET_Win32) library = dlopen (filename, RTLD_NOW | RTLD_GLOBAL) ; #elif defined(TARGET_MAC) char pathMac[1024] ; /* buffer to the directory */ int indexMac; int contmac=0; char *nameMac=files[current_file]; /* Get the real directory for Mac OS X */ while (contmac 7 && strcmp(ptr-7, ".dll.dylib") == 0) strcpy (ptr-7, ".dylib"); if (strlen(soname) > 7 && strcmp(ptr-7, ".dylib.dylib") == 0) strcpy (ptr-7, ".dylib"); library = dlopen (soname, RTLD_NOW | RTLD_GLOBAL) ; #else snprintf (soname, 1024, "./%s.so",filename); /* Clean the name (strip .DLL, and use lowercase) */ for (ptr = soname ; *ptr ; ptr++) *ptr = TOLOWER(*ptr); if (strlen(soname) > 7 && strcmp(ptr-7, ".dll.so") == 0) strcpy (ptr-7, ".so"); if (strlen(soname) > 7 && strcmp(ptr-7, ".so.so") == 0) strcpy (ptr-7, ".so"); library = dlopen (soname, RTLD_NOW | RTLD_GLOBAL) ; #endif if (!library) gr_error (dlerror()) ; RegisterFunctions = dlsym (library, "RegisterFunctions") ; if (!RegisterFunctions) gr_error("Error in %s", filename) ; (*RegisterFunctions)(fnc_import, sysproc_add) ; } while (proc->func) { sysproc_tab[proc->code] = proc ; proc++ ; } fnc_show_information(); } /* Rutinas matemticas de punto fijo, basadas en Allegro */ void init_cos_tables() { int i ; for (i = 0 ; i <= 90000 ; i++) { cos_table[i] = ftofix(cos (i * M_PI / 180000.0)) ; } cos_table_initialized = 1 ; } Fenix/fxi/src/g_font.c0000644000000000000000000004431610607526750013642 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : g_font.c * DESCRIPTION : Font loading and manipulation * * HISTORY: 0.82 - First version (used to be in g_texts.c) */ #ifdef TARGET_BEOS #include #else #include #endif #include #include #include "fxi.h" FONT * fonts[256] = { 0 } ; int font_count = 0 ; /* Fuente 0 reservada para sistema */ /* * FUNCTION : gr_font_new * * Create a new font, with no characters in it. * The font uses the MS-DOS charset and 8bpp by default. * * PARAMS : * None * * RETURN VALUE : * Code of the new font or -1 if error * The font data is in the global array fonts[index] * */ int gr_font_new () { FONT * f = (FONT *)malloc(sizeof(FONT)); if (f == NULL) { gr_error ("gr_font_new: sin memoria"); return -1; } if (font_count == 255) { gr_error ("gr_font_new: demasiadas fuentes"); return -1; } memset (f, 0, sizeof(FONT)); f->charset = CHARSET_CP850; f->bpp = 8; f->maxwidth = 0; f->maxheight = 0; fonts[font_count] = f ; return font_count++ ; } /* * FUNCTION : gr_font_newfrombitmap * * Create a new font using a bitmap as source. The bitmap should be * in black and white (1 bit per pixel) with a fixed character size * and a character width of 8, 16, 24... * * PARAMS : * chardata Pointer to the bitmap * width Width of each character, in bits (pixels) * height Height of each character * options Can be 0 or a combination of the following flags: * * NFB_FIXEDWIDTH Create a fixed width font * (the default is a propotional width one) * * RETURN VALUE : * 1 if MMX available, 0 otherwise * */ static void align_bitmap_char_left (unsigned char *data, int width, int height); static int get_bitmap_char_width (unsigned char *data, int width, int height); int gr_font_newfrombitmap (char * chardata, int width, int height, int options) { FONT * f ; char * ptr, * charptr ; int i, y, id ; int charsize ; int linesize ; GRAPH * bitmap; id = gr_font_new() ; if (id == -1) return -1; f = fonts[id]; f->bpp = 1; charsize = width/8 * height; linesize = width/8; for (charptr = chardata, i = 0 ; i < 256 ; i++, charptr += charsize) { if (options != NFB_FIXEDWIDTH) align_bitmap_char_left (charptr, width, height) ; bitmap = bitmap_new (i, width, height, 1, 1); if (bitmap == NULL) { gr_error ("gr_font_newfrombitmap: sin memoria"); return id; } f->glyph[i].bitmap = bitmap; f->glyph[i].xoffset = 0; f->glyph[i].yoffset = 0; if (options != NFB_FIXEDWIDTH) f->glyph[i].xadvance = get_bitmap_char_width (charptr, width, height); else f->glyph[i].xadvance = width; bitmap_add_cpoint (bitmap, 0, 0) ; ptr = bitmap->data ; for (y = 0 ; y < height ; y++, ptr += bitmap->pitch) memcpy (ptr, charptr + linesize*y, linesize); if (bitmap->modified > 0) bitmap->modified = 0 ; bitmap->info_flags = 0 ; } /* Set a reasonable size for the space */ f->glyph[32].xadvance = 5 ; f->maxwidth = width; f->maxheight = height; return id ; } /* Utility function used by gr_new_fontfrombitmap to align characters */ static void align_bitmap_char_left (unsigned char *data, int width, int height) { int leftest, n, c ; static int leftest_table[256] = { 0 } ; if (leftest_table[0] == 0) { for (n = 0 ; n < 256 ; n++) { if (n & 0x80) leftest_table[n] = 0 ; else if (n & 0x40) leftest_table[n] = 1 ; else if (n & 0x20) leftest_table[n] = 2 ; else if (n & 0x10) leftest_table[n] = 3 ; else if (n & 0x08) leftest_table[n] = 4 ; else if (n & 0x04) leftest_table[n] = 5 ; else if (n & 0x02) leftest_table[n] = 6 ; else if (n & 0x01) leftest_table[n] = 7 ; else leftest_table[n] = 8 ; } } leftest = 8 ; for (n = 0 ; n < height ; n++) { for (c = 0 ; c < width ; c += 8) { if (leftest > c+leftest_table[data[(width*n+c)/8]]) leftest = c+leftest_table[data[(width*n+c)/8]] ; } } if (leftest > 7) { if (width > leftest) { for (n = 0 ; n < height ; n++) { memmove (data + n*width/8, data + (n*width+leftest)/8, (width - leftest)/8); } } leftest &= 7; } for (n = 0 ; n < height*width/8 ; n++) data[n] <<= leftest ; } /* Utility function used by gr_new_fontfrombitmap to calculate char widths */ static int get_bitmap_char_width (unsigned char *data, int width, int height) { int x, c, d, max = 0 ; while (height--) { for (x = 0 ; x < width ; x += 8) { c = *data++ ; for (d = 8 ; d > 0 ; d--, c >>= 1) { if (c & 0x01) break ; } if (x*8+d > max) max = x*8+d ; } } return max+1 ; } /* * FUNCTION : gr_font_systemfont * * Create the system font. This function should be called once. * * PARAMS : * chardata Pointer to the system font data * * RETURN VALUE : * Always returns 1 * */ int gr_font_systemfont (char * chardata) { int last_count = font_count ; if (fonts[0]) gr_font_destroy(0) ; font_count = 0 ; gr_font_newfrombitmap (chardata, 8, 8, 0); if (last_count) font_count = last_count ; return 1; } /* * FUNCTION : gr_font_destroy * * Destroy a font and all the internal bitmap data * * PARAMS : * fontid ID of the font * * RETURN VALUE : * None * */ void gr_font_destroy (int fontid) { int n ; if (fontid >= 0 && fontid < font_count) { if (!fonts[fontid]) return ; for (n = 0 ; n < 256 ; n++) { if (fonts[fontid]->glyph[n].bitmap) bitmap_destroy (fonts[fontid]->glyph[n].bitmap) ; } free (fonts[fontid]) ; fonts[fontid] = NULL ; while (font_count > 0 && fonts[font_count-1] == 0) font_count-- ; } } /* * FUNCTION : gr_font_load * * Load a font from a given file, in FNT (DIV) format * * PARAMS : * filename Name of the file * * RETURN VALUE : * ID of the new font, or -1 if error * */ static int gr_font_loadfrom (file * fp); int gr_font_load (char * filename) { file * fp ; int result; fp = file_open (filename, "rb") ; if (!fp) return -1 ; result = gr_font_loadfrom(fp); file_close (fp); return result; } static int gr_font_loadfrom (file * fp) { char header[8]; int bpp; int types, i, id; Uint32 y; FONT * f; struct { int width ; int height ; int yoffset ; int fileoffset ; } oldchardata[256]; struct { int width; int height; int xadvance; int yadvance; int xoffset; int yoffset; int fileoffset ; } chardata[256] ; if (font_count == 256) return -1 ; /* Read the file header */ if (!file_read(fp, header,8)) return -1; if (memcmp (header, "fnt\x1a\x0d\x0a", 7) != 0 && memcmp (header, "fnx\x1a\x0d\x0a", 7) != 0) { gr_error ("gr_font_load: formato desconocido"); return -1; } bpp = header[7]; if (bpp == 0) bpp = 8; /* Read or ignore the palette */ if (bpp == 8) { if (palette_loaded) file_seek (fp, 576 + 768, SEEK_CUR) ; else if (!gr_read_pal (fp)) return -1 ; } /* Read the character data (detect old format) */ if (header[2] == 'x') { if (!file_readSint32(fp, &types)) return -1 ; if (!file_read(fp, chardata, sizeof(chardata))) return -1 ; for (i = 0 ; i < 256 ; i++) { ARRANGE_DWORD (&chardata[i].width); ARRANGE_DWORD (&chardata[i].height); ARRANGE_DWORD (&chardata[i].xadvance); ARRANGE_DWORD (&chardata[i].yadvance); ARRANGE_DWORD (&chardata[i].xoffset); ARRANGE_DWORD (&chardata[i].yoffset); ARRANGE_DWORD (&chardata[i].fileoffset); } } else { if (!file_readSint32(fp, &types)) return -1 ; if (!file_read(fp, oldchardata, sizeof(oldchardata))) return -1 ; for (i = 0 ; i < 256 ; i++) { ARRANGE_DWORD (&oldchardata[i].width); ARRANGE_DWORD (&oldchardata[i].height); ARRANGE_DWORD (&oldchardata[i].yoffset); ARRANGE_DWORD (&oldchardata[i].fileoffset); chardata[i].width = oldchardata[i].width; chardata[i].height = oldchardata[i].height; chardata[i].xoffset = 0; chardata[i].yoffset = oldchardata[i].yoffset; chardata[i].xadvance = oldchardata[i].width; chardata[i].yadvance = oldchardata[i].height + oldchardata[i].yoffset; chardata[i].fileoffset = oldchardata[i].fileoffset; } } /* Create the font */ id = gr_font_new() ; if (id == -1) return -1; f = fonts[id]; assert (f != 0) ; if (header[2] == 'x') { f->bpp = header[7]; f->charset = types; } else { f->bpp = 8; f->charset = CHARSET_CP850; } /* Load the character bitmaps */ for (i = 0 ; i < 256 ; i++) { GRAPH * gr; Uint8 * ptr; f->glyph[i].xadvance = chardata[i].xadvance ; f->glyph[i].yadvance = chardata[i].yadvance ; if (chardata[i].fileoffset == 0 || chardata[i].width == 0 || chardata[i].height == 0) continue ; f->glyph[i].xoffset = chardata[i].xoffset ; f->glyph[i].yoffset = chardata[i].yoffset ; file_seek (fp, chardata[i].fileoffset, SEEK_SET) ; f->glyph[i].bitmap = gr = bitmap_new (i, chardata[i].width, chardata[i].height, f->bpp, 1) ; assert (gr) ; bitmap_add_cpoint (gr, 0, 0) ; for (y = 0, ptr = gr->data ; y < gr->height ; y++, ptr += gr->pitch) { if (!file_read (fp, ptr, gr->widthb)) break ; if (gr->depth == 16) gr_convert16_565ToScreen ((Uint16 *)ptr, gr->width); } f->glyph[i].yoffset = chardata[i].yoffset ; } if (f->glyph[32].xadvance == 0) f->glyph[32].xadvance = 4 ; return id ; } /* * FUNCTION : gr_font_save * * Write a font to disk, in FNT/FNX format * * PARAMS : * fontid ID of the font to save * filename Name of the file to create * * RETURN VALUE : * 1 if succeded or 0 otherwise * */ int gr_font_save (int fontid, const char * filename) { char fullname[1024]; char * ptr; gzFile * file; int n; Uint32 y; long offset; Uint8 * block = NULL ; Uint8 * lineptr; FONT * font; Uint8 header[8]; struct { int width; int height; int xadvance; int yadvance; int xoffset; int yoffset; int fileoffset ; } chardata[256] ; if (fontid < 0 || fontid > 255 || !fonts[fontid]) { gr_error ("gr_font_save: fuente incorrecta"); return 0; } font = fonts[fontid]; /* If the file does not have an extension, append ".FNT" */ memset (fullname, 0, sizeof(fullname)); strncpy (fullname, filename, 1000); ptr = fullname + strlen(fullname) - 1; while (ptr > fullname && !strchr("/\\.", *ptr)) ptr--; if (*ptr != '.') strcat (fullname, ".fnt"); /* Open the file */ file = gzopen (fullname, "wb"); if (!file) { gr_error ("gr_font_save: no se pudo crear el fichero %s", fullname); return 0; } /* Write the header */ memcpy (header, "fnx\x1a\x0d\x0a\x00", 7); header[7] = font->bpp; gzwrite (file, &header, 8); /* Write the palette */ if (font->bpp == 8) { Uint8 colors[256][3]; Uint8 * block = calloc(576,1) ; for (n = 1 ; n < 256 ; n++) { colors[n][0] = palette[n].r >> 2 ; colors[n][1] = palette[n].g >> 2 ; colors[n][2] = palette[n].b >> 2 ; } gzwrite (file, &colors, 768) ; gzwrite (file, block, 576) ; free(block) ; } /* Write the character information */ memset (chardata, 0, sizeof(chardata)); offset = 8 + 4 + (font->bpp == 8 ? 576+768:0) + sizeof(chardata); for (n = 0 ; n < 256 ; n++) { chardata[n].xadvance = font->glyph[n].xadvance; chardata[n].yadvance = font->glyph[n].yadvance; if (font->glyph[n].bitmap) { chardata[n].width = font->glyph[n].bitmap->width; chardata[n].height = font->glyph[n].bitmap->height; chardata[n].xadvance = font->glyph[n].xadvance; chardata[n].yadvance = font->glyph[n].yadvance; chardata[n].xoffset = font->glyph[n].xoffset; chardata[n].yoffset = font->glyph[n].yoffset; chardata[n].fileoffset = offset; offset += font->glyph[n].bitmap->widthb * chardata[n].height; } ARRANGE_DWORD (&chardata[n].xadvance); ARRANGE_DWORD (&chardata[n].yadvance); ARRANGE_DWORD (&chardata[n].width); ARRANGE_DWORD (&chardata[n].width); ARRANGE_DWORD (&chardata[n].xoffset); ARRANGE_DWORD (&chardata[n].yoffset); ARRANGE_DWORD (&chardata[n].fileoffset); } ARRANGE_DWORD (&font->charset); gzwrite (file, &font->charset, 4); ARRANGE_DWORD (&font->charset); gzwrite (file, &chardata, sizeof(chardata)); /* Write the character bitmaps */ for (n = 0 ; n < 256 ; n++) { if (font->glyph[n].bitmap) { GRAPH * gr = font->glyph[n].bitmap; if (gr->depth != font->bpp) { gr_error ("gr_font_save: fuente corrupta"); gzclose (file); return 0; } if (gr->depth == 16) { if ( (block = malloc(gr->widthb)) == NULL) { gr_error ("gr_font_save: sin memoria"); gzclose (file); return 0; } } lineptr = gr->data; for (y = 0 ; y < gr->height ; y++, lineptr += gr->pitch) { if (gr->depth == 16) { memcpy (block, lineptr, gr->widthb); ARRANGE_WORDS (block, (int)gr->width); gr_convert16_ScreenTo565 ((Uint16 *)block, gr->width); gzwrite (file, block, gr->widthb); } else { gzwrite (file, lineptr, gr->widthb); } } if (gr->depth == 16) free(block); } } gzclose(file); return 1; } /* * FUNCTION : gr_load_bdf * * Load a BDF font from disk. This is a very simple loader that ignores * anything that is not relevant to screen display or non-horizontal * writing fonts. * * PARAMS : * filename Name of the BDF file * * RETURN VALUE : * ID of the font if succeded or -1 otherwise * */ int gr_load_bdf (const char * filename) { file * fp; Uint8 line[2048]; Uint8 * ptr; Uint8 * optr; FONT * font; int id, x, y, i; int error = 0; Uint8 nibbleh[256]; Uint8 nibblel[256]; int default_xadvance = 0; int default_yadvance = 0; int in_char = 0; int encoding = -1; int width = 0; int height = 0; int xoffset = 0; int yoffset = 0; int xadvance = 0; int yadvance = 0; int minyoffset = 0; /* Arrays used to convert hex ASCII to binary */ memset (nibbleh, 0, 256); memset (nibblel, 0, 256); for (i = '0' ; i <= '9' ; i++) { nibbleh[i] = ((i - '0') << 4); nibblel[i] = i - '0'; } for (i = 10 ; i <= 15 ; i++) { nibbleh['A' + i - 10] = (i << 4); nibbleh['a' + i - 10] = (i << 4); nibblel['A' + i - 10] = i; nibblel['a' + i - 10] = i; } /* Open the file and create the font */ fp = file_open (filename, "r"); if (!fp) return -1; id = gr_font_new (); if (id < 0) return -1; font = fonts[id]; font->bpp = 1; font->charset = CHARSET_ISO8859; font->maxwidth = 0; font->maxheight = 0; /* Process the file, a line each time */ for (line[2047] = 0 ; ; ) { if (!file_gets (fp, line, 2047)) break; /* Handle global-level commands */ if (strncmp (line, "DWIDTH ", 7) == 0 && !in_char) { default_xadvance = atoi(line+7); ptr = strchr (line+7, ' '); if (ptr) default_yadvance = atoi(ptr+1); } else if (strncmp (line, "STARTCHAR", 9) == 0) { in_char = 1; encoding = -1; height = 0; xadvance = default_xadvance; yadvance = default_yadvance; } else if (strncmp (line, "ENDCHAR", 7) == 0) { in_char = 0; } /* Handle character-level commands */ else if (strncmp (line, "DWIDTH ", 7) == 0 && in_char) { xadvance = atoi(line+7); ptr = strchr (line+7, ' '); if (ptr) yadvance = atoi(ptr+1); } else if (strncmp (line, "ENCODING ", 9) == 0 && in_char) { encoding = atoi(line+9); if (encoding == -1) { ptr = strchr (line+7, ' '); if (ptr) encoding = atoi(ptr+1); } } else if (strncmp (line, "BBX ", 4) == 0 && in_char) { width = atoi(line+4); if (width & 7) width = (width & ~7)+8; if ((ptr = strchr (line+4, ' ')) == NULL) continue; height = atoi(ptr+1); if ((ptr = strchr (ptr+1, ' ')) == NULL) continue; xoffset = atoi(ptr+1); if ((ptr = strchr (ptr+1, ' ')) == NULL) continue; yoffset = atoi(ptr+1); } else if (strncmp (line, "BITMAP", 6) == 0) { /* Read bitmap data */ if (encoding >= 0 && encoding < 256 && height > 0) { font->glyph[encoding].xadvance = xadvance; font->glyph[encoding].yadvance = yadvance; font->glyph[encoding].xoffset = xoffset; font->glyph[encoding].yoffset = -yoffset-height; if (minyoffset > -yoffset-height) minyoffset = -yoffset-height; error = 1; font->glyph[encoding].bitmap = bitmap_new (encoding, width, height, 1, 1); if (font->glyph[encoding].bitmap == 0) break; bitmap_add_cpoint (font->glyph[encoding].bitmap, 0, 0) ; if (font->maxwidth < width) font->maxwidth = width; if (font->maxheight < height) font->maxheight = height; for (y = 0 ; y < height ; y++) { if (!file_gets (fp, line, 2047)) break; ptr = line; optr = (Uint8 *)font->glyph[encoding].bitmap->data + font->glyph[encoding].bitmap->pitch * y; for (x = 0 ; x < width ; x += 8) { if (!ptr[0] || !ptr[1]) break; *optr++ = nibbleh[ptr[0]] | nibblel[ptr[1]]; ptr += 2; } } if (y != height) break; error = 0; } } } file_close (fp); if (error) { gr_error ("gr_load_bdf: incorrect BDF file"); return -1; } /* Adjust yoffsets to positive */ for (i = 0 ; i < 256 ; i++) font->glyph[i].yoffset -= minyoffset; if (font->glyph[32].xadvance == 0) font->glyph[32].xadvance = font->glyph['j'].xadvance; fonts[font_count] = font ; return font_count++ ; } /* * FUNCTION : gr_font_get * * Return a font object, given an ID * * PARAMS : * id id of the font * * RETURN VALUE : * Pointer to the font object or NULL if it does not exist * */ FONT * gr_font_get (int id) { if (id >= 0 && id <= 255) return fonts[id]; return NULL; } Fenix/fxi/src/f_bgload.c0000644000000000000000000000434410607526736014124 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.85 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * * */ /* * FILE : f_bgload.c * DESCRIPTION : FXI functions for background loading (THREAD BASED) */ #include #include "fxi.h" typedef struct { char *file; int *id, (*fn)(); } bgdata ; /** * PREP * Helper function preparing params **/ bgdata *prep(int *params){ bgdata *t=(bgdata*)malloc(sizeof(bgdata)); t->file=(char *)string_get(params[0]); t->id=(int*)params[1]; string_discard(params[0]); return t; } /** * bgDoLoad * Helper function executed in the new thread **/ int bgDoLoad(void *d){ bgdata *t=(bgdata*)d; *(t->id)= -2 ; // WAIT STATUS *(t->id)=(*t->fn)(t->file); free(t); return 0; } /** int LOAD_FPG(STRING FICHERO, INT POINTER VARIABLE) Loads fpg file FICHERO on a separate thread VARIABLE is -2 while waiting, -1 on error, >=0 otherwise **/ int fxi_bgload_fpg(INSTANCE * my, int * params) { bgdata *t=prep(params); t->fn=gr_load_fpg; SDL_CreateThread(bgDoLoad,(void *)t); return 0 ; } /** int LOAD_FGC(STRING FICHERO, INT POINTER VARIABLE) Loads fpg file FICHERO on a separate thread VARIABLE is -2 while waiting, -1 on error, >=0 otherwise **/ int fxi_bgload_fgc(INSTANCE * my, int * params) { bgdata *t=prep(params); t->fn=fgc_load; SDL_CreateThread(bgDoLoad,(void *)t); return 0 ; } Fenix/fxi/src/dcbr.c0000644000000000000000000002465510607526736013310 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : dcbr.c * DESCRIPTION : DCB loading functions * * HISTORY: 0.83 - Patch to unify path processing * */ #include #ifdef TARGET_BEOS #include #else #include #endif #include #include #ifndef TARGET_Win32 #include #else #include #endif #include "fxi.h" #include "dcb.h" #include "dirs.h" #include "files.h" void * globaldata = 0 ; void * localdata = 0 ; int local_size ; int * localstr = 0 ; int local_strings ; PROCDEF * procs = NULL ; PROCDEF * mainproc = NULL ; int procdef_count = 0 ; PROCDEF * procdef_get (int n) { if (n >= 0 && n < procdef_count) return &procs[n] ; return NULL ; } PROCDEF * procdef_get_by_name (char * name) { int n; for (n = 0 ; n < procdef_count; n++) if (strcmp(procs[n].name, name) == 0) return &procs[n]; return NULL ; } DCB_HEADER dcb ; static char * trim(char * ptr) { char * ostr = ptr; char * bptr = ptr; while (*ptr == ' ' || *ptr == '\n' || *ptr == '\r' || *ptr == '\t') ptr++; while (*ptr) *bptr++ = *ptr++; while (bptr > ostr && (bptr[-1] == ' ' || bptr[-1] == '\n' || bptr[-1] == '\r' || bptr[-1] == '\t')) bptr--; *bptr = 0; return (ostr); } static int load_file (const char * filename, int n) { char line[2048] ; int allocated = 16 ; int count = 0 ; char ** lines ; file * fp ; fp = file_open (filename, "r0") ; if (!fp) { dcb.sourcelines[n] = 0 ; dcb.sourcecount[n] = 0 ; return 0 ; } lines = (char **) malloc(sizeof(char**) * 16) ; while (!file_eof(fp)) { file_gets (fp, line, 2048) ; trim(line); if (allocated == count) { allocated += 16 ; lines = realloc (lines, sizeof(char**) * allocated) ; } lines[count++] = strdup(line) ; } file_close (fp) ; dcb.sourcelines[n] = lines ; dcb.sourcecount[n] = count ; return 1 ; } int dcb_load (const char * filename) { file * fp ; /* check for existence of the DCB FILE */ if (!file_exists(filename)) return 0 ; fp = file_open (filename, "rb0") ; if (!fp) gr_error ("Error al abrir %s\n", filename) ; return dcb_load_from (fp, 0); } int dcb_load_from (file * fp, int offset) { unsigned int n ; char *path, *ptr ; /* Cambia al directorio del DCB con chdir */ path = dir_path_convert(fp->name) ; for (ptr = path+strlen(path) ; ptr >= path ; ptr--) if (*ptr == '/' || *ptr == '\\') break ; ptr[1] = 0 ; chdir (path) ; base_dir = path ; /* En WIN32, cambia a la unidad del DCB */ #ifdef WIN32 if (path[0] && path[1] == ':') { if (path[0] >= 'A' && path[0] <= 'Z') base_drive = path[0]-'A'+1 ; if (path[0] >= 'a' && path[0] <= 'z') base_drive = path[0]-'a'+1 ; _chdrive (base_drive); } #endif /* Lee el contenido del fichero */ file_seek (fp, offset, SEEK_SET); file_read (fp, &dcb, sizeof(DCB_HEADER_DATA)) ; if (memcmp (dcb.data.Header, "dcb\xD\x0A\x1F\x00\x00", 8) != 0 || (dcb.data.Version & 0xFF00) != (DCB_VERSION & 0xFF00)) { /* gr_error ("%s: no es un DCB version %d o compatible", filename, DCB_VERSION >> 8) ;*/ return 0 ; } globaldata = malloc (dcb.data.SGlobal + 4) ; localdata = malloc (dcb.data.SLocal + 4) ; localstr = (int *) malloc (4 * dcb.data.NLocStrings + 4) ; dcb.proc = (DCB_PROC *) malloc (sizeof(DCB_PROC) * (1+dcb.data.NProcs)) ; procs = (PROCDEF *) malloc (sizeof(PROCDEF) * (1+dcb.data.NProcs)) ; mainproc = procs ; procdef_count = dcb.data.NProcs ; local_size = dcb.data.SLocal ; local_strings = dcb.data.NLocStrings ; /* Recupera las zonas de datos globales */ file_seek (fp, offset + dcb.data.OGlobal, SEEK_SET) ; file_read (fp, globaldata, dcb.data.SGlobal) ; file_seek (fp, offset + dcb.data.OLocal, SEEK_SET) ; file_read (fp, localdata, dcb.data.SLocal) ; if (dcb.data.NLocStrings) { file_seek (fp, offset + dcb.data.OLocStrings, SEEK_SET) ; file_read (fp, localstr, dcb.data.NLocStrings * 4) ; } file_seek (fp, offset + dcb.data.OProcsTab, SEEK_SET) ; for (n = 0 ; n < dcb.data.NProcs ; n++) { file_read (fp, &dcb.proc[n], sizeof(DCB_PROC_DATA)) ; } /* Recupera las cadenas */ dcb.data.OStrings += offset; dcb.data.OText += offset; string_load (fp) ; /* Recupera los ficheros includos */ if (dcb.data.NFiles) { dcb.file = (DCB_FILE *) malloc(sizeof(DCB_FILE) * dcb.data.NFiles) ; file_seek (fp, offset + dcb.data.OFilesTab, SEEK_SET) ; file_read (fp, dcb.file, sizeof(DCB_FILE) * dcb.data.NFiles) ; for (n = 0 ; n < dcb.data.NFiles ; n++) { file_add_xfile (fp, dcb.file[n].OFile, dcb.file[n].Name, dcb.file[n].SFile) ; } } /* Recupera los imports */ if (dcb.data.NImports) { dcb.imports = (Uint32 *)malloc(4 * dcb.data.NImports) ; file_seek (fp, offset + dcb.data.OImports, SEEK_SET) ; file_read (fp, dcb.imports, 4 * dcb.data.NImports) ; } /* Recupera los datos de depurado */ if (dcb.data.NID) { dcb.id = (DCB_ID *) malloc(sizeof(DCB_ID) * dcb.data.NID) ; file_seek (fp, offset + dcb.data.OID, SEEK_SET) ; file_read (fp, dcb.id, sizeof(DCB_ID) * dcb.data.NID) ; } if (dcb.data.NGloVars) { dcb.glovar = (DCB_VAR *) malloc(sizeof(DCB_VAR) * dcb.data.NGloVars) ; file_seek (fp, offset + dcb.data.OGloVars, SEEK_SET) ; file_read (fp, dcb.glovar, sizeof(DCB_VAR) * dcb.data.NGloVars) ; } if (dcb.data.NLocVars) { dcb.locvar = (DCB_VAR *) malloc(sizeof(DCB_VAR) * dcb.data.NLocVars) ; file_seek (fp, offset + dcb.data.OLocVars, SEEK_SET) ; file_read (fp, dcb.locvar, sizeof(DCB_VAR) * dcb.data.NLocVars) ; } if (dcb.data.NVarSpaces) { dcb.varspace = (DCB_VARSPACE *) malloc(sizeof(DCB_VARSPACE) * dcb.data.NVarSpaces) ; dcb.varspace_vars = (DCB_VAR **) malloc(sizeof(DCB_VAR *) * dcb.data.NVarSpaces) ; file_seek (fp, offset + dcb.data.OVarSpaces, SEEK_SET) ; file_read (fp, dcb.varspace, sizeof(DCB_VARSPACE) * dcb.data.NVarSpaces) ; for (n = 0 ; n < dcb.data.NVarSpaces ; n++) { dcb.varspace_vars[n] = 0 ; if (!dcb.varspace[n].NVars) continue ; dcb.varspace_vars[n] = (DCB_VAR *) malloc (sizeof(DCB_VAR) * dcb.varspace[n].NVars) ; file_seek (fp, offset + dcb.varspace[n].OVars, SEEK_SET) ; file_read (fp, dcb.varspace_vars[n], sizeof(DCB_VAR) * dcb.varspace[n].NVars) ; } } if (dcb.data.NSourceFiles) { char filename[256] ; dcb.sourcecount = (int*)malloc (sizeof(int) * dcb.data.NSourceFiles) ; dcb.sourcelines = (char ***)malloc (sizeof(char **) * dcb.data.NSourceFiles) ; file_seek (fp, offset + dcb.data.OSourceFiles, SEEK_SET) ; for (n = 0 ; n < dcb.data.NSourceFiles ; n++) { file_read (fp, filename, 256) ; /* FIX PARA LOS INCLUDES */ if (!load_file (filename, n)) gr_con_printf ("[FXI] File %s not found", filename) ; } } /* Recupera los procesos */ for (n = 0 ; n < dcb.data.NProcs ; n++) { procs[n].params = dcb.proc[n].data.NParams ; procs[n].string_count = dcb.proc[n].data.NPriStrings ; procs[n].pubstring_count = dcb.proc[n].data.NPubStrings ; procs[n].private_size = dcb.proc[n].data.SPrivate ; procs[n].public_size = dcb.proc[n].data.SPublic ; procs[n].code_size = dcb.proc[n].data.SCode ; procs[n].id = dcb.proc[n].data.ID ; procs[n].flags = dcb.proc[n].data.Flags ; procs[n].type = n ; procs[n].name = getid(procs[n].id) ; procs[n].breakpoint = 0; if (dcb.proc[n].data.SPrivate) { procs[n].pridata = (int *)malloc(dcb.proc[n].data.SPrivate) ; file_seek (fp, offset + dcb.proc[n].data.OPrivate, SEEK_SET) ; file_read (fp, procs[n].pridata, dcb.proc[n].data.SPrivate) ; } if (dcb.proc[n].data.SPublic) { procs[n].pubdata = (int *)malloc(dcb.proc[n].data.SPublic) ; file_seek (fp, offset + dcb.proc[n].data.OPublic, SEEK_SET) ; file_read (fp, procs[n].pubdata, dcb.proc[n].data.SPublic) ; } if (dcb.proc[n].data.SCode) { procs[n].code = (int *) malloc(dcb.proc[n].data.SCode) ; file_seek (fp, offset + dcb.proc[n].data.OCode, SEEK_SET) ; file_read (fp, procs[n].code, dcb.proc[n].data.SCode) ; if (dcb.proc[n].data.OExitCode) procs[n].exitcode = procs[n].code + dcb.proc[n].data.OExitCode ; else procs[n].exitcode = NULL ; } if (dcb.proc[n].data.NPriStrings) { procs[n].strings = (int *)malloc(dcb.proc[n].data.NPriStrings * 4) ; file_seek (fp, offset + dcb.proc[n].data.OPriStrings, SEEK_SET) ; file_read (fp, procs[n].strings, dcb.proc[n].data.NPriStrings * 4) ; } if (dcb.proc[n].data.NPubStrings) { procs[n].pubstrings = (int *)malloc(dcb.proc[n].data.NPubStrings * 4) ; file_seek (fp, offset + dcb.proc[n].data.OPubStrings, SEEK_SET) ; file_read (fp, procs[n].pubstrings, dcb.proc[n].data.NPubStrings * 4) ; } if (dcb.proc[n].data.NPriVars) { dcb.proc[n].privar = (DCB_VAR *)malloc(dcb.proc[n].data.NPriVars * sizeof(DCB_VAR)) ; file_seek (fp, offset + dcb.proc[n].data.OPriVars, SEEK_SET) ; file_read (fp, dcb.proc[n].privar, dcb.proc[n].data.NPriVars * sizeof(DCB_VAR)) ; } if (dcb.proc[n].data.NPubVars) { dcb.proc[n].pubvar = (DCB_VAR *)malloc(dcb.proc[n].data.NPubVars * sizeof(DCB_VAR)) ; file_seek (fp, offset + dcb.proc[n].data.OPubVars, SEEK_SET) ; file_read (fp, dcb.proc[n].pubvar, dcb.proc[n].data.NPubVars * sizeof(DCB_VAR)) ; } } return 1 ; } char * getid(unsigned int code) { unsigned int n ; for (n = 0 ; n < dcb.data.NID ; n++) { if (dcb.id[n].Code == code) return dcb.id[n].Name ; } return "(?)" ; } Fenix/fxi/src/g_scroll.c0000644000000000000000000002572210607744630014171 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #include "fxi.h" #define MIN(a,b) ((a)<(b)?(a):(b)) #define MAX(a,b) ((a)>(b)?(a):(b)) /* Indicadores de bloqueo */ #define GRAPH_HWRAP 1 #define GRAPH_VWRAP 2 #define BACK_HWRAP 4 #define BACK_VWRAP 8 scrolldata scrolls[10] ; typedef struct _scroll_Extra_data { Sint32 x0 ; Sint32 y0 ; Sint32 x1 ; Sint32 y1 ; Sint32 z ; Sint32 camera ; Sint32 ratio ; Sint32 speed ; Sint32 region1 ; Sint32 region2 ; Sint32 flags1 ; Sint32 flags2 ; Sint32 follows ; Sint32 reserved[7] ; } __PACKED SCROLL_EXTRA_DATA ; void gr_scroll_bbox (int n, REGION * r) { if (n >= 0 && n <= 9) *r = *scrolls[n].region; } void scroll_region (int n, REGION * r) { if (n < 0 || n > 9) return ; /* Corrected from x,y... to posx,posy... so out_region works fine */ r->x -= scrolls[n].posx0 ; r->y -= scrolls[n].posy0 ; r->x2 -= scrolls[n].posx0 ; r->y2 -= scrolls[n].posy0 ; } /* Averigua si las regiones de scroll ocupan toda la pantalla */ static int scroll_fills_region (REGION r) { int n ; REGION r2 ; SCROLL_EXTRA_DATA * data ; GRAPH * graph ; int flags ; if (r.x > r.x2 || r.y > r.y2) return 1 ; for (n = 0 ; n < 10 ; n++) { data = &((SCROLL_EXTRA_DATA *)&GLODWORD(SCROLLS))[n] ; if (!scrolls[n].active) continue ; if (scrolls[n].back) { graph = scrolls[n].back ; flags = data->flags2 ; } else { graph = scrolls[n].graph ; flags = data->flags1 ; } if (!graph) continue ; if (flags & B_TRANSLUCENT) continue ; // Descarta el scroll si puede verse a travs if (!(flags & B_NOCOLORKEY)) { if (graph->modified) bitmap_analize(graph) ; if (!(graph->info_flags & GI_NOCOLORKEY)) continue ; } if (scrolls[n].region->x <= r.x && scrolls[n].region->y <= r.y && scrolls[n].region->x2 > r.x && scrolls[n].region->y2 > r.y) { r2 = r ; r2.x = scrolls[n].region->x2+1 ; if (!scroll_fills_region(r2)) return 0 ; r2 = r ; r2.y = scrolls[n].region->y2+1 ; r2.x2 = scrolls[n].region->x2 ; return scroll_fills_region(r2) ; } } return 0 ; } int gr_scroll_is_fullscreen () { REGION base ; base.x = 0 ; base.y = 0 ; base.x2 = scrbitmap->width-1 ; base.y2 = scrbitmap->height-1 ; return scroll_fills_region(base) ; } void gr_scroll_start (int n, int fileid, int graphid, int backid, int region, int flags) { if (n >= 0 && n <= 9) { object_list_dirty = 1; if (region < 0 || region > 31) region = 0 ; scrolls[n].active = 1 ; scrolls[n].fileid = fileid ; scrolls[n].graphid = graphid ; scrolls[n].backid = backid ; scrolls[n].region = ®ions[region] ; scrolls[n].flags = flags ; scrolls[n].graph = graphid ? bitmap_get (fileid, graphid) : 0 ; scrolls[n].back = backid ? bitmap_get (fileid, backid) : 0 ; if (!graphid || !scrolls[n].graph) gr_error ("El fondo de scroll %d:%d no existe\n", fileid, graphid) ; if ( backid && !scrolls[n].back ) gr_error ("Grafico %d:%d no existe\n", fileid, backid) ; } } void gr_scroll_stop (int n) { if (n >= 0 && n <= 9) { object_list_dirty = 1; scrolls[n].active = 0 ; } } static int compare_instances (const void * ptr1, const void * ptr2) { const INSTANCE * i1 = *(const INSTANCE **)ptr1 ; const INSTANCE * i2 = *(const INSTANCE **)ptr2 ; return LOCDWORD(i2,COORDZ) - LOCDWORD(i1,COORDZ); } void gr_scroll_draw (int n, int do_drawing, REGION * clipping) { int nproc, x, y, x0, y0, x1, y1, cx, cy, w, h, speed ; static INSTANCE ** proclist = 0 ; static int proclist_reserved = 0 ; int proclist_count ; REGION r; SCROLL_EXTRA_DATA * data ; INSTANCE * i ; if (n < 0 || n > 9) return ; data = &((SCROLL_EXTRA_DATA *)&GLODWORD(SCROLLS))[n] ; if (!scrolls[n].active || !scrolls[n].region || !scrolls[n].graph) return ; w = scrolls[n].region->x2 - scrolls[n].region->x + 1 ; h = scrolls[n].region->y2 - scrolls[n].region->y + 1 ; scrolls[n].z = data->z ; scrolls[n].ratio = data->ratio ; scrolls[n].camera = instance_get(data->camera) ; scrolls[n].speed = data->speed ; if (data->follows >= 0 && data->follows <= 9) scrolls[n].follows = &scrolls[data->follows] ; else scrolls[n].follows = 0 ; if (data->region1 < 0 || data->region1 > 31) scrolls[n].region1 = 0 ; else scrolls[n].region1 = ®ions[data->region1] ; if (data->region2 < 0 || data->region2 > 31) scrolls[n].region2 = 0 ; else scrolls[n].region2 = ®ions[data->region2] ; /* Actualiza las variables globales (perseguir la camara, etc) */ if (scrolls[n].follows) { if (scrolls[n].ratio) { data->x0 = scrolls[n].follows->x0 * 100 / scrolls[n].ratio ; data->y0 = scrolls[n].follows->y0 * 100 / scrolls[n].ratio ; } else { data->x0 = scrolls[n].follows->x0 ; data->y0 = scrolls[n].follows->y0 ; } } if (scrolls[n].camera) { instance_update_bbox (scrolls[n].camera) ; /* Mira a ver si entra dentro de la region o la 2 */ speed = scrolls[n].speed ; if (scrolls[n].speed == 0) speed = 9999999 ; x0 = LOCDWORD(scrolls[n].camera,BOX_X0) - data->x0 ; y0 = LOCDWORD(scrolls[n].camera,BOX_Y0) - data->y0 ; x1 = LOCDWORD(scrolls[n].camera,BOX_X1) - data->x0 ; y1 = LOCDWORD(scrolls[n].camera,BOX_Y1) - data->y0 ; if (scrolls[n].region1) { if (x0 < scrolls[n].region1->x2 && y0 < scrolls[n].region1->y2 && x1 >= scrolls[n].region1->x && y1 > scrolls[n].region1->y) { speed = 0 ; } } if (scrolls[n].region2) { if (x0 < scrolls[n].region1->x2 && y0 < scrolls[n].region1->y2 && x1 >= scrolls[n].region1->x && y1 > scrolls[n].region1->y) { speed = 99999999 ; } } /* Forzar a que est en el centro de la ventana */ cx = LOCDWORD(scrolls[n].camera,COORDX) ; cy = LOCDWORD(scrolls[n].camera,COORDY) ; RESOLXY(scrolls[n].camera, cx, cy); cx -= w/2 ; cy -= h/2 ; if (data->x0 < cx) data->x0 = MIN(data->x0+speed, cx) ; if (data->y0 < cy) data->y0 = MIN(data->y0+speed, cy) ; if (data->x0 > cx) data->x0 = MAX(data->x0-speed, cx) ; if (data->y0 > cy) data->y0 = MAX(data->y0-speed, cy) ; } /* Scrolls no cclicos y posicin del background */ if (scrolls[n].graph) { if (!(scrolls[n].flags & GRAPH_HWRAP)) data->x0 = MAX (0, MIN (data->x0, (int)scrolls[n].graph->width - w)) ; if (!(scrolls[n].flags & GRAPH_VWRAP)) data->y0 = MAX (0, MIN (data->y0, (int)scrolls[n].graph->height - h)) ; } if (scrolls[n].ratio) { data->x1 = data->x0 * 100 / scrolls[n].ratio ; data->y1 = data->y0 * 100 / scrolls[n].ratio ; } if (scrolls[n].back) { if (!(scrolls[n].flags & BACK_HWRAP)) data->x1 = MAX (0, MIN (data->x1, (int)scrolls[n].back->width - w)) ; if (!(scrolls[n].flags & BACK_VWRAP)) data->y1 = MAX (0, MIN (data->y1, (int)scrolls[n].back->height - h)) ; } /* Actualiza la posicin del scroll segn las variables globales */ scrolls[n].posx0 = data->x0 ; scrolls[n].posy0 = data->y0 ; scrolls[n].x0 = data->x0 % scrolls[n].graph->width ; scrolls[n].y0 = data->y0 % scrolls[n].graph->height ; if (scrolls[n].x0 < 0) scrolls[n].x0 += scrolls[n].graph->width ; if (scrolls[n].y0 < 0) scrolls[n].y0 += scrolls[n].graph->height ; if (scrolls[n].back) { scrolls[n].posx1 = data->x1 ; scrolls[n].posy1 = data->y1 ; scrolls[n].x1 = data->x1 % scrolls[n].back->width ; scrolls[n].y1 = data->y1 % scrolls[n].back->height ; if (scrolls[n].x1 < 0) scrolls[n].x1 += scrolls[n].back->width ; if (scrolls[n].y1 < 0) scrolls[n].y1 += scrolls[n].back->height ; } if (!do_drawing) return ; /* Dibuja el fondo */ r = *scrolls[n].region; if (clipping) region_union(&r, clipping); if (scrolls[n].back) { if (scrolls[n].back->ncpoints > 0 && scrolls[n].back->cpoints[0].x >= 0) { cx = scrolls[n].back->cpoints[0].x ; cy = scrolls[n].back->cpoints[0].y ; } else { cx = scrolls[n].back->width / 2 ; cy = scrolls[n].back->height / 2 ; } y = scrolls[n].region->y - scrolls[n].y1 ; while (y < scrolls[n].region->y2) { x = scrolls[n].region->x - scrolls[n].x1 ; while (x < scrolls[n].region->x2) { gr_blit (0, &r, x+cx, y+cy, data->flags2, scrolls[n].back) ; x += scrolls[n].back->width ; } y += scrolls[n].back->height ; } } /* Dibuja el primer plano */ if (scrolls[n].graph->ncpoints > 0 && scrolls[n].graph->cpoints[0].x >= 0) { cx = scrolls[n].graph->cpoints[0].x ; cy = scrolls[n].graph->cpoints[0].y ; } else { cx = scrolls[n].graph->width / 2 ; cy = scrolls[n].graph->height / 2 ; } y = scrolls[n].region->y - scrolls[n].y0 ; while (y < scrolls[n].region->y2) { x = scrolls[n].region->x - scrolls[n].x0 ; while (x < scrolls[n].region->x2) { gr_blit (0, &r, x+cx, y+cy, data->flags1, scrolls[n].graph) ; x += scrolls[n].graph->width ; } y += scrolls[n].graph->height ; } /* Crea una lista ordenada de instancias a dibujar */ i = first_instance ; proclist_count = 0 ; while (i) { if (((LOCDWORD(i,STATUS) & ~STATUS_WAITING_MASK) == STATUS_RUNNING || (LOCDWORD(i,STATUS) & ~STATUS_WAITING_MASK) == STATUS_FROZEN ) && LOCDWORD(i,CTYPE) == 1) { if (LOCDWORD(i,CFLAGS) && !(LOCDWORD(i,CFLAGS) & (1<next ; continue ; } if (proclist_count == proclist_reserved) { proclist_reserved += 16 ; proclist = (INSTANCE **) realloc (proclist, sizeof(INSTANCE *) * proclist_reserved) ; } proclist[proclist_count++] = i ; } i = i->next ; } /* Ordena la listilla */ qsort (proclist, proclist_count, sizeof(INSTANCE *), compare_instances) ; /* Visualiza los procesos */ for (nproc = 0 ; nproc < proclist_count ; nproc++) { x = LOCDWORD (proclist[nproc], COORDX) ; y = LOCDWORD (proclist[nproc], COORDY) ; RESOLXY(proclist[nproc], x, y); draw_instance_at (proclist[nproc], &r, x - scrolls[n].posx0 + scrolls[n].region->x, y - scrolls[n].posy0 + scrolls[n].region->y) ; } } int gr_scroll_active (int n) { return scrolls[n].active ; } Fenix/fxi/src/g_pal.c0000644000000000000000000005447310607526756013463 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : g_pal.c * DESCRIPTION : Palette and color functions * * HISTORY: 0.82 - Blendops functions moved to g_blendop.c */ #ifdef TARGET_BEOS #include #else #include #endif #include #include #include "fxi.h" #include "fgc.h" #include "fbm.h" #include "fpl.h" extern GRAPH * gr_read_png (const char * filename) ; SDL_Color palette[256] ; SDL_Color vpalette[256] ; Uint16 colorequiv[256] ; /* Equivalencia paleta -> pantalla */ Uint16 colorghost[65536] ; /* Deja un color a 50% de intensidad */ int palette_loaded = 0 ; int palette_changed = 0 ; static int fade_inc = 0 ; int fade_on = 0 ; int fade_step = 64 ; SDL_Color fade_from ; SDL_Color fade_to ; SDL_Color fade_pos = { 100, 100, 100 }; /* Lista ordenada de colores */ int color_list[256] ; /* Tabla de transparencias */ Uint8 trans_table[256][256] ; int trans_table_updated = 0 ; /* Paleta de colores por defecto */ int default_palette[] = { 0, 0, 0, 16, 16, 16, 32, 32, 32, 48, 48, 48, 64, 64, 64, 84, 84, 84, 100,100,100, 116,116,116, 132,132,132, 148,148,148, 168,168,168, 184,184,184, 200,200,200, 216,216,216, 232,232,232, 252,252,252, 40, 0, 0, 72, 0, 0, 108, 0, 0, 144, 0, 0, 180, 0, 0, 216, 0, 0, 252, 0, 0, 252, 32, 0, 252, 64, 0, 252, 96, 0, 252,128, 0, 252,160, 0, 252,180, 56, 252,200,112, 252,220,168, 252,240,224, 0, 40, 0, 0, 60, 0, 0, 84, 0, 0,108, 0, 0,132, 0, 0,156, 0, 0,180, 0, 0,204, 0, 0,228, 0, 0,252, 0, 48,252, 32, 96,252, 64, 144,252, 96, 192,252,132, 216,252,176, 240,252,220, 0, 0, 40, 0, 0, 72, 0, 0,104, 0, 0,140, 0, 0,172, 0, 0,208, 0, 0,252, 0, 48,252, 0,100,252, 0,148,252, 0,200,252, 0,252,252, 56,252,252, 112,252,252, 168,252,252, 224,252,252, 28, 28, 0, 52, 52, 0, 76, 76, 0, 100,100, 0, 124,124, 0, 152,152, 0, 176,176, 0, 200,200, 0, 224,224, 0, 252,252, 0, 252,252, 36, 252,252, 72, 252,252,108, 252,252,144, 252,252,180, 252,252,220, 28, 0, 28, 52, 0, 52, 76, 0, 76, 100, 0,100, 124, 0,124, 152, 0,152, 176, 0,176, 200, 0,200, 224, 0,224, 252, 0,252, 252, 36,252, 252, 72,252, 252,112,252, 252,148,252, 252,184,252, 252,224,252, 0, 20, 20, 0, 40, 40, 0, 60, 60, 0, 80, 80, 0,104,100, 0,124,120, 0,144,144, 0,164,164, 0,188,184, 0,208,204, 0,228,224, 0,252,248, 44,252,248, 92,252,248, 140,252,248, 188,252,248, 24, 12, 0, 44, 24, 0, 64, 36, 0, 84, 48, 0, 108, 60, 0, 128, 72, 0, 148, 84, 0, 168, 96, 0, 192,112, 0, 196,128, 28, 204,144, 60, 212,160, 92, 216,180,120, 224,196,152, 232,212,184, 240,232,216, 24, 12, 12, 40, 20, 20, 60, 32, 32, 80, 44, 44, 96, 52, 52, 116, 64, 64, 136, 76, 76, 156, 88, 88, 176,104,104, 196,120,120, 216,136,136, 240,152,152, 240,168,168, 244,188,188, 244,204,204, 248,224,224, 24, 20, 12, 44, 36, 24, 68, 52, 36, 88, 72, 48, 112, 88, 60, 132,104, 72, 156,124, 88, 172,140,100, 188,156,112, 204,176,124, 220,192,136, 240,212,152, 240,216,168, 244,224,188, 244,232,204, 248,240,224, 32, 8, 0, 60, 16, 0, 88, 28, 0, 120, 36, 0, 148, 48, 0, 176, 56, 0, 208, 68, 0, 216, 88, 0, 224,112, 0, 232,136, 0, 240,160, 0, 252,184, 0, 252,200, 56, 252,216,112, 252,232,168, 252,252,224, 20, 12, 12, 36, 24, 24, 56, 36, 36, 72, 48, 48, 92, 64, 64, 108, 76, 76, 128, 88, 88, 144,100,100, 164,116,116, 172,132,132, 184,148,148, 192,164,164, 204,180,180, 212,196,196, 224,212,212, 236,232,232, 12, 20, 12, 24, 36, 24, 36, 56, 36, 48, 72, 48, 64, 92, 64, 76,108, 76, 88,128, 88, 100,144,100, 116,164,116, 132,172,132, 148,184,148, 164,192,164, 180,204,180, 196,212,196, 212,224,212, 232,236,232, 12, 12, 16, 24, 24, 32, 36, 36, 48, 48, 48, 64, 64, 64, 80, 76, 76, 96, 88, 88,112, 100,100,128, 116,116,148, 132,132,160, 148,148,172, 164,164,184, 180,180,196, 196,196,208, 212,212,220, 232,232,236, 40, 0, 0, 80, 0, 0, 124, 0, 0, 164, 0, 0, 208, 0, 0, 252, 0, 0, 252, 40, 0, 252, 84, 0, 252,124, 0, 252,168, 0, 252,208, 0, 252,252, 0, 252,252, 44, 252,252, 92, 252,252,140, 252,252,188, 0, 0, 0, 0, 0, 88, 0, 0,128, 0, 0,168, 0, 0,208, 0, 0,248, 40, 0,248, 84, 0,248, 124, 0,248, 168, 0,248, 208, 0,248, 252, 0,252, 252, 52,252, 252,108,252, 252,164,252, 252,220,252 } ; static void activate_vpalette() { int n ; if (!screen) return ; if (enable_16bits) { for (n = 0 ; n < 256 ; n++) colorequiv[n] = SDL_MapRGB (screen->format, palette[n].r, palette[n].g, palette[n].b) ; } else { for (n = 0 ; n < 256 ; n++) { if (fade_pos.r <= 100) vpalette[n].r = palette[n].r * fade_pos.r / 100; else vpalette[n].r = palette[n].r + (255-palette[n].r) * (fade_pos.r-100) / 100; if (fade_pos.g <= 100) vpalette[n].g = palette[n].g * fade_pos.g / 100; else vpalette[n].g = palette[n].g + (255-palette[n].g) * (fade_pos.g-100) / 100; if (fade_pos.b <= 100) vpalette[n].b = palette[n].b * fade_pos.b / 100; else vpalette[n].b = palette[n].b + (255-palette[n].b) * (fade_pos.b-100) / 100; } SDL_SetColors (screen, vpalette, 0, 256) ; } } void gr_roll_palette (int color0, int num, int inc) { SDL_Color backup[256] ; if (!scr_initialized) gr_init (320, 200) ; if (color0 < 0 || color0 > 255) return ; if (num+color0 > 255) num = 256-color0 ; while (inc >= num) inc -= num ; while (inc <= -num) inc += num ; if (!inc) return ; memcpy (&backup[color0], &palette[color0], sizeof(SDL_Color)*num) ; if (inc < 0) /* Derecha */ { inc = -inc ; memmove (&palette[color0+inc], &palette[color0], sizeof(SDL_Color)*(num-inc)) ; memcpy (&palette[color0], &backup[color0+num-inc], sizeof(SDL_Color)*inc) ; } else /* Izquierda */ { memmove (&palette[color0], &palette[color0+inc], sizeof(SDL_Color)*(num-inc)) ; memcpy (&palette[color0+num-inc], &backup[color0], sizeof(SDL_Color)*inc) ; } palette_changed = 1 ; } void gr_fade_init (int r, int g, int b, int speed) { fade_inc = speed; fade_step = 0; fade_on = 1 ; fade_from = fade_pos; fade_to.r = r > 200 ? 200 : r ; fade_to.g = g > 200 ? 200 : g ; fade_to.b = b > 200 ? 200 : b ; GLODWORD(FADING) = 1 ; } void gr_fade_step() { if (fade_on != 0) { GLODWORD(FADING) = 1 ; fade_step += fade_inc ; if (fade_step < 0) { GLODWORD(FADING) = 0 ; fade_step = 0 ; fade_on = 0 ; } if (fade_step >= 64) { GLODWORD(FADING) = 0 ; fade_step = 64 ; fade_on = 0 ; } fade_pos.r = (fade_to.r * fade_step + fade_from.r * (64-fade_step)) / 64; fade_pos.g = (fade_to.g * fade_step + fade_from.g * (64-fade_step)) / 64; fade_pos.b = (fade_to.b * fade_step + fade_from.b * (64-fade_step)) / 64; if ((fade_step + fade_inc < 0 || fade_step + fade_inc > 64) && (fade_pos.r == 100 && fade_pos.g == 100 && fade_pos.b == 100)) { GLODWORD(FADING) = 0 ; fade_on = 0; } activate_vpalette() ; if (scrbitmap->depth == 16) { gr_fade16 (scrbitmap, fade_pos.r, fade_pos.g, fade_pos.b); } } } int gr_read_pal (file * fp) { unsigned char colors[256][3] ; int i ; if (!file_read (fp, colors, 3 * 256)) return 0 ; /* Ignora definiciones de gama */ file_seek (fp, 576, SEEK_CUR) ; for (i = 0 ; i < 256 ; i++) { palette[i].r = colors[i][0] << 2 ; palette[i].g = colors[i][1] << 2 ; palette[i].b = colors[i][2] << 2 ; } palette_loaded = 1 ; palette_changed = 1 ; return 1 ; } /* * FUNCTION : gr_save_pal * * Saves the current palette to the given file * * PARAMS : * filename Name of file to create * * RETURN VALUE : * 1 if succeded, 0 if error */ int gr_save_pal (const char * filename) { file * fp = file_open (filename, "wb"); char header[8] = "pal\x1A\x0D\x0A"; unsigned char colors[256][3] ; int i; if (!fp) return 0; for (i = 0 ; i < 256 ; i++) { colors[i][0] = palette[i].r / 4 ; colors[i][1] = palette[i].g / 4 ; colors[i][2] = palette[i].b / 4 ; } file_write (fp, header, 8); file_write (fp, colors, 768); memset (colors, 0, 576); file_write (fp, colors, 576); file_close (fp); return 1; } int gr_load_pal (const char * filename) { file * fp = file_open (filename, "rb") ; char header[8], headerEx[16] ; FGC_HEADER fgcHeader; FBM_FILE_HEADER fbmHeader; int r = 0 ; int i = 0 ; if (!fp) return -1 ; file_read (fp, header, 8) ; if (strcmp (header, "map\x1A\x0D\x0A") == 0) { file_seek (fp, 48, SEEK_SET) ; r = gr_read_pal (fp) ; } else if (strcmp (header, "fpg\x1A\x0D\x0A") == 0 || strcmp (header, "fnt\x1A\x0D\x0A") == 0 || strcmp (header, "pal\x1A\x0D\x0A") == 0) { r = gr_read_pal (fp) ; } else if (memcmp (header, "\x89PNG", 4) == 0) { GRAPH * graph ; file_close (fp); palette_loaded = 0; graph = gr_read_png(filename); if (graph) bitmap_destroy(graph); return 1; } else { // Soporte para FGC file_seek(fp, 0, SEEK_SET) ; file_read (fp, headerEx, 16) ; if (strcmp (headerEx, FGC_MAGIC) == 0) { file_seek (fp, 0, SEEK_SET) ; if (file_read (fp, &fgcHeader, sizeof(FGC_HEADER)) != sizeof(FGC_HEADER)) { fgc_error = "Fichero FGC corrupto o truncado"; file_close(fp); return -1; } ARRANGE_DWORD(&fgcHeader.version); ARRANGE_DWORD(&fgcHeader.depth); ARRANGE_DWORD(&fgcHeader.count); ARRANGE_DWORD(&fgcHeader.palette); if (fgcHeader.depth == 8) { static unsigned char color_palette[256][3]; file_seek (fp, fgcHeader.palette, SEEK_SET) ; if (file_read(fp, color_palette, 768) != 768) { fgc_error = "PALETA - Fichero FGC truncado"; file_close(fp); return -1; } for (i = 0 ; i < 256 ; i++) { palette[i].r = color_palette[i][0]; palette[i].g = color_palette[i][1]; palette[i].b = color_palette[i][2]; } palette_loaded = 1 ; palette_changed = 1 ; r = 1 ; } else { fgc_error = "Fichero FGC no contiene informacin de paleta"; file_close(fp); return -1; } } else if (strcmp (header, FBM_MAGIC) == 0) { // Soporte para FBM static unsigned char color_palette[256][3]; file_seek (fp, 0, SEEK_SET) ; if (file_read(fp,&fbmHeader,sizeof(FBM_FILE_HEADER)!=sizeof(FBM_FILE_HEADER))) { fbm_error = "Fichero FBM corrupto o truncado"; file_close(fp); return -1; } ARRANGE_DWORD(&fbmHeader.depth); if (fbmHeader.depth!=8) { fbm_error = "Fichero FBM no contiene informarcion de paleta"; file_close(fp); return -1; } file_seek (fp, sizeof(FBM_FILE_HEADER)+sizeof(FBM_HEADER), SEEK_SET) ; if (file_read(fp, color_palette, 768) != 768) { fbm_error = "PALETA - Fichero FGC truncado"; file_close(fp); return -1; } for (i = 0 ; i < 256 ; i++) { palette[i].r = color_palette[i][0]; palette[i].g = color_palette[i][1]; palette[i].b = color_palette[i][2]; } palette_loaded = 1 ; palette_changed = 1 ; r = 1 ; } else if (strcmp (header, FPL_MAGIC) == 0) { // FPL SUPPORT file_seek (fp, 0, SEEK_SET) ; r = fpl_load_from(fp) ; } } file_close(fp) ; return r; } int gr_rgb (int r, int g, int b) { int color ; if (!scr_initialized) gr_init (320, 200) ; r >>= screen->format->Rloss ; g >>= screen->format->Gloss ; b >>= screen->format->Bloss ; color= (r << screen->format->Rshift) | (g << screen->format->Gshift) | (b << screen->format->Bshift) ; if (!color) return 1 ; return color ; } void gr_get_rgb (int color, int *r, int *g, int *b) { if (!scr_initialized) gr_init (320, 200) ; if (!enable_16bits) { color &= 0xFF ; (*r) = palette[color].r ; (*g) = palette[color].g ; (*b) = palette[color].b ; return ; } (*r) = ((color & screen->format->Rmask) >> screen->format->Rshift) ; (*g) = ((color & screen->format->Gmask) >> screen->format->Gshift) ; (*b) = ((color & screen->format->Bmask) >> screen->format->Bshift) ; (*r) <<= screen->format->Rloss ; (*g) <<= screen->format->Gloss ; (*b) <<= screen->format->Bloss ; } /* Busca el color ms cercano en la paleta a uno determinado */ /* Emplea una cach interna que acelera considerablemente el proceso, * a cambio de perder una parte de precisin */ Uint8 nearest_table[64][64][64] ; inline int find_nearest_color (const int first, const int last, SDL_Color key) { int n, diff ; int best, bestdiff; SDL_Color * c ; n = nearest_table[key.r/4][key.g/4][key.b/4] ; if (!n && key.r/4 > 0) n = nearest_table[key.r/4-1][key.g/4][key.b/4] ; if (!n && key.g/4 > 0) n = nearest_table[key.b/4][key.g/4-1][key.b/4] ; if (!n && key.b/4 > 0) n = nearest_table[key.b/4][key.g/4][key.b/4-1] ; if (n) return n ; //printf ("*** %02d %02d %02d NOT FOUND ****\n", key.r/8, key.g/8, key.b/8) ; bestdiff = 999 ; best = 0; for (n = first ; n <= last ; n++) { c = &palette[color_list[n]] ; diff = (key.r > c->r ? key.r-c->r : c->r-key.r) + (key.g > c->g ? key.g-c->g : c->g-key.g) + (key.b > c->b ? key.b-c->b : c->b-key.b) ; if (diff < bestdiff) { bestdiff = diff ; best = n ; } } return nearest_table[key.r/4][key.g/4][key.b/4] = color_list[best] ; } int gr_find_nearest_color (int r, int g, int b) { SDL_Color c ; c.r = r ; c.g = g ; c.b = b ; return find_nearest_color(0, 255, c) ; } Uint16 gr_get_color (int r, int g, int b) { return SDL_MapRGB (screen->format, (Uint8)r, (Uint8)g, (Uint8)b) ; } /* ---------------------------------------------------------------------- * Funcin que rellena la tabla de color ms cercano (nearest_table) * ---------------------------------------------------------------------- */ #define DUP 1 #define DDOWN 2 #define DRIGHT 3 #define DLEFT 4 #define DIN 5 #define DOUT 6 typedef struct __fillpoint { Uint8 r, g, b, dir, color ; struct __fillpoint * next ; struct __fillpoint * prev ; } fillpoint ; static fillpoint * filling = NULL ; inline fillpoint * add_filling(int r, int g, int b, int color, int dir) { fillpoint * n ; if (nearest_table[r*2][g*2][b*2] != 0) return NULL ; nearest_table[r*2+0][g*2+0][b*2+0] = color ; nearest_table[r*2+0][g*2+0][b*2+1] = color ; nearest_table[r*2+0][g*2+1][b*2+0] = color ; nearest_table[r*2+0][g*2+1][b*2+1] = color ; nearest_table[r*2+1][g*2+0][b*2+0] = color ; nearest_table[r*2+1][g*2+0][b*2+1] = color ; nearest_table[r*2+1][g*2+1][b*2+0] = color ; nearest_table[r*2+1][g*2+1][b*2+1] = color ; n = malloc(sizeof(fillpoint)) ; n->r = r ; n->g = g ; n->b = b ; n->color = color ; n->dir = dir ; n->next = filling ; n->prev = NULL ; if (filling) filling->prev = n ; return filling = n ; } inline void del_filling(fillpoint * n) { if (n->next) n->next->prev = n->prev ; if (n->prev) n->prev->next = n->next ; else filling = n->next ; free (n) ; } void gr_fill_nearest_table() { int n ; SDL_Color c ; register fillpoint * ptr = NULL ; fillpoint * next = NULL ; for (n = 1 ; n < 256 ; n++) { c = palette[n] ; c.r /= 8 ; c.g /= 8 ; c.b /= 8 ; add_filling (c.r, c.g, c.b, n, DRIGHT) ; if (c.r < 31) add_filling (c.r+1, c.g, c.b, n, DRIGHT) ; if (c.r > 0) add_filling (c.r-1, c.g, c.b, n, DLEFT) ; if (c.g < 31) add_filling (c.r, c.g+1, c.b, n, DDOWN) ; if (c.g > 0) add_filling (c.r, c.g-1, c.b, n, DUP) ; if (c.b < 31) add_filling (c.r, c.g, c.b+1, n, DIN) ; if (c.b > 0) add_filling (c.r, c.g, c.b-1, n, DOUT) ; } while (filling) { ptr = filling ; while (ptr) { if (ptr->r < 31) add_filling(ptr->r+1, ptr->g, ptr->b, ptr->color, DRIGHT) ; if (ptr->r > 0) add_filling(ptr->r-1, ptr->g, ptr->b, ptr->color, DLEFT) ; if (ptr->g < 31) add_filling(ptr->r, ptr->g+1, ptr->b, ptr->color, DUP) ; if (ptr->g > 0) add_filling(ptr->r, ptr->g-1, ptr->b, ptr->color, DDOWN) ; if (ptr->b < 31) add_filling(ptr->r, ptr->g, ptr->b+1, ptr->color, DIN) ; if (ptr->b > 0) add_filling(ptr->r, ptr->g, ptr->b-1, ptr->color, DOUT) ; next = ptr->next ; del_filling (ptr) ; ptr = next ; } } } /* ---------------------------------------------------------------------- * Rellena el contenido de la tabla de transparencias * ---------------------------------------------------------------------- */ static int compare_colors (const void * p1, const void * p2) { SDL_Color * c1 = &palette[*(int *)p1] ; SDL_Color * c2 = &palette[*(int *)p2] ; return (c1->r + c1->g + c1->b) - (c2->r + c2->g + c2->b) ; } void gr_make_trans_table() { int ticks1, ticks2 ; int a=0, b=0, c1=0, c2=0, n=0 ; SDL_Color base, dest ; if (trans_table_updated) return; if (report_graphics) ticks1 = SDL_GetTicks() ; memset (nearest_table, 0, sizeof(nearest_table)) ; for (n = 1 ; n < 256 ; n++) { SDL_Color *c = &palette[n] ; nearest_table[c->r/4][c->g/4][c->b/4] = n ; } for (n = 0 ; n < 256 ; n++) color_list[n] = n ; qsort (color_list, 256, sizeof(int), compare_colors) ; gr_fill_nearest_table() ; for (a = 0 ; a < 256 ; a++) { c1 = color_list[a] ; base.r = palette[c1].r/2 ; base.g = palette[c1].g/2 ; base.b = palette[c1].b/2 ; for (b = 0 ; b < a ; b++) { c2 = color_list[b] ; dest.r = base.r + palette[c2].r/2 ; dest.g = base.g + palette[c2].g/2 ; dest.b = base.b + palette[c2].b/2 ; trans_table[c1][c2] = trans_table[c2][c1] = find_nearest_color (b, a, dest) ; } trans_table[c1][c1] = c1 ; trans_table[0][c1] = c1 ; } trans_table_updated = 1 ; if (report_graphics) { ticks2 = SDL_GetTicks() ; gr_con_printf ("[GRAPH] Palette analysis done in %d ms\n", ticks2-ticks1) ; } } void gr_refresh_palette() { int n ; if (!scr_initialized) return ; memset (nearest_table, 0, sizeof(nearest_table)) ; for (n = 0 ; n < 256 ; n++) color_list[n] = n ; qsort (color_list, 256, sizeof(int), compare_colors) ; trans_table_updated = 0 ; /* Actualiza la paleta */ palette_changed = 0 ; if (fade_step != 100) { memcpy (vpalette, palette, sizeof(vpalette)) ; activate_vpalette() ; background_dirty = 1 ; // Temporal, hasta buscar una solucion mejor } else { if (enable_16bits) { for (n = 0 ; n < 256 ; n++) colorequiv[n] = SDL_MapRGB (screen->format, palette[n].r, palette[n].g, palette[n].b) ; } else { SDL_SetColors (screen, palette, 0, 256) ; } } } void gr_set_rgb (int color, int r, int g, int b) { if (color < 0 || color > 255) return ; palette[color].r = r << 2 ; palette[color].g = g << 2 ; palette[color].b = b << 2 ; palette_changed = 1 ; } /* Rutinas para guardar y recibir trozos de paleta desde un buffer */ void gr_get_colors (int color, int num, Uint8 * pal) { if (num < 1 || color < 0 || color > 255) return ; if (color+num >= 256) num = 256-color ; while (num--) { *pal++ = palette[color ].r ; *pal++ = palette[color ].g ; *pal++ = palette[color++].b ; } } void gr_set_colors (int color, int num, Uint8 * pal) { if (num < 1 || color < 0 || color > 255) return ; if (color+num >= 256) num = 256-color ; while (num--) { palette[color ].r = *pal++ ; palette[color ].g = *pal++ ; palette[color++].b = *pal++ ; } palette_changed = 1 ; } Fenix/fxi/src/i_debug.c0000644000000000000000000002163210607526760013761 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #ifdef TARGET_BEOS #include #else #include #endif #include #include "fxi.h" #include "dcb.h" /* ---------------------------------------------------------------------- */ /* Este mdulo contiene funciones que muestran el equivalente en texto de */ /* una instruccin o mnemnico, o de un bloque de cdigo completo */ /* ---------------------------------------------------------------------- */ struct { char * name; int code; int params ; } mnemonics[] = { { "ARRAY", MN_ARRAY, 1 }, { "GET_PRIVATE", MN_GET_PRIV, 1 }, { "GET_REMOTE", MN_GET_REMOTE, 1 }, { "GET_LOCAL", MN_GET_LOCAL, 1 }, { "GET_GLOBAL", MN_GET_GLOBAL, 1 }, { "PRIVATE", MN_PRIVATE, 1 }, { "REMOTE", MN_REMOTE, 1 }, { "LOCAL", MN_LOCAL, 1 }, { "GLOBAL", MN_GLOBAL, 1 }, { "DUP", MN_DUP }, { "PUSH", MN_PUSH, 1 }, { "POP", MN_POP }, { "INDEX", MN_INDEX, 1 }, { "NEG", MN_NEG }, { "NOT", MN_NOT }, { "CALL", MN_CALL, 1 }, { "PROCESS", MN_PROC, 1 }, { "SYSCALL", MN_SYSCALL, 1 }, { "SYSPROC", MN_SYSPROC, 1 }, { "CLONE", MN_CLONE, 1 }, { "END", MN_END }, { "RETURN", MN_RETURN }, { "FRAME", MN_FRAME }, { "TYPE", MN_TYPE, 1 }, { "MUL", MN_MUL }, { "DIV", MN_DIV }, { "ADD", MN_ADD }, { "SUB", MN_SUB }, { "MOD", MN_MOD }, { "ROR", MN_ROR }, { "ROL", MN_ROL }, { "AND", MN_AND }, { "OR", MN_OR }, { "XOR", MN_XOR }, { "BNOT", MN_BNOT }, { "BAND", MN_BAND }, { "BOR", MN_BOR }, { "BXOR", MN_BXOR }, { "EQ", MN_EQ }, { "NE", MN_NE }, { "GT", MN_GT }, { "LT", MN_LT }, { "GTE", MN_GTE }, { "LTE", MN_LTE }, { "FLOAT2INT", MN_FLOAT2INT, 1 }, { "INT2FLOAT", MN_INT2FLOAT, 1 }, { "INT2WORD", MN_INT2WORD, 1 }, { "INT2BYTE", MN_INT2BYTE, 1 }, { "POSTINC", MN_POSTINC, 1 }, { "POSTDEC", MN_POSTDEC, 1 }, { "INC", MN_INC, 1 }, { "DEC", MN_DEC, 1 }, { "VARADD", MN_VARADD }, { "VARSUB", MN_VARSUB }, { "VARMUL", MN_VARMUL }, { "VARDIV", MN_VARDIV }, { "VARMOD", MN_VARMOD }, { "VARXOR", MN_VARXOR }, { "VARAND", MN_VARAND }, { "VAROR", MN_VAROR }, { "VARROR", MN_VARROR }, { "VARROL", MN_VARROL }, { "LET", MN_LET }, { "LETNP", MN_LETNP }, { "REPEAT", MN_REPEAT, 1 }, { "BREAK", MN_BREAK, 1 }, { "BRFALSE", MN_BRFALSE, 1 }, { "RETRUE", MN_RETRUE, 1 }, { "REFALSE", MN_REFALSE, 1 }, { "JUMP", MN_JUMP, 1 }, { "JFALSE", MN_JFALSE, 1 }, { "JTRUE", MN_JTRUE, 1 }, { "JTFALSE", MN_JTFALSE, 1 }, { "JTTRUE", MN_JTTRUE, 1 }, { "PTR", MN_PTR }, { "SWITCH", MN_SWITCH }, { "CASE", MN_CASE, 0 }, { "CASE_R", MN_CASE_R, 0 }, { "JNOCASE", MN_JNOCASE, 1 }, { "CHRSTR", MN_CHRSTR }, { "SUBSTR", MN_SUBSTR, 1 }, { "STR2INT", MN_STR2INT, 1 }, { "STR2CHR", MN_STR2CHR, 1 }, { "INT2STR", MN_INT2STR, 1 }, { "CHR2STR", MN_CHR2STR, 1 }, { "STR2FLOAT", MN_STR2FLOAT, 1 }, { "FLOAT2STR", MN_FLOAT2STR, 1 }, { "POINTER2STR", MN_POINTER2STR, 1 }, { "POINTER2BOL", MN_POINTER2BOL, 1 }, { "A2STR", MN_A2STR, 0 }, { "STR2A", MN_STR2A, 0 }, { "STRACAT", MN_STRACAT, 0 }, { "DEBUG", MN_DEBUG, 1 }, { 0, -1 } } ; void mnemonic_dump (int i, int param) { int n = 0 ; while (mnemonics[n].name) { if (mnemonics[n].code == (i & MN_MASK)) { switch (MN_TYPEOF(i)) { case MN_WORD: printf ("WORD ") ; break ; case MN_BYTE: printf ("BYTE ") ; break ; case MN_FLOAT: printf ("FLOAT ") ; break ; case MN_STRING: printf ("STRING ") ; break ; default: printf (" ") ; break ; } printf ("%-12s", mnemonics[n].name) ; if (i == (MN_PUSH | MN_FLOAT)) printf ("%-8f", *(float *)¶m) ; else if (i & MN_1_PARAMS) printf ("%-8d", param) ; /* printf ("\n") ; */ } n++ ; } } /* Muestra el rbol de instancias */ void instance_dump_all() { INSTANCE * i ; for (i = first_instance ; i ; i = i->next) { if (!LOCDWORD(i,FATHER)) { instance_dump (i, 1) ; } } } void instance_dump(INSTANCE * father, int indent) { INSTANCE * i, * next ; PROCDEF * proc ; DCB_PROC * dcbproc ; char buffer[128] ; char line[128] ; int n, nid ; i = father ; if (!father) i = first_instance ; proc = i->proc ; dcbproc = &dcb.proc[proc->type] ; nid = LOCDWORD(i,PROCESS_ID) ; if (dcb.data.NID && dcbproc->data.ID) { sprintf (buffer, "%s", getid(dcbproc->data.ID)) ; } else { sprintf (buffer, "%s", proc->type == 0 ? "MAIN":"PROC") ; } line[0] = 0 ; for (n = 0 ; n < indent*3-3 ; n+=3) strcat (line, " \x03 ") ; sprintf (line+strlen(line), " \x01\x02 %-12s ", buffer) ; while (n++ < 8) strcat (line, " ") ; sprintf (line+strlen(line), "%7d", nid) ; if (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) strcat(line, "[W]"); switch (LOCDWORD(i, STATUS) & ~STATUS_WAITING_MASK) { case STATUS_DEAD : strcat (line, "[D]") ; break ; case STATUS_KILLED : strcat (line, "[K]") ; break ; case STATUS_RUNNING : strcat (line, " ") ; break ; case STATUS_SLEEPING : strcat (line, "[S]") ; break ; case STATUS_FROZEN : strcat (line, "[F]") ; break ; /* default: sprintf (line+strlen(line), "%-4d", LOCDWORD(i, STATUS)) ; break; */ } gr_con_printf (line) ; if (!LOCDWORD(i,SON)) return ; next = instance_get (LOCDWORD(i,SON)) ; if (!next) gr_con_printf ("[FXI] \12**PANIC**\7 SON %d does not exist\n", LOCDWORD(i,SON)) ; i = next ; while (i) { proc = i->proc ; dcbproc = &dcb.proc[proc->type] ; if (LOCDWORD(i, SON)) { instance_dump (i, indent+1) ; } else { nid = LOCDWORD(i,PROCESS_ID) ; if (dcb.data.NID && dcbproc->data.ID) { sprintf (buffer, "%s", getid(dcbproc->data.ID)) ; } else { sprintf (buffer, "%s", proc->type == 0 ? "MAIN":"PROC") ; } line[0] = 0 ; for (n = 0 ; n < indent*3 ; n+=3) strcat (line, " \x03 ") ; sprintf (line+strlen(line), " \x01\x02 %-12s ", buffer) ; while (n++ < 8) strcat (line, " ") ; sprintf (line+strlen(line), "%7d", nid) ; if (LOCDWORD(i, STATUS) & STATUS_WAITING_MASK) strcat(line, "[W]"); switch (LOCDWORD(i, STATUS) & ~STATUS_WAITING_MASK) { case STATUS_DEAD : strcat (line, "[D]") ; break ; case STATUS_KILLED : strcat (line, "[K]") ; break ; case STATUS_RUNNING : strcat (line, " ") ; break ; case STATUS_SLEEPING : strcat (line, "[S]") ; break ; case STATUS_FROZEN : strcat (line, "[F]") ; break ; /* default: sprintf (line+strlen(line), "%-4d", LOCDWORD(i, STATUS)) ; break; */ } gr_con_printf (line) ; /* printf ("FAT: %-5d SON: %-5d BIG: %-5d SMA: %-5d\n", LOCDWORD(i, FATHER), LOCDWORD(i, SON), LOCDWORD(i, BIGBRO), LOCDWORD(i, SMALLBRO)) ; */ } if (LOCDWORD(i, BIGBRO)) { next = instance_get (LOCDWORD(i, BIGBRO)) ; if (!next) gr_con_printf ("[FXI] \12**PANIC**\7 BIGBRO %d does not exist\n", LOCDWORD(i, BIGBRO)) ; i = next ; } else break ; } } Fenix/fxi/src/mmx_hspan.c0000644000000000000000000007507610607526772014373 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : mmx_hspan.c * DESCRIPTION : Accelerated MMX routines for horizontal texture span * drawing (used by g_blit.c) * * HISTORY: 0.82 - First version */ #include "fxi.h" //#define DEBUGMMX #ifdef MMX_FUNCTIONS /* Parameters for hspan_16to16_translucent */ extern Sint16 * ghost1; extern Sint16 * ghost2; /* Parameters for hspan_8to8_translucent */ extern Sint8 (* ghost8)[256][256]; /* * FUNCTION : gr_draw_hspan_XXX * * Draw a textures span line into a bitmap. Those functions * represent the inner loop of the blitter, but in an * unscaled, non-rotated case (for gr_blit). Texture/screen * coordinates are already calculated in origin/dest pointers. * * This file includes optimized Intel-MMX versions of those * functions, and compiles under Visual C++ 6.0 * * There is one version of this function for each bit depth * and blend effect configuration * * PARAMS : * dest Destination pointer * tex Origin pointer * pixels Number of pixels to draw * incs Texture increment: must be 1 or -1 * * RETURN VALUE : * None * */ void MMX_draw_hspan_8to8_nocolorkey(Uint8 * scr, Uint8 * tex, int pixels, int incs) { #ifdef DEBUGMMX printf("MMX_draw_hspan_8to8_nocolorkey\n"); fflush(stdout); #endif #ifdef __GNUC__ __asm__ __volatile__( // "movl %1, %%esi \n" // mov esi, tex // "movl %0, %%edi \n" // mov edi, scr "movl %3, %%edx \n" // mov edx, incs "cmp $0, %%edx \n" // cmp edx, 0 "jng 1f \n" // jng inverse "movl %2, %%ecx \n" // mov ecx, pixels "sar $3, %%ecx \n" // sar ecx, 3 "jz 3f \n" // jz last_pixels "sal $3, %%edx \n" // sal edx, 3 "movl %2, %%eax \n" // mov eax, pixels "and $0x7, %%eax \n" // and eax, 07h "movl %%eax, %2 \n" // mov pixels, eax "0: \n" // main_loop // main_loop: "movq 0(%%esi), %%mm0 \n" // movq mm0, [esi] "add %%edx, %%esi \n" // add esi, edx "movq 0(%%edi), %%mm0 \n" // movq [edi], mm0 "add $8, %%edi \n" // add edi, 8 "dec %%ecx \n" // dec ecx "jnz 0b \n" // jnz main_loop "jmp 3f \n" // jmp last_pixels "1: \n" // inverse // inverse: "movl %2, %%ecx \n" // mov ecx, pixels "sar $3, %%ecx \n" // sar ecx, 3 "jz 3f \n" // jz last_pixels "sal $3, %%edx \n" // sal edx, 3 "movl %2, %%eax \n" // mov eax, pixels "and $0x7, %%eax \n" // and eax, 07h "movl %%eax, %2 \n" // mov pixels, eax "2: \n" // inverse_loop // inverse_loop: "movl -3(%%esi), %%eax \n" // mov eax, [esi-3] "movl -7( %%esi), %%ebx \n" // mov ebx, [esi-7] "sub $8, %%esi \n" // sub esi, 8 "rol $8, %%ax \n" // rol ax, 8 "rol $8, %%bx \n" // rol bx, 8 "add $8, %%edi \n" // add edi, 8 "rol $16, %%eax \n" // rol eax, 16 "rol $16, %%ebx \n" // rol ebx, 16 "rol $8, %%ax \n" // rol ax, 8 "rol $8, %%bx \n" // rol bx, 8 "dec %%ecx \n" // dec ecx "movl %%eax, -8(%%edi) \n" // mov [edi-8], eax "movl %%ebx, -4( %%edi ) \n" // mov [edi-4], ebx "jnz 2b \n" // jnz inverse_loop "3: \n" // last_pixels // last_pixels: "movl %2, %%ecx \n" // mov ecx, pixels "test %%ecx, %%ecx \n" // test ecx, ecx "jz 5f \n" // jz ending "4: \n" // last_pixel_loop // last_pixel_loop: "movb (%%esi), %%al \n" // mov al, [esi] "add %3, %%esi \n" // add esi, incs "movb %%al, ( %%edi) \n" // mov [edi], al "inc %%edi \n" // inc edi "dec %%ecx \n" // dec ecx "jnz 4b \n" // jnz last_pixel_loop "5: \n" // ending: // ending: "emms \n" // emms : : "D" (scr), "S" (tex), "m" (pixels), "m" (incs) : "mm0", "mm1", "cc" // "ax", "esi", "edi", "edx", "ecx", "eax", "memory" ); #else _asm { mov esi, tex mov edi, scr mov edx, incs cmp edx, 0 jng inverse mov ecx, pixels sar ecx, 3 jz last_pixels sal edx, 3 mov eax, pixels and eax, 07h mov pixels, eax main_loop: movq mm0, [esi] add esi, edx movq [edi], mm0 add edi, 8 dec ecx jnz main_loop jmp last_pixels inverse: mov ecx, pixels sar ecx, 3 jz last_pixels sal edx, 3 mov eax, pixels and eax, 07h mov pixels, eax inverse_loop: mov eax, [esi-3] mov ebx, [esi-7] sub esi, 8 rol ax, 8 rol bx, 8 add edi, 8 rol eax, 16 rol ebx, 16 rol ax, 8 rol bx, 8 dec ecx mov [edi-8], eax mov [edi-4], ebx jnz inverse_loop last_pixels: mov ecx, pixels test ecx, ecx jz ending last_pixel_loop: mov al, [esi] add esi, incs mov [edi], al inc edi dec ecx jnz last_pixel_loop ending: emms } #endif } void MMX_draw_hspan_8to8_translucent(Uint8 * scr, Uint8 * tex, int pixels, int incs) { int counter; #ifdef DEBUGMMX printf("MMX_draw_hspan_8to8_translucent\n"); fflush(stdout); #endif #ifdef __GNUC__ __asm__ __volatile__( // "movl %1, %%esi \n" // mov esi, tex // "movl %0, %%edi \n" // mov edi, scr "movl %2, %%edx \n" // mov edx, pixels "movl %3, %%ecx \n" // mov ecx, incs "add %%ecx, %%ecx \n" // add ecx, ecx "movl %%ecx, %3 \n" // mov incs, ecx "xor %%eax, %%eax \n" // xor eax, eax "xor %%ebx, %%ebx \n" // xor ebx, ebx "sar $1, %%edx \n" // sar edx, 1 "jz 0f \n" // jz last_pixel "movl %5, %%edx \n" // mov counter, edx "movl (%4), %%edx \n" // mov edx, [ghost8] "1: \n" // main_loop // main_loop: "movw (%%esi), %%ax \n" // mov ax, [esi] "movw (%%edi), %%bx \n" // mov bx, [edi] "xchg %%bh, %%al \n" // xchg al, bh "add %3, %%esi \n" // add esi, incs "movb (%%edx ,%%eax), %%ch \n" // mov ch, byte ptr [edx + eax] "add $2, %%edi \n" // add edi, 2 "movb (%%edx ,%%ebx), %%cl \n" // mov cl, byte ptr [edx + ebx] "decl %5 \n" // dec counter "movw %%cx, -2( %%edi) \n" // mov [edi-2], cx "jnz 1b \n" // jnz main_loop "0: \n" // last_pixel // last_pixel: "movl %2, %%ecx \n" // mov ecx, pixels "test $1, %%ecx \n" // test ecx, 1 "jz 2f \n" // jz ending "movl ( %4 ), %%edx \n" // mov edx, [ghost8] "movb ( %%esi), %%ah \n" // mov ah, [esi] "movb ( %%edi ), %%al \n" // mov al, [edi] "movb (%%edx, %%eax), %%al \n" // mov al, byte ptr [edx + eax] "movb %%al, ( %%edi ) \n" // mov [edi], al "2: \n" // ending: // ending: : : "D" (scr), "S" (tex), "m" (pixels), "m" (incs), "m" (ghost8), "m" (counter) : "cc" // "ax", "bx","esi", "edi", "edx", "ecx", "eax", "memory" ); #else _asm { mov esi, tex mov edi, scr mov edx, pixels mov ecx, incs add ecx, ecx mov incs, ecx xor eax, eax xor ebx, ebx sar edx, 1 jz last_pixel mov counter, edx mov edx, [ghost8] main_loop: mov ax, [esi] mov bx, [edi] xchg al, bh add esi, incs mov ch, byte ptr [edx + eax] add edi, 2 mov cl, byte ptr [edx + ebx] dec counter mov [edi-2], cx jnz main_loop last_pixel: mov ecx, pixels test ecx, 1 jz ending mov edx, [ghost8] mov ah, [esi] mov al, [edi] mov al, byte ptr [edx + eax] mov [edi], al ending: } #endif } void MMX_draw_hspan_8to8(Uint8 * scr, Uint8 * tex, int pixels, int incs) { #ifdef DEBUGMMX printf( "MMX_draw_hspan_8to8\n"); fflush(stdout); #endif #ifdef __GNUC__ __asm__ __volatile__( // "movl %1, %%esi \n" // mov esi, tex // "movl %0, %%edi \n" // mov edi, scr "movl %2, %%ecx \n" // mov ecx, pixels "movl %3, %%edx \n" // mov edx, incs "add %%edx, %%edx\n" // add edx, edx "add %%edx, %%edx\n" // add edx, edx "sar $2, %%ecx \n" // sar ecx, 2 "jz 0f \n" // jz last_pixel "cmp $0, %%edx \n" // cmp edx, 0 "jl 3f \n" // jl main_loop "add %%edx, %%edx \n" // add edx, edx "sar $1, %%ecx \n" // sar ecx, 1 "jz 0f \n" // jz last_pixel "1: \n" //mmx_loop: //mmx_loop: "movq (%%esi), %%mm0 \n" // movq mm0, [esi] "pxor %%mm2, %%mm2 \n" // pxor mm2, mm2 "add $8, %%esi \n" // add esi, 8 "movq (%%edi), %%mm1 \n" // movq mm1, [edi] "pcmpeqb %%mm2, %%mm0 \n" // pcmpeqb mm2, mm0 "add $8, %%edi \n" // add edi, 8 "pand %%mm2, %%mm1 \n" // pand mm1, mm2 "pandn %%mm0, %%mm2 \n" // pandn mm2, mm0 "dec %%ecx \n" // dec ecx "por %%mm1, %%mm2 \n" // por mm2, mm1 "movq %%mm2, -8(%%edi) \n" // movq [edi-8], mm2 "jnz 1b \n" // jnz mmx_loop "movl %2, %%ecx \n" // mov ecx, pixels "and $7, %%ecx \n" // and ecx, 7 "jmp 2f \n" // jmp last_pixel_loop "3: \n" //main_loop: //main_loop: "movl -3(%%esi), %%eax \n" // mov eax, [esi-3] "movl (%%edi), %%ebx \n" // mov ebx, [edi] "xchg %%ah, %%al \n" // xchg ah, al "rol $16, %%eax \n" // rol eax, 16 "xchg %%al, %%ah \n" // xchg ah, al "test %%al, %%al \n" // test al, al "jnz 4f \n" // jnz next_pixel "movb %%bl, %%al \n" // mov al, bl "4: \n" //next_pixel: //next_pixel: "test %%ah, %%ah \n" // test ah, ah "jnz 5f \n" // jnz next_pixel2 "movb %%bh, %%ah \n" // mov ah, bh "5: \n" //next_pixel2: //next_pixel2: "ror $16, %%eax \n" // ror eax, 16 "ror $16, %%ebx \n" // ror ebx, 16 "test %%al, %%al \n" // test al, al "jnz 6f \n" // jnz next_pixel3 "movb %%bl, %%al \n" // mov al, bl "6: \n" //next_pixel3: //next_pixel3: "test %%ah, %%ah \n" // test ah, ah "jnz 7f \n" // jnz next_step "movb %%bh, %%ah \n" // mov ah, bh "7: \n" //next_step: //next_step: "ror $16, %%eax \n" // ror eax, 16 "movl %%eax, (%%edi) \n" // mov [edi], eax "add $4, %%edi \n" // add edi, 4 "add %%edx, %%esi \n" // add esi, edx "dec %%ecx \n" // dec ecx "jnz 3b \n" // jnz main_loop "movl %2, %%ecx \n" // mov ecx, pixels "and $0x3, %%ecx \n" // and ecx, 03h "jz 8f \n" // jz ending "jmp 2f \n" // jmp last_pixel_loop "0: \n" //last_pixel: //last_pixel: "movl %2, %%ecx \n" // mov ecx, pixels "2: \n" //last_pixel_loop: //last_pixel_loop: "dec %%ecx \n" // dec ecx "jl 8f \n" // jl ending "movb (%%esi), %%al \n" // mov al, [esi] "inc %%edi \n" // inc edi "add %3, %%esi \n" // add esi, incs "test %%al, %%al \n" // test al, al "jz 2b \n" // jz last_pixel_loop "movb %%al, -1(%%edi) \n" // mov [edi-1], al "jmp 2b \n" // jmp last_pixel_loop "8: \n" //ending: //ending: "emms \n" // emms : : "D" (scr), "S" (tex), "m" (pixels), "m" (incs) : "mm0", "mm1", "cc" // "ax", "bx", "esi", "edi", "edx", "ecx", "eax", "memory" ); #else _asm { mov esi, tex mov edi, scr mov ecx, pixels mov edx, incs add edx, edx add edx, edx sar ecx, 2 jz last_pixel cmp edx, 0 jl main_loop add edx, edx sar ecx, 1 jz last_pixel mmx_loop: movq mm0, [esi] pxor mm2, mm2 add esi, 8 movq mm1, [edi] pcmpeqb mm2, mm0 add edi, 8 pand mm1, mm2 pandn mm2, mm0 dec ecx por mm2, mm1 movq [edi-8], mm2 jnz mmx_loop mov ecx, pixels and ecx, 7 jmp last_pixel_loop main_loop: mov eax, [esi-3] mov ebx, [edi] xchg ah, al rol eax, 16 xchg ah, al test al, al jnz next_pixel mov al, bl next_pixel: test ah, ah jnz next_pixel2 mov ah, bh next_pixel2: ror eax, 16 ror ebx, 16 test al, al jnz next_pixel3 mov al, bl next_pixel3: test ah, ah jnz next_step mov ah, bh next_step: ror eax, 16 mov [edi], eax add edi, 4 add esi, edx dec ecx jnz main_loop mov ecx, pixels and ecx, 03h jz ending jmp last_pixel_loop last_pixel: mov ecx, pixels last_pixel_loop: dec ecx jl ending mov al, [esi] inc edi add esi, incs test al, al jz last_pixel_loop mov [edi-1], al jmp last_pixel_loop ending: emms } #endif } void MMX_draw_hspan_16to16(Uint16 * scr, Uint16 * tex, int pixels, int incs) { #ifdef DEBUGMMX printf( "MMX_draw_hspan_16to16\n"); fflush(stdout); #endif #ifdef __GNUC__ __asm__ __volatile__( // "movl %1,%%esi \n" // mov esi, tex // "movl %0, %%edi \n" // mov edi, scr "movl %2, %%ecx \n" // mov ecx, pixels "movl %3, %%edx \n" // mov edx, incs "add %%edx ,%%edx \n" // add edx, edx "sar $1, %%ecx \n" // sar ecx, 1 "jz 4f \n" // jz last_pixel "cmp $0, %%edx \n" // cmp edx, 0 "jl 1f \n" // jl main_loop "sal $2,%%edx \n" // sal edx, 2 "sar $2, %%ecx \n" // sar ecx, 2 "jz 4f \n" // jz last_pixel "0: \n" // mmx_loop //mmx_loop: "movq (%%esi), %%mm0 \n" // movq mm0, [esi] "pxor %%mm2, %%mm2 \n" // pxor mm2, mm2 "movq 8(%%esi), %%mm3 \n" // movq mm3, [esi+8] "pxor %%mm5, %%mm5 \n" // pxor mm5, mm5 "add $16, %%esi \n" // add esi, 16 "movq (%%edi), %%mm1 \n" // movq mm1, [edi] "pcmpeqw %%mm0, %%mm2 \n" // pcmpeqw mm2, mm0 "movq 8(%%edi), %%mm4 \n" // movq mm4, [edi+8] "pcmpeqw %%mm3, %%mm5 \n" // pcmpeqw mm5, mm3 "add $16, %%edi \n" // add edi, 16 "pand %%mm2, %%mm1 \n" // pand mm1, mm2 "pand %%mm5, %%mm4 \n" // pand mm4, mm5 "pandn %%mm0, %%mm2 \n" // pandn mm2, mm0 "pandn %%mm3, %%mm5 \n" // pandn mm5, mm3 "dec %%ecx \n" // dec ecx "por %% mm1, %%mm2 \n" // por mm2, mm1 "por %%mm4, %%mm5 \n" // por mm5, mm4 "movq %%mm2, -16(%%edi) \n" // movq [edi-16], mm2 "movq %%mm5, -8(%%edi) \n" // movq [edi-8], mm5 "jnz 0b \n" // jnz mmx_loop "movl %2, %%ecx \n" // mov ecx, pixels "and $7, %%ecx \n" // and ecx, 7 "jz 7f \n" // jz ending "movl %3, %%edx \n" // mov edx, incs "add %%edx, %%edx \n" // add edx, edx "jmp 5f \n" // jmp last_pixel_loop "1: \n" // main_loop //main_loop: "movw (%%esi), %%ax \n" // mov ax, [esi] "movw (%%esi,%%edx), %%bx \n" // mov bx, [esi+edx] "add %%edx, %%esi \n" // add esi, edx "test %%ax, %%ax \n" // test ax, ax "jz 2f \n" // jz next_pixel "movw %%ax, (%%edi) \n" // mov [edi], ax "2: \n" // next_pixel //next_pixel: "test %%bx , %%bx \n" // test bx, bx "jz 3f \n" // jz next_step "movw %%bx, 2(%%edi) \n" // mov [edi+2], bx "3: \n" // next_step //next_step: "add $4, %%edi \n" // add edi, 4 "add %%edx, %%esi \n" // add esi, edx "dec %%ecx \n" // dec ecx "jnz 1b \n" // jnz main_loop "movl %2, %%ecx \n" // mov ecx, pixels "and $0x01, %%ecx \n" // and ecx, 01h "jz 7f \n" // jz ending "movl %3, %%edx \n" // mov edx, incs "add %%edx, %%edx \n" // add edx, edx "jmp 5f \n" // jmp last_pixel_loop "4: \n" // last_pixel //last_pixel: "movl %2, %%ecx \n" // mov ecx, pixels "movl %3, %%edx \n" // mov edx, incs "add %%edx , %%edx \n" // add edx, edx "5: \n" // last_pixel_loop //last_pixel_loop: "movw (%%esi), %%ax \n" // mov ax, [esi] "add $2, %%edi \n" // add edi, 2 "add %%edx, %%esi \n" // add esi, edx "test %%ax , %%ax \n" // test ax, ax "jz 6f \n" // jz n "movw %%ax, -2(%%edi) \n" // mov [edi-2], ax "6: \n" // n: //n: "dec %%ecx \n" // dec ecx "jnz 5b \n" // jnz last_pixel_loop "7: \n" // ending //ending: "emms \n" // emms : : "D" (scr), "S" (tex), "m" (pixels), "m" (incs) : "mm0", "mm1", "cc" // "ax", "bx", "esi", "edi", "edx", "ecx", "eax", "memory" ); #else _asm { mov esi, tex mov edi, scr mov ecx, pixels mov edx, incs add edx, edx sar ecx, 1 jz last_pixel cmp edx, 0 jl main_loop sal edx, 2 sar ecx, 2 jz last_pixel mmx_loop: movq mm0, [esi] pxor mm2, mm2 movq mm3, [esi+8] pxor mm5, mm5 add esi, 16 movq mm1, [edi] pcmpeqw mm2, mm0 movq mm4, [edi+8] pcmpeqw mm5, mm3 add edi, 16 pand mm1, mm2 pand mm4, mm5 pandn mm2, mm0 pandn mm5, mm3 dec ecx por mm2, mm1 por mm5, mm4 movq [edi-16], mm2 movq [edi-8], mm5 jnz mmx_loop mov ecx, pixels and ecx, 7 jz ending mov edx, incs add edx, edx jmp last_pixel_loop main_loop: mov ax, [esi] mov bx, [esi+edx] add esi, edx test ax, ax jz next_pixel mov [edi], ax next_pixel: test bx, bx jz next_step mov [edi+2], bx next_step: add edi, 4 add esi, edx dec ecx jnz main_loop mov ecx, pixels and ecx, 01h jz ending mov edx, incs add edx, edx jmp last_pixel_loop last_pixel: mov ecx, pixels mov edx, incs add edx, edx last_pixel_loop: mov ax, [esi] add edi, 2 add esi, edx test ax, ax jz n mov [edi-2], ax n: dec ecx jnz last_pixel_loop ending: emms } #endif } void MMX_draw_hspan_16to16_translucent(Uint16 * scr, Uint16 * tex, int pixels, int incs) { #ifdef DEBUGMMX printf("MMX_draw_hspan_16to16_translucent\n"); fflush(stdout); #endif #ifdef __GNUC__ __asm__ __volatile__( // "movl %1, %%esi \n" // mov esi, tex // "movl %0, %%edi \n" // mov edi, scr "movl %4, %%ecx \n" // mov ecx, ghost1 "movl %5, %%edx \n" // mov edx, ghost2 "xor %%eax, %%eax \n" // xor eax, eax "xor %%ebx, %%ebx \n" // xor ebx, ebx "cmp $1, %3 \n" // cmp incs, 1 "jne 2f \n" // jne loop_backward "0: \n" // loop_forward //loop_forward: "movw (%%esi), %%ax \n" // mov ax, word ptr [esi] "movw (%%edi), %%bx \n" // mov bx, word ptr [edi] "add $2, %%esi \n" // add esi, 2 "test %%ax, %%ax \n" // test ax, ax "jz 1f \n" // jz n1 "movw (%%ecx,%%eax,2), %%ax \n" // mov ax, [ecx+eax*2] "add $2, %%edi \n" // add edi, 2 "add (%%edx,%%ebx,2), %%ax \n" // add ax, [edx+ebx*2] "decl %2 \n" // dec pixels "movw %%ax, -2(%%edi) \n" // mov [edi-2], ax "jnz 0b \n" // jnz loop_forward "jmp 4f \n" // jmp ending "1: \n" // n1: //n1: "add $2, %%edi \n" // add edi, 2 "decl %2 \n" // dec pixels "jnz 0b \n" // jnz loop_forward "jmp 4f \n" // jmp ending "2: \n" // loop_backward //loop_backward: "movw (%%esi), %%ax \n" // mov ax, word ptr [esi] "movw (%%edi), %%bx \n" // mov bx, word ptr [edi] "sub $2, %%esi \n" // sub esi, 2 "test %%ax, %%ax \n" // test ax, ax "jz 3f \n" // jz n2 "movw (%%ecx,%%eax,2), %%ax \n" // mov ax, [ecx+eax*2] "add $2, %%edi \n" // add edi, 2 "add (%%edx,%%ebx,2), %%ax \n" // add ax, [edx+ebx*2] "decl %2 \n" // dec pixels "movw %%ax, -2(%%edi) \n" // mov [edi-2], ax "jnz 2b \n" // jnz loop_backward "jmp 4f \n" // jmp ending "3: \n" // n2: //n2: "add $2, %%edi \n" // add edi, 2 "decl %2 \n" // dec pixels "jnz 2b \n" // jnz loop_backward "4: \n" // ending //ending: : : "D" (scr), "S" (tex), "m" (pixels), "m" (incs), "m" (ghost1), "m" (ghost2) : "cc" // "ax", "bx", "esi", "edi", "edx", "ecx", "eax", "memory" ); #else _asm { mov esi, tex mov edi, scr mov ecx, ghost1 mov edx, ghost2 xor eax, eax xor ebx, ebx cmp incs, 1 jne loop_backward loop_forward: mov ax, word ptr [esi] mov bx, word ptr [edi] add esi, 2 test ax, ax jz n1 mov ax, [ecx+eax*2] add edi, 2 add ax, [edx+ebx*2] dec pixels mov [edi-2], ax jnz loop_forward jmp ending n1: add edi, 2 dec pixels jnz loop_forward jmp ending loop_backward: mov ax, word ptr [esi] mov bx, word ptr [edi] sub esi, 2 test ax, ax jz n2 mov ax, [ecx+eax*2] add edi, 2 add ax, [edx+ebx*2] dec pixels mov [edi-2], ax jnz loop_backward jmp ending n2: add edi, 2 dec pixels jnz loop_backward ending: } #endif } void MMX_draw_hspan_16to16_nocolorkey(Uint16 * scr, Uint16 * tex, int pixels, int incs) { #ifdef DEBUGMMX printf("MMX_draw_hspan_16to16_nocolorkey\n"); fflush(stdout); #endif #ifdef __GNUC__ __asm__ __volatile__( // "movl %1, %%esi \n" // mov esi, tex // "movl %0, %%edi \n" // mov edi, scr "movl %2, %%ecx \n" // mov ecx, pixels "cmp $0, %3 \n" // cmp incs, 0 "jl 1f \n" // jl last_pixel "cmp $8, %%ecx \n" // cmp ecx, 8 "jl 1f \n" // jl last_pixel "sar $3, %%ecx \n" // sar ecx, 3 "xor %%edx, %%edx \n" // xor edx, edx "0: \n" // main_loop // main_loop: "movq (%%esi,%%edx), %%mm0 \n" // movq mm0, [esi+edx] "movq 8(%%esi,%%edx), %%mm1 \n" // movq mm1, [esi+edx+8] "movq %%mm0, (%%edi,%%edx) \n" // movq [edi+edx], mm0 "movq %%mm1, 8(%%edi,%%edx) \n" // movq [edi+edx+8], mm1 "add $16, %%edx \n" // add edx, 16 "dec %%ecx \n" // dec ecx "jnz 0b \n" // jnz main_loop "movl %2, %%ecx \n" // mov ecx, pixels "and $7, %%ecx \n" // and ecx, 7 "jz 3f \n" // jz ending "add %%edx, %%esi \n" // add esi, edx "add %%edx, %%edi \n" // add edi, edx "1: \n" // last_pixel // last_pixel: "movl %3, %%edx \n" // mov edx, incs "add %%edx, %%edx \n" // add edx, edx "2: \n" // last_pixel_loop // last_pixel_loop: "movw (%%esi), %%ax \n" // mov ax, [esi] "add %%edx, %%esi \n" // add esi, edx "movw %%ax, (%%edi) \n" // mov [edi], ax "add $2, %%edi \n" // add edi, 2 "dec %%ecx \n" // dec ecx "jnz 2b \n" // jnz last_pixel_loop "3: \n" // ending: // ending: "emms \n" // emms // emms : : "D" (scr), "S" (tex), "m" (pixels), "m" (incs) : "mm0", "mm1", "cc" // "ax", "esi", "edi", "edx", "ecx", "eax", "memory" ); #else _asm { mov esi, tex mov edi, scr mov ecx, pixels cmp incs, 0 jl last_pixel cmp ecx, 8 jl last_pixel sar ecx, 3 xor edx, edx main_loop: movq mm0, [esi+edx] movq mm1, [esi+edx+8] movq [edi+edx], mm0 movq [edi+edx+8], mm1 add edx, 16 dec ecx jnz main_loop mov ecx, pixels and ecx, 7 jz ending add esi, edx add edi, edx last_pixel: mov edx, incs add edx, edx last_pixel_loop: mov ax, [esi] add esi, edx mov [edi], ax add edi, 2 dec ecx jnz last_pixel_loop ending: emms } #endif } #endif Fenix/fxi/src/mmx_main.c0000644000000000000000000000360610607526772014174 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : mmx_main.c * DESCRIPTION : MMX support routines (including CPUID) * * HISTORY: 0.82 - First version */ #include "fxi.h" int MMX_available = 0; /* * FUNCTION : MMX_init * * See if the current processor supports MMX and update the * global variable mmx_available with either 1 or 0 * * PARAMS : * None * * RETURN VALUE : * 1 if MMX available, 0 otherwise * */ void MMX_init() { #ifdef MMX_FUNCTIONS int cpuid_processor; int cpuid_features; #ifdef __GNUC__ __asm__ __volatile__ ( "movl $1, %%eax \n" "cpuid \n" : "=a" (cpuid_processor), "=d" (cpuid_features) ); #else _asm { mov eax,1 cpuid mov cpuid_processor, eax mov cpuid_features, edx } #endif MMX_available = (cpuid_features & (1 << 23)) ? 1:0; #else MMX_available = 0; #endif } Fenix/fxi/src/g_mode7.c0000644000000000000000000003217310607744630013704 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #include #ifdef TARGET_BEOS #include #else #include #endif #include #include "fxi.h" #include "fmath.h" #define FOCAL_DIST 128 extern Uint8 trans_table[256][256] ; extern int trans_table_updated ; typedef struct _mode7 { int active ; REGION * region ; GRAPH * indoor ; GRAPH * outdoor ; } MODE7 ; typedef struct _mode7_info { Uint32 camera_id ; Uint32 height ; Uint32 distance ; Uint32 horizon ; Uint32 focus ; Uint32 z ; Uint32 color ; Uint32 flags ; Uint32 reserved[2] ; } __PACKED MODE7_INFO ; MODE7 current_mode7[10] ; void gr_mode7_bbox (int n, REGION * r) { if (n >= 0 && n <= 9) *r = *current_mode7[n].region; } int gr_mode7_active (int n) { return (n >= 0 && n <= 9) ? current_mode7[n].active : 0 ; } void gr_mode7_stop (int n) { object_list_dirty = 1; current_mode7[n].active = 0 ; } void gr_mode7_start (int n, int fileid, int inid, int outid, int region, int horizon) { MODE7_INFO * dat ; if (n < 0 || n > 9) return ; dat = &((MODE7_INFO *)&GLODWORD(M7STRUCTS))[n]; dat->height = 32; dat->distance = 64; dat->horizon = horizon; dat->focus = 256; dat->z = 256; dat->color = 0; dat->flags = 0; object_list_dirty = 1; current_mode7[n].active = 1 ; current_mode7[n].indoor = bitmap_get (fileid, inid) ; current_mode7[n].outdoor = bitmap_get (fileid, outid) ; current_mode7[n].outdoor = bitmap_get (fileid, outid) ; current_mode7[n].region = region_get (region) ; } /* Funciones generales de rotacin en 2D * * x1 = x * cos(angulo) - y * sin(angulo) * * y1 = x * sin(angulo) + y * cos(angulo) * * */ #define ROTATEDX(x,y,sina,cosa) (fmul(x,cosa) - fmul(y,sina)) #define ROTATEDY(x,y,sina,cosa) (fmul(x,sina) + fmul(y,cosa)) /* Esta estructura guarda informacin que se recalcula a cada frame. * Quiz no sera necesario recalcularlo todo. El incremento podra * quedar constante mientras no variara la altura, p.ej. */ typedef struct _lineinfo { fixed left_bmp_x ; fixed left_bmp_y ; fixed right_bmp_x ; fixed right_bmp_y ; fixed hinc, vinc ; } LINEINFO ; static LINEINFO lines[1280] ; static int compare_by_distance (const void * ptr1, const void * ptr2) { const INSTANCE * i1 = *(const INSTANCE **)ptr1 ; const INSTANCE * i2 = *(const INSTANCE **)ptr2 ; return LOCDWORD(i2,DISTANCE_1) - LOCDWORD(i1,DISTANCE_1); } void gr_mode7_draw (int n) { fixed bmp_x, bmp_y ; fixed base_x, base_y, base_z ; fixed camera_x, camera_y, camera_z ; fixed point_x, point_y, point_z ; fixed cosa, sina ; fixed angle ; fixed hinc, vinc ; int horizon_y = -1; int jump ; int outdoor_hmask = 0 ; int outdoor_vmask = 0 ; Uint32 sx, sy ; int x, y, z, height, width ; Uint8 * ptr, * baseline, c ; MODE7 * mode7 = ¤t_mode7[n] ; GRAPH * indoor = mode7->indoor ; GRAPH * outdoor = mode7->outdoor ; GRAPH * dest = scrbitmap ; GRAPH * pgr ; MODE7_INFO * dat = &((MODE7_INFO *)&GLODWORD(M7STRUCTS))[n] ; INSTANCE * camera ; static INSTANCE ** proclist = 0 ; static int proclist_reserved = 0 ; int proclist_count, nproc ; INSTANCE * i ; if (!cos_table_initialized) init_cos_tables() ; /* Averigua la posicin inicial de dibujo */ camera = instance_get (dat->camera_id) ; if (!camera) return ; angle = LOCDWORD(camera, ANGLE) ; cosa = fcos (-angle) ; sina = fsin (-angle) ; /* Averigua la posicin de inicio */ camera_x = itofix(LOCDWORD (camera, COORDX)) ; camera_y = itofix(LOCDWORD (camera, COORDY)) ; camera_z = itofix(dat->height) ; RESOLXY(camera, camera_x, camera_y); camera_x -= cosa * dat->distance ; camera_y -= sina * dat->distance ; if (dat->flags & B_VMIRROR) camera_z = -camera_z ; /* Bucle para sacar las sub-posiciones de cada lnea */ width = mode7->region->x2 - mode7->region->x + 1 ; height = mode7->region->y2 - mode7->region->y + 1 ; if (!height || !width) return ; // horizon_y = 0 ; for (y = height ; y >= 0 ; y--) { /* Representa en las 3D el punto (0, y) de pantalla */ base_x = itofix(FOCAL_DIST) ; base_y = -itofix(dat->focus/2) ; base_z = itofix(dat->focus/2) - itofix(y * dat->focus / height) ; /* Rota dicho punto segn el ngulo del proceso */ point_x = ROTATEDX (base_x, base_y, sina, cosa) + camera_x ; point_y = ROTATEDY (base_x, base_y, sina, cosa) + camera_y ; point_z = base_z + camera_z ; /* Aplica la frmula (ver mode7.txt) */ if (point_z == camera_z) { horizon_y = y ; continue ; } //if (point_z >= camera_z) break ; lines[y].left_bmp_x = fdiv( fmul((point_x - camera_x), -camera_z), (point_z - camera_z) ) + camera_x ; lines[y].left_bmp_y = fdiv( fmul((point_y - camera_y), -camera_z), (point_z - camera_z) ) + camera_y ; /* Lo mismo para el punto (width,y) */ base_x = itofix(FOCAL_DIST) ; base_y = itofix(dat->focus/2) ; base_z = itofix(dat->focus/2) - itofix(y * dat->focus / height) ; point_x = ROTATEDX (base_x, base_y, sina, cosa) + camera_x ; point_y = ROTATEDY (base_x, base_y, sina, cosa) + camera_y ; point_z = base_z + camera_z ; //if (point_z >= camera_z) break ; lines[y].right_bmp_x = fdiv( fmul((point_x - camera_x), -camera_z), (point_z - camera_z) ) + camera_x ; lines[y].right_bmp_y = fdiv( fmul((point_y - camera_y), -camera_z), (point_z - camera_z) ) + camera_y ; /* Averigua el incremento necesario para cada paso de la lnea */ lines[y].hinc = (lines[y].right_bmp_x - lines[y].left_bmp_x) / width ; lines[y].vinc = (lines[y].right_bmp_y - lines[y].left_bmp_y) / width ; } /* Bucle principal */ if ( horizon_y == -1 ) return ; y = horizon_y ; ptr = (Uint8 *)dest->data + dest->pitch*y + mode7->region->x ; if (outdoor) { outdoor_hmask = outdoor_vmask = 0xFFFFFFFF ; while (~(outdoor_hmask << 1) < (int)outdoor->width-1) outdoor_hmask <<= 1 ; while (~(outdoor_vmask << 1) < (int)outdoor->height-1) outdoor_vmask <<= 1 ; outdoor_hmask = ~outdoor_hmask ; outdoor_vmask = ~outdoor_vmask ; } jump = camera_z < 0 ? -1 : 1 ; ptr += (jump > 0 ? dest->pitch : -(int)dest->pitch) ; y += jump ; if (dest->depth != 8) gr_error ("Profundidad de color no soportada\n(mode7, dest)") ; if (outdoor && outdoor->depth != 8) gr_error ("Profundidad de color no soportada\n(mode7, out)") ; if (indoor && indoor->depth != 8) gr_error ("Profundidad de color no soportada\n(mode7, in)") ; if ((dat->flags & B_TRANSLUCENT) && !trans_table_updated) gr_make_trans_table() ; if (!(dat->flags & B_TRANSLUCENT)) for ( ; y < height && y >= 0 ; y += jump) { if (dat->flags & B_HMIRROR) { bmp_x = lines[y].right_bmp_x ; bmp_y = lines[y].right_bmp_y ; hinc = -lines[y].hinc ; vinc = -lines[y].vinc ; } else { bmp_x = lines[y].left_bmp_x ; bmp_y = lines[y].left_bmp_y ; hinc = lines[y].hinc ; vinc = lines[y].vinc ; } baseline = ptr ; for (x = 0 ; x < width ; x++) { sx = fixtoi (bmp_x) ; sy = fixtoi (bmp_y) ; if (indoor && sx >= 0 && sx < indoor->width && sy >= 0 && sy < indoor->height) { c = ((Uint8*)indoor->data)[indoor->pitch*sy + sx] ; if (c > 0) *ptr = c ; ptr++ ; } else { if (outdoor) c = ((Uint8*)outdoor->data)[outdoor->pitch*(sy & outdoor_vmask) + (sx & outdoor_hmask)] ; else c = dat->color ; if (c > 0) *ptr = c ; ptr++ ; } bmp_x += hinc ; bmp_y += vinc ; } ptr = baseline + (jump > 0 ? dest->pitch : -(int)dest->pitch) ; } else for ( ; y < height && y >= 0 ; y += jump) { if (dat->flags & B_HMIRROR) { bmp_x = lines[y].right_bmp_x ; bmp_y = lines[y].right_bmp_y ; hinc = -lines[y].hinc ; vinc = -lines[y].vinc ; } else { bmp_x = lines[y].left_bmp_x ; bmp_y = lines[y].left_bmp_y ; hinc = lines[y].hinc ; vinc = lines[y].vinc ; } baseline = ptr ; for (x = 0 ; x < width ; x++) { sx = fixtoi (bmp_x) ; sy = fixtoi (bmp_y) ; if (indoor && sx >= 0 && sx < indoor->width && sy >= 0 && sy < indoor->height) { *ptr = trans_table[((Uint8*)indoor->data)[indoor->pitch*sy + sx]][*ptr] ; ptr++; } else { if (outdoor) { *ptr = trans_table[((Uint8*)outdoor->data)[outdoor->pitch*(sy & outdoor_vmask) + (sx & outdoor_hmask)]][*ptr] ; ptr++; } else { *ptr = trans_table[dat->color][*ptr] ; ptr++; } } bmp_x += hinc ; bmp_y += vinc ; } ptr = baseline + (jump > 0 ? dest->pitch : -(int)dest->pitch) ; } /* Crea una lista ordenada de instancias a dibujar */ i = first_instance ; proclist_count = 0 ; while (i) { if (((LOCDWORD(i,STATUS) & ~STATUS_WAITING_MASK) == STATUS_RUNNING || (LOCDWORD(i,STATUS) & ~STATUS_WAITING_MASK) == STATUS_FROZEN) && LOCDWORD(i,CTYPE) == 2) { if (LOCDWORD(i,CFLAGS) && !(LOCDWORD(i,CFLAGS) & (1<<(n-1)))) { i = i->next ; continue ; } if (proclist_count == proclist_reserved) { proclist_reserved += 16 ; proclist = (INSTANCE **) realloc (proclist, sizeof(INSTANCE *) * proclist_reserved) ; } /* Averigua la distancia a la cmara */ x = LOCDWORD(i, COORDX) ; y = LOCDWORD(i, COORDY) ; RESOLXY(i, x, y); x -= fixtoi(camera_x) ; y -= fixtoi(camera_y) ; LOCDWORD(i,DISTANCE_1) = ftofix(sqrt ((double)x*x + (double)y*y)) ; proclist[proclist_count++] = i ; } i = i->next ; } /* Ordena la listilla */ qsort (proclist, proclist_count, sizeof(INSTANCE *), compare_by_distance) ; /* Visualiza los procesos */ for (nproc = 0 ; nproc < proclist_count ; nproc++) { pgr = instance_graph(proclist[nproc]) ; if (!pgr) continue ; if (LOCDWORD (proclist[nproc], DISTANCE_1) <= 0) continue ; base_x = LOCDWORD(proclist[nproc], COORDX) ; base_y = LOCDWORD(proclist[nproc], COORDY) ; base_z = LOCDWORD(proclist[nproc], HEIGHT) ; RESOLXYZ(proclist[nproc], base_x, base_y, base_z); base_x = itofix(base_x) - camera_x ; base_y = itofix(base_y) - camera_y ; base_z = itofix(base_z) + dat->height - camera_z ; x = ROTATEDX(base_x,base_y,cosa,sina) ; y = ROTATEDY(base_x,base_y,cosa,sina) ; z = base_z ; if (y <= 0) continue ; bmp_x = (long) (-((float)FOCAL_DIST * fixtof(x) / fixtof(y)) * (float)width / (float) dat->focus) ; bmp_y = (long) (-((float)FOCAL_DIST * fixtof(z) / fixtof(y)) * (float)dat->height / (float) dat->focus) ; x = LOCDWORD(proclist[nproc], GRAPHSIZE) ; LOCDWORD(proclist[nproc], GRAPHSIZE) = dat->focus * 8 / fixtoi(LOCDWORD(proclist[nproc], DISTANCE_1)) ; draw_instance_at (proclist[nproc], mode7->region, mode7->region->x + width/2 + bmp_x, mode7->region->y + height/2 + bmp_y) ; LOCDWORD(proclist[nproc], GRAPHSIZE) = x ; } } Fenix/fxi/src/img_png.c0000644000000000000000000003020510607526770014000 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : img_png.c * DESCRIPTION : PNG Loading functions * * HISTORY: 0.83 - Added gr_save_png * */ /* * INCLUDES */ #ifdef TARGET_BEOS #include #else #include #endif #include #include #include #include "fxi.h" /* * GLOBAL VARIABLES */ extern SDL_Surface * screen ; /* DEFINED in g_main.c */ static file * png ; static void user_read_data (png_structp png_ptr, png_bytep data, png_size_t length) { file_read (png, data, length) ; } GRAPH * gr_read_png (const char * filename) { GRAPH * bitmap ; unsigned int n, x ; int shift; Uint16 * ptr ; Uint32 * orig ; Uint32 * row ; Uint32 Rshift, Gshift, Bshift ; Uint32 Rmask, Gmask, Bmask ; png_bytep * rowpointers ; png_structp png_ptr ; png_infop info_ptr, end_info ; png_uint_32 width, height, rowbytes; int depth, color ; /* Abre el fichero y se asegura de que screen est inicializada */ png = file_open (filename, "rb") ; if (!png) gr_error ("No existe %s\n", filename) ; /* Prepara las estructuras internas */ png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0) ; if (!png_ptr) gr_error ("Error al cargar PNG") ; info_ptr = png_create_info_struct (png_ptr) ; end_info = png_create_info_struct (png_ptr) ; if (!info_ptr || !end_info) gr_error ("Error al cargar PNG") ; /* Rutina de error */ if (setjmp (png_ptr->jmpbuf)) { png_destroy_read_struct (&png_ptr, &info_ptr, &end_info) ; file_close (png) ; return 0 ; } /* Recupera informacin sobre el PNG */ png_set_read_fn (png_ptr, 0, user_read_data) ; png_read_info (png_ptr, info_ptr) ; png_get_IHDR (png_ptr, info_ptr, &width, &height, &depth, &color, 0, 0 , 0) ; row = malloc( sizeof(Uint32) * width ); if ( !row ) { file_close (png) ; return 0 ; } rowpointers = malloc( sizeof(png_bytep) * height ); if ( !rowpointers ) { file_close (png) ; free ( row ) ; return 0 ; } /* Configura los distintos modos disponibles */ if (color == PNG_COLOR_TYPE_GRAY || color == PNG_COLOR_TYPE_GRAY_ALPHA) { png_set_gray_to_rgb (png_ptr); if (color == PNG_COLOR_TYPE_GRAY) png_set_filler (png_ptr, 0xFF, PNG_FILLER_AFTER) ; } if (depth == 16) png_set_strip_16(png_ptr) ; if (color == PNG_COLOR_TYPE_RGB) png_set_filler (png_ptr, 0xFF, PNG_FILLER_AFTER) ; png_set_bgr(png_ptr) ; /* Recupera el fichero, convirtiendo a 16 bits si es preciso */ rowbytes = png_get_rowbytes (png_ptr, info_ptr) ; bitmap = bitmap_new (0, width, height, color == PNG_COLOR_TYPE_PALETTE ? 8 : 16, 1) ; if (!bitmap) gr_error ("Error al cargar PNG") ; if (color == PNG_COLOR_TYPE_PALETTE) { /* Read the color palette */ if (!palette_loaded) { png_colorp png_palette = (png_colorp) png_malloc (png_ptr, 256*sizeof(png_color)) ; if (!png_palette) gr_error ("Sin memoria") ; else { png_get_PLTE (png_ptr, info_ptr, &png_palette, &n) ; for (n-- ; n <= 255 ; n--) { palette[n].r = png_palette[n].red; palette[n].g = png_palette[n].green; palette[n].b = png_palette[n].blue; } } palette_loaded = 1 ; palette_changed = 1 ; } for (n = 0 ; n < height ; n++) rowpointers[n] = ((Uint8*)bitmap->data) + n*bitmap->pitch ; png_read_image (png_ptr, rowpointers) ; /* If the depth is less than 8, expand the pixel values */ if (depth == 4) { shift = ((width & 0x01) << 2); for (n = 0 ; n < height ; n++) { char * orig = rowpointers[n]; char * dest = orig + width - 1; orig += (width-1)/2; for (x = 0 ; x < width ; x++) { *dest-- = ((*orig >> shift) & 0x0F); if (shift == 4) { shift = 0; orig--; } else shift = 4; } } } else if (depth == 2) { shift = ((3 - ((width + 3) & 0x03)) << 1); for (n = 0 ; n < height ; n++) { char * orig = rowpointers[n]; char * dest = orig + width - 1; orig += (width-1)/4; for (x = 0 ; x < width ; x++) { *dest-- = ((*orig >> shift) & 0x03); if (shift == 6) { shift = 0; orig--; } else shift += 2 ; } } } else if (depth == 1) { shift = ((7 - ((width + 7) & 0x07)) << 1); for (n = shift = 0 ; n < height ; n++) { char * orig = rowpointers[n]; char * dest = orig + width - 1; orig += (width-1)/8; for (x = 0 ; x < width ; x++) { *dest-- = ((*orig >> shift) & 0x01); if (shift == 7) { shift = 0; orig--; } else shift++ ; } } } } else { if (scr_initialized) { Bshift = 16-screen->format->Rshift ; Gshift = 8-screen->format->Gshift ; Rshift = 0-screen->format->Bshift ; Bmask = 0xFF0000 ; Gmask = 0x00FF00 ; Rmask = 0x0000FF ; for (n = 0 ; n < screen->format->Rloss ; n++) Rshift++, Rmask <<= 1 ; for (n = 0 ; n < screen->format->Gloss ; n++) Gshift++, Gmask <<= 1 ; for (n = 0 ; n < screen->format->Bloss ; n++) Bshift++, Bmask <<= 1 ; Bmask &= 0xFF0000 ; Gmask &= 0x00FF00 ; Rmask &= 0x0000FF ; } else { Bshift = 8; Gshift = 5; Rshift = 3; Bmask = 0xF70000; Gmask = 0x00FC00; Rmask = 0x0000F7; } for (n = 0 ; n < height ; n++) { rowpointers[0] = (void *)row ; png_read_rows (png_ptr, rowpointers, 0, 1) ; ptr = (Uint16*) bitmap->data + n*bitmap->pitch/2; orig = row ; for (x = 0 ; x < width ; x++) { ARRANGE_DWORD(orig); if ((*orig) & 0x80000000) { *ptr = ((*orig & Rmask) >> Rshift)| ((*orig & Gmask) >> Gshift)| ((*orig & Bmask) >> Bshift) ; if (!*ptr) (*ptr)++ ; } else *ptr = 0 ; ptr++, orig++ ; } } } /* Fin */ if (!setjmp (png_ptr->jmpbuf)) png_read_end (png_ptr, 0) ; file_close (png) ; bitmap->modified = 1 ; free ( row ) ; free ( rowpointers ) ; return bitmap ; } /* * FUNCTION : gr_save_png * * Save a GRAPH into a PNG file * * PARAMS : * gr GRAPH with the image to save * filename name for the file * * RETURN VALUE : * 0 - FAILURE * 1 - SUCCESS * */ int gr_save_png (GRAPH * gr, const char * filename) { FILE * file = fopen (filename, "wb") ; png_structp png_ptr ; png_infop info_ptr ; png_uint_32 k, i ; png_bytep * rowpointers ; png_colorp pal ; Uint32 * data, * ptr ; Uint16 * orig ; if (!file) return(0) ; rowpointers = malloc( sizeof(png_bytep) * gr->height ); if ( !rowpointers ) { fclose(file) ; return 0 ; } png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0) ; info_ptr = png_create_info_struct (png_ptr) ; if (!png_ptr || !info_ptr) { free ( rowpointers ) ; fclose(file) ; return(0) ; } /* Error handling... */ if (setjmp(png_ptr->jmpbuf)) { fclose (file) ; png_destroy_write_struct (&png_ptr, NULL) ; free ( rowpointers ) ; return(0) ; } png_init_io (png_ptr, file) ; /* NOTE: NO SUPPORT FOR ANIMATIONS! */ if (gr->depth == 8) { /* 8 bits PNG file */ png_set_IHDR (png_ptr, info_ptr, gr->width, gr->height, 8, PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE) ; pal = (png_colorp) png_malloc (png_ptr, 256*sizeof(png_color)) ; if (!pal) { fclose (file) ; png_destroy_write_struct (&png_ptr, NULL) ; free ( rowpointers ) ; return(0) ; } /* Generate palette info */ for (k = 0 ; k < 256 ; k++) { pal[k].red = palette[k].r ; pal[k].green = palette[k].g ; pal[k].blue = palette[k].b ; } png_set_PLTE (png_ptr, info_ptr, pal, 256) ; png_write_info (png_ptr, info_ptr) ; /* no need to rearrange data */ for (k = 0 ; k < (unsigned)gr->height ; k++) rowpointers[k] = (Uint8 *)gr->data + gr->pitch*k ; png_write_image (png_ptr, rowpointers) ; /* Free allocated palette... */ png_free (png_ptr, (png_voidp) pal) ; info_ptr->palette = NULL ; } else { png_set_IHDR (png_ptr, info_ptr, gr->width, gr->height, 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE) ; png_write_info (png_ptr, info_ptr) ; data = malloc (gr->width * gr->height * 4) ; if (!data) { fclose (file) ; png_destroy_write_struct (&png_ptr, NULL) ; free ( rowpointers ) ; return(0) ; } for (k = 0 ; k < (unsigned)gr->height ; k++) { ptr = data + gr->width * k ; /* uses dword for each pixel! */ orig = (Uint16 *)gr->data + gr->width * k ; rowpointers[k] = (Uint8 *)ptr ; for (i = 0 ; i < (unsigned)gr->width ; i++) { if (*orig == 0 && !(gr->info_flags & GI_NOCOLORKEY)) *ptr = 0x00000000 ; else { *ptr = ((*orig & 0xf800) >> 8) | ((*orig & 0x07e0) << 5) | ((*orig & 0x001f) << 19)| 0xFF000000 ; /* Rearrange data */ ARRANGE_DWORD(ptr) ; } orig++ ; ptr++ ; } } png_write_image (png_ptr, rowpointers) ; free (data) ; data = NULL ; } png_write_end (png_ptr, info_ptr) ; fclose (file) ; free ( rowpointers ) ; return (1) ; } Fenix/fxi/src/i_main.c0000644000000000000000000022160010607526770013615 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * HISTORY: Eliminated string_internal as stated in the new strings lib thugh * full strings library is not yet implemented. */ #include #include #ifdef TARGET_BEOS #include #else #include #endif #include #include "fxi.h" #include "dcb.h" void mnemonic_dump (int i, int param); /* ---------------------------------------------------------------------- */ /* Mdulo principal del intrprete: funcin de ejecucin de bloques */ /* ---------------------------------------------------------------------- */ int must_exit = 0 ; int force_debug = 0 ; int debug_next = 0 ; int debug_on_frame = 0; int trace_sentence = -1; INSTANCE * trace_instance = NULL; INSTANCE * last_instance_run = NULL; int stack[16384] ; int * stack_gptr = stack ; #ifdef DEBUG void stack_dump() { int * ptr = stack ; int i=0; while (ptr < stack_gptr) { printf ( "%08X ", *ptr++) ; if (i==4){ i=0; printf("\n"); } else { i++; } if (ptr > stack_gptr + 4) { printf ( " ...") ; break ; } } if ( i ){ printf("\n"); } return ; } #endif static int freevars(void * data, DCB_VAR * var, int nvars); static int freetype(int * data, DCB_TYPEDEF * var); /*static */void freestrings( PROCDEF * proc, int * data ); static int freevars(void * data, DCB_VAR * var, int nvars) { int result = 0; int partial; for (; nvars > 0; nvars--, var++) { partial = freetype (data, &var->Type); data = (Uint8*) data + partial; result += partial; } return result; } static int freetype(int * data, DCB_TYPEDEF * var) { int n = 0; int count = 1; int result = 0; int partial; for (;nBaseType[n]) { case TYPE_FLOAT: case TYPE_INT: case TYPE_DWORD: case TYPE_POINTER: for (; count ; count--) { result += 4; data++; // = (Uint8*)data + 4; } break; case TYPE_SHORT: case TYPE_WORD: for (; count ; count--) { result += 2; data = (int *)((Uint8*)data + 2); } break; case TYPE_BYTE: case TYPE_SBYTE: case TYPE_CHAR: result += count; break; case TYPE_STRING: for (; count ; count--) { string_discard(*(Uint32 *)data); data++; // = (Uint8*)data + 4; result += 4; } break; case TYPE_ARRAY: count *= var->Count[n]; n++; continue; case TYPE_STRUCT: for (; count ; count--) { partial = freevars(data, dcb.varspace_vars[var->Members], dcb.varspace[var->Members].NVars); data = (int *)((Uint8*)data + partial); result += partial; } break; default: break; } break; } return result; } /*static */void freestrings(PROCDEF * proc, int * data) { // Splinter, descarto todas las strings privadas int i, s = 0, r; for ( i=0; s < proc->private_size; i++ ){ r = freetype((int *)((Uint8 *)data + s), &dcb.proc[proc->type].privar[i].Type); s += r; } } void instance_go_all () { INSTANCE * i = NULL; int i_count = 0 ; must_exit = 0 ; gprof_begin ("Interpreter"); while (first_instance) { if (show_console) { gr_wait_frame() ; gr_draw_frame() ; if (must_exit) break ; } else { if (!last_instance_run) { /* Ejecuta uno a uno todos los procesos */ i_count = 0 ; } while (1) { if (last_instance_run && instance_exists(last_instance_run)) { i = last_instance_run; } else { last_instance_run = NULL; i = instance_next_by_priority(); if (!i) break; } if (LOCDWORD(i, STATUS) == STATUS_KILLED || LOCDWORD(i, STATUS) == STATUS_DEAD || last_instance_run) { last_instance_run = NULL; instance_go (i); if (force_debug || must_exit) break; continue; } last_instance_run = NULL; if (LOCDWORD(i, STATUS) != STATUS_RUNNING) continue; if (LOCDWORD(i, FRAME_PERCENT) < 100) { LOCDWORD(i, TYPE_SCAN) = 0; LOCDWORD(i, ID_SCAN) = 0; instance_go (i); if (force_debug || must_exit) break; i_count++; } } if (must_exit) break ; if (force_debug) { show_console = 1; last_instance_run = trace_instance; } /* Si no se ejecut nada: Dibujar, actualizar variables, etc. */ if (!i_count && !force_debug) { /* Honors the signal-changed status of the process and * saves so it is used in this loop the next frame */ i = first_instance ; while (i) { INSTANCE * next = i->next ; if (LOCDWORD(i,STATUS) == STATUS_RUNNING) { LOCDWORD(i,FRAME_PERCENT) -= 100 ; } LOCDWORD(i,SAVED_STATUS) = LOCDWORD(i, STATUS); if (LOCDWORD(i,STATUS) == STATUS_RUNNING) { if (LOCDWORD(i, SAVED_PRIORITY) != LOCDWORD(i, PRIORITY)) { LOCDWORD(i, SAVED_PRIORITY) = LOCDWORD(i, PRIORITY); instance_dirty(i); } } i = next ; } if (!first_instance) break ; /* Dibuja el frame */ gprof_frame(); gprof_begin ("Waiting for next frame"); gr_wait_frame() ; gprof_end ("Waiting for next frame"); gprof_begin ("Drawing"); gr_draw_frame() ; gprof_end ("Drawing"); gprof_begin ("Interpreter"); gr_advance_timers() ; if (debug_on_frame) { debug_on_frame = 0; show_console = 1; } continue ; } /* NOTA: los procesos pueden haberse autodestruido tras su ejecucin */ } } gprof_end ("Interpreter"); } int instance_go (INSTANCE * r) { if (!r) return 0 ; register int * ptr = r->codeptr ; register int * stack_ptr = stack_gptr ; int * stack_begin = stack_ptr ; int n ; int return_value = LOCDWORD(r, PROCESS_ID) ; int was_visible; SYSPROC * p ; INSTANCE * i ; PROCDEF * proc = r->proc, * aproc ; static char buffer[16], * str ; /* This variable contains a pointer to the private area at the stack. It is 0 if the current process uses the instance's private area instead */ int * private_data = r->pridata; /* Pointer to the current process's code (it may be a called one) */ int * base_code = r->code; int switchval = 0, switchval_string = 0, cased = 0 ; int child_is_alive = 0; /* ------------------------------------------------------------------------------- */ /* Restauro si salio por debug */ if (r->inpridata) { private_data = r->inpridata; base_code = r->inproc->code; proc = r->inproc; } if (r->stack) { /* Restore a saved stack, if present */ if ((*r->stack) & STACK_SIZE_MASK) memcpy (stack_ptr, r->stack+1, *r->stack * 4); stack_ptr += ((*r->stack) & STACK_SIZE_MASK); free (r->stack); r->stack = NULL; } if (debug) { printf ("***** INSTANCE %s(%d) ENTRY\n", proc->name, LOCDWORD(r,PROCESS_ID)) ; } gprof_begin (proc->name); was_visible = instance_visible(r); LOCDWORD(r, PREV_Z) = LOCDWORD(r, COORDZ); if((proc->breakpoint || r->breakpoint) && trace_instance != r) { debug_next = 1; } trace_sentence = -1; while(!must_exit && (LOCDWORD(r, STATUS) & STATUS_WAITING_MASK) != STATUS_KILLED) { if (debug_next && trace_sentence != -1) { force_debug = 1; debug_next = 0; r->codeptr = ptr ; stack_gptr = stack_ptr ; return_value = LOCDWORD(r, PROCESS_ID); if (private_data != r->pridata) { r->inpridata = private_data; r->inproc = proc; } break; } #ifdef DEBUG if (debug) { stack_gptr = stack_ptr ; stack_dump(); printf ("%45s [%4u] ", " ", (ptr - base_code)) ; mnemonic_dump (*ptr, ptr[1]) ; printf("\n"); fflush(stdout) ; } #endif switch (*ptr) { /* Manipulacin de la pila */ case MN_DUP: *stack_ptr = *(stack_ptr-1) ; stack_ptr++ ; ptr++ ; break ; case MN_PUSH: case MN_PUSH | MN_FLOAT: *stack_ptr++ = ptr[1] ; ptr += 2 ; break ; case MN_POP: stack_ptr-- ; ptr++ ; break ; case MN_INDEX: case MN_INDEX | MN_UNSIGNED: case MN_INDEX | MN_STRING: case MN_INDEX | MN_WORD: case MN_INDEX | MN_WORD | MN_UNSIGNED: case MN_INDEX | MN_BYTE: case MN_INDEX | MN_BYTE | MN_UNSIGNED: case MN_INDEX | MN_FLOAT: /* Splinter, se agrega float, no se por que no estaba */ stack_ptr[-1] += ptr[1] ; ptr += 2 ; break ; case MN_ARRAY: stack_ptr[-2] += (ptr[1] * stack_ptr[-1]) ; stack_ptr-- ; ptr += 2 ; break ; /* Llamadas a procesos */ case MN_CLONE: i = instance_duplicate (r) ; i->codeptr = ptr+2 ; ptr = base_code + ptr[1] ; continue ; case MN_CALL: case MN_PROC: aproc = procdef_get (ptr[1]) ; if (!aproc) gr_error ("Error: Procedimiento desconocido\n") ; proc = aproc; if (proc->flags & (PROC_USES_FRAME | PROC_USES_LOCALS | PROC_USES_PUBLICS)) { /* Process uses FRAME or locals, must create an instance */ i = instance_new (proc, r) ; for (n = 0 ; n < proc->params ; n++) PRIDWORD(i,4*n) = stack_ptr[-proc->params+n] ; stack_ptr -= proc->params ; stack_gptr = stack_ptr ; gprof_end (proc->name); /* Por default, me pongo en espera... */ LOCDWORD(r,STATUS) |= STATUS_WAITING_MASK; i->called_by = r; /* Ejecuto la funcion/processo... */ if (*ptr == MN_CALL) { *stack_ptr++ = instance_go (i); } else { instance_go (i); } child_is_alive = instance_exists(i); gprof_begin (proc->name); ptr += 2 ; /* If the process is a function in a frame, save the stack and leave */ /* Si sigue corriendo la funcion/proceso que lance, es porque esta en un frame. Si esta ejecutando codigo, es porque su STATUS es RUNNING */ if (child_is_alive && LOCDWORD(r,STATUS) & STATUS_WAITING_MASK) { /* En este caso me pongo a dormir y retorno */ i->called_by = r; /* Guardo todo el contenido del stack actual (mi stack) */ r->stack = (int *) malloc(4*(stack_ptr - stack_begin + 2)); /* Guardo size del stack */ r->stack[0] = stack_ptr - stack_begin; if (stack_ptr > stack_begin) memcpy (r->stack+1, stack_begin, 4*(stack_ptr-stack_begin)); /* Guardo el puntero de instruccion */ /* Esta instancia no va a ejecutar otro codigo hasta que retorne el hijo */ r->codeptr = ptr ; /* Apunto global stack a stack_begin (inicio de mi stack) */ stack_gptr = stack_begin; /* Si no fue un call, seteo un flag en la len para no retornar valor */ if (ptr[-2] != MN_CALL) { r->stack[0] |= STACK_NO_RETURN_VALUE; } if (debug_next && trace_sentence != -1) { force_debug = 1; debug_next = 0; } return 0; } /* Me despierto */ LOCDWORD(r, STATUS) &= ~STATUS_WAITING_MASK; if (child_is_alive) { i->called_by = NULL; } proc = r->proc; } else { /* This process can be called locally: create a private memory area using the stack */ /* Solo privadas, si usa otro tipo de variables es una instancia */ int * old_data = private_data; private_data = stack_ptr - proc->params; if (stack_ptr > stack + sizeof(stack)/4 - proc->private_size/4 - 128) // 128 = reservado gr_error ("Stack overflow!"); stack_ptr += ( proc->private_size/4 - proc->params ) ; if (proc->private_size > proc->params*4) { memcpy ((Uint32 *)private_data + proc->params, proc->pridata + proc->params, proc->private_size - proc->params*4); } /* Save the previous process frame (see MN_RETURN) */ *stack_ptr++ = *ptr; // Instruccion Actual (stack_ptr[-6] in return) *stack_ptr++ = (Sint32) base_code; // Base Code Actual (stack_ptr[-5] in return) *stack_ptr++ = (Sint32) proc; // Proc Actual (stack_ptr[-4] in return) *stack_ptr++ = (Sint32) (ptr+2); // (stack_ptr[-3] in return) *stack_ptr++ = (Sint32) old_data; // (stack_ptr[-2] in return) base_code = ptr = proc->code; } break ; case MN_SYSCALL: p = sysproc_get (ptr[1]) ; if (!p) gr_error ("Error: Funcin del sistema desconocida\n") ; stack_ptr -= p->params ; *stack_ptr = (*p->func) (r, stack_ptr) ; stack_ptr++ ; ptr += 2 ; break ; case MN_SYSPROC: p = sysproc_get (ptr[1]) ; if (!p) gr_error ("Error: Procedimiento del sistema desconocido\n") ; stack_ptr -= p->params ; (*p->func) (r, stack_ptr) ; ptr += 2 ; break ; /* Acceso a direcciones de variables */ case MN_PRIVATE: case MN_PRIVATE | MN_UNSIGNED: case MN_PRIVATE | MN_WORD: case MN_PRIVATE | MN_BYTE: case MN_PRIVATE | MN_WORD | MN_UNSIGNED: case MN_PRIVATE | MN_BYTE | MN_UNSIGNED: case MN_PRIVATE | MN_STRING: case MN_PRIVATE | MN_FLOAT: *stack_ptr++ = (int) ((Uint8 *)private_data + ptr[1]); ptr += 2 ; break ; case MN_PUBLIC: case MN_PUBLIC | MN_UNSIGNED: case MN_PUBLIC | MN_WORD: case MN_PUBLIC | MN_BYTE: case MN_PUBLIC | MN_WORD | MN_UNSIGNED: case MN_PUBLIC | MN_BYTE | MN_UNSIGNED: case MN_PUBLIC | MN_STRING: case MN_PUBLIC | MN_FLOAT: *stack_ptr++ = (int) &PUBDWORD(r, ptr[1]) ; ptr += 2 ; break ; case MN_LOCAL: case MN_LOCAL | MN_UNSIGNED: case MN_LOCAL | MN_WORD: case MN_LOCAL | MN_BYTE: case MN_LOCAL | MN_WORD | MN_UNSIGNED: case MN_LOCAL | MN_BYTE | MN_UNSIGNED: case MN_LOCAL | MN_STRING: case MN_LOCAL | MN_FLOAT: *stack_ptr++ = (int) &LOCDWORD(r, ptr[1]) ; ptr += 2 ; break ; case MN_GLOBAL: case MN_GLOBAL | MN_UNSIGNED: case MN_GLOBAL | MN_WORD: case MN_GLOBAL | MN_BYTE: case MN_GLOBAL | MN_WORD | MN_UNSIGNED: case MN_GLOBAL | MN_BYTE | MN_UNSIGNED: case MN_GLOBAL | MN_STRING: case MN_GLOBAL | MN_FLOAT: *stack_ptr++ = (int) &GLODWORD(ptr[1]) ; ptr += 2 ; break ; case MN_REMOTE: case MN_REMOTE | MN_UNSIGNED: case MN_REMOTE | MN_WORD: case MN_REMOTE | MN_BYTE: case MN_REMOTE | MN_WORD | MN_UNSIGNED: case MN_REMOTE | MN_BYTE | MN_UNSIGNED: case MN_REMOTE | MN_STRING: case MN_REMOTE | MN_FLOAT: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = (int) &LOCDWORD(i, ptr[1]) ; ptr += 2 ; break ; case MN_REMOTE_PUBLIC: case MN_REMOTE_PUBLIC | MN_UNSIGNED: case MN_REMOTE_PUBLIC | MN_WORD: case MN_REMOTE_PUBLIC | MN_BYTE: case MN_REMOTE_PUBLIC | MN_WORD | MN_UNSIGNED: case MN_REMOTE_PUBLIC | MN_BYTE | MN_UNSIGNED: case MN_REMOTE_PUBLIC | MN_STRING: case MN_REMOTE_PUBLIC | MN_FLOAT: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = (int) &PUBDWORD(i, ptr[1]) ; ptr += 2 ; break ; /* Acceso a variables tipo DWORD */ case MN_GET_PRIV: case MN_GET_PRIV | MN_FLOAT: case MN_GET_PRIV | MN_UNSIGNED: *stack_ptr++ = *(int *) ((Uint8 *)private_data + ptr[1]); ptr += 2 ; break ; case MN_GET_PUBLIC: case MN_GET_PUBLIC | MN_FLOAT: case MN_GET_PUBLIC | MN_UNSIGNED: *stack_ptr++ = PUBDWORD(r, ptr[1]) ; ptr += 2 ; break ; case MN_GET_LOCAL: case MN_GET_LOCAL | MN_FLOAT: case MN_GET_LOCAL | MN_UNSIGNED: *stack_ptr++ = LOCDWORD(r, ptr[1]) ; ptr += 2 ; break ; case MN_GET_GLOBAL: case MN_GET_GLOBAL | MN_FLOAT: case MN_GET_GLOBAL | MN_UNSIGNED: *stack_ptr++ = GLODWORD(ptr[1]) ; ptr += 2 ; break ; case MN_GET_REMOTE: case MN_GET_REMOTE | MN_FLOAT: case MN_GET_REMOTE | MN_UNSIGNED: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = LOCDWORD(i,ptr[1]) ; ptr += 2 ; break ; case MN_GET_REMOTE_PUBLIC: case MN_GET_REMOTE_PUBLIC | MN_FLOAT: case MN_GET_REMOTE_PUBLIC | MN_UNSIGNED: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = PUBDWORD(i,ptr[1]) ; ptr += 2 ; break ; case MN_PTR: case MN_PTR | MN_UNSIGNED: case MN_PTR | MN_FLOAT: stack_ptr[-1] = *(Sint32 *)stack_ptr[-1] ; ptr++ ; break ; /* Acceso a variables tipo STRING */ case MN_PUSH | MN_STRING: *stack_ptr++ = ptr[1] ; string_use ( stack_ptr[-1] ) ; ptr += 2 ; break ; case MN_GET_PRIV | MN_STRING: *stack_ptr++ = *(int *) ((Uint8 *)private_data + ptr[1]); string_use ( stack_ptr[-1] ) ; ptr += 2 ; break ; case MN_GET_PUBLIC | MN_STRING: *stack_ptr++ = PUBDWORD(r, ptr[1]) ; string_use ( stack_ptr[-1] ) ; ptr += 2 ; break ; case MN_GET_LOCAL | MN_STRING: *stack_ptr++ = LOCDWORD(r, ptr[1]) ; string_use ( stack_ptr[-1] ) ; ptr += 2 ; break ; case MN_GET_GLOBAL | MN_STRING: *stack_ptr++ = GLODWORD(ptr[1]) ; string_use ( stack_ptr[-1] ) ; ptr += 2 ; break ; case MN_GET_REMOTE | MN_STRING: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = LOCDWORD(i,ptr[1]) ; string_use ( stack_ptr[-1] ) ; ptr += 2 ; break ; case MN_GET_REMOTE_PUBLIC | MN_STRING: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = PUBDWORD(i,ptr[1]) ; string_use ( stack_ptr[-1] ) ; ptr += 2 ; break ; case MN_STRING | MN_PTR: stack_ptr[-1] = *(Sint32 *)stack_ptr[-1] ; string_use ( stack_ptr[-1] ) ; ptr++ ; break ; case MN_STRING | MN_POP: string_discard ( stack_ptr[-1] ) ; stack_ptr-- ; ptr++ ; break ; /* Acceso a variables tipo WORD */ case MN_WORD | MN_GET_PRIV: *stack_ptr++ = *(Sint16 *) ((Uint8 *)private_data+ptr[1]) ; ptr += 2 ; break ; case MN_WORD | MN_GET_PRIV | MN_UNSIGNED: *stack_ptr++ = *(Uint16 *) ((Uint8 *)private_data+ptr[1]) ; ptr += 2 ; break ; case MN_WORD | MN_GET_PUBLIC: *stack_ptr++ = (Sint16) PUBWORD(r, ptr[1]) ; ptr += 2 ; break ; case MN_WORD | MN_GET_PUBLIC | MN_UNSIGNED: *stack_ptr++ = PUBWORD(r, ptr[1]) ; ptr += 2 ; break ; case MN_WORD | MN_GET_LOCAL: *stack_ptr++ = (Sint16) LOCWORD(r, ptr[1]) ; ptr += 2 ; break ; case MN_WORD | MN_GET_LOCAL | MN_UNSIGNED: *stack_ptr++ = LOCWORD(r, ptr[1]) ; ptr += 2 ; break ; case MN_WORD | MN_GET_GLOBAL: *stack_ptr++ = GLOWORD(ptr[1]) ; ptr += 2 ; break ; case MN_WORD | MN_GET_GLOBAL | MN_UNSIGNED: *stack_ptr++ = GLOWORD(ptr[1]) ; ptr += 2 ; break ; case MN_WORD | MN_GET_REMOTE: case MN_WORD | MN_GET_REMOTE | MN_UNSIGNED: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = LOCWORD(i,ptr[1]) ; ptr += 2 ; break ; case MN_WORD | MN_GET_REMOTE_PUBLIC: case MN_WORD | MN_GET_REMOTE_PUBLIC | MN_UNSIGNED: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = PUBWORD(i,ptr[1]) ; ptr += 2 ; break ; case MN_WORD | MN_PTR: case MN_WORD | MN_PTR | MN_UNSIGNED: stack_ptr[-1] = *(Sint16 *)stack_ptr[-1] ; ptr++ ; break ; case MN_WORD | MN_NOT: case MN_WORD | MN_NOT | MN_UNSIGNED: stack_ptr[-1] = !(stack_ptr[-1]) ; ptr++ ; break ; /* Acceso a variables tipo BYTE */ case MN_BYTE | MN_GET_PRIV: *stack_ptr++ = *(Sint8 *) ((Uint8 *)private_data+ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_GET_PRIV | MN_UNSIGNED: *stack_ptr++ = *(Uint8 *) ((Uint8 *)private_data+ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_GET_PUBLIC: *stack_ptr++ = (Sint8) PUBBYTE(r, ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_GET_PUBLIC | MN_UNSIGNED: *stack_ptr++ = PUBBYTE(r, ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_GET_LOCAL: *stack_ptr++ = (signed char) LOCBYTE(r, ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_GET_LOCAL | MN_UNSIGNED: *stack_ptr++ = LOCBYTE(r, ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_GET_GLOBAL: *stack_ptr++ = (signed char) GLOBYTE(ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_GET_GLOBAL | MN_UNSIGNED: *stack_ptr++ = GLOBYTE(ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_GET_REMOTE: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = (signed char) LOCBYTE(i,ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_GET_REMOTE | MN_UNSIGNED: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = LOCBYTE(i,ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_GET_REMOTE_PUBLIC: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = (signed char) PUBBYTE(i,ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_GET_REMOTE_PUBLIC | MN_UNSIGNED: i = instance_get (stack_ptr[-1]) ; if (i == 0) gr_error ("Error de ejecucion en proceso %s(%d):\nProcedimiento %d no activo\n", proc->name, LOCDWORD(r,PROCESS_ID), stack_ptr[-1]) ; else stack_ptr[-1] = PUBBYTE(i,ptr[1]) ; ptr += 2 ; break ; case MN_BYTE | MN_PTR: stack_ptr[-1] = *((Sint8 *)stack_ptr[-1]) ; ptr++ ; break ; case MN_BYTE | MN_PTR | MN_UNSIGNED: stack_ptr[-1] = *((Uint8 *)stack_ptr[-1]) ; ptr++ ; break ; case MN_BYTE | MN_NOT: case MN_BYTE | MN_NOT | MN_UNSIGNED: stack_ptr[-1] = !(stack_ptr[-1]) ; ptr++ ; break ; /* Operaciones matemticas en coma floatante */ case MN_FLOAT | MN_NEG: *(float *)&stack_ptr[-1] = -*((float *)&stack_ptr[-1]) ; ptr++ ; break ; case MN_FLOAT | MN_NOT: *(float *)&stack_ptr[-1] = (float) !*((float *)&stack_ptr[-1]) ; ptr++ ; break ; case MN_FLOAT | MN_ADD: *(float *)&stack_ptr[-2] += *((float *)&stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_FLOAT | MN_SUB: *(float *)&stack_ptr[-2] -= *((float *)&stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_FLOAT | MN_MUL: *(float *)&stack_ptr[-2] *= *((float *)&stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_FLOAT | MN_DIV: if (*((float *)&stack_ptr[-1]) == 0.0) gr_error ("Error: Division por cero\n") ; *(float *)&stack_ptr[-2] /= *((float *)&stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_FLOAT2INT: *(Sint32 *)&(stack_ptr[-ptr[1]-1]) = (Sint32) *(float *)&(stack_ptr[-ptr[1]-1]) ; ptr+=2 ; break ; case MN_INT2FLOAT: case MN_INT2FLOAT | MN_UNSIGNED: *(float *)&(stack_ptr[-ptr[1]-1]) = (float) *(Sint32 *)&(stack_ptr[-ptr[1]-1]) ; ptr+=2 ; break ; case MN_INT2WORD: case MN_INT2WORD | MN_UNSIGNED: *(int *)&(stack_ptr[-ptr[1]-1]) = (Sint32)(Uint16) *(Sint32 *)&(stack_ptr[-ptr[1]-1]) ; ptr += 2; break; case MN_INT2BYTE: case MN_INT2BYTE | MN_UNSIGNED: *(int *)&(stack_ptr[-ptr[1]-1]) = (Sint32)(Uint8) *(Sint32 *)&(stack_ptr[-ptr[1]-1]) ; ptr += 2; break; /* Operaciones matemticas */ case MN_NEG: case MN_NEG | MN_UNSIGNED: stack_ptr[-1] = -stack_ptr[-1] ; ptr++ ; break ; case MN_NOT: case MN_NOT | MN_UNSIGNED: stack_ptr[-1] = !(stack_ptr[-1]) ; ptr++ ; break ; case MN_ADD: stack_ptr[-2] += stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_SUB: stack_ptr[-2] -= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_MUL | MN_WORD: case MN_MUL | MN_BYTE: case MN_MUL: stack_ptr[-2] *= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_MUL | MN_WORD | MN_UNSIGNED: case MN_MUL | MN_BYTE | MN_UNSIGNED: case MN_MUL | MN_UNSIGNED: stack_ptr[-2] = (Uint32)stack_ptr[-2] * (Uint32)stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_DIV | MN_WORD: case MN_DIV | MN_BYTE: case MN_DIV: if (stack_ptr[-1] == 0) gr_error ("Error: Division por cero\n") ; stack_ptr[-2] /= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_DIV | MN_WORD | MN_UNSIGNED: case MN_DIV | MN_BYTE | MN_UNSIGNED: case MN_DIV | MN_UNSIGNED: if (stack_ptr[-1] == 0) gr_error ("Error: Division por cero\n") ; stack_ptr[-2] = (Uint32)stack_ptr[-2] / (Uint32)stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_MOD | MN_WORD: case MN_MOD | MN_BYTE: case MN_MOD: if (stack_ptr[-1] == 0) gr_error ("Error: Division por cero\n") ; stack_ptr[-2] %= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_MOD | MN_WORD | MN_UNSIGNED: case MN_MOD | MN_BYTE | MN_UNSIGNED: case MN_MOD | MN_UNSIGNED: if (stack_ptr[-1] == 0) gr_error ("Error: Division por cero\n") ; stack_ptr[-2] = (Uint32)stack_ptr[-2] % (Uint32)stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; /* Operaciones a nivel de bit */ case MN_ROR: // (Sint32)(stack_ptr[-2]) >>= stack_ptr[-1] ; (stack_ptr[-2]) = (Sint32)(stack_ptr[-2]) >> stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_ROR | MN_UNSIGNED: // (Uint32)(stack_ptr[-2]) >>= stack_ptr[-1] ; stack_ptr[-2] = (Uint32)(stack_ptr[-2]) >> stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_ROR: // (Sint16)(stack_ptr[-2]) >>= stack_ptr[-1] ; stack_ptr[-2] = (Sint16)(stack_ptr[-2]) >> stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_ROR | MN_UNSIGNED: // (Uint16)(stack_ptr[-2]) >>= stack_ptr[-1] ; stack_ptr[-2] = (Uint16)(stack_ptr[-2]) >> stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_ROR: // (Sint8)(stack_ptr[-2]) >>= stack_ptr[-1] ; stack_ptr[-2] = (Sint8)(stack_ptr[-2]) >> stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_ROR | MN_UNSIGNED: // (Uint8)(stack_ptr[-2]) >>= stack_ptr[-1] ; stack_ptr[-2] = (Uint8)(stack_ptr[-2]) >> stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_ROL: // (Sint32)(stack_ptr[-2]) <<= stack_ptr[-1] ; (stack_ptr[-2]) = (Sint32)(stack_ptr[-2]) << stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; /* Todos estos ROL siguientes no serian necesarios, pero bueno... */ case MN_ROL | MN_UNSIGNED: // (Uint32)(stack_ptr[-2]) <<= stack_ptr[-1] ; (stack_ptr[-2]) = (Uint32)(stack_ptr[-2]) << stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_ROL: // (Sint16)(stack_ptr[-2]) <<= stack_ptr[-1] ; (stack_ptr[-2]) = (Sint16)(stack_ptr[-2]) << stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_ROL | MN_UNSIGNED: // (Uint16)(stack_ptr[-2]) <<= stack_ptr[-1] ; (stack_ptr[-2]) = (Uint16)(stack_ptr[-2]) << stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_ROL: // (Sint8)(stack_ptr[-2]) <<= stack_ptr[-1] ; (stack_ptr[-2]) = (Sint8)(stack_ptr[-2]) << stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_ROL | MN_UNSIGNED: // (Uint8)(stack_ptr[-2]) <<= stack_ptr[-1] ; (stack_ptr[-2]) = (Uint8)(stack_ptr[-2]) << stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; /* case MN_ROL: stack_ptr[-2] >>= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_ROL: stack_ptr[-2] <<= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; */ case MN_BAND: stack_ptr[-2] &= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BOR: stack_ptr[-2] |= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BXOR: stack_ptr[-2] ^= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BNOT: stack_ptr[-1] = ~(stack_ptr[-1]) ; ptr++ ; break ; /* Operaciones logicas */ case MN_AND: stack_ptr[-2] = stack_ptr[-2] && stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_OR: stack_ptr[-2] = stack_ptr[-2] || stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_XOR: stack_ptr[-2] = (stack_ptr[-2]!=0) ^ (stack_ptr[-1]!=0) ; stack_ptr-- ; ptr++ ; break ; /* Comparaciones */ case MN_EQ: stack_ptr[-2] = (stack_ptr[-2] == stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_NE: stack_ptr[-2] = (stack_ptr[-2] != stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_GTE: stack_ptr[-2] = (stack_ptr[-2] >= stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_GTE | MN_UNSIGNED: stack_ptr[-2] = ((Uint32)stack_ptr[-2] >= (Uint32)stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_LTE: stack_ptr[-2] = (stack_ptr[-2] <= stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_LTE | MN_UNSIGNED: stack_ptr[-2] = ((Uint32)stack_ptr[-2] <= (Uint32)stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_LT: stack_ptr[-2] = (stack_ptr[-2] < stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_LT | MN_UNSIGNED: stack_ptr[-2] = ((Uint32)stack_ptr[-2] < (Uint32)stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_GT: stack_ptr[-2] = (stack_ptr[-2] > stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_GT | MN_UNSIGNED: stack_ptr[-2] = ((Uint32)stack_ptr[-2] > (Uint32)stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; /* Comparaciones con floats */ case MN_EQ | MN_FLOAT: stack_ptr[-2] = (*(float *)&stack_ptr[-2] == *(float *)&stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_NE | MN_FLOAT: stack_ptr[-2] = (*(float *)&stack_ptr[-2] != *(float *)&stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_GTE | MN_FLOAT: stack_ptr[-2] = (*(float *)&stack_ptr[-2] >= *(float *)&stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_LTE | MN_FLOAT: stack_ptr[-2] = (*(float *)&stack_ptr[-2] <= *(float *)&stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_LT | MN_FLOAT: stack_ptr[-2] = (*(float *)&stack_ptr[-2] < *(float *)&stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_GT | MN_FLOAT: stack_ptr[-2] = (*(float *)&stack_ptr[-2] > *(float *)&stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; /* Comparaciones con cadenas */ case MN_EQ | MN_STRING : n = string_comp (stack_ptr[-2], stack_ptr[-1]) == 0 ; string_discard (stack_ptr[-2]); string_discard (stack_ptr[-1]); stack_ptr[-2] = n; stack_ptr-- ; ptr++ ; break ; case MN_NE | MN_STRING : n = string_comp (stack_ptr[-2], stack_ptr[-1]) != 0 ; string_discard (stack_ptr[-2]); string_discard (stack_ptr[-1]); stack_ptr[-2] = n; stack_ptr-- ; ptr++ ; break ; case MN_GTE | MN_STRING : n = string_comp (stack_ptr[-2], stack_ptr[-1]) >= 0 ; string_discard (stack_ptr[-2]); string_discard (stack_ptr[-1]); stack_ptr[-2] = n; stack_ptr-- ; ptr++ ; break ; case MN_LTE | MN_STRING : n = string_comp (stack_ptr[-2], stack_ptr[-1]) <= 0 ; string_discard (stack_ptr[-2]); string_discard (stack_ptr[-1]); stack_ptr[-2] = n; stack_ptr-- ; ptr++ ; break ; case MN_LT | MN_STRING : n = string_comp (stack_ptr[-2], stack_ptr[-1]) < 0 ; string_discard (stack_ptr[-2]); string_discard (stack_ptr[-1]); stack_ptr[-2] = n; stack_ptr-- ; ptr++ ; break ; case MN_GT | MN_STRING : n = string_comp (stack_ptr[-2], stack_ptr[-1]) > 0 ; string_discard (stack_ptr[-2]); string_discard (stack_ptr[-1]); stack_ptr[-2] = n; stack_ptr-- ; ptr++ ; break ; /* Operaciones con cadenas */ case MN_VARADD | MN_STRING: n = *(Sint32 *)(stack_ptr[-2]) ; *(Sint32 *)(stack_ptr[-2]) = string_add (n, stack_ptr[-1]) ; string_use ( *(Sint32 *)(stack_ptr[-2]) ) ; string_discard (n) ; string_discard (stack_ptr[-1]) ; stack_ptr-- ; ptr++ ; break ; case MN_LETNP | MN_STRING: string_discard ( *(Sint32 *)(stack_ptr[-2]) ) ; (*(Sint32 *)(stack_ptr[-2])) = stack_ptr[-1] ; stack_ptr-=2 ; ptr++ ; break ; case MN_LET | MN_STRING: string_discard ( *(Sint32 *)(stack_ptr[-2]) ) ; (*(Sint32 *)(stack_ptr[-2])) = stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_ADD | MN_STRING: n = string_add (stack_ptr[-2], stack_ptr[-1]) ; string_use ( n ) ; string_discard ( stack_ptr[-2] ) ; string_discard ( stack_ptr[-1] ) ; stack_ptr-- ; stack_ptr[-1] = n ; ptr++ ; break ; case MN_INT2STR | MN_WORD: stack_ptr[-ptr[1]-1] = string_itoa((Sint16)stack_ptr[-ptr[1]-1]) ; string_use (stack_ptr[-ptr[1]-1]) ; ptr += 2 ; break ; case MN_INT2STR: stack_ptr[-ptr[1]-1] = string_itoa(stack_ptr[-ptr[1]-1]) ; string_use (stack_ptr[-ptr[1]-1]) ; ptr += 2 ; break ; case MN_INT2STR | MN_BYTE: stack_ptr[-ptr[1]-1] = string_itoa((Sint8)stack_ptr[-ptr[1]-1]) ; string_use (stack_ptr[-ptr[1]-1]) ; ptr += 2 ; break ; case MN_INT2STR | MN_UNSIGNED | MN_BYTE: stack_ptr[-ptr[1]-1] = string_uitoa((Uint8) stack_ptr[-ptr[1]-1]) ; string_use (stack_ptr[-ptr[1]-1]) ; ptr += 2 ; break ; case MN_INT2STR | MN_UNSIGNED: case MN_INT2STR | MN_UNSIGNED | MN_WORD: stack_ptr[-ptr[1]-1] = string_uitoa((unsigned) stack_ptr[-ptr[1]-1]) ; string_use (stack_ptr[-ptr[1]-1]) ; ptr += 2 ; break ; case MN_FLOAT2STR: stack_ptr[-ptr[1]-1] = string_ftoa(*(float *)&stack_ptr[-ptr[1]-1]) ; string_use (stack_ptr[-ptr[1]-1]) ; ptr += 2 ; break ; case MN_CHR2STR: buffer[0] = (Uint8)stack_ptr[-ptr[1]-1] ; buffer[1] = 0 ; stack_ptr[-ptr[1]-1] = string_new(buffer) ; string_use (stack_ptr[-ptr[1]-1]) ; ptr += 2 ; break ; case MN_CHRSTR: n = string_char (stack_ptr[-2], stack_ptr[-1]) ; string_use ( n ) ; string_discard ( stack_ptr[-2] ) ; stack_ptr-- ; stack_ptr[-1] = n ; ptr++ ; break ; case MN_STR2CHR: n = stack_ptr[-ptr[1]-1] ; stack_ptr[-1] = *string_get(n) ; string_discard(n); ptr += 2 ; break ; case MN_POINTER2STR: stack_ptr[-ptr[1]-1] = string_ptoa(*(void **)&stack_ptr[-ptr[1]-1]) ; string_use (stack_ptr[-ptr[1]-1]) ; ptr += 2 ; break ; case MN_POINTER2BOL: stack_ptr[-ptr[1]-1] = stack_ptr[-ptr[1]-1] ? 1:0 ; ptr += 2 ; break ; case MN_STR2FLOAT: n = stack_ptr[-ptr[1]-1] ; str = (char *)string_get(n) ; *(float *)(&stack_ptr[-ptr[1]-1]) = str ? (float)atof(str) : 0.0f ; string_discard (n) ; ptr += 2 ; break ; case MN_STR2INT: n = stack_ptr[-ptr[1]-1] ; str = (char *)string_get(n) ; stack_ptr[-ptr[1]-1] = str ? atoi(str) : 0 ; string_discard (n) ; ptr += 2 ; break ; /* Operaciones con cadenas de ancho fijo */ case MN_A2STR: str = *(char **)(&stack_ptr[-ptr[1]-1]) ; n = string_new(str); string_use(n); stack_ptr[-ptr[1]-1] = n ; ptr+=2 ; break ; case MN_STR2A: n = stack_ptr[-1]; strncpy (*(char **)(&stack_ptr[-2]), string_get(n), ptr[1]) ; ((char *)(stack_ptr[-2]))[ptr[1]] = 0; stack_ptr[-2] = stack_ptr[-1]; stack_ptr--; ptr+=2 ; break ; case MN_STRACAT: n = stack_ptr[-1]; strncat (*(char **)(&stack_ptr[-2]), string_get(n),ptr[1] - strlen(*(char **)(&stack_ptr[-2]))) ; ((char *)(stack_ptr[-2]))[ptr[1]] = 0; stack_ptr[-2] = stack_ptr[-1]; stack_ptr--; ptr+=2 ; break ; /* Operaciones directas con variables tipo DWORD */ case MN_LETNP: case MN_LETNP | MN_UNSIGNED: (*(Sint32 *)(stack_ptr[-2])) = stack_ptr[-1] ; stack_ptr-=2 ; ptr++ ; break ; case MN_LET: case MN_LET | MN_UNSIGNED: (*(Sint32 *)(stack_ptr[-2])) = stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_INC: case MN_INC | MN_UNSIGNED: (*(Sint32 *)(stack_ptr[-1])) += ptr[1] ; ptr+=2 ; break ; case MN_DEC: case MN_DEC | MN_UNSIGNED: (*(Sint32 *)(stack_ptr[-1])) -= ptr[1] ; ptr+=2 ; break ; case MN_POSTDEC: case MN_POSTDEC | MN_UNSIGNED: (*(Sint32 *)(stack_ptr[-1])) -= ptr[1] ; stack_ptr[-1] = *(Sint32 *)(stack_ptr[-1]) + ptr[1] ; ptr+=2 ; break ; case MN_POSTINC: case MN_POSTINC | MN_UNSIGNED: *((Sint32 *)(stack_ptr[-1])) += ptr[1] ; stack_ptr[-1] = *(Sint32 *)(stack_ptr[-1]) - ptr[1] ; ptr+=2 ; break ; case MN_VARADD: case MN_VARADD | MN_UNSIGNED: *(Sint32 *)(stack_ptr[-2]) += stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_VARSUB: case MN_VARSUB | MN_UNSIGNED: *(Sint32 *)(stack_ptr[-2]) -= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_VARMUL: case MN_VARMUL | MN_UNSIGNED: *(Sint32 *)(stack_ptr[-2]) *= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_VARDIV: case MN_VARDIV | MN_UNSIGNED: if (stack_ptr[-1] == 0) gr_error ("Error: Division por cero\n") ; *(Sint32 *)(stack_ptr[-2]) /= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_VARMOD: case MN_VARMOD | MN_UNSIGNED: if (stack_ptr[-1] == 0) gr_error ("Error: Division por cero\n") ; *(Sint32 *)(stack_ptr[-2]) %= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_VAROR: case MN_VAROR | MN_UNSIGNED: *(Sint32 *)(stack_ptr[-2]) |= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_VARXOR: case MN_VARXOR | MN_UNSIGNED: *(Sint32 *)(stack_ptr[-2]) ^= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_VARAND: case MN_VARAND | MN_UNSIGNED: *(Sint32 *)(stack_ptr[-2]) &= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_VARROR: *(Sint32 *)(stack_ptr[-2]) >>= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_VARROR | MN_UNSIGNED: *(Uint32 *)(stack_ptr[-2]) >>= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_VARROL: *(Sint32 *)(stack_ptr[-2]) <<= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_VARROL | MN_UNSIGNED: *(Uint32 *)(stack_ptr[-2]) <<= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; /* Operaciones directas con variables tipo WORD */ case MN_WORD | MN_LETNP: case MN_WORD | MN_LETNP | MN_UNSIGNED: (*(Sint16 *)(stack_ptr[-2])) = stack_ptr[-1] ; stack_ptr-=2 ; ptr++ ; break ; case MN_WORD | MN_LET: case MN_WORD | MN_LET | MN_UNSIGNED: (*(Sint16 *)(stack_ptr[-2])) = stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_INC: case MN_WORD | MN_INC | MN_UNSIGNED: (*(Sint16 *)(stack_ptr[-1])) += ptr[1] ; ptr+=2 ; break ; case MN_WORD | MN_DEC: case MN_WORD | MN_DEC | MN_UNSIGNED: (*(Sint16 *)(stack_ptr[-1])) -= ptr[1] ; ptr+=2 ; break ; case MN_WORD | MN_POSTDEC: case MN_WORD | MN_POSTDEC | MN_UNSIGNED: (*(Sint16 *)(stack_ptr[-1])) -= ptr[1] ; stack_ptr[-1] = *(Sint16 *)(stack_ptr[-1]) + ptr[1] ; ptr+=2 ; break ; case MN_WORD | MN_POSTINC: case MN_WORD | MN_POSTINC | MN_UNSIGNED: *((Sint16 *)(stack_ptr[-1])) += ptr[1] ; stack_ptr[-1] = *(Sint16 *)(stack_ptr[-1]) - ptr[1] ; ptr+=2 ; break ; case MN_WORD | MN_VARADD: case MN_WORD | MN_VARADD | MN_UNSIGNED: *(Sint16 *)(stack_ptr[-2]) += stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_VARSUB: case MN_WORD | MN_VARSUB | MN_UNSIGNED: *(Sint16 *)(stack_ptr[-2]) -= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_VARMUL: case MN_WORD | MN_VARMUL | MN_UNSIGNED: *(Sint16 *)(stack_ptr[-2]) *= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_VARDIV: case MN_WORD | MN_VARDIV | MN_UNSIGNED: if ((Sint16)stack_ptr[-1] == 0) gr_error ("Error: Division por cero\n") ; *(Sint16 *)(stack_ptr[-2]) /= (Sint16)stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_VARMOD: case MN_WORD | MN_VARMOD | MN_UNSIGNED: if ((Sint16)stack_ptr[-1] == 0) gr_error ("Error: Division por cero\n") ; *(Sint16 *)(stack_ptr[-2]) %= (Sint16)stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_VAROR: case MN_WORD | MN_VAROR | MN_UNSIGNED: *(Sint16 *)(stack_ptr[-2]) |= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_VARXOR: case MN_WORD | MN_VARXOR | MN_UNSIGNED: *(Sint16 *)(stack_ptr[-2]) ^= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_VARAND: case MN_WORD | MN_VARAND | MN_UNSIGNED: *(Sint16 *)(stack_ptr[-2]) &= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_VARROR: *(Sint16 *)(stack_ptr[-2]) >>= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_VARROR | MN_UNSIGNED: *(Uint16 *)(stack_ptr[-2]) >>= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_VARROL: *(Sint16 *)(stack_ptr[-2]) <<= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_WORD | MN_VARROL | MN_UNSIGNED: *(Uint16 *)(stack_ptr[-2]) <<= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; /* Operaciones directas con variables tipo BYTE */ case MN_BYTE | MN_LETNP: case MN_BYTE | MN_LETNP | MN_UNSIGNED: (*(Uint8 *)(stack_ptr[-2])) = stack_ptr[-1] ; stack_ptr-=2 ; ptr++ ; break ; case MN_BYTE | MN_LET: case MN_BYTE | MN_LET | MN_UNSIGNED: (*(Uint8 *)(stack_ptr[-2])) = stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_INC: case MN_BYTE | MN_INC | MN_UNSIGNED: (*(Uint8 *)(stack_ptr[-1])) += ptr[1] ; ptr+=2 ; break ; case MN_BYTE | MN_DEC: case MN_BYTE | MN_DEC | MN_UNSIGNED: (*(Uint8 *)(stack_ptr[-1])) -= ptr[1] ; ptr+=2 ; break ; case MN_BYTE | MN_POSTDEC: case MN_BYTE | MN_POSTDEC | MN_UNSIGNED: (*(Uint8 *)(stack_ptr[-1])) -= ptr[1] ; stack_ptr[-1] = *(Uint8 *)(stack_ptr[-1]) + ptr[1] ; ptr+=2 ; break ; case MN_BYTE | MN_POSTINC: case MN_BYTE | MN_POSTINC | MN_UNSIGNED: *((Uint8 *)(stack_ptr[-1])) += ptr[1] ; stack_ptr[-1] = *(Uint8 *)(stack_ptr[-1]) - ptr[1] ; ptr+=2 ; break ; case MN_BYTE | MN_VARADD: case MN_BYTE | MN_VARADD | MN_UNSIGNED: *(Uint8 *)(stack_ptr[-2]) += stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_VARSUB: case MN_BYTE | MN_VARSUB | MN_UNSIGNED: *(Uint8 *)(stack_ptr[-2]) -= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_VARMUL: case MN_BYTE | MN_VARMUL | MN_UNSIGNED: *(Uint8 *)(stack_ptr[-2]) *= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_VARDIV: case MN_BYTE | MN_VARDIV | MN_UNSIGNED: if ((Uint8)stack_ptr[-1] == 0) gr_error ("Error: Division por cero\n") ; *(Uint8 *)(stack_ptr[-2]) /= (Uint8)stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_VARMOD: case MN_BYTE | MN_VARMOD | MN_UNSIGNED: if ((Uint8)stack_ptr[-1] == 0) gr_error ("Error: Division por cero\n") ; *(Uint8 *)(stack_ptr[-2]) %= (Uint8)stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_VAROR: case MN_BYTE | MN_VAROR | MN_UNSIGNED: *(Uint8 *)(stack_ptr[-2]) |= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_VARXOR: case MN_BYTE | MN_VARXOR | MN_UNSIGNED: *(Uint8 *)(stack_ptr[-2]) ^= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_VARAND: case MN_BYTE | MN_VARAND | MN_UNSIGNED: *(Uint8 *)(stack_ptr[-2]) &= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_VARROR: *(Sint8 *)(stack_ptr[-2]) >>= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_VARROR | MN_UNSIGNED: *(Uint8 *)(stack_ptr[-2]) >>= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_VARROL: *(Sint8 *)(stack_ptr[-2]) <<= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_BYTE | MN_VARROL | MN_UNSIGNED: *(Uint8 *)(stack_ptr[-2]) <<= stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; /* Operaciones directas con variables tipo FLOAT */ case MN_FLOAT | MN_LETNP: (*(float *)(stack_ptr[-2])) = *(float *)&stack_ptr[-1] ; stack_ptr-=2 ; ptr++ ; break ; case MN_FLOAT | MN_LET : (*(float *)(stack_ptr[-2])) = *(float *)&stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_FLOAT | MN_INC: (*(float *)(stack_ptr[-1])) += ptr[1] ; ptr+=2 ; break ; case MN_FLOAT | MN_DEC: (*(float *)(stack_ptr[-1])) -= ptr[1] ; ptr+=2 ; break ; case MN_FLOAT | MN_POSTDEC: (*(float *)(stack_ptr[-1])) -= ptr[1] ; stack_ptr[-1] = *(Uint32 *)(stack_ptr[-1]) + ptr[1] ; ptr+=2 ; break ; case MN_FLOAT | MN_POSTINC: *((float *)(stack_ptr[-1])) += ptr[1] ; stack_ptr[-1] = *(Uint32 *)(stack_ptr[-1]) - ptr[1] ; ptr+=2 ; break ; case MN_FLOAT | MN_VARADD: *(float *)(stack_ptr[-2]) += *(float *)&stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_FLOAT | MN_VARSUB: *(float *)(stack_ptr[-2]) -= *(float *)&stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_FLOAT | MN_VARMUL: *(float *)(stack_ptr[-2]) *= *(float *)&stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; case MN_FLOAT | MN_VARDIV: if (*(float *)&stack_ptr[-1] == 0.0) gr_error ("Error: Division por cero\n") ; *(float *)(stack_ptr[-2]) /= *(float *)&stack_ptr[-1] ; stack_ptr-- ; ptr++ ; break ; /* Saltos */ case MN_JUMP: ptr = base_code + ptr[1] ; continue ; case MN_JTRUE: stack_ptr-- ; if (*stack_ptr) { ptr = base_code + ptr[1] ; continue ; } ptr += 2 ; break ; case MN_JFALSE: stack_ptr-- ; if (!*stack_ptr) { ptr = base_code + ptr[1] ; continue ; } ptr += 2 ; break ; case MN_JTTRUE: if (stack_ptr[-1]) { ptr = base_code + ptr[1] ; continue ; } ptr += 2 ; break ; case MN_JTFALSE: if (!stack_ptr[-1]) { ptr = base_code + ptr[1] ; continue ; } ptr += 2 ; break ; /* Switch */ case MN_SWITCH: switchval = *--stack_ptr ; cased = 0 ; ptr++ ; break ; case MN_SWITCH | MN_STRING: if (switchval_string != 0) string_discard (switchval_string); switchval_string = *--stack_ptr; cased = 0; ptr++; break; case MN_CASE: if (switchval == *--stack_ptr) cased = 2 ; ptr++ ; break ; case MN_CASE | MN_STRING: if (string_comp (switchval_string, *--stack_ptr) == 0) cased = 2 ; string_discard (*stack_ptr); string_discard (stack_ptr[-1]); ptr++; break; case MN_CASE_R: stack_ptr -= 2 ; if (switchval >= stack_ptr[0] && switchval <= stack_ptr[1]) cased = 1 ; ptr++ ; break ; case MN_CASE_R | MN_STRING: stack_ptr -= 2; if (string_comp (switchval_string, stack_ptr[0]) >= 0 && string_comp (switchval_string, stack_ptr[1]) <= 0) cased = 1; string_discard (stack_ptr[0]); string_discard (stack_ptr[1]); ptr++; break; case MN_JNOCASE: if (cased < 1) { ptr = base_code + ptr[1] ; continue ; } ptr += 2 ; break ; /* Control de procesos */ case MN_TYPE: { PROCDEF * proct = procdef_get (ptr[1]) ; if (!proct) gr_error ("Error: Procedimiento desconocido\n") ; *stack_ptr++ = proct->type ; ptr += 2 ; break ; } case MN_FRAME: LOCDWORD(r,FRAME_PERCENT) += stack_ptr[-1]; stack_ptr-- ; r->codeptr = ptr+1 ; stack_gptr = stack_ptr ; return_value = LOCDWORD(r, PROCESS_ID); if (r->called_by && instance_exists(r->called_by) && (LOCDWORD(r->called_by, STATUS) & STATUS_WAITING_MASK) && !(r->proc->flags & PROC_FUNCTION) ) { /* We're returning and the parent is waiting: wake it up */ if (r->called_by->stack && !(r->called_by->stack[0] & STACK_NO_RETURN_VALUE)) { r->called_by->stack[r->called_by->stack[0] & STACK_SIZE_MASK] = return_value; } LOCDWORD(r->called_by,STATUS) &= ~STATUS_WAITING_MASK; r->called_by = NULL; } goto break_all ; case MN_END: if (private_data == r->pridata) /* Esto es una nueva instancia */ { if (LOCDWORD (r,STATUS) != STATUS_DEAD) LOCDWORD (r,STATUS) = STATUS_KILLED ; stack_gptr = stack_ptr ; goto break_all ; } return_value = LOCDWORD(r, PROCESS_ID); *stack_ptr++ = return_value; case MN_RETURN: if (private_data == r->pridata) /* Esto es una nueva instancia */ { if (LOCDWORD (r,STATUS) != STATUS_DEAD) LOCDWORD (r,STATUS) = STATUS_KILLED ; stack_ptr-- ; stack_gptr = stack_ptr ; return_value = *stack_ptr ; goto break_all ; } /* The process is inside a stack-call */ proc = (PROCDEF *)stack_ptr[-4]; // stack_ptr[-4] = Recupero el proc de la instancia actual freestrings(proc, private_data); return_value = stack_ptr[-1]; ptr = (int *)stack_ptr[-3]; base_code = (int *)stack_ptr[-5]; int * temp = private_data; private_data = (int *)stack_ptr[-2]; if (stack_ptr[-6] == MN_CALL) { /* Save a return value */ stack_ptr = temp; *stack_ptr++ = return_value; } else { stack_ptr = temp; } r->inpridata = NULL; r->inproc = NULL; break; /* Otros */ case MN_DEBUG: if (dcb.data.NID) { gr_con_printf ("\n----- DEBUG from %s(%d) -----\n", proc->name, LOCDWORD(r,PROCESS_ID) ) ; debug_next = 1; } ptr++; break ; case MN_SENTENCE: trace_sentence = ptr[1]; trace_instance = r; if (debug) { printf ("%d: ", trace_sentence & 0xFFFFFF); if (dcb.sourcecount[trace_sentence >> 24]) { printf (" %s", dcb.sourcelines[trace_sentence >> 24] [(trace_sentence & 0xFFFFFF)-1]) ; } printf ("\n"); fflush(stdout) ; } ptr += 2 ; break ; default: gr_error ("Error: Mnemonico 0x%02X no implementado en %s\n", *ptr, proc->name) ; } /* Si me killearon o estoy en waiting salgo */ if (LOCDWORD(r,STATUS) == STATUS_KILLED || LOCDWORD(r,STATUS) & STATUS_WAITING_MASK) { r->codeptr = ptr; stack_gptr = stack_ptr ; return_value = LOCDWORD(r, PROCESS_ID); goto break_all ; } #ifdef EXIT_ON_EMPTY_STACK if (stack_ptr == stack) { r->codeptr = ptr ; if (LOCDWORD(r,STATUS) != STATUS_RUNNING && LOCDWORD(r,STATUS) != STATUS_DEAD) break ; } #endif } /* *** SALIDA GENERAL *** */ break_all: gprof_end (proc->name); /* Check for waiting parent */ if (r->called_by && instance_exists(r->called_by) && LOCDWORD(r->called_by, STATUS) & STATUS_WAITING_MASK && (LOCDWORD(r, STATUS) == STATUS_KILLED || !*ptr || *ptr == MN_RETURN || *ptr == MN_END) ) { /* We're returning and the parent is waiting: wake it up */ if (r->called_by->stack && !((*r->called_by->stack) & STACK_NO_RETURN_VALUE) ) { r->called_by->stack[(*r->called_by->stack) & STACK_SIZE_MASK] = return_value; } LOCDWORD(r->called_by, STATUS) &= ~STATUS_WAITING_MASK; } /* The process should be destroyed immediately, * it is a function-type one */ if (!*ptr || *ptr == MN_RETURN || *ptr == MN_END || LOCDWORD(r, STATUS) == STATUS_KILLED) // Splinter { /* Ejecuto ONEXIT */ if ((LOCDWORD(r,STATUS) & ~STATUS_WAITING_MASK) != STATUS_DEAD && r->exitcode) { LOCDWORD(r,STATUS) = STATUS_DEAD; r->codeptr = r->exitcode; if (r->called_by && instance_exists(r->called_by)) { r->called_by = NULL; } instance_go(r); } else { instance_destroy(r); } if (was_visible) object_list_dirty = 1; } else if (LOCDWORD(r, STATUS) != STATUS_KILLED && r->first_run) { r->first_run = 0; object_list_dirty = 1; } else if (was_visible != instance_visible(r)) { object_list_dirty = 1; } else if (LOCDWORD(r, COORDZ) != LOCDWORD(r, PREV_Z)) { object_list_unsorted = 1; } if (switchval_string != 0) string_discard(switchval_string); if (debug_next && trace_sentence != -1) { force_debug = 1; debug_next = 0; } return return_value; } Fenix/fxi/src/fbm.c0000644000000000000000000003500210607526740013121 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : fbm.c * DESCRIPTION : Fenix Bitmap handling functions * * HISTORY: 0.85 - first version */ #include #include #include "fxi.h" #include "fbm.h" const char * fbm_error = ""; /* * FUNCTION : arrange_sequences * arrange_keyframes * * In non-Intel platforms, correctly arranges all the contents * of the graphic. If should be called just before writing to * the file and once again thereafter to leave it as it was before * * PARAMS : * graph Pointer to the graphic * * RETURN VALUE : * None * */ static void arrange_sequences (GRAPH * graph) { Uint32 n; for (n = 0 ; n <= graph->max_sequence ; n++) { ARRANGE_DWORD(&graph->sequences[n].first_keyframe); ARRANGE_DWORD(&graph->sequences[n].last_keyframe); ARRANGE_DWORD(&graph->sequences[n].next_sequence); } } static void arrange_keyframes (GRAPH * graph) { Uint32 n; for (n = 0 ; n <= graph->max_keyframe ; n++) { ARRANGE_DWORD(&graph->keyframes[n].frame); ARRANGE_DWORD(&graph->keyframes[n].angle); ARRANGE_DWORD(&graph->keyframes[n].flags); ARRANGE_DWORD(&graph->keyframes[n].pause); } } /* * FUNCTION : fbm_load_from * * Load a FBM file from an already opened file * * PARAMS : * fp Pointer to the file object * fgc_depth Color depth if the graphic is part of a FGC file or 0 if it isn't * Part of the header are supposed to not be there if this * parameter is greater than 0 (see fbm.h for details) * * RETURN VALUE : * Pointer to the newly allocated GRAPH * NULL if error (fbm_error will have a description in this case) * */ GRAPH * fbm_load_from (file * fp, int fgc_depth) { FBM_FILE_HEADER file_header; FBM_HEADER header; FBM_SEQUENCE * sequences; FBM_KEYFRAME * keyframes; FBM_CONTROL_POINT control_point; GRAPH * graph = NULL; int error = 0; int size; int section; int n, h; static char color_palette[768]; // Read the header and check the file type and version if (fgc_depth == 0) { if (file_read (fp, &file_header, sizeof(FBM_FILE_HEADER)) != sizeof(FBM_FILE_HEADER)) { fbm_error = "Error de lectura"; return NULL; } ARRANGE_DWORD (&file_header.version); ARRANGE_DWORD (&file_header.depth); if (strcmp (file_header.magic, FBM_MAGIC) != 0) { fbm_error = "El fichero no es un FBM vlido"; return NULL; } if ((file_header.version & 0xFF00) != 0x0100) { fbm_error = "El fichero FBM es de una versin posterior incompatible"; return NULL; } } else { file_header.depth = fgc_depth; } // Read the graphic header if (file_read (fp, &header, sizeof(FBM_HEADER)) != sizeof(FBM_HEADER)) { fbm_error = "Error de lectura"; return NULL; } ARRANGE_DWORD (&header.width); ARRANGE_DWORD (&header.height); ARRANGE_DWORD (&header.flags); ARRANGE_DWORD (&header.code); ARRANGE_DWORD (&header.max_frame); ARRANGE_DWORD (&header.max_sequence); ARRANGE_DWORD (&header.max_keyframe); ARRANGE_DWORD (&header.max_point); ARRANGE_DWORD (&header.points); // Do some sanity checks on the file if (!FBM_VALID_DEPTH(file_header.depth)) { fbm_error = "Fichero FBM corrupto"; return NULL; } if (header.width > FBM_MAX_WIDTH || header.height > FBM_MAX_HEIGHT) { fbm_error = "Fichero FBM corrupto"; return NULL; } // Allocate space in memory for the data sequences = (FBM_SEQUENCE *) malloc(sizeof(FBM_SEQUENCE) * (header.max_sequence+1)); keyframes = (FBM_KEYFRAME *) malloc(sizeof(FBM_KEYFRAME) * (header.max_keyframe+1)); if (sequences == NULL || keyframes == NULL) { fbm_error = "No hay memoria libre suficiente para cargar el FBM"; error = 1; } // Create the graphic and fill its information in memory if (error == 0) { graph = bitmap_new (header.code, header.width, header.height, file_header.depth, header.max_frame+1); if (graph == NULL) { fbm_error = "Error al crear el grfico en memoria"; error = 1; } else { // Use our data instead of the default one free (graph->sequences); free (graph->keyframes); graph->sequences = sequences; graph->keyframes = keyframes; graph->max_sequence = header.max_sequence; graph->max_keyframe = header.max_keyframe; strncpy (graph->name, header.name, 64); graph->info_flags = header.flags; } } // Load each section sequentialy for (section = 0 ; error == 0 && section < 5 ; section++) { switch (section) { case 0: // Read the palette if (file_header.depth == 8 && !fgc_depth) { if (file_read(fp, color_palette, 768) != 768) { fbm_error = "Fichero FBM truncado"; error = 1; } else { if (!palette_loaded) { for (n = 0 ; n < 256 ; n++) { palette[n].r = color_palette[3*n + 0]; palette[n].g = color_palette[3*n + 1]; palette[n].b = color_palette[3*n + 2]; } // bug 62 : initialization of palette vars palette_loaded = 1 ; palette_changed = 1 ; } } } break; case 1: // Read the sequences size = sizeof(FBM_SEQUENCE) * (header.max_sequence+1); if (file_read(fp, sequences, size) != size) { fbm_error = "Fichero FBM truncado"; error = 1; } else { arrange_sequences(graph); } break; case 2: // Read the keyframes size = sizeof(FBM_KEYFRAME) * (header.max_keyframe+1); if (file_read(fp, keyframes, size) != size) { fbm_error = "Fichero FBM truncado"; error = 1; } else { arrange_keyframes(graph); } break; case 3: // Read the control points while (error == 0 && header.points-- > 0) { if (file_read(fp, &control_point, size) != size) { fbm_error = "Fichero FBM truncado"; error = 1; } else { ARRANGE_DWORD(&control_point.index); ARRANGE_DWORD(&control_point.x); ARRANGE_DWORD(&control_point.y); bitmap_set_cpoint (graph, control_point.index, control_point.x, control_point.y); } } break; case 4: // Read the graphic data if (graph->depth == 1) size = (graph->width + 7)/8 /* * graph->height*/; else size = graph->width /* * map->height */ * graph->depth / 8; h = graph->height * graph->frames; for (n = 0; n < h; n++) { if (file_read(fp, ((char *) graph->data_start) + n * graph->pitch, size) != size) { fbm_error = "Fichero FBM truncado"; error = 1; } if (graph->depth == 16) { ARRANGE_WORDS (graph->data_start, size/2); if (scr_initialized) gr_convert16_565ToScreen ((Uint16*)graph->data_start, size/2); } } } } // Free the allocated memory and return if (error) { if (graph != NULL) bitmap_destroy(graph); else { if (sequences) free(sequences); if (keyframes) free(keyframes); } return NULL; } return graph; } /* * FUNCTION : fbm_load * * Loads an FBM file, given its name. It is a shortcut for fbm_load_from * * PARAMS : * filename Name of the file * * RETURN VALUE : * Pointer to the newly allocated GRAPH * NULL if error (fbm_error will have a description in this case) * */ GRAPH * fbm_load (const char * filename) { file * fp = file_open(filename, "rb"); GRAPH * result; if (!fp) { fbm_error = "Error al abrir fichero"; return NULL; } result = fbm_load_from (fp, 0); file_close(fp); return result; } /* * FUNCTION : fbm_save_to * * Save all the data of a graphic to an already open FBM file * This function is used by both fbm_save and fgc_save * * PARAMS : * map Pointer to the graphic object * fp Pointer to the file object * with_palette 1 to save the palette (FBM files), 0 inside FGC files * * RETURN VALUE : * 1 if no error, 0 otherwise (fbm_error will have a description in this case) * */ int fbm_save_to (GRAPH * map, file * fp, int with_palette) { FBM_HEADER header; Sint32 size; Uint32 n; int h; static char color_palette[768]; char * data_copy = NULL; char * data = NULL; // Prepare the header header.code = map->code; header.flags = map->info_flags; header.height = map->height; header.max_frame = map->frames - 1; header.max_keyframe = map->max_keyframe; header.max_sequence = map->max_sequence; header.width = map->width; strncpy (header.name, map->name, sizeof(header.name)); // Calculate the biggest control point index // and number of control points in the graphic header.max_point = 0; header.points = 0; for (n = 0 ; n < map->ncpoints ; n++) { if (map->cpoints[n].x != CPOINT_UNDEFINED) { header.max_point = n; header.points++; } } ARRANGE_DWORD (&header.width); ARRANGE_DWORD (&header.height); ARRANGE_DWORD (&header.flags); ARRANGE_DWORD (&header.code); ARRANGE_DWORD (&header.max_frame); ARRANGE_DWORD (&header.max_sequence); ARRANGE_DWORD (&header.max_keyframe); ARRANGE_DWORD (&header.max_point); ARRANGE_DWORD (&header.points); // Write the header if (file_write (fp, &header, sizeof(FBM_HEADER)) != sizeof(FBM_HEADER)) { fbm_error = "Error escribiendo fichero FBM"; return 0; } // Write the color palette if (map->depth == 8 && with_palette) { for (n = 0 ; n < 256 ; n++) { color_palette[3*n + 0] = palette[n].r; color_palette[3*n + 1] = palette[n].g; color_palette[3*n + 2] = palette[n].b; } if (file_write (fp, &color_palette, 768) != 768) { fbm_error = "Error escribiendo fichero FBM"; return 0; } } // Write the sequences arrange_sequences(map); size = sizeof(FBM_SEQUENCE) * (header.max_sequence+1); if (file_write (fp, map->sequences, size) != size) { arrange_sequences(map); fbm_error = "Error escribiendo fichero FBM"; return 0; } arrange_sequences(map); // Write the keyframes arrange_keyframes(map); size = sizeof(FBM_KEYFRAME) * (header.max_keyframe+1); if (file_write (fp, map->keyframes, size) != size) { arrange_keyframes(map); fbm_error = "Error escribiendo fichero FBM"; return 0; } arrange_keyframes(map); // Write the control points for (n = 0 ; n < map->ncpoints ; n++) { if (map->cpoints[n].x != CPOINT_UNDEFINED) { FBM_CONTROL_POINT cp; cp.index = n; cp.x = map->cpoints[n].x; cp.y = map->cpoints[n].y; ARRANGE_DWORD(&cp.index); ARRANGE_DWORD(&cp.x); ARRANGE_DWORD(&cp.y); if (file_write (fp, &cp, sizeof(cp)) != sizeof(cp)) { fbm_error = "Error escribiendo fichero FBM"; return 0; } } } // Write the graphic data if (map->depth == 1) size = (map->width + 7)/8 /* * map->height*/; else size = map->width /* * map->height */ * map->depth / 8; if (map->depth == 16) { data_copy = (Uint16 *)malloc(size); if (data_copy == NULL) { fbm_error = "No hay memoria libre suficiente"; return 0; } } h = map->height * map->frames; for (n = 0; n < h; n++) { data = ((char *)map->data_start) + n * map->pitch; if (map->depth == 16) { memcpy (data_copy, data, size); if (scr_initialized) gr_convert16_ScreenTo565(data_copy, size/2); ARRANGE_WORDS (data_copy, size/2); data = data_copy ; } if (file_write(fp, data, size) != size) { fbm_error = "Error escribiendo fichero FBM"; free (data_copy); return 0; } } if (data_copy) free(data_copy); return 1; } /* * FUNCTION : fbm_save * * Save a graphic to a new FBM file * * PARAMS : * map Pointer to the graphic object * filename Name of the file to be created * * RETURN VALUE : * 1 if no error, 0 otherwise (fbm_error will have a description in this case) * */ int fbm_save (GRAPH * map, const char * filename) { FBM_FILE_HEADER file_header; file * fp; int return_value; // Create the file fp = file_open (filename, "wb9"); if (fp == NULL) { fbm_error = "Error al crear fichero FBM"; return 0; } // Write the FBM file header strcpy (file_header.magic, FBM_MAGIC); file_header.depth = map->depth; file_header.version = 0x0100; ARRANGE_DWORD(&file_header.depth); ARRANGE_DWORD(&file_header.version); if (file_write (fp, &file_header, sizeof(FBM_FILE_HEADER)) != sizeof(FBM_FILE_HEADER)) { fbm_error = "Error escribiendo en fichero FBM"; file_close (fp); return 0; } // Use fbm_save_to to save the rest of the graphic return_value = fbm_save_to(map, fp, 1); file_close(fp); return return_value; } /* * FUNCTION : fbm_size * * Calculate the size of a FBM file (optionally without * header nor color palette) for the purposes of saving the * graphic to a FGC collection * * PARAMS : * map Pointer to the graphic object * with_header 1 to count the FBM header, 0 inside FGC files * with_palette 1 to count the color palette, 0 inside FGC files * * RETURN VALUE : * Size of the resulting file * */ Uint32 fbm_size (GRAPH * graph, int with_header, int with_palette) { Uint32 result = 0; Uint32 size; Uint32 n; // Count the headers if (with_header) result += sizeof(FBM_FILE_HEADER); result += sizeof(FBM_HEADER); // Count the information result += sizeof(FBM_SEQUENCE) * (graph->max_sequence+1); result += sizeof(FBM_KEYFRAME) * (graph->max_keyframe+1); for (n = 0 ; n < graph->ncpoints ; n++) if (graph->cpoints[n].x != CPOINT_UNDEFINED) result += sizeof(FBM_CONTROL_POINT); if (graph->depth == 8 && with_palette) result += 768; // Count the data if (graph->depth == 1) size = (graph->width + 7)/8 * graph->height; else size = graph->width * graph->height * graph->depth / 8; // Return the result return result + size; } Fenix/fxi/src/f_cd.c0000644000000000000000000001420010607526736013252 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.85 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : f_cd.c * DESCRIPTION : FXI functions for CD handling */ #include "fxi.h" static SDL_CD * sdl_cd = NULL; static int sdl_cdnum = -1; /** int CD_DRIVES() Returns the number of CD drives in the system **/ int fxi_cd_drives (INSTANCE * my, int * params) { return SDL_CDNumDrives(); } /** int CD_STATUS (int CD) Returns the status of a CD (using SDL constants) **/ int fxi_cd_status (INSTANCE * my, int * params) { if (params[0] < 0 || params[0] >= SDL_CDNumDrives()) return 0; if (sdl_cd == NULL || sdl_cdnum != params[0]) { if (sdl_cd) SDL_CDClose(sdl_cd); sdl_cd = SDL_CDOpen(params[0]); if (sdl_cd == NULL) return 0; sdl_cdnum = params[0]; } return SDL_CDStatus(sdl_cd); } /** string CD_NAME (int CD) Returns a human-readable string with the name of a CD drive **/ int fxi_cd_name (INSTANCE * my, int * params) { int result; if (params[0] < 0 || params[0] >= SDL_CDNumDrives()) return 0; result = string_new(SDL_CDName(params[0])); string_use(result); return result; } /** CD_GETINFO(int CD) Fills the global structure CD with information about the current CD Returns 1 if there is a valid CD in the drive or 0 otherwise **/ int fxi_cd_getinfo (INSTANCE * my, int * params) { int i, pos, total = 0; if (params[0] < 0 || params[0] >= SDL_CDNumDrives()) return 0; if (sdl_cd == NULL || sdl_cdnum != params[0]) { if (sdl_cd) SDL_CDClose(sdl_cd); sdl_cd = SDL_CDOpen(params[0]); if (sdl_cd == NULL) return 0; sdl_cdnum = params[0]; } GLODWORD(CD_TRACKS) = sdl_cd->numtracks; GLODWORD(CD_TRACK) = sdl_cd->cur_track; FRAMES_TO_MSF (sdl_cd->cur_frame, &GLODWORD(CD_MINUTE), &GLODWORD(CD_SECOND), &GLODWORD(CD_SUBFRAME)); for (i = 0, pos = CD_TRACKINFO ; i < sdl_cd->numtracks ; i++, pos += 4) { total += sdl_cd->track[i].length; GLODWORD(pos) = (sdl_cd->track[i].type == SDL_AUDIO_TRACK); FRAMES_TO_MSF (sdl_cd->track[i].length, &GLODWORD(pos+1), &GLODWORD(pos+2), &GLODWORD(pos+3)); } FRAMES_TO_MSF (total, &GLODWORD(CD_MINUTES), &GLODWORD(CD_SECONDS), &GLODWORD(CD_FRAMES)); return 1; } /** CD_PLAY (int CD, int TRACK) Starts playing a track of the given CD **/ int fxi_cd_play (INSTANCE * my, int * params) { if (params[0] < 0 || params[0] >= SDL_CDNumDrives()) return 0; if (sdl_cd == NULL || sdl_cdnum != params[0]) { if (sdl_cd) SDL_CDClose(sdl_cd); sdl_cd = SDL_CDOpen(params[0]); if (sdl_cd == NULL) return 0; sdl_cdnum = params[0]; } if (CD_INDRIVE(SDL_CDStatus(sdl_cd))) return !SDL_CDPlayTracks(sdl_cd, params[1], 0, 1, 0); return 0; } /** CD_PLAY (int CD, int TRACK, int NUMTRACKS) Plays a series of tracks of the CD **/ int fxi_cd_playtracks (INSTANCE * my, int * params) { if (params[0] < 0 || params[0] >= SDL_CDNumDrives()) return 0; if (sdl_cd == NULL || sdl_cdnum != params[0]) { if (sdl_cd) SDL_CDClose(sdl_cd); sdl_cd = SDL_CDOpen(params[0]); if (sdl_cd == NULL) return 0; sdl_cdnum = params[0]; } if (CD_INDRIVE(SDL_CDStatus(sdl_cd))) return !SDL_CDPlayTracks(sdl_cd, params[1], 0, params[2], 0); return 0; } /** CD_EJECT (int CD) Ejects a CD **/ int fxi_cd_eject (INSTANCE * my, int * params) { if (params[0] < 0 || params[0] >= SDL_CDNumDrives()) return 0; if (sdl_cd == NULL || sdl_cdnum != params[0]) { if (sdl_cd) SDL_CDClose(sdl_cd); sdl_cd = SDL_CDOpen(params[0]); if (sdl_cd == NULL) return 0; sdl_cdnum = params[0]; } return !SDL_CDEject(sdl_cd); } /** CD_PAUSE (int CD) Pauses the CD playing **/ int fxi_cd_pause (INSTANCE * my, int * params) { if (params[0] < 0 || params[0] >= SDL_CDNumDrives()) return 0; if (sdl_cd == NULL || sdl_cdnum != params[0]) { if (sdl_cd) SDL_CDClose(sdl_cd); sdl_cd = SDL_CDOpen(params[0]); if (sdl_cd == NULL) return 0; sdl_cdnum = params[0]; } return !SDL_CDPause(sdl_cd); } /** CD_RESUME (int CD) Resumes a CD in pause **/ int fxi_cd_resume (INSTANCE * my, int * params) { if (params[0] < 0 || params[0] >= SDL_CDNumDrives()) return 0; if (sdl_cd == NULL || sdl_cdnum != params[0]) { if (sdl_cd) SDL_CDClose(sdl_cd); sdl_cd = SDL_CDOpen(params[0]); if (sdl_cd == NULL) return 0; sdl_cdnum = params[0]; } return !SDL_CDResume(sdl_cd); } /** CD_STOP (int CD) Stops the CD **/ int fxi_cd_stop (INSTANCE * my, int * params) { if (params[0] < 0 || params[0] >= SDL_CDNumDrives()) return 0; if (sdl_cd == NULL || sdl_cdnum != params[0]) { if (sdl_cd) SDL_CDClose(sdl_cd); sdl_cd = SDL_CDOpen(params[0]); if (sdl_cd == NULL) return 0; sdl_cdnum = params[0]; } return !SDL_CDStop(sdl_cd); } int fxi_cd_numtracks(INSTANCE * my, int * params) { if (params[0] < 0 || params[0] >= SDL_CDNumDrives()) return 0; if (sdl_cd == NULL || sdl_cdnum != params[0]) { if (sdl_cd) SDL_CDClose(sdl_cd); sdl_cd = SDL_CDOpen(params[0]); if (sdl_cd == NULL) return 0; sdl_cdnum = params[0]; } return sdl_cd->numtracks; } int fxi_cd_getcurtrack(INSTANCE * my, int * params) { if (params[0] < 0 || params[0] >= SDL_CDNumDrives()) return 0; if (sdl_cd == NULL || sdl_cdnum != params[0]) { if (sdl_cd) SDL_CDClose(sdl_cd); sdl_cd = SDL_CDOpen(params[0]); if (sdl_cd == NULL) return 0; sdl_cdnum = params[0]; } return sdl_cd->cur_track; } Fenix/fxi/src/scaler_normal.c0000644000000000000000000000324610607526774015212 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* By Splinter 2007 */ #include #include #include #include "fxi.h" void scale_normal2x(Uint8 *srcPtr, Uint32 srcPitch, Uint8 *dstPtr, Uint32 dstPitch, int width, int height) { const Uint32 nextlineSrc = srcPitch / sizeof(Uint16); const Uint16 *p = (const Uint16 *)srcPtr; const Uint32 nextlineDst = dstPitch / sizeof(Uint16); Uint16 *q = (Uint16 *)dstPtr; while (height--) { int tmpWidth = width; while (tmpWidth--) { *q=*p; *(q+nextlineDst)=*p; q++; *q=*p; *(q+nextlineDst)=*p; q++; p++; } p += nextlineSrc - width; q += (nextlineDst - width) * 2; } } Fenix/fxi/src/i_saveload.c0000644000000000000000000001730410607526770014473 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : i_saveload.c * DESCRIPTION : Save/load functions based on varspace type info * * HISTORY: 0.83 - First version */ #include #include #include #ifdef TARGET_BEOS #include #else #include #endif #include #include #include "fxi.h" static int savetype (file * fp, void * data, DCB_TYPEDEF * var); static int loadtype (file * fp, void * data, DCB_TYPEDEF * var); /* * FUNCTION : loadvars * * Load data from memory to a given file at the current file offset, * using a varspace's type information * * PARAMS : * fp Pointer to the file object * data Pointer to the data * var Pointer to the type array * nvars Number of variables (length of var array) * * RETURN VALUE : * Number of bytes actually read * */ int loadvars (file * fp, void * data, DCB_VAR * var, int nvars) { int result = 0; int partial; for (; nvars > 0; nvars--, var++) { partial = loadtype (fp, data, &var->Type); data = (Uint8*)data + partial; result += partial; } return result; } /* * FUNCTION : loadtypes * * Load data from memory to a given file at the current file offset, * using type information stored in memory * * PARAMS : * fp Pointer to the file object * data Pointer to the data * var Pointer to the type array * nvars Number of variables (length of var array) * * RETURN VALUE : * Number of bytes actually read * */ int loadtypes (file * fp, void * data, DCB_TYPEDEF * var, int nvars) { int result = 0; int partial; for (; nvars > 0; nvars--, var++) { partial = loadtype (fp, data, var); data = (Uint8*)data + partial; result += partial; } return result; } /* * FUNCTION : savevars * * Save data from memory to a given file at the current file offset, * using a varspace's type information * * PARAMS : * fp Pointer to the file object * data Pointer to the data * var Pointer to the type array * nvars Number of variables (length of var array) * * RETURN VALUE : * Number of bytes actually written * */ int savevars (file * fp, void * data, DCB_VAR * var, int nvars) { int result = 0; int partial; for (; nvars > 0; nvars--, var++) { partial = savetype (fp, data, &var->Type); data = (Uint8*) data + partial; result += partial; } return result; } /* * FUNCTION : savetypes * * Save data from memory to a given file at the current file offset, * using type information stored in memory * * PARAMS : * fp Pointer to the file object * data Pointer to the data * var Pointer to the type array * nvars Number of variables (length of var array) * * RETURN VALUE : * Number of bytes actually written * */ int savetypes (file * fp, void * data, DCB_TYPEDEF * var, int nvars) { int result = 0; int partial; for (; nvars > 0; nvars--, var++) { partial = savetype(fp, data, var); result += partial; data = (Uint8*)data + partial; } return result; } /* * FUNCTION : savetype * * Save one variable from memory to a given file at the current file offset, * using the given type information. This is a convenience function * used by both savevars and savetypes. * * PARAMS : * fp Pointer to the file object * data Pointer to the data * var Pointer to the variable type * * RETURN VALUE : * Number of bytes actually written * */ static int savetype (file * fp, void * data, DCB_TYPEDEF * var) { int n = 0; int count = 1; int result = 0; const char * str; int len; int partial; for (;;) { switch (var->BaseType[n]) { case TYPE_FLOAT: case TYPE_INT: case TYPE_DWORD: for (; count ; count--) { ARRANGE_DWORD (data); result += file_write (fp, data, 4); ARRANGE_DWORD (data); data = (Uint8*)data + 4; } break; case TYPE_SHORT: case TYPE_WORD: for (; count ; count--) { ARRANGE_WORD (data); result += file_write (fp, data, 2); ARRANGE_WORD (data); data = (Uint8*)data + 2; } break; case TYPE_BYTE: case TYPE_SBYTE: case TYPE_CHAR: result += file_write (fp, data, count); break; case TYPE_STRING: str = string_get(*(Uint32 *)data); len = strlen(str); ARRANGE_DWORD(&len); file_write (fp, &len, 4); file_write (fp, (void*)str, len); result += 4; break; case TYPE_ARRAY: count *= var->Count[n]; n++; continue; case TYPE_STRUCT: for (; count ; count--) { partial = savevars(fp, data, dcb.varspace_vars[var->Members], dcb.varspace[var->Members].NVars); data = (Uint8*)data + partial; result += partial; } break; default: gr_error ("No es posible grabar esta estructura"); break; } break; } return result; } /* * FUNCTION : loadtype * * Load one variable from a given file at the current file offset, * using the given type information. This is a convenience function * used by both loadvars and loadtypes. * * PARAMS : * fp Pointer to the file object * data Pointer to the data * var Pointer to the variable type * * RETURN VALUE : * Number of bytes actually written * */ static int loadtype (file * fp, void * data, DCB_TYPEDEF * var) { int n = 0; int count = 1; int result = 0; char * str; int len; int partial; for (;;) { switch (var->BaseType[n]) { /* Not sure about float types */ case TYPE_FLOAT: case TYPE_INT: case TYPE_DWORD: for (; count ; count--) { ARRANGE_DWORD (data); result += file_read (fp, data, 4); ARRANGE_DWORD (data); data = (Uint8*)data + 4; } break; case TYPE_SHORT: case TYPE_WORD: for (; count ; count--) { ARRANGE_WORD (data); result += file_read (fp, data, 2); ARRANGE_WORD (data); data = (Uint8*)data + 2; } break; case TYPE_SBYTE: case TYPE_BYTE: case TYPE_CHAR: result += file_read (fp, data, count); break; case TYPE_STRING: string_discard (*(Uint32*)data); file_read (fp, &len, 4); ARRANGE_DWORD(&len); str = malloc(len+1); if (str == 0) { gr_error ("loadtype: Sin memoria"); } else { if (len > 0) file_read (fp, str, len); str[len] = 0; *(Uint32*)data = string_new(str); string_use(*(Uint32*)data); free(str); } result += 4; break; case TYPE_ARRAY: count *= var->Count[n]; n++; continue; case TYPE_STRUCT: for (; count ; count--) { partial = loadvars(fp, data, dcb.varspace_vars[var->Members], dcb.varspace[var->Members].NVars); result += partial; data = (Uint8*)data + partial; } break; default: gr_error ("No es posible recuperar esta estructura"); break; } break; } return result; } Fenix/fxi/src/Makefile0000644000000000000000000005635710607744630013671 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # fxi/src/Makefile. Generated from Makefile.in by configure. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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. srcdir = . top_srcdir = ../.. pkgdatadir = $(datadir)/fenix pkglibdir = $(libdir)/fenix pkgincludedir = $(includedir)/fenix top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /bin/install -c 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 = i686-pc-mingw32 host_triplet = i686-pc-mingw32 target_triplet = i686-pc-mingw32 ACLOCAL = ${SHELL} /c/Fenix/missing --run aclocal-1.7 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /c/Fenix/missing --run tar AUTOCONF = ${SHELL} /c/Fenix/missing --run autoconf AUTOHEADER = ${SHELL} /c/Fenix/missing --run autoheader AUTOMAKE = ${SHELL} /c/Fenix/missing --run automake-1.7 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -O3 -finline-functions -ffast-math -I/usr/local/include COMMON_CFLAGS = -I/usr/local/include -DTARGET_Win32 -DWIN32 -D_WIN32 COMMON_LIBS = -L/usr/local/lib -lz -lshlwapi CPP = gcc -E CPPFLAGS = CYGPATH_W = echo DEFS = -DPACKAGE_NAME=\"fenix\" -DPACKAGE_TARNAME=\"fenix\" -DPACKAGE_VERSION=\"0.92a\" -DPACKAGE_STRING=\"fenix\ 0.92a\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"fenix\" -DVERSION=\"0.92a\" -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 DEPDIR = .deps DO_FPG = DO_FPG_FALSE = # DO_FPG_TRUE = DO_FXC = DO_FXC_FALSE = # DO_FXC_TRUE = DO_FXI = DO_FXI_FALSE = # DO_FXI_TRUE = DO_MAP = DO_MAP_FALSE = # DO_MAP_TRUE = ECHO_C = ECHO_N = -n ECHO_T = EGREP = grep -E EXEEXT = .exe HAVE_WINDRES_FALSE = # HAVE_WINDRES_TRUE = INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = LIBOBJS = LIBS = -L/usr/local/lib LTLIBOBJS = MAINT = # MAINTAINER_MODE_FALSE = MAINTAINER_MODE_TRUE = # MAKEINFO = ${SHELL} /c/Fenix/missing --run makeinfo OBJEXT = o PACKAGE = fenix PACKAGE_BUGREPORT = PACKAGE_NAME = fenix PACKAGE_STRING = fenix 0.92a PACKAGE_TARNAME = fenix PACKAGE_VERSION = 0.92a PATH_SEPARATOR = : SDL_CFLAGS = -I/usr/local/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main SDL_CONFIG = /usr/local/bin/sdl-config SDL_LIBS = -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows SET_MAKE = SHELL = /bin/sh STRIP = VERSION = 0.92a WINDRES = windres ac_ct_CC = gcc ac_ct_STRIP = ac_ct_WINDRES = windres am__fastdepCC_FALSE = # am__fastdepCC_TRUE = am__include = include am__quote = bindir = ${exec_prefix}/bin build = i686-pc-mingw32 build_alias = build_cpu = i686 build_os = mingw32 build_vendor = pc datadir = ${prefix}/share exec_prefix = ${prefix} host = i686-pc-mingw32 host_alias = host_cpu = i686 host_os = mingw32 host_vendor = pc includedir = ${prefix}/include infodir = ${prefix}/info install_sh = /c/Fenix/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localstatedir = ${prefix}/var mandir = ${prefix}/man oldincludedir = /usr/include prefix = /usr/local program_transform_name = s,x,x, sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com sysconfdir = ${prefix}/etc target = i686-pc-mingw32 target_alias = target_cpu = i686 target_os = mingw32 target_vendor = pc bin_PROGRAMS = fxi INCLUDES = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I../../include -I../inc -DDEBUG fxi_LDADD = $(SDL_LIBS) $(COMMON_LIBS) -lz -lpng -lSDL_mixer fxi_LDFLAGS = --as-needed SOURCE_FILES = main.c dcbr.c instance.c strings.c \ i_main.c i_debug.c i_func.c \ g_main.c g_maps.c g_blit.c g_texts.c g_pal.c g_draw.c \ g_systexts.c g_console.c g_scroll.c g_flic.c g_mode7.c \ img_png.c img_pcx.c sound.c pathfind.c fnc_exports.c \ g_conversion.c g_font.c g_fpg.c g_blendop.c f_bgload.c \ f_cd.c f_sort.c fbm.c fgc.c fpl.c f_joystick.c i_copy.c \ ../../common/dirs.c ../../common/regex.c \ ../../common/files.c ../../common/xctype.c \ g_profiler.c i_saveload.c \ scaler_scanline.c scaler_normal.c scaler_hq2x.c scaler_scale2x.c \ mmx_main.c mmx_hspan.c #hacer un if con mmx para activarlo o no noinst_HEADERS = ../inc/fxi.h ../../include/files.h ../../include/xctype.h \ ../../include/offsets.h ../../include/pslang.h ../inc/fmath.h fxi_SOURCES = $(SOURCE_FILES) fxi.rc #fxi_SOURCES = $(SOURCE_FILES) subdir = fxi/src mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = bin_PROGRAMS = fxi$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__fxi_SOURCES_DIST = main.c dcbr.c instance.c strings.c i_main.c \ i_debug.c i_func.c g_main.c g_maps.c g_blit.c g_texts.c g_pal.c \ g_draw.c g_systexts.c g_console.c g_scroll.c g_flic.c g_mode7.c \ img_png.c img_pcx.c sound.c pathfind.c fnc_exports.c \ g_conversion.c g_font.c g_fpg.c g_blendop.c f_bgload.c f_cd.c \ f_sort.c fbm.c fgc.c fpl.c f_joystick.c i_copy.c \ ../../common/dirs.c ../../common/regex.c ../../common/files.c \ ../../common/xctype.c g_profiler.c i_saveload.c \ scaler_scanline.c scaler_normal.c scaler_hq2x.c \ scaler_scale2x.c mmx_main.c mmx_hspan.c fxi.rc am__objects_1 = main.$(OBJEXT) dcbr.$(OBJEXT) instance.$(OBJEXT) \ strings.$(OBJEXT) i_main.$(OBJEXT) i_debug.$(OBJEXT) \ i_func.$(OBJEXT) g_main.$(OBJEXT) g_maps.$(OBJEXT) \ g_blit.$(OBJEXT) g_texts.$(OBJEXT) g_pal.$(OBJEXT) \ g_draw.$(OBJEXT) g_systexts.$(OBJEXT) g_console.$(OBJEXT) \ g_scroll.$(OBJEXT) g_flic.$(OBJEXT) g_mode7.$(OBJEXT) \ img_png.$(OBJEXT) img_pcx.$(OBJEXT) sound.$(OBJEXT) \ pathfind.$(OBJEXT) fnc_exports.$(OBJEXT) g_conversion.$(OBJEXT) \ g_font.$(OBJEXT) g_fpg.$(OBJEXT) g_blendop.$(OBJEXT) \ f_bgload.$(OBJEXT) f_cd.$(OBJEXT) f_sort.$(OBJEXT) \ fbm.$(OBJEXT) fgc.$(OBJEXT) fpl.$(OBJEXT) f_joystick.$(OBJEXT) \ i_copy.$(OBJEXT) dirs.$(OBJEXT) regex.$(OBJEXT) files.$(OBJEXT) \ xctype.$(OBJEXT) g_profiler.$(OBJEXT) i_saveload.$(OBJEXT) \ scaler_scanline.$(OBJEXT) scaler_normal.$(OBJEXT) \ scaler_hq2x.$(OBJEXT) scaler_scale2x.$(OBJEXT) \ mmx_main.$(OBJEXT) mmx_hspan.$(OBJEXT) am_fxi_OBJECTS = $(am__objects_1) fxi.$(OBJEXT) #am_fxi_OBJECTS = $(am__objects_1) fxi_OBJECTS = $(am_fxi_OBJECTS) fxi_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles DEP_FILES = ./$(DEPDIR)/dcbr.Po ./$(DEPDIR)/dirs.Po \ ./$(DEPDIR)/f_bgload.Po ./$(DEPDIR)/f_cd.Po \ ./$(DEPDIR)/f_joystick.Po ./$(DEPDIR)/f_sort.Po \ ./$(DEPDIR)/fbm.Po ./$(DEPDIR)/fgc.Po \ ./$(DEPDIR)/files.Po ./$(DEPDIR)/fnc_exports.Po \ ./$(DEPDIR)/fpl.Po ./$(DEPDIR)/g_blendop.Po \ ./$(DEPDIR)/g_blit.Po ./$(DEPDIR)/g_console.Po \ ./$(DEPDIR)/g_conversion.Po ./$(DEPDIR)/g_draw.Po \ ./$(DEPDIR)/g_flic.Po ./$(DEPDIR)/g_font.Po \ ./$(DEPDIR)/g_fpg.Po ./$(DEPDIR)/g_main.Po \ ./$(DEPDIR)/g_maps.Po ./$(DEPDIR)/g_mode7.Po \ ./$(DEPDIR)/g_pal.Po ./$(DEPDIR)/g_profiler.Po \ ./$(DEPDIR)/g_scroll.Po ./$(DEPDIR)/g_systexts.Po \ ./$(DEPDIR)/g_texts.Po ./$(DEPDIR)/i_copy.Po \ ./$(DEPDIR)/i_debug.Po ./$(DEPDIR)/i_func.Po \ ./$(DEPDIR)/i_main.Po ./$(DEPDIR)/i_saveload.Po \ ./$(DEPDIR)/img_pcx.Po ./$(DEPDIR)/img_png.Po \ ./$(DEPDIR)/instance.Po ./$(DEPDIR)/main.Po \ ./$(DEPDIR)/mmx_hspan.Po ./$(DEPDIR)/mmx_main.Po \ ./$(DEPDIR)/pathfind.Po ./$(DEPDIR)/regex.Po \ ./$(DEPDIR)/scaler_hq2x.Po \ ./$(DEPDIR)/scaler_normal.Po \ ./$(DEPDIR)/scaler_scale2x.Po \ ./$(DEPDIR)/scaler_scanline.Po ./$(DEPDIR)/sound.Po \ ./$(DEPDIR)/strings.Po ./$(DEPDIR)/xctype.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(am__fxi_SOURCES_DIST) HEADERS = $(noinst_HEADERS) DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in SOURCES = $(fxi_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj .rc $(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu fxi/src/Makefile Makefile: # $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) dirs.$(OBJEXT): ../../common/dirs.c regex.$(OBJEXT): ../../common/regex.c files.$(OBJEXT): ../../common/files.c xctype.$(OBJEXT): ../../common/xctype.c fxi$(EXEEXT): $(fxi_OBJECTS) $(fxi_DEPENDENCIES) @rm -f fxi$(EXEEXT) $(LINK) $(fxi_LDFLAGS) $(fxi_OBJECTS) $(fxi_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c include ./$(DEPDIR)/dcbr.Po include ./$(DEPDIR)/dirs.Po include ./$(DEPDIR)/f_bgload.Po include ./$(DEPDIR)/f_cd.Po include ./$(DEPDIR)/f_joystick.Po include ./$(DEPDIR)/f_sort.Po include ./$(DEPDIR)/fbm.Po include ./$(DEPDIR)/fgc.Po include ./$(DEPDIR)/files.Po include ./$(DEPDIR)/fnc_exports.Po include ./$(DEPDIR)/fpl.Po include ./$(DEPDIR)/g_blendop.Po include ./$(DEPDIR)/g_blit.Po include ./$(DEPDIR)/g_console.Po include ./$(DEPDIR)/g_conversion.Po include ./$(DEPDIR)/g_draw.Po include ./$(DEPDIR)/g_flic.Po include ./$(DEPDIR)/g_font.Po include ./$(DEPDIR)/g_fpg.Po include ./$(DEPDIR)/g_main.Po include ./$(DEPDIR)/g_maps.Po include ./$(DEPDIR)/g_mode7.Po include ./$(DEPDIR)/g_pal.Po include ./$(DEPDIR)/g_profiler.Po include ./$(DEPDIR)/g_scroll.Po include ./$(DEPDIR)/g_systexts.Po include ./$(DEPDIR)/g_texts.Po include ./$(DEPDIR)/i_copy.Po include ./$(DEPDIR)/i_debug.Po include ./$(DEPDIR)/i_func.Po include ./$(DEPDIR)/i_main.Po include ./$(DEPDIR)/i_saveload.Po include ./$(DEPDIR)/img_pcx.Po include ./$(DEPDIR)/img_png.Po include ./$(DEPDIR)/instance.Po include ./$(DEPDIR)/main.Po include ./$(DEPDIR)/mmx_hspan.Po include ./$(DEPDIR)/mmx_main.Po include ./$(DEPDIR)/pathfind.Po include ./$(DEPDIR)/regex.Po include ./$(DEPDIR)/scaler_hq2x.Po include ./$(DEPDIR)/scaler_normal.Po include ./$(DEPDIR)/scaler_scale2x.Po include ./$(DEPDIR)/scaler_scanline.Po include ./$(DEPDIR)/sound.Po include ./$(DEPDIR)/strings.Po include ./$(DEPDIR)/xctype.Po distclean-depend: -rm -rf ./$(DEPDIR) .c.o: if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ fi # source='$<' object='$@' libtool=no \ # depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ fi # source='$<' object='$@' libtool=no \ # depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'` dirs.o: ../../common/dirs.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dirs.o -MD -MP -MF "$(DEPDIR)/dirs.Tpo" \ -c -o dirs.o `test -f '../../common/dirs.c' || echo '$(srcdir)/'`../../common/dirs.c; \ then mv "$(DEPDIR)/dirs.Tpo" "$(DEPDIR)/dirs.Po"; \ else rm -f "$(DEPDIR)/dirs.Tpo"; exit 1; \ fi # source='../../common/dirs.c' object='dirs.o' libtool=no \ # depfile='$(DEPDIR)/dirs.Po' tmpdepfile='$(DEPDIR)/dirs.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dirs.o `test -f '../../common/dirs.c' || echo '$(srcdir)/'`../../common/dirs.c dirs.obj: ../../common/dirs.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dirs.obj -MD -MP -MF "$(DEPDIR)/dirs.Tpo" \ -c -o dirs.obj `if test -f '../../common/dirs.c'; then $(CYGPATH_W) '../../common/dirs.c'; else $(CYGPATH_W) '$(srcdir)/../../common/dirs.c'`; \ then mv "$(DEPDIR)/dirs.Tpo" "$(DEPDIR)/dirs.Po"; \ else rm -f "$(DEPDIR)/dirs.Tpo"; exit 1; \ fi # source='../../common/dirs.c' object='dirs.obj' libtool=no \ # depfile='$(DEPDIR)/dirs.Po' tmpdepfile='$(DEPDIR)/dirs.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dirs.obj `if test -f '../../common/dirs.c'; then $(CYGPATH_W) '../../common/dirs.c'; else $(CYGPATH_W) '$(srcdir)/../../common/dirs.c'` regex.o: ../../common/regex.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regex.o -MD -MP -MF "$(DEPDIR)/regex.Tpo" \ -c -o regex.o `test -f '../../common/regex.c' || echo '$(srcdir)/'`../../common/regex.c; \ then mv "$(DEPDIR)/regex.Tpo" "$(DEPDIR)/regex.Po"; \ else rm -f "$(DEPDIR)/regex.Tpo"; exit 1; \ fi # source='../../common/regex.c' object='regex.o' libtool=no \ # depfile='$(DEPDIR)/regex.Po' tmpdepfile='$(DEPDIR)/regex.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regex.o `test -f '../../common/regex.c' || echo '$(srcdir)/'`../../common/regex.c regex.obj: ../../common/regex.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regex.obj -MD -MP -MF "$(DEPDIR)/regex.Tpo" \ -c -o regex.obj `if test -f '../../common/regex.c'; then $(CYGPATH_W) '../../common/regex.c'; else $(CYGPATH_W) '$(srcdir)/../../common/regex.c'`; \ then mv "$(DEPDIR)/regex.Tpo" "$(DEPDIR)/regex.Po"; \ else rm -f "$(DEPDIR)/regex.Tpo"; exit 1; \ fi # source='../../common/regex.c' object='regex.obj' libtool=no \ # depfile='$(DEPDIR)/regex.Po' tmpdepfile='$(DEPDIR)/regex.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regex.obj `if test -f '../../common/regex.c'; then $(CYGPATH_W) '../../common/regex.c'; else $(CYGPATH_W) '$(srcdir)/../../common/regex.c'` files.o: ../../common/files.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.o -MD -MP -MF "$(DEPDIR)/files.Tpo" \ -c -o files.o `test -f '../../common/files.c' || echo '$(srcdir)/'`../../common/files.c; \ then mv "$(DEPDIR)/files.Tpo" "$(DEPDIR)/files.Po"; \ else rm -f "$(DEPDIR)/files.Tpo"; exit 1; \ fi # source='../../common/files.c' object='files.o' libtool=no \ # depfile='$(DEPDIR)/files.Po' tmpdepfile='$(DEPDIR)/files.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.o `test -f '../../common/files.c' || echo '$(srcdir)/'`../../common/files.c files.obj: ../../common/files.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.obj -MD -MP -MF "$(DEPDIR)/files.Tpo" \ -c -o files.obj `if test -f '../../common/files.c'; then $(CYGPATH_W) '../../common/files.c'; else $(CYGPATH_W) '$(srcdir)/../../common/files.c'`; \ then mv "$(DEPDIR)/files.Tpo" "$(DEPDIR)/files.Po"; \ else rm -f "$(DEPDIR)/files.Tpo"; exit 1; \ fi # source='../../common/files.c' object='files.obj' libtool=no \ # depfile='$(DEPDIR)/files.Po' tmpdepfile='$(DEPDIR)/files.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.obj `if test -f '../../common/files.c'; then $(CYGPATH_W) '../../common/files.c'; else $(CYGPATH_W) '$(srcdir)/../../common/files.c'` xctype.o: ../../common/xctype.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xctype.o -MD -MP -MF "$(DEPDIR)/xctype.Tpo" \ -c -o xctype.o `test -f '../../common/xctype.c' || echo '$(srcdir)/'`../../common/xctype.c; \ then mv "$(DEPDIR)/xctype.Tpo" "$(DEPDIR)/xctype.Po"; \ else rm -f "$(DEPDIR)/xctype.Tpo"; exit 1; \ fi # source='../../common/xctype.c' object='xctype.o' libtool=no \ # depfile='$(DEPDIR)/xctype.Po' tmpdepfile='$(DEPDIR)/xctype.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xctype.o `test -f '../../common/xctype.c' || echo '$(srcdir)/'`../../common/xctype.c xctype.obj: ../../common/xctype.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xctype.obj -MD -MP -MF "$(DEPDIR)/xctype.Tpo" \ -c -o xctype.obj `if test -f '../../common/xctype.c'; then $(CYGPATH_W) '../../common/xctype.c'; else $(CYGPATH_W) '$(srcdir)/../../common/xctype.c'`; \ then mv "$(DEPDIR)/xctype.Tpo" "$(DEPDIR)/xctype.Po"; \ else rm -f "$(DEPDIR)/xctype.Tpo"; exit 1; \ fi # source='../../common/xctype.c' object='xctype.obj' libtool=no \ # depfile='$(DEPDIR)/xctype.Po' tmpdepfile='$(DEPDIR)/xctype.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xctype.obj `if test -f '../../common/xctype.c'; then $(CYGPATH_W) '../../common/xctype.c'; else $(CYGPATH_W) '$(srcdir)/../../common/xctype.c'` uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../../include $(distdir)/../inc @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(PROGRAMS) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-depend distclean-generic distclean-tags distdir dvi \ dvi-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am .rc.o: $(WINDRES) $< -I../../include -o $@ # 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: Fenix/fxi/src/strings.c0000644000000000000000000007743010607745044014061 0ustar rootroot/****************************************************************************/ /* */ /* Fenix - Videogame compiler/interpreter */ /* Current release : PROJECT 1.0 - 0.84 */ /* Last stable release : */ /* Project documentation : http://fenix.divsite.net */ /* */ /****************************************************************************/ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* */ /****************************************************************************/ /* Copyright 1999 Jos Luis Cebrin Page */ /* Copyright 2002 FENIX PROJECT 1.0 TEAM */ /****************************************************************************/ /****************************************************************************/ /* FILE : strings.c */ /* DESCRIPTION : Strings management. Includes any function related to */ /* variable-length strings. Those strings are allocated */ /* in dynamic memory with reference counting. */ /****************************************************************************/ /* HISTORY : 29/01/2001 (jlceb) the pointer/reference/dontfree arrays */ /* are now of dynamic size. Some comments written. */ /****************************************************************************/ #include #include #include #ifdef TARGET_BEOS #include #else #include #endif #include "fxi.h" #include "dcb.h" /****************************************************************************/ /* GLOBAL VARIABLES : */ /****************************************************************************/ /* 1 to debug string operations to the console (lots of text) */ int report_string = 0 ; /* #undef gr_con_printf #define gr_con_printf(...) printf(__VA_ARGS__);fflush(stdout); */ /****************************************************************************/ /* STATIC VARIABLES : */ /****************************************************************************/ /* Fixed string memory. The DCB fixed strings are stored here */ static char * string_mem = 0 ; static int string_allocated = 0 ; static int string_used = 0 ; /* Pointers to each string's text. Every string is allocated using strdup() or malloc(). A pointer of a unused slot is 0. Exception: "fixed" strings are stored in a separate memory block and should not be freed */ static char ** string_ptr ; /* Usage count for each string. An unused slot has a count of 0 */ static int * string_uct ; /* Fixed-memory flag: 1 for "fixed" strings */ static char * string_dontfree ; /* How many strings slots are used. This is only the bigger id in use + 1. There may be unused slots in this many positions */ static int string_count = 1 ; /* How many string slots are available in the ptr, uct and dontfree arrays */ static int string_ptr_allocated = 0 ; /****************************************************************************/ /* FUNCTION : string_init */ /****************************************************************************/ /* Allocate memory for the dynamic arrays. You should call this function */ /* before anything else in this file. There is enough space for about */ /* 1024 short strings, that should be enough for simple programs. More */ /* space is allocated as needed. */ /****************************************************************************/ void string_init () { string_mem = (char *) malloc (4096) ; string_allocated = 4096 ; string_used = 0 ; string_ptr_allocated = 1024 ; string_ptr = (char **) malloc (1024 * sizeof(char *)) ; string_uct = (int *) malloc (1024 * sizeof(int)) ; string_dontfree = (char *) malloc (1024 * sizeof(char)) ; /* Create an empty string with ID 0 */ string_mem[0] = 0 ; string_ptr[0] = string_mem ; string_count = 1 ; } /****************************************************************************/ /* FUNCTION : string_alloc */ /****************************************************************************/ /* int bytes: how many new strings we could need */ /****************************************************************************/ /* Increase the size of the internal string arrays. This limits how many */ /* strings you can have in memory at the same time, and this should be */ /* called when every identifier slot available is already used. */ /****************************************************************************/ static void string_alloc (int count) { string_ptr_allocated += count ; string_ptr = (char **) realloc (string_ptr, string_ptr_allocated * sizeof(char *)) ; string_uct = (int *) realloc (string_uct, string_ptr_allocated * sizeof(int)) ; string_dontfree = (char *) realloc (string_dontfree, string_ptr_allocated * sizeof(char)) ; if (!string_ptr || !string_uct || !string_dontfree) gr_error ("string_alloc: sin memoria\n") ; } /****************************************************************************/ /* FUNCTION : string_dump */ /****************************************************************************/ /* Shows all the strings in memory in the console, including the reference */ /* count (usage count) of each string. */ /****************************************************************************/ void string_dump () { int i ; int used=0; gr_con_printf ("[STRING] ---- Dumping MaxID=%d strings ----\n", string_count) ; for (i = 0 ; i < string_count ; i++){ if (string_ptr[i]){ if (string_uct[i] == 0){ if (!string_dontfree[i]){ free(string_ptr[i]) ; string_ptr[i] = NULL ; // Splinter continue ; } } used++; } else { continue ; } gr_con_printf ("[STRING] %4d %1d [%4d]: {%s}\n", i, string_uct[i], string_dontfree[i], string_ptr[i]) ; } gr_con_printf ("[STRING] ---- Dumping Used=%d End ----\n", used) ; } /****************************************************************************/ /* FUNCTION : string_get */ /****************************************************************************/ /* int code: identifier of the string you want */ /****************************************************************************/ /* Returns the contens of an string. Beware: this pointer with only be */ /* valid while no other string function is called. */ /****************************************************************************/ const char * string_get (int code) { assert (code < string_count && code >= 0) ; if (report_string){ gr_con_printf ("[STRING] string_get %d\n", code) ; } return string_ptr[code] ; } /****************************************************************************/ /* FUNCTION : string_load */ /****************************************************************************/ /* file * fp: the DCB file (must be opened) */ /* */ /* This function uses the global "dcb" struct. It should be already filled. */ /****************************************************************************/ /* Loads the string portion of a DCB file. This includes an area with all */ /* the text (that will be stored in the string_mem pointer) and an array of */ /* the offsets of every string. This function fills the internal arrayswith */ /* all this data and allocates memory if needed. */ /****************************************************************************/ void string_load (file * fp) { int * string_offset, n; string_count = dcb.data.NStrings ; string_used = dcb.data.SText ; file_seek (fp, dcb.data.OStrings, SEEK_SET) ; string_offset = (int *) malloc (4 * string_count) ; if (!string_offset) { gr_error ("string_load: not enough memory\n") ; } file_read (fp, string_offset, 4 * string_count) ; if (string_used > string_allocated) { string_allocated = string_used ; string_mem = (char *) realloc (string_mem, string_used) ; } if (string_count + 128 > string_ptr_allocated) { string_alloc (string_count + 512 - string_ptr_allocated) ; } file_seek (fp, dcb.data.OText, SEEK_SET) ; file_read (fp, string_mem, string_used) ; for (n = 0 ; n < string_count ; n++) { string_ptr[n] = string_mem + string_offset[n] ; string_uct[n] = 0 /*25*/ ; // -- Fix Splinter string_dontfree[n] = 1 ; } string_ptr[n] = NULL ; string_uct[n] = 0 ; // -- Fix Splinter free (string_offset) ; } /****************************************************************************/ /* FUNCTION : string_use */ /****************************************************************************/ /* int code: identifier of the string you are using */ /****************************************************************************/ /* Increase the usage counter of an string. Use this when you store the */ /* identifier of the string somewhere. */ /****************************************************************************/ void string_use (int code) { string_uct[code]++ ; if (report_string) { gr_con_printf ("[STRING] String %d used (count: %d)\n", code, string_uct[code]) ; } } /****************************************************************************/ /* FUNCTION : string_discard */ /****************************************************************************/ /* int code: identifier of the string you don't need anymore */ /****************************************************************************/ /* Decrease the usage counter of an string. Use this when you retrieve the */ /* identifier of the string and discard it, or some memory (like private */ /* variables) containing the string identifier is destroyed. If the usage */ /* count is decreased to zero, the string will be discarted, and the */ /* identifier may be used in the future by other string. */ /****************************************************************************/ void string_discard (int code) { if ( code < 0 || code > string_count || !string_ptr[code]) { return; } if (string_uct[code] < 1) { if (report_string) { gr_con_printf ("[STRING] string_discard: String %d released but already discarted\n", code) ; } return ; } string_uct[code]-- ; if (report_string) { gr_con_printf ("[STRING] string_discard: String %d released (count: %d)\n", code, string_uct[code]) ; } if ( string_uct[code] < 1 ) { if (report_string) { gr_con_printf ("[STRING] string_discard: String %d released and discarted\n", code) ; } if (!string_dontfree[code]) { free(string_ptr[code]) ; string_ptr[code] = NULL ; // Splinter string_uct[code] = 0 ; } if (report_string ) { if ( string_dontfree[code]) { gr_con_printf ("[STRING] string_discard: (Memory don't freed - %d is special string, count: %d)\n", code, string_uct[code]) ; } else { gr_con_printf ("[STRING] string_discard: String %d released and discarted (count: %d)\n", code, string_uct[code]) ; } } } } /****************************************************************************/ /* FUNCTION : string_coalesce */ /****************************************************************************/ /* Does some garbage collection (frees any memory used by unreferenced */ /* strings). This should not be necessary, because strings are now discarted*/ /* inmediately when its usage counts is zero. */ /****************************************************************************/ void string_coalesce() { int n ; if (string_count < string_ptr_allocated/2) return ; for (n = 1 ; n < string_ptr_allocated ; n++) { if (!string_uct[n]) { if (!string_dontfree[n]) { free (string_ptr[n]) ; string_ptr[n] = NULL ; // Splinter } } } } /****************************************************************************/ /* FUNCTION : string_getid */ /****************************************************************************/ /* Searchs for an available ID and returns it. If none available, more space*/ /* is allocated for the new string. This is used for new strings only. */ /****************************************************************************/ static int string_getid () { int n ; // Si tengo suficientes alocados, retorno el siguiente segun string_count if (string_count < string_ptr_allocated) { return string_count++ ; } // Ya no tengo mas espacio, entonces busco alguno libre for (n = 1 ; n < string_ptr_allocated ; n++) { if (!string_ptr[n]) { return n ; } } // Incremento espacio string_alloc (1024) ; gr_con_printf ("[STRING] 12*PANIC7 Too many strings, allocating more space") ; // Devuelvo el string_count + 1, ya que ahora tengo 1024 mas que antes return string_count++ ; } /****************************************************************************/ /* FUNCTION : string_new */ /****************************************************************************/ /* Create a new string. It returns its ID. Note that it uses strdup() */ /* TODO: do something if no memory available */ /****************************************************************************/ int string_new (const char * ptr) { char * str = strdup(ptr) ; int id ; assert (str) ; id = string_getid() ; if (report_string) { gr_con_printf ("[STRING] String %d created: \"%s\"\n", id, str) ; } string_ptr[id] = str ; string_uct[id] = 0 ; string_dontfree[id] = 0 ; return id ; } /* * FUNCTION : string_newa * * Create a new string from a text buffer section * * PARAMS: * ptr Pointer to the text buffer at start position * count Number of characters * * RETURN VALUE: * ID of the new string */ int string_newa (const char * ptr, unsigned count) { char * str = malloc(count+1); int id ; assert (str) ; id = string_getid() ; strncpy (str, ptr, count); str[count] = 0; string_ptr[id] = str ; string_uct[id] = 0 ; string_dontfree[id] = 0 ; if (report_string){ gr_con_printf ("[STRING] (newa) String %d created: \"%s\"\n", id, str) ; } return id ; } /****************************************************************************/ /* FUNCTION : string_concat */ /****************************************************************************/ /* Add some text to an string and return the resulting string. This does not*/ /* modify the original string, but creates a new one. */ /****************************************************************************/ int string_concat (int code1, char * str2) { char * str1 ; assert (code1 < string_count && code1 >= 0) ; str1 = string_ptr[code1] ; assert (str1) ; str1 = (char *) realloc(str1, strlen(str1) + strlen(str2) + 1) ; assert (str1) ; strcat (str1, str2) ; string_ptr[code1] = str1 ; return code1 ; } /****************************************************************************/ /* FUNCTION : string_add */ /****************************************************************************/ /* Add an string to another one and return the resulting string. This does */ /* not modify the original string, but creates a new one. */ /****************************************************************************/ int string_add (int code1, int code2) { const char * str1 = string_get(code1) ; const char * str2 = string_get(code2) ; char * str3 ; int id ; assert (str1) ; assert (str2) ; str3 = (char *) malloc(strlen(str1) + strlen(str2) + 1) ; assert (str3) ; strcpy (str3, str1) ; strcat (str3, str2) ; id = string_getid() ; string_ptr[id] = str3 ; string_uct[id] = 0 ; string_dontfree[id] = 0 ; if (report_string){ gr_con_printf ("[STRING] (add) String %d created: \"%s\"\n", id, str3) ; } return id ; } /****************************************************************************/ /* FUNCTION : string_ptoa */ /****************************************************************************/ /* Convert a pointer to a new created string and return its ID. */ /****************************************************************************/ int string_ptoa (void * n) { char * str ; int id ; str = (char *) malloc(64) ; assert (str) ; sprintf (str, "%p", n) ; id = string_getid() ; string_ptr[id] = str ; string_uct[id] = 0 ; string_dontfree[id] = 0 ; if (report_string){ gr_con_printf ("[STRING] (ptoa) String %d created: \"%s\"\n", id, str) ; } return id ; } /****************************************************************************/ /* FUNCTION : string_ftoa */ /****************************************************************************/ /* Convert a float to a new created string and return its ID. */ /****************************************************************************/ int string_ftoa (float n) { char * str, * ptr ; int id ; str = (char *) malloc(64) ; assert (str) ; sprintf (str, "%f", n) ; ptr = str + strlen(str) - 1 ; while (ptr >= str) { if (*ptr != '0') break ; *ptr-- = 0 ; } if (ptr >= str && *ptr == '.') *ptr = 0 ; if (*str == 0) strcpy (str, "0") ; id = string_getid() ; string_ptr[id] = str ; string_uct[id] = 0 ; string_dontfree[id] = 0 ; if (report_string){ gr_con_printf ("[STRING] (ftoa) String %d created: \"%s\"\n", id, str) ; } return id ; } /****************************************************************************/ /* FUNCTION : string_itoa */ /****************************************************************************/ /* Convert an integer to a new created string and return its ID. */ /****************************************************************************/ int string_itoa (int n) { char * str ; int id ; str = (char *) malloc(32) ; assert (str) ; sprintf (str, "%d", n) ; id = string_getid() ; string_ptr[id] = str ; string_uct[id] = 0 ; string_dontfree[id] = 0 ; if (report_string){ gr_con_printf ("[STRING] (itoa) String %d created: \"%s\"\n", id, str) ; } return id ; } /****************************************************************************/ /* FUNCTION : string_uitoa */ /****************************************************************************/ /* Convert an unsigned integer to a new created string and return its ID. */ /****************************************************************************/ int string_uitoa (unsigned int n) { char * str ; int id ; str = (char *) malloc(32) ; assert (str) ; sprintf (str, "%u", n) ; id = string_getid() ; string_ptr[id] = str ; string_uct[id] = 0 ; string_dontfree[id] = 0 ; if (report_string){ gr_con_printf ("[STRING] (uitoa) String %d created: \"%s\"\n", id, str) ; } return id ; } /****************************************************************************/ /* FUNCTION : string_comp */ /****************************************************************************/ /* Compare two strings using strcmp and return the result */ /****************************************************************************/ int string_comp (int code1, int code2) { const char * str1 = string_get(code1) ; const char * str2 = string_get(code2) ; return strcmp (str1, str2) ; } /****************************************************************************/ /* FUNCTION : string_char */ /****************************************************************************/ /* Extract a character from a string. The parameter nchar can be: */ /* - 0 or positive: return this character from the left (0 = leftmost) */ /* - negative: return this character from the right (-1 = rightmost) */ /* The result is not the ASCII value, but the identifier of a new string */ /* that is create in the process and contains only the extracted character */ /****************************************************************************/ int string_char (int n, int nchar) { const char * str = string_get(n) ; int len ; char buffer[2] ; assert (str) ; len = strlen(str) ; if (nchar >= len) nchar = len ; if (nchar < 0) nchar = len + nchar ; if (nchar < 0) nchar = len ; buffer[0] = str[nchar] ; buffer[1] = 0 ; return string_new (buffer) ; } /****************************************************************************/ /* FUNCTION : string_substr */ /****************************************************************************/ /* Extract a substring from a string. The parameters can be: */ /* - 0 or positive: count this character from the left (0 = leftmost) */ /* - negative: count this character from the right (-1 = rightmost) */ /* */ /* NO MORE: If first > last, the two values are swapped before returning the result */ /****************************************************************************/ int string_substr (int code, int first, int len) { const char * str = string_get(code) ; char * ptr ; int rlen, n ; assert (str) ; rlen = strlen(str) ; if (first < 0) first = rlen + first ; if (first < 0) first = 0 ; if (first > (rlen - 1)) return string_new("") ; if (len < 0) { len = rlen + (len + 2) - first - 1 ; if (len < 1) return string_new("") ; } if ((first + len) > rlen) len = (rlen - first) ; ptr = (char *)malloc(len+1) ; memcpy (ptr, str + first, len) ; ptr[len] = 0 ; n = string_getid() ; string_ptr[n] = ptr ; string_uct[n] = 0 ; string_dontfree[n] = 0 ; if (report_string){ gr_con_printf ("[STRING] (substr) String %d created: \"%s\"\n", n, ptr) ; } return n ; } /* * FUNCTION : string_find * * Find a substring. Returns the position of the leftmost character (0 * for the leftmost position) or -1 if the string was not found. * * PARAMS: * code1 Code of the string * code2 Code of the substring * first Character to start the search * (negative to search backwards) * * RETURN VALUE: * Result of the comparison */ int string_find (int code1, int code2, int first) { const char * str1 = string_get(code1) ; const char * str2 = string_get(code2) ; int pos, len1, len ; assert (str1 && str2) ; len1 = strlen(str1); len = strlen(str2) ; pos = first; if (pos < 0) { pos = len1 + pos; if (pos < 0) pos = 0; } if (pos > len1) pos = len1; for ( ; str1[pos] && pos >= 0 ; first >= 0 ? pos++ : pos--) { if (memcmp(str1+pos, str2, len) == 0) return pos ; } return -1 ; } /* * FUNCTION : string_ucase * * Convert an string to upper case. It does not alter the given string, but * creates a new string in the correct case and returns its id. * * PARAMS: * code Internal code of original string * * RETURN VALUE: * Code of the resulting string */ int string_ucase (int code) { const char * str = string_get(code) ; char * bptr, * ptr ; int id ; assert (str) ; bptr = (char *)malloc(strlen(str)+1) ; assert (bptr) ; for (ptr = bptr; *str ; ptr++, str++) *ptr = TOUPPER(*str) ; *ptr = 0 ; id = string_getid() ; string_ptr[id] = bptr ; string_uct[id] = 0 ; string_dontfree[id] = 0 ; if (report_string){ gr_con_printf ("[STRING] (ucase) String %d created: \"%s\"\n", id, bptr) ; } return id ; } /* * FUNCTION : string_lcase * * Convert an string to lower case. It does not alter the given string, but * creates a new string in the correct case and returns its id. * * PARAMS: * code Internal code of original string * * RETURN VALUE: * Code of the resulting string */ int string_lcase (int code) { const char * str = string_get(code) ; char * bptr, * ptr ; int id ; assert (str) ; bptr = (char *)malloc(strlen(str)+1) ; assert (bptr) ; for (ptr = bptr; *str ; ptr++, str++) *ptr = TOLOWER(*str) ; *ptr = 0 ; id = string_getid() ; string_ptr[id] = bptr ; string_uct[id] = 0 ; string_dontfree[id] = 0 ; if (report_string){ gr_con_printf ("[STRING] (lcase) String %d created: \"%s\"\n", id, bptr) ; } return id ; } /* * FUNCTION : string_strip * * Create a copy of a string, without any leading or ending blanks * * PARAMS: * code Internal code of original string * * RETURN VALUE: * Code of the resulting string */ int string_strip (int code) { const char * ptr = string_get(code) ; char * ostr; char * bptr; int id = string_new(ptr); ostr = (char *)string_get(id) ; bptr = ostr; assert (bptr); while (*ptr == ' ' || *ptr == '\n' || *ptr == '\r' || *ptr == '\t') ptr++; while (*ptr) *bptr++ = *ptr++; while (bptr > ostr && (bptr[-1] == ' ' || bptr[-1] == '\n' || bptr[-1] == '\r' || bptr[-1] == '\t')) bptr--; *bptr = 0; return id ; } /* * FUNCTION : string_format * * Format a number using the given characters * * PARAMS: * number Number to format * spec Format specification * * RETURN VALUE: * Code of the resulting string */ int string_format (double number, int dec, char point, char thousands) { char buffer[128]; char buffer2[256]; char * s, * t; int c; int negative = 0; if (number < 0) { negative = 1; // number = -number; } sprintf (buffer, "%.*f", dec, number); s = buffer + strlen(buffer)-1; t = buffer2 + 127; *t-- = 0; if (strchr (buffer, '.')) { if (dec < 0) { while (*s == '0' && s >= buffer) s--; if (*s == '.') *s-- = 0; } if (strchr (buffer, '.')) { while (s >= buffer) { if (*s == '.') { *t-- = point; s--; break; } *t-- = *s--; } } } c = 0; while (s >= buffer) { *t-- = *s-- ; if (c == 2 && s >= buffer) { *t-- = thousands ; c = 0; } else c++; } return string_new (t+1); } /* * FUNCTION : string_casecmp * * Compare two strings (case-insensitive version) * * PARAMS: * code1 Code of the first string * code2 Code of the second string * * RETURN VALUE: * Result of the comparison */ int string_casecmp (int code1, int code2) { const unsigned char * str1 = string_get(code1) ; const unsigned char * str2 = string_get(code2) ; while (*str1 || *str2) { if (TOUPPER(*str1) != TOUPPER(*str2)) return TOUPPER(*str1) - TOUPPER(*str2); str1++; str2++; } return 0 ; } /* * FUNCTION : string_pad * * Add spaces to the left or right of a string * * PARAMS: * code Code of the string * total Total length of the final string * align 0 = align to the right; 1 = align to the left * * RETURN VALUE: * Result of the comparison */ int string_pad (int code, int total, int align) { const char * ptr = string_get(code); int len; int spaces = 0; int id; char * str; assert(ptr); len = strlen(ptr); if (len < total) spaces = total - len; if (!spaces) return string_new(ptr) ; str = malloc(total+1); assert (str); if (!align) { memset (str, ' ', spaces); strcpy (str + spaces, ptr) ; } else { strcpy (str, ptr) ; memset (str + len, ' ', spaces) ; str[total] = 0; } id = string_getid() ; string_ptr[id] = str ; string_uct[id] = 0 ; string_dontfree[id] = 0 ; if (report_string){ gr_con_printf ("[STRING] (pad) String %d created: \"%s\"\n", id, str) ; } return id ; } Fenix/fxi/src/g_draw.c0000644000000000000000000007240010607526746013631 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include #ifdef TARGET_BEOS #include #else #include #endif #include #include #include "fxi.h" #include "files.h" #include "grlib.h" #define ABS(x) ((x) < 0 ? -(x):(x)) int syscolor8 = 15 ; Uint16 syscolor16 = 0xFFFF ; Uint16 syscolor16_alpha; int drawing_alpha = 255; Uint16 * drawing_alpha16; Uint8 * drawing_alpha8; Uint32 drawing_stipple = 0xFFFFFFFF; static DRAWING_OBJECT * drawing_objects = NULL; #ifdef __GNUC__ #define _inline inline #endif _inline void _HLine8_nostipple (Uint8 * ptr, Uint32 length) { if (drawing_alpha == 255) { memset (ptr, syscolor8, length) ; } else { register int n; for (n = length ; n ; n--, ptr++) *ptr = drawing_alpha8[(syscolor8 << 8) + *ptr]; } } _inline void _HLine8_stipple (Uint8 * ptr, Uint32 length) { register int n; if (drawing_alpha == 255) { for (n = length ; n ; n--, ptr++) { if (drawing_stipple & 1) *ptr = syscolor8; drawing_stipple = ((drawing_stipple << 1) | (drawing_stipple & 0x80000000 ? 1:0)); } } else { for (n = length ; n ; n--, ptr++) { if (drawing_stipple & 1) *ptr = drawing_alpha8[(syscolor8 << 8) + *ptr]; drawing_stipple = ((drawing_stipple << 1) | (drawing_stipple & 0x80000000 ? 1:0)); } } } _inline void _HLine16_nostipple (Uint16 * ptr, Uint32 length) { register int n ; if (drawing_alpha == 255) { for (n = length ; n ; n--) *ptr++ = syscolor16 ; } else { for (n = length ; n ; n--, ptr++) *ptr = drawing_alpha16[*ptr] + syscolor16_alpha ; } } _inline void _HLine16_stipple (Uint16 * ptr, Uint32 length) { register int n ; if (drawing_alpha == 255) { for (n = length ; n ; n--, ptr++) { if (drawing_stipple & 1) *ptr = syscolor16 ; drawing_stipple = ((drawing_stipple << 1) | (drawing_stipple & 0x80000000 ? 1:0)); } } else { for (n = length ; n ; n--, ptr++) { if (drawing_stipple & 1) *ptr = drawing_alpha16[*ptr] + syscolor16_alpha ; drawing_stipple = ((drawing_stipple << 1) | (drawing_stipple & 0x80000000 ? 1:0)); } } } _inline void _Pixel8 (Uint8 * ptr, int color) { if (drawing_alpha == 255) *ptr = color ; else *ptr = drawing_alpha8[(color << 8) + *ptr]; } _inline void _Pixel16 (Uint16 * ptr, Uint16 color, Uint16 color_alpha) { if (drawing_alpha == 255) *ptr = color ; else *ptr = drawing_alpha16[*ptr] + color_alpha; } /* * FUNCTION : gr_get_pixel * * Read a pixel from a bitmap * * PARAMS : * dest Destination bitmap * x, y Pixel coordinates * * RETURN VALUE : * 1, 8 or 16-bit integer with the pixel value * */ int gr_get_pixel (GRAPH * dest, int x, int y) { if (x < 0 || y < 0 || x >= (int)dest->width || y >= (int)dest->height) return -1 ; switch (dest->depth) { case 8: return ((Uint8 *)dest->data) [x + dest->pitch*y] ; case 16: return ((Uint16 *)dest->data)[x + dest->pitch*y/2] ; case 1: return (((Uint8 *)dest->data)[x/8 + dest->pitch*y] & (0x80 >> (x & 7))) ? 1:0; default: gr_error ("gr_get_pixel: Profundidad de color no soportada"); return 0; } } /* * FUNCTION : gr_put_pixel * * Paint a pixel with no clipping whatsoever, except by * the bitmap's dimensions * * PARAMS : * dest Destination bitmap * x, y Pixel coordinates * color 1, 8 or 16-bit pixel value * * RETURN VALUE : * None * */ void gr_put_pixel (GRAPH * dest, int x, int y, int color) { if (x < 0 || y < 0 || x >= (int)dest->width || y >= (int)dest->height) return ; dest->modified = 1 ; switch (dest->depth) { case 8: _Pixel8(((Uint8 *)dest->data)+ x + dest->pitch*y, color); break; case 16: _Pixel16(((Uint16 *)dest->data) + x + dest->pitch*y/2, color, gr_alpha16(drawing_alpha)[color]) ; break; case 1: if (color) ((Uint8 *)dest->data)[x/8 + dest->pitch*y] |= (0x80 >> (x & 7)) ; else ((Uint8 *)dest->data)[x/8 + dest->pitch*y] &= ~(0x80 >> (x & 7)) ; break; default: gr_error ("gr_put_pixel: Profundidad de color no soportada"); } } /* * FUNCTION : gr_put_pixel * * Paint a pixel with no clipping whatsoever, using * a clipping region * * PARAMS : * dest Destination bitmap * x, y Pixel coordinates * color 1, 8 or 16-bit pixel value * * RETURN VALUE : * None * */ void gr_put_pixelc (GRAPH * dest, REGION * clip, int x, int y, int color) { if (clip && x >= clip->x && x <= clip->x2 && y >= clip->y && y <= clip->y2) gr_put_pixel (dest, x, y, color); } /* * FUNCTION : gr_clear * * Clear a bitmap (paint all pixels as 0 [transparent]) * * PARAMS : * dest Bitmap to clear * * RETURN VALUE : * None * */ void gr_clear (GRAPH * dest) { dest->modified = 1 ; memset (dest->data, 0, dest->pitch * dest->height) ; if (dest == background) background_is_black = 1; } /* * FUNCTION : gr_clear_as * * Clear a bitmap (paint all pixels as the given color) * * PARAMS : * dest Bitmap to clear * color 8 or 16-bit color value * * RETURN VALUE : * None * */ void gr_clear_as (GRAPH * dest, int color) { Uint32 y; dest->modified = 1 ; switch (dest->depth) { case 8: for (y = 0 ; y < dest->height ; y++) memset ((Uint8 *)dest->data + dest->pitch * y, color, dest->width) ; break; case 16: for (y = 0 ; y < dest->height ; y++) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2; int n, m = dest->width ; for (n = 0 ; n < m ; n++) *ptr++ = color ; } break; case 1: for (y = 0 ; y < dest->height ; y++) memset ((Uint8 *)dest->data + dest->pitch * y, color ? 0xFF:0, dest->width/8) ; break; default: gr_error ("gr_clear_as: Profundidad de color no soportada"); } if (dest == background && !color) background_is_black = 1; } /* * FUNCTION : gr_vline * * Draw a vertical rectangle * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * x, y Coordinates of the top-left pixel * h Height in pixels * * RETURN VALUE : * None * */ void gr_vline (GRAPH * dest, REGION * clip, int x, int y, int h) { REGION base_clip ; if (!dest) dest = scrbitmap ; if (!clip) { clip = &base_clip ; clip->x = 0 ; clip->y = 0 ; clip->x2 = dest->width-1 ; clip->y2 = dest->height-1 ; } dest->modified = 1 ; if (h < 0) h = -h, y -= h-1 ; if (x < clip->x || x > clip->x2) return ; if (y < clip->y) h += y-clip->y, y = clip->y ; if (y+h > clip->y2) h = clip->y2+1-y ; if (h < 1) return ; if (dest->depth == 8) { Uint8 * ptr = dest->data ; ptr += dest->pitch * y + x ; if (drawing_stipple != 0xFFFFFFFF) { while (h--) { if (drawing_stipple & 1) _Pixel8 (ptr, syscolor8) ; drawing_stipple = ((drawing_stipple << 1) | (drawing_stipple & 0x80000000 ? 1:0)); ptr += dest->pitch ; } } else { while (h--) { _Pixel8 (ptr, syscolor8) ; ptr += dest->pitch ; } } } else if (dest->depth == 16) { Uint16 * ptr = dest->data ; ptr += dest->pitch * y / 2 + x ; if (drawing_stipple != 0xFFFFFFFF) { while (h--) { if (drawing_stipple & 1) _Pixel16 (ptr, syscolor16, syscolor16_alpha) ; drawing_stipple = ((drawing_stipple << 1) | (drawing_stipple & 0x80000000 ? 1:0)); ptr += dest->pitch / 2 ; } } else { while (h--) { _Pixel16 (ptr, syscolor16, syscolor16_alpha) ; ptr += dest->pitch / 2 ; } } } } /* * FUNCTION : gr_gline * * Draw an horizontal line * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * x, y Coordinates of the top-left pixel * w Width in pixels * * RETURN VALUE : * None * */ void gr_hline (GRAPH * dest, REGION * clip, int x, int y, int w) { REGION base_clip ; if (!dest) dest = scrbitmap ; if (!clip) { clip = &base_clip ; clip->x = 0 ; clip->y = 0 ; clip->x2 = dest->width-1 ; clip->y2 = dest->height-1 ; } dest->modified = 1 ; if (w < 0) w = -w, x -= w-1 ; if (y < clip->y || y > clip->y2) return ; if (x < clip->x) w += x-clip->x, x = clip->x ; if (x+w > clip->x2) w = clip->x2+1-x ; if (w < 1) return ; if (dest->depth == 8) { Uint8 * ptr = dest->data ; ptr += dest->pitch * y + x ; if (drawing_stipple == 0xFFFFFFFF) _HLine8_nostipple (ptr, w) ; else _HLine8_stipple (ptr, w) ; } else if (dest->depth == 16) { Uint16 * ptr = dest->data ; ptr += dest->pitch * y / 2 + x ; if (drawing_stipple == 0xFFFFFFFF) _HLine16_nostipple (ptr, w) ; else _HLine16_stipple (ptr, w) ; } else if (dest->depth == 1) { Uint8 * ptr = dest->data; int mask ; ptr += dest->pitch * y + x/8; mask = (1 << (7-(x & 7))); while (w--) { if (!syscolor8) *ptr &= ~mask; else *ptr |= mask; mask >>= 1; if (!mask) { mask = 0x80; ptr++; } } } } /* * FUNCTION : gr_box * * Draw a filled rectangle * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * x, y Coordinates of the top-left pixel * w Width in pixels * h Height in pixels * * RETURN VALUE : * None * */ void gr_box (GRAPH * dest, REGION * clip, int x, int y, int w, int h) { REGION base_clip ; if (!dest) dest = scrbitmap ; if (!clip) { clip = &base_clip ; clip->x = 0 ; clip->y = 0 ; clip->x2 = dest->width-1 ; clip->y2 = dest->height-1 ; } dest->modified = 1 ; if (w < 0) w = -w, x -= w ; if (h < 0) h = -h, y -= h ; if (x < clip->x) w += x-clip->x, x = clip->x ; if (y < clip->y) h += y-clip->y, y = clip->y ; if (x+w > clip->x2) w = clip->x2+1-x ; if (y+h > clip->y2) h = clip->y2+1-y ; if (w < 1 || h < 1) return ; if (dest->depth == 8) { Uint8 * ptr = dest->data ; ptr += dest->pitch * y + x ; while (h--) { _HLine8_nostipple (ptr, w) ; ptr += dest->pitch ; } } else if (dest->depth == 16) { Uint16 * ptr = dest->data ; ptr += dest->pitch * y / 2 + x ; while (h--) { _HLine16_nostipple (ptr, w) ; ptr += dest->pitch/2 ; } } else if (dest->depth == 1) { while (h--) gr_hline (dest, clip, x, y+h, w); } } /* * FUNCTION : gr_rectangle * * Draw a rectangle (non-filled) * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * x, y Coordinates of the top-left pixel * w Width in pixels * h Height in pixels * * RETURN VALUE : * None * */ void gr_rectangle (GRAPH * dest, REGION * clip, int x, int y, int w, int h) { int stipple = drawing_stipple; if (w < 0) w = -w, x -= w ; if (h < 0) h = -h, y -= h ; gr_hline (dest, clip, x, y, w) ; if (h > 1) gr_vline (dest, clip, x+w-1, y, h) ; drawing_stipple = stipple; if (w > 1 && h > 1) { gr_vline (dest, clip, x, y, h) ; gr_hline (dest, clip, x, y+h-1, w) ; } } /* * FUNCTION : gr_circle * * Draw a circle * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * x, y Coordinates of the center * r Radius, in pixels * * RETURN VALUE : * None * */ void gr_circle (GRAPH * dest, REGION * clip, int x, int y, int r) { int cx = 0, cy = r ; int lcx = -1, lcy = -1; int df = 1-r, de = 3, dse = -2*r + 5 ; REGION base_clip ; int color = 0; if (!dest) dest = scrbitmap ; if (!clip) { clip = &base_clip ; clip->x = 0 ; clip->y = 0 ; clip->x2 = dest->width-1 ; clip->y2 = dest->height-1 ; } dest->modified = 1 ; if (dest->depth == 8) { color = syscolor8; } else if (dest->depth == 16) { color = syscolor16; } do { if (drawing_stipple & 1) { if (lcx != cx) { gr_put_pixelc (dest, clip, x-cx, y-cy, color) ; if (x-cx!=x+cx) gr_put_pixelc (dest, clip, x+cx, y-cy, color) ; if (y-cy != y+cy) { gr_put_pixelc (dest, clip, x-cx, y+cy, color) ; if (x-cx!=x+cx) gr_put_pixelc (dest, clip, x+cx, y+cy, color) ; } if (y-cx != y-cy) { gr_put_pixelc (dest, clip, x-cy, y-cx, color) ; if (x-cy!=x+cy) gr_put_pixelc (dest, clip, x+cy, y-cx, color) ; } if (y-cx != y+cx && y+cy != y+cx) { gr_put_pixelc (dest, clip, x-cy, y+cx, color) ; if (x-cy!=x+cy) gr_put_pixelc (dest, clip, x+cy, y+cx, color) ; } } } drawing_stipple = ((drawing_stipple << 1) | (drawing_stipple & 0x80000000 ? 1:0)); lcx = cx; lcy = cy; cx++ ; if (df < 0) df += de, de += 2, dse += 2 ; else df += dse, de += 2, dse += 4, cy-- ; } while (cx <= cy) ; } /* * FUNCTION : gr_fcircle * * Draw a filled circle * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * x, y Coordinates of the center * r Radius, in pixels * * RETURN VALUE : * None * */ void gr_fcircle (GRAPH * dest, REGION * clip, int x, int y, int r) { int cx = 0, cy = r ; int lcx = -1, lcy = -1; int df = 1-r, de = 3, dse = -2*r + 5 ; int old_stipple = drawing_stipple; drawing_stipple = 0xFFFFFFFF; do { if (lcy != cy) { gr_hline (dest, clip, x-cx, y-cy, 2*cx) ; if (y-cy != y+cy) gr_hline (dest, clip, x-cx, y+cy, 2*cx) ; } if (lcx != cx) { if (y-cx != y-cy) gr_hline (dest, clip, x-cy, y-cx, 2*cy) ; if (y-cx != y+cx && y+cy != y+cx) gr_hline (dest, clip, x-cy, y+cx, 2*cy) ; } lcx = cx; lcy = cy; cx++ ; if (df < 0) df += de, de += 2, dse += 2 ; else df += dse, de += 2, dse += 4, cy-- ; } while (cx <= cy) ; drawing_stipple = old_stipple; } /* * FUNCTION : gr_line * * Draw a line * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * x, y Coordinates of the first point * w, h Distance to the second point * * RETURN VALUE : * None * */ void gr_line (GRAPH * dest, REGION * clip, int x, int y, int w, int h) { int n, m, hinc, vinc ; int i1, i2, dd ; REGION base_clip ; if (!w) { gr_vline (dest, clip, x, y, h) ; return ; } if (!h) { gr_hline (dest, clip, x, y, w) ; return ; } if (!dest) dest = scrbitmap ; if (!clip) { clip = &base_clip ; clip->x = 0 ; clip->y = 0 ; clip->x2 = dest->width-1 ; clip->y2 = dest->height-1 ; } dest->modified = 1 ; /* Clipping de la lnea - INCORRECTO pero funcional */ if (x < clip->x) /* izquierda */ { if (x+w < clip->x) return; n = clip->x - x ; m = w ? n*h/ABS(w) : 0; x += n, w -= n, y += m, h -= m ; if (w == 0) return; } if (x+w < clip->x) /* w < 0 */ { n = clip->x - (x+w) ; m = w ? n*h/ABS(w) : 0 ; w += n, h -= m ; if (w == 0) return; } if (y < clip->y) /* arriba */ { if (y+h < clip->y) return; m = clip->y - y ; n = h ? m*w/ABS(h) : 0 ; x += n, w -= n, y += m, h -= m ; if (h == 0) return; } if (y+h < clip->y) /* h < 0 */ { m = clip->y - (y+h) ; n = h ? m*w/ABS(h) : 0; w -= n, h += m ; if (h == 0) return; } if (x > clip->x2) /* derecha */ { if (x+w > clip->x2) return; n = x - clip->x2 ; m = w ? n*h/ABS(w) : 0; x -= n, w += n, y += m, h -= m ; if (w == 0) return; } if (x+w > clip->x2) /* w > 0 */ { n = (x+w) - clip->x2 ; m = w ? n*h/ABS(w) : 0; w -= n, h -= m ; if (w == 0) return; } if (y > clip->y2) /* abajo */ { if (y+h > clip->y2) return; m = y - clip->y2 ; n = m*w/ABS(h); x += n, w -= n, y -= m, h += m ; if (h == 0) return; } if (y+h > clip->y2) /* h > 0 */ { m = (y+h) - clip->y2 ; n = h ? m*w/ABS(h) : 0; w -= n, h -= m ; if (h == 0) return; } hinc = w > 0 ? 1:-1 ; vinc = h > 0 ? dest->pitch:-(int)dest->pitch ; if (dest->depth == 16) vinc /= 2; /* Aqu va una implementacin deprisa y corriendo de Bresenham */ w = ABS(w) ; h = ABS(h) ; if (w > h) { i1 = 2 * h ; dd = i1 - w ; i2 = dd - w ; } else { i1 = 2 * w ; dd = i1 - h ; i2 = dd - h ; } if (dest->depth == 8) { Uint8 * ptr = (Uint8 *)dest->data + dest->pitch*y + x; if (w > h) while (w--) { if (drawing_stipple & 1) _Pixel8(ptr, syscolor8) ; drawing_stipple = ((drawing_stipple << 1) | (drawing_stipple & 0x80000000 ? 1:0)); if (dd >= 0) ptr += hinc+vinc, dd += i2 ; else ptr += hinc, dd += i1 ; } else while (h--) { if (drawing_stipple & 1) _Pixel8(ptr, syscolor8 ) ; drawing_stipple = ((drawing_stipple << 1) | (drawing_stipple & 0x80000000 ? 1:0)); if (dd >= 0) ptr += vinc+hinc, dd += i2 ; else ptr += vinc, dd += i1 ; } } else if (dest->depth == 16) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x; if (w > h) while (w--) { if (drawing_stipple & 1) _Pixel16(ptr, syscolor16, syscolor16_alpha) ; drawing_stipple = ((drawing_stipple << 1) | (drawing_stipple & 0x80000000 ? 1:0)); if (dd >= 0) ptr += hinc+vinc, dd += i2 ; else ptr += hinc, dd += i1 ; } else while (h--) { if (drawing_stipple & 1) _Pixel16(ptr, syscolor16, syscolor16_alpha) ; drawing_stipple = ((drawing_stipple << 1) | (drawing_stipple & 0x80000000 ? 1:0)); if (dd >= 0) ptr += vinc+hinc, dd += i2 ; else ptr += vinc, dd += i1 ; } } } /* * FUNCTION : gr_bezier * * Draw a bezier curve * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * params Pointer to an integer array with the parameters: * * x1, y1 * x2, y2 * x3, y3 * x4, y4 Curve points * level Curve smoothness (1 to 15, 15 is more) * * RETURN VALUE : * None * */ void gr_bezier (GRAPH * dest, REGION * clip, int * params) { const int x1 = params[0]; const int y1 = params[1]; const int x2 = params[2]; const int y2 = params[3]; const int x3 = params[4]; const int y3 = params[5]; const int x4 = params[6]; const int y4 = params[7]; int level = params[8]; float x = (float)x1, y = (float)y1; float xp = x, yp = y; float delta; float dx, d2x, d3x; float dy, d2y, d3y; float a, b, c; int i; int n = 1; /* Compute number of iterations */ if(level < 1) level=1; if(level >= 15) level=15; while (level-- > 0) n*= 2; delta = 1.0f / (float)n; /* Compute finite differences */ /* a, b, c are the coefficient of the polynom in t defining the parametric curve */ /* The computation is done independently for x and y */ a = (float)(-x1 + 3*x2 - 3*x3 + x4); b = (float)(3*x1 - 6*x2 + 3*x3); c = (float)(-3*x1 + 3*x2); d3x = 6 * a * delta*delta*delta; d2x = d3x + 2 * b * delta*delta; dx = a * delta*delta*delta + b * delta*delta + c * delta; a = (float)(-y1 + 3*y2 - 3*y3 + y4); b = (float)(3*y1 - 6*y2 + 3*y3); c = (float)(-3*y1 + 3*y2); d3y = 6 * a * delta*delta*delta; d2y = d3y + 2 * b * delta*delta; dy = a * delta*delta*delta + b * delta*delta + c * delta; for (i = 0; i < n; i++) { x += dx; dx += d2x; d2x += d3x; y += dy; dy += d2y; d2y += d3y; if((Sint16)(xp) != (Sint16)(x) || (Sint16)(yp) != (Sint16)(y)) { gr_line(dest,clip,(Sint16)xp,(Sint16)yp,(Sint16)x-(Sint16)xp,(Sint16)y-(Sint16)yp); } xp = x; yp = y; } } /* * FUNCTION : info_object * * Internal function used to return information about a primitive object * * PARAMS : * dr Drawing object * bbox Pointer to a REGION to be filled with the bounding box * * RETURN VALUE : * 1 if the primitive changed since last frame * */ int info_object (DRAWING_OBJECT * dr, REGION * clip) { REGION newclip; switch (dr->type) { case DRAWOBJ_CIRCLE: newclip.x = dr->x1-dr->x2; newclip.y = dr->y1-dr->x2; newclip.x2 = dr->x1+dr->x2; newclip.y2 = dr->y1+dr->x2; break; case DRAWOBJ_CURVE: newclip.x = dr->x1; newclip.y = dr->y1; newclip.x2 = dr->x4; newclip.y2 = dr->y4; break; default: newclip.x = dr->x1; newclip.y = dr->y1; newclip.x2 = dr->x2; newclip.y2 = dr->y2; break; } if (newclip.x != clip->x || newclip.y != clip->y || newclip.x2 != clip->x2 || newclip.y2 != clip->y2) { *clip = newclip; return 1; } return 0; } /* * FUNCTION : draw_object * * Internal function used to draw a primitive object * * PARAMS : * dr Drawing object * * RETURN VALUE : * None * */ static void draw_object (DRAWING_OBJECT * dr, REGION * clip) { int b8 = syscolor8; int b16 = syscolor16; syscolor8 = dr->color8; syscolor16 = dr->color16; switch (dr->type) { case DRAWOBJ_LINE: gr_line (scrbitmap, clip, dr->x1, dr->y1, dr->x2-dr->x1, dr->y2-dr->y1); break; case DRAWOBJ_RECT: gr_rectangle (scrbitmap, clip, dr->x1, dr->y1, dr->x2-dr->x1, dr->y2-dr->y1); break; case DRAWOBJ_BOX: gr_box (scrbitmap, clip, dr->x1, dr->y1, dr->x2-dr->x1, dr->y2-dr->y1); break; case DRAWOBJ_CIRCLE: gr_circle (scrbitmap, clip, dr->x1, dr->y1, dr->x2); break; case DRAWOBJ_FCIRCLE: gr_fcircle (scrbitmap, clip, dr->x1, dr->y1, dr->x2); break; case DRAWOBJ_CURVE: gr_bezier (scrbitmap, clip, &dr->x1); break; } syscolor8 = b8; syscolor16 = b16; } /* * FUNCTION : gr_drawing_new * * Create a new on-screen drawing object * * PARAMS : * drawing Object type and coordinates * z Z Coordinate * * RETURN VALUE : * An integer identifier, representing the new object, or -1 if error * */ int gr_drawing_new (DRAWING_OBJECT drawing, int z) { DRAWING_OBJECT * dr = malloc (sizeof(DRAWING_OBJECT)); if (!dr) return -1; /* Fill the struct and register the new object */ *dr = drawing; dr->next = drawing_objects; dr->color8 = syscolor8; dr->color16 = syscolor16; dr->id = gr_new_object (z, info_object, draw_object, dr); drawing_objects = dr; return dr->id; } /* * FUNCTION : gr_drawing_destroy * * Destroy a new on-screen drawing object * * PARAMS : * id Object id returned by gr_drawing_new * or 0 to destroy every object * * RETURN VALUE : * None * */ void gr_drawing_destroy (int id) { DRAWING_OBJECT * dr=drawing_objects; DRAWING_OBJECT * ldr=NULL; DRAWING_OBJECT * ndr=NULL; while (dr) { ndr = dr->next; if(!id || dr->id == id){ gr_destroy_object (dr->id); if(ldr) { ldr->next = dr->next; } free(dr); if (drawing_objects == dr) drawing_objects = ndr; if(id) return; dr = ldr; } ldr = dr; dr = ndr; } } /* * FUNCTION : gr_drawing_move * * Move an on-screen drawing object to a new coordinates, * relative to the first point in the primitive * * PARAMS : * id Object id returned by gr_drawing_new * x, y New coordinates * * RETURN VALUE : * None * */ void gr_drawing_move (int id, int x, int y) { DRAWING_OBJECT * dr=drawing_objects; while (dr) { if (dr->id == id) { int incx = x - dr->x1; int incy = y - dr->y1; dr->x1 += incx; dr->y1 += incy; if (dr->type == DRAWOBJ_CIRCLE || dr->type == DRAWOBJ_FCIRCLE) return; dr->x2 += incx; dr->y2 += incy; dr->x3 += incx; dr->y3 += incy; dr->x4 += incx; dr->y4 += incy; return; } dr = dr->next; } } /* * FUNCTION : gr_drawing_alpha * * Sets the drawing alpha value for primitives * * PARAMS : * alpha New alpha (0-255) * * RETURN VALUE : * None * */ void gr_setalpha (int value) { value &= 0xFF; drawing_alpha = value; if (enable_16bits) { drawing_alpha16 = gr_alpha16(255-value); drawing_alpha8 = gr_alpha8(value); syscolor16_alpha = gr_alpha16(value)[syscolor16]; } else { drawing_alpha8 = gr_alpha8(value); } } /* * FUNCTION : gr_drawing_alpha * * Sets the drawing color * * PARAMS : * alpha New color (16 bits if enable_16bits == 1) * * RETURN VALUE : * None * */ void gr_setcolor (int c) { int r, g, b; if (c == 0) { syscolor8 = 0; syscolor16 = 0; } else if (!enable_16bits) { syscolor8 = c; } else { if (c > 255 || c < 0) { gr_get_rgb (c, &r, &g, &b); syscolor8 = gr_find_nearest_color (r, g, b); } else { syscolor8 = c; } syscolor16 = c ; } if (drawing_alpha != 255) syscolor16_alpha = gr_alpha16(drawing_alpha)[syscolor16]; } Fenix/fxi/src/g_texts.c0000644000000000000000000003503010607526760014035 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : g_texts.c * DESCRIPTION : Text manipulation routines * * HISTORY: 0.82 - New extended FONT format. Font functions moved to g_font. * 0.74 - gr_text_new_var modified to support data types * 0.74 - gr_text_put_all modified to suppor new data types * 0.72 - Corrected gr_text_bitmap (WRITE_IN_MAP) */ #ifdef TARGET_BEOS #include #else #include #endif #include #include #include "fxi.h" #define MAX_TEXTS 512 int fntcolor8 = -1 ; Uint16 fntcolor16 = 0xFFFF ; typedef struct _text { int id ; int on ; /* 1 - Texto ; 2 - VarSTR; 3 - VarINT; 4 - VarFLOAT; 5 - VarWORD; 6 - VarBYTE */ int fontid ; int x ; int y ; int z ; int alignment ; int color8 ; int color16 ; int objectid ; int last_value ; char * text ; /* Memoria dinmica */ const void * var ; /* CHANGED TO VOID to allow diff. data types */ } TEXT; TEXT texts[MAX_TEXTS] ; int text_nextid = 1 ; int text_count = 0 ; #ifndef WIN32 char *strrev(char *str) { char *p1, *p2; if (! str || ! *str) return str; for (p1 = str, p2 = str + strlen(str) - 1; p2 > p1; ++p1, --p2) { *p1 ^= *p2; *p2 ^= *p1; *p1 ^= *p2; } return str; } #endif /* * FUNCTION : get_text * * Returns the character string of a given text * (may be the representation of a integer or float value) * * PARAMS : * text Pointer to the text object * * RETURN VALUE : * String contained within the text * */ static const char * get_text (TEXT * text) { static char buffer[128]; char * aux; int w; switch (text->on) { case TEXT_TEXT: return text->text; case TEXT_STRING: return string_get(*(int*)text->var) ; case TEXT_INT: sprintf (buffer, "%d", *(int *)text->var) ; return buffer ; case TEXT_DWORD: sprintf (buffer, "%u", *(int *)text->var) ; return buffer ; case TEXT_FLOAT: sprintf (buffer, "%f", *(float *)text->var) ; /* REMOVING TRAILING 0s */ aux = strrev(buffer) ; w=0 ; while (*aux=='0') w++, aux++; if (*aux=='.') aux-- ; strcpy(buffer,aux) ; strrev(buffer) ; return buffer ; case TEXT_BYTE: sprintf (buffer, "%d", *(Uint8 *)text->var) ; return buffer ; case TEXT_SBYTE: sprintf (buffer, "%d", *(Sint8 *)text->var) ; return buffer ; case TEXT_CHAR: sprintf (buffer, "%c", *(Uint8 *)text->var) ; return buffer ; case TEXT_WORD: sprintf (buffer, "%d", *(Uint16 *)text->var) ; return buffer ; case TEXT_SHORT: sprintf (buffer, "%d", *(Sint16 *)text->var) ; return buffer ; case TEXT_CHARARRAY: return (const char *)(text->var); } return NULL; } /* * FUNCTION : info_text * * Returns information about a text object * * PARAMS : * text Pointer to the text object * bbox Region to update with the text bounding box * * RETURN VALUE : * 1 if the text has changed since last frame * */ static int info_text (TEXT * text, REGION * bbox) { const char * str = get_text(text); int x, y, width, height; REGION prev = *bbox; FONT * font; // Splinter if (!str) return 1; font = gr_font_get (text->fontid); if (font == NULL) { return 1; } /* Calculate the text dimensions */ x = text->x; y = text->y; width = gr_text_width (text->fontid, str); height = gr_text_height (text->fontid, str); /* Update the font's maxheight (if needed) */ if (font->maxheight == 0) { int c; for (c = 0 ; c < 256 ; c++) { if (font->glyph[c].bitmap == NULL) continue; if (font->maxheight < (int)font->glyph[c].bitmap->height + font->glyph[c].yoffset) font->maxheight = (int)font->glyph[c].bitmap->height + font->glyph[c].yoffset; } } /* Adjust top-left coordinates for text alignment */ switch (text->alignment) { case 1: case 4: case 7: x -= width/2; break; case 2: case 5: case 8: x -= width-1; break; } switch (text->alignment) { case 3: case 4: case 5: y -= font->maxheight/2; break; case 6: case 7: case 8: y -= font->maxheight-1; break; } /* Fill the bounding box */ bbox->x = x; bbox->y = y; bbox->x2 = x+width-1; bbox->y2 = y+height-1; /* Check if the var has changed since last call */ if (bbox->x != prev.x || bbox->y != prev.y || bbox->x2 != prev.x2 || bbox->y2 != prev.y2) return 1; switch (text->on) { case TEXT_TEXT: return 0; case TEXT_STRING: case TEXT_FLOAT: case TEXT_INT: case TEXT_DWORD: if (text->last_value == *(int *)text->var) return 0; text->last_value = *(int *)text->var; return 1; case TEXT_BYTE: case TEXT_SBYTE: case TEXT_CHAR: if (text->last_value == *(Uint8 *)text->var) return 0; text->last_value = *(Uint8 *)text->var; return 1; case TEXT_WORD: case TEXT_SHORT: if (text->last_value == *(Uint16 *)text->var) return 0; text->last_value = *(Uint16 *)text->var; return 1; case TEXT_CHARARRAY: return 1; } return 0; } /* * FUNCTION : draw_text * * Draws a text object * * PARAMS : * text Pointer to the text object * clip Clipping region * * RETURN VALUE : * None * */ void draw_text (TEXT * text, REGION * clip) { const char * str = get_text(text); int save8, save16; int x, y, width, height; FONT * font; int ret; // Splinter if (!str) return; font = gr_font_get (text->fontid); if (font == NULL) { gr_text_destroy(text->id); return; } /* Calculate the text dimensions */ x = text->x; y = text->y; width = gr_text_width (text->fontid, str); height = gr_text_height (text->fontid, str); /* Update the font's maxheight (if needed) */ if (font->maxheight == 0) { int c; for (c = 0 ; c < 256 ; c++) { if (font->glyph[c].bitmap == NULL) continue; if (font->maxheight < (int)font->glyph[c].bitmap->height + font->glyph[c].yoffset) font->maxheight = (int)font->glyph[c].bitmap->height + font->glyph[c].yoffset; } } /* Adjust top-left coordinates for text alignment */ switch (text->alignment) { case 1: case 4: case 7: x -= width/2; break; case 2: case 5: case 8: x -= width-1; break; } switch (text->alignment) { case 3: case 4: case 5: y -= font->maxheight/2; break; case 6: case 7: case 8: y -= font->maxheight-1; break; } /* Draw the text */ save8 = fntcolor8; save16 = fntcolor16; fntcolor8 = text->color8; fntcolor16 = text->color16; if(!gr_text_put (0, clip, text->fontid, x, y, str)) gr_text_destroy(text->id); fntcolor8 = save8; fntcolor16 = save16; } /* * FUNCTION : gr_text_new * * Create a new text, using a fixed text string * * PARAMS : * fontid Font number * x, y Screen coordinates * alignment Alignment * text Pointer to text * * RETURN VALUE : * None * */ int gr_text_new (int fontid, int x, int y, int alignment, const char * text) { int textid = text_nextid ; if (text_nextid == MAX_TEXTS) { for (textid = 1 ; textid < MAX_TEXTS ; textid++) if (!texts[textid].on) break ; if (textid == MAX_TEXTS) gr_error ("Demasiados textos en pantalla") ; } else text_nextid++ ; text_count++ ; texts[textid].id = textid ; texts[textid].on = 1 ; texts[textid].fontid = fontid ; texts[textid].x = x ; texts[textid].y = y ; texts[textid].z = GLODWORD(TEXTZ) ; texts[textid].alignment = alignment ; texts[textid].text = text ? strdup(text) : 0 ; texts[textid].color8 = fntcolor8 ; texts[textid].color16 = fntcolor16 ; texts[textid].objectid = gr_new_object (texts[textid].z, info_text, draw_text, &texts[textid]); texts[textid].last_value = 0 ; return textid ; } int gr_text_new_var (int fontid, int x, int y, int alignment, const void * var, int type) { int textid = gr_text_new (fontid, x, y, alignment, 0) ; if (textid < 0) return -1 ; texts[textid].on = type ; if (type > 1) texts[textid].var = var ; return textid ; } void gr_text_move (int textid, int x, int y) { if (textid > 0 && textid < text_nextid) { texts[textid].x = x ; texts[textid].y = y ; } } void gr_text_destroy (int textid) { if (textid == 0) { for (textid = 1 ; textid < text_nextid ; textid++) { if (texts[textid].on) { gr_destroy_object (texts[textid].objectid); if (texts[textid].text) free (texts[textid].text) ; texts[textid].on = 0 ; } } text_count = 0 ; text_nextid = 1 ; return ; } if (textid > 0 && textid < text_nextid) { if (!texts[textid].on) return ; gr_destroy_object (texts[textid].objectid); if (texts[textid].text) free (texts[textid].text) ; texts[textid].on = 0 ; if (textid == text_nextid-1) { while (text_nextid > 1 && !texts[text_nextid-1].on) text_nextid-- ; } text_count-- ; } } int gr_text_width (int fontid, const unsigned char * text) { return gr_text_widthn (fontid, text, strlen(text)); } int gr_text_widthn (int fontid, const unsigned char * text, int n) { int l = 0 ; FONT * f ; if (!text || !*text) return 0; if (fontid < 0 || fontid > 255 || !fonts[fontid]) { gr_con_printf ("Tipo de letra incorrecto (%d)", fontid) ; return 0; } f = fonts[fontid] ; while (*text && n--) { switch (f->charset) { case CHARSET_ISO8859: l += f->glyph[dos_to_win[*text]].xadvance ; break; case CHARSET_CP850: l += f->glyph[*text].xadvance ; break; } text++; } return l ; } int gr_text_margintop (int fontid, const unsigned char * text) { int minyoffset = 0x7FFFFFFF ; FONT * f ; if (!text || !*text) return 0; if (fontid < 0 || fontid > 255 || !fonts[fontid]) { gr_con_printf ("Tipo de letra incorrecto (%d)", fontid) ; return 0; } f = fonts[fontid] ; while (*text) { switch (f->charset) { case CHARSET_ISO8859: if (minyoffset > f->glyph[dos_to_win[*text]].yoffset) minyoffset = f->glyph[dos_to_win[*text]].yoffset; break; case CHARSET_CP850: if (minyoffset > f->glyph[*text].yoffset) minyoffset = f->glyph[*text].yoffset; break; } text++ ; } return minyoffset ; } int gr_text_height (int fontid, const unsigned char * text) { int l = 0; int margin ; FONT * f ; if (fontid < 0 || fontid > 255 || !fonts[fontid]) { gr_con_printf ("Tipo de letra incorrecto (%d)", fontid) ; return 0; } if (!text || !*text) return 0; margin = gr_text_margintop (fontid, text); f = fonts[fontid] ; while (*text) { if (f->glyph[*text].bitmap) { switch (f->charset) { case CHARSET_ISO8859: if (l < f->glyph[dos_to_win[*text]].yoffset + (int)f->glyph[dos_to_win[*text]].bitmap->height) { l = f->glyph[dos_to_win[*text]].yoffset + (int)f->glyph[dos_to_win[*text]].bitmap->height ; } break; case CHARSET_CP850: if (f->glyph[*text].yoffset + (int)f->glyph[*text].bitmap->height > l) { l = f->glyph[*text].yoffset + (int)f->glyph[*text].bitmap->height ; } break; } } text++ ; } return l - margin ; } int gr_text_put (GRAPH * dest, REGION * clip, int fontid, int x, int y, const unsigned char * text) { GRAPH * ch ; FONT * f ; Uint8 current_char; int flags ; int save16, save8; if (fontid < 0 || fontid > 255 || !fonts[fontid]) { gr_con_printf ("Tipo de letra incorrecto (%d)", fontid) ; return 0; } if (!text || !*text) return 1; if (!dest) dest = scrbitmap ; f = fonts[fontid] ; /* Se permite imprimir texto antes de inicializar los globales */ flags = globaldata ? GLODWORD(TEXT_FLAGS) : 0 ; save8 = syscolor8; save16 = syscolor16; if (fntcolor8 == -1) { gr_setcolor (dest->depth == 8 ? gr_find_nearest_color(255,255,255):gr_rgb(255,255,255)); } else { syscolor8 = fntcolor8; syscolor16 = fntcolor16; } while (*text) { switch (f->charset) { case CHARSET_ISO8859: current_char = dos_to_win[*text]; break; case CHARSET_CP850: current_char = *text; break; default: current_char = 0; break; } ch = f->glyph[current_char].bitmap ; if (ch) { gr_blit (dest, clip, x + f->glyph[current_char].xoffset, y + f->glyph[current_char].yoffset, flags, ch) ; } x += f->glyph[current_char].xadvance ; text++ ; } syscolor8 = save8; syscolor16 = save16; return 1; } GRAPH * gr_text_bitmap (int fontid, const char * text, int alignment) { GRAPH * gr ; int x, y ; FONT * f ; // Splinter if (!text || !*text) return NULL; if (fontid < 0 || fontid > 255 || !fonts[fontid]) { gr_con_printf ("Tipo de letra incorrecto (%d)", fontid) ; return NULL; } f = fonts[fontid] ; /* Un refresco de paleta en mitad de gr_text_put puede provocar efectos * desagradables al modificar el tipo de letra del sistema */ if (palette_changed) gr_refresh_palette() ; gr = bitmap_new_syslib (gr_text_width (fontid, text), gr_text_height (fontid, text), enable_16bits ? 16:8, 1) ; assert (gr) ; gr_clear (gr) ; if (!gr_text_put (gr, 0, fontid, 0, -gr_text_margintop(fontid, text), text)) { bitmap_destroy(gr); return NULL; } switch (alignment) { case 0: case 1: case 2: y = 0 ; break ; case 3: case 4: case 5: y = gr->height/2 ; break ; default: y = gr->height-1 ; break ; } switch (alignment) { case 0: case 3: case 6: x = 0 ; break ; case 1: case 4: case 7: x = gr->width/2 ; break ; default: x = gr->width-1 ; break ; } bitmap_add_cpoint (gr, x, y) ; return gr ; } void gr_text_setcolor (int c) { int r, g, b; if (c == 0) { fntcolor8 = 0; fntcolor16 = 0; } else if (!enable_16bits) { fntcolor8 = c ; } else { gr_get_rgb (c, &r, &g, &b); fntcolor8 = gr_find_nearest_color (r, g, b); fntcolor16 = c ; } } int gr_text_getcolor() { return ((enable_16bits)?fntcolor16:fntcolor8) ; } Fenix/fxi/src/i_copy.c0000644000000000000000000001042210607526760013640 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : i_copy.c * DESCRIPTION : Struct copy functions based on varspace type info * * HISTORY: 0.85 - First version */ #include #include #include #ifdef TARGET_BEOS #include #else #include #endif #include #include #include "fxi.h" static int copytype (void * dst, void * src, DCB_TYPEDEF * var); /* * FUNCTION : copyvars * * Copy data using a varspace's type information. It updates the * destination pointer while walking the variables. * * PARAMS : * dst Pointer to the destination memory * src Pointer to the data * var Pointer to the type array * nvars Number of variables (length of var array) * * RETURN VALUE : * Number of bytes actually copied * */ int copyvars (void * dst, void * src, DCB_VAR * var, int nvars) { int result = 0; int partial; for (; nvars > 0; nvars--, var++) { partial = copytype (dst, src, &var->Type); src = (Uint8*)src + partial; dst = (Uint8*)dst + partial; result += partial; } return result; } /* * FUNCTION : copytypes * * Copy data from memory using type information stored in memory * * PARAMS : * dst Pointer to the destination memory * src Pointer to the source * var Pointer to the type array * nvars Number of variables (length of var array) * * RETURN VALUE : * Number of bytes actually coppied * */ int copytypes (void * dst, void * src, DCB_TYPEDEF * var, int nvars, int reps) { int result = 0; int partial; DCB_TYPEDEF * _var = var; int _nvars = nvars ; for (; reps > 0; reps--){ var = _var; nvars = _nvars; for (; nvars > 0; nvars--, var++) { partial = copytype(dst, src, var); result += partial; src = (Uint8*)src + partial; dst = (Uint8*)dst + partial; } } return result; } /* * FUNCTION : copytype * * Copy one variable using the given type information. * * PARAMS : * dst Pointer to the file object * src Pointer to the data * var Pointer to the variable type * * RETURN VALUE : * Number of bytes actually written * */ static int copytype (void * dst, void * src, DCB_TYPEDEF * var) { int count = 1; int result = 0; int n = 0; for (;;) { switch (var->BaseType[n]) { case TYPE_FLOAT: case TYPE_INT: case TYPE_DWORD: memcpy (dst, src, 4 * count); return 4 * count; case TYPE_WORD: case TYPE_SHORT: memcpy (dst, src, 2 * count); return 2 * count; case TYPE_BYTE: case TYPE_SBYTE: case TYPE_CHAR: memcpy (dst, src, count); return count; case TYPE_STRING: while (count--) { string_discard(*(int *)dst); string_use(*(int *)src); *(int *)dst = *(int *)src; dst = (void *)((int *)dst + 1); src = (void *)((int *)src + 1); result += 4; } return result; case TYPE_ARRAY: count *= var->Count[n]; n++; continue; case TYPE_STRUCT: for (; count ; count--) { int partial = copyvars(dst, src, dcb.varspace_vars[var->Members], dcb.varspace[var->Members].NVars); src = (Uint8*)src + partial; dst = (Uint8*)dst + partial; result += partial; } break; default: gr_error ("No es posible copiar esta estructura"); break; } break; } return result; } Fenix/fxi/src/g_blit.c0000644000000000000000000013116010607526744013623 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : g_blit.c * DESCRIPTION : New blitter (gr_rotated_blit functions) * * HISTORY: 0.82 - Performance/prec. improvements & MMX versions * 0.81 - First version of a new blitter */ #include "fxi.h" #include #include #include #include #include /* Matemticas de punto fijo, basadas en Allegro */ #include "fmath.h" #include /* Define some constants and structs used by the blitter */ typedef struct { int x, y; } _POINT; typedef struct { float x, y; } _POINTF; typedef struct { int x; int y; float s; float t; } VERTEX; typedef _POINTF VECTOR; typedef void (DRAW_SPAN) (GRAPH*,GRAPH*,int,int,int,int,int,int,int); typedef void (DRAW_HSPAN)(void *,void *,int,int); typedef Uint16 (ADDITIVE_BLEND)(Uint16,Uint16); /* Conversion tables used by transparency/blending * * In 16 bits, this two lookup tables will be used as: * * Dest_color = ghost1[screen_color] + ghost2[graphic_color] * * In transparency mode, both tables are the assigned to the ghostcolor * global table (a table that reduces all color components to half) */ Sint16 * ghost1; Sint16 * ghost2; Uint8 * ghost8; /* Calculates additive blend value */ ADDITIVE_BLEND *ablend; int bt; #ifdef MMX_FUNCTIONS Uint16 MMX_additive_blend(Uint16 A, Uint16 B){ Uint8 m[4], n[4]; if (!enable_16bits){ A &= 0xFF ; m[0] = palette[A].r ; m[1] = palette[A].g ; m[2] = palette[A].b ; B &= 0xFF ; n[0] = palette[B].r ; n[1] = palette[B].g ; n[2] = palette[B].b ; }else{ m[0] = ((A & screen->format->Rmask) >> screen->format->Rshift) ; m[1] = ((A & screen->format->Gmask) >> screen->format->Gshift) ; m[2] = ((A & screen->format->Bmask) >> screen->format->Bshift) ; m[0] <<= screen->format->Rloss ; m[1] <<= screen->format->Gloss ; m[2] <<= screen->format->Bloss ; n[0] = ((B & screen->format->Rmask) >> screen->format->Rshift) ; n[1] = ((B & screen->format->Gmask) >> screen->format->Gshift) ; n[2] = ((B & screen->format->Bmask) >> screen->format->Bshift) ; n[0] <<= screen->format->Rloss ; n[1] <<= screen->format->Gloss ; n[2] <<= screen->format->Bloss ; } if(!bt){ #ifdef __GNUC__ __asm__ __volatile__( "movd %0, %%mm0\n" "movd %1, %%mm1\n" "paddusb %%mm1, %%mm0\n" "movd %%mm0, %0\n" "emms\n" : : "m" (m), "m" (n) : "mm0", "mm1", "cc" ); #else _asm{ movd mm0,m movd mm1,n paddusb mm0,mm1 movd m,mm0 emms } #endif }else{ #ifdef __GNUC__ __asm__ __volatile__( "movd %0, %%mm0\n" "movd %1, %%mm1\n" "psubusb %%mm1, %%mm0\n" "movd %%mm0, %0\n" "emms\n" : : "m" (m), "m" (n) : "mm0", "mm1", "cc" ); #else _asm{ movd mm0,m movd mm1,n psubusb mm0,mm1 movd m,mm0 emms } #endif } if(enable_16bits) return gr_rgb(m[0],m[1],m[2]); else return gr_find_nearest_color(m[0],m[1],m[2]); } #endif Uint16 additive_blend(Uint16 A, Uint16 B){ Sint32 r,g,b,r2,g2,b2; gr_get_rgb(B,&r,&g,&b); gr_get_rgb(A,&r2,&g2,&b2); if(!bt){ r+=r2; if(r>255)r=255; g+=g2; if(g>255)g=255; b+=b2; if(b>255)b=255; }else{ r+=(r2-256); if(r<0)r=0; g+=(g2-256); if(g<0)g=0; b+=(b2-256); if(b<0)b=0; } if(enable_16bits) return gr_rgb(r,g,b); else return gr_find_nearest_color(r,g,b); } /* Routine to sort vertexes in y, x order */ static int compare_vertex_y (const VERTEX * a, const VERTEX * b) { if (a->y == b->y) return a->x - b->x; return a->y - b->y; } /* * FUNCTION : gr_draw_span_XXX * * Draw a textures span line into a bitmap. Those functions * represent the inner loop of the blitter. * * This file includes unoptimized C versions of those functions * * There is one version of this function for each bit depth * and blend effect configuration * * PARAMS : * dest Destination bitmap or NULL for screen * orig Pointer to the graphic object to draw * x, y Pixel coordinates of the destination leftmost point * pixels Number of pixels to draw * s, t Texture coordinates of the leftmost point * s2, t2 Texture coordinates of the rightmost point * * RETURN VALUE : * None * */ extern Sint16 * ghost1; extern Sint16 * ghost2; extern Uint8 * ghost8; /* void draw_span_1to1(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint8 * ptr = (Uint8 *)dest->data + dest->pitch*y + x/8 ; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16)/8 + (cs >> 16)/8; Uint8 mask = (0x80 >> ((cs >> 16)/8 & 7)); *ptr |= (*tex & mask); if (ct%8==7) ptr++; cs += incs, ct += inct; } } void draw_span_1to1_nocolorkey(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint8 * ptr = (Uint8 *)dest->data + dest->pitch*y + x/8 ; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16)/8 + (cs >> 16)/8; Uint8 mask = (0x80 >> ((cs >> 16)/8 & 7)); *ptr &= ~mask; *ptr |= (*tex & mask); if (ct%8==7) ptr++; cs += incs, ct += inct; } } */ void draw_span_1to8(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint8 * ptr = (Uint8 *)dest->data + dest->pitch*y + x ; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16)/8; Uint8 mask = (0x80 >> ((cs >> 16) & 7)); if (*tex & mask) *ptr++ = syscolor8; else ptr++; cs += incs, ct += inct; } } void draw_span_8to8_nocolorkey(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint8 * ptr = (Uint8 *)dest->data + dest->pitch*y + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16); *ptr++ = *tex; cs += incs, ct += inct; } } void draw_span_8to8_translucent(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint8 * ptr = (Uint8 *)dest->data + dest->pitch*y + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16); if (*tex != 0) *ptr = ghost8[(*tex << 8) + *ptr]; ptr++; cs += incs, ct += inct; } } void draw_span_8to8(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint8 * ptr = (Uint8 *)dest->data + dest->pitch*y + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16); if (*tex != 0) *ptr = *tex; ptr++; cs += incs, ct += inct; } } void draw_span_8to8_ablend(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint8 * ptr = (Uint8 *)dest->data + dest->pitch*y + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16); if (*tex != 0) *ptr = (Uint8)ablend(*tex,*ptr); ptr++; cs += incs, ct += inct; } } void draw_span_8to8_tablend(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint8 * ptr = (Uint8 *)dest->data + dest->pitch*y + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16); if (*tex != 0) *ptr = (Uint8)ablend(ghost8[(*tex << 8) + *ptr],*ptr); ptr++; cs += incs, ct += inct; } } void draw_span_1to16(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x ; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16)/8; Uint8 mask = (0x80 >> ((cs >> 16) & 7)); if (*tex & mask) *ptr++ = syscolor16; else ptr++; cs += incs, ct += inct; } } void draw_span_8to16(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16); if (*tex != 0) *ptr = colorequiv[*tex]; ptr++; cs += incs, ct += inct; } } void draw_span_8to16_ablend (GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16); if (*tex != 0) *ptr = ablend(colorequiv[*tex],*ptr); ptr++; cs += incs, ct += inct; } } void draw_span_8to16_tablend(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16); if (*tex != 0) *ptr = ablend((Uint16)(ghost1[colorequiv[*tex]] + ghost2[*ptr]),*ptr); ptr++; cs += incs, ct += inct; } } void draw_span_8to16_translucent(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16); if (*tex != 0) *ptr = ghost1[colorequiv[*tex]] + ghost2[*ptr]; ptr++; cs += incs, ct += inct; } } void draw_span_8to16_nocolorkey(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint8 * tex = (Uint8 *)orig->data + orig->pitch*(ct >> 16) + (cs >> 16); *ptr++ = colorequiv[*tex]; cs += incs, ct += inct; } } void draw_span_16to16(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint16 * tex = (Uint16 *)orig->data + orig->pitch*(ct >> 16)/2 + (cs >> 16); if (*tex != 0) *ptr = *tex; ptr++; cs += incs, ct += inct; } } void draw_span_16to16_ablend(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint16 * tex = (Uint16 *)orig->data + orig->pitch*(ct >> 16)/2 + (cs >> 16); if (*tex != 0) *ptr = ablend(*tex,*ptr); ptr++; cs += incs, ct += inct; } } void draw_span_16to16_tablend(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint16 * tex = (Uint16 *)orig->data + orig->pitch*(ct >> 16)/2 + (cs >> 16); if (*tex != 0) *ptr = ablend((Uint16)(ghost1[*tex] + ghost2[*ptr]),*ptr); ptr++; cs += incs, ct += inct; } } void draw_span_16to16_translucent(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint16 * tex = (Uint16 *)orig->data + orig->pitch*(ct >> 16)/2 + (cs >> 16); if (*tex != 0) *ptr = ghost1[*tex] + ghost2[*ptr]; ptr++; cs += incs, ct += inct; } } void draw_span_16to16_nocolorkey(GRAPH * dest, GRAPH * orig, int x, int y, int pixels, int s, int t, int incs, int inct) { Uint16 * ptr = (Uint16 *)dest->data + dest->pitch*y/2 + x; int cs = s, ct = t, i; for (i = 0 ; i < pixels ; i++) { Uint16 * tex = (Uint16 *)orig->data + orig->pitch*(ct >> 16)/2 + (cs >> 16); *ptr++ = *tex; cs += incs, ct += inct; } } /* * FUNCTION : gr_draw_hspan_XXX * * Draw a textures span line into a bitmap. Those functions * represent the inner loop of the blitter, but in an * unscaled, non-rotated case (for gr_blit). Texture/screen * coordinates are already calculated in origin/dest pointers. * * This file includes unoptimized C versions of those functions * * There is one version of this function for each bit depth * and blend effect configuration * * PARAMS : * dest Destination pointer * tex Origin pointer * pixels Number of pixels to draw * incs Texture increment: must be 1 or -1 * * RETURN VALUE : * None * */ /* Parameter for 1to8 and 16to8 */ static int posx; void draw_hspan_1to8 (Uint8 * scr, Uint8 * tex, int pixels, int incs) { int i; int mask = (0x80 >> (posx & 7)); for (i = 0 ; i < pixels ; i++) { if (*tex & mask) *scr++ = syscolor8; else scr++; if (incs < 0) { if (mask == 0x80) mask = 0x01, tex--; else mask <<= 1; } else { if (mask == 0x01) mask = 0x80, tex++; else mask >>= 1; } } } void draw_hspan_8to8_nocolorkey(Uint8 * scr, Uint8 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { *scr++ = *tex; tex += incs; } } void draw_hspan_8to8_translucent(Uint8 * scr, Uint8 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex != 0) *scr = ghost8[(*tex << 8) + *scr]; scr++; tex += incs; } } void draw_hspan_8to8_tablend(Uint8 * scr, Uint8 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex != 0) *scr = (Uint8)ablend(ghost8[(*tex << 8) + *scr],*scr); scr++; tex += incs; } } void draw_hspan_8to8_ablend(Uint8 * scr, Uint8 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex != 0) *scr = (Uint8)ablend(*tex, *scr); scr++; tex += incs; } } void draw_hspan_8to8(Uint8 * scr, Uint8 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex != 0) *scr = *tex; scr++; tex += incs; } } void draw_hspan_1to16(Uint16 * scr, Uint8 * tex, int pixels, int incs) { int i; int mask = (0x80 >> (posx & 7)); for (i = 0 ; i < pixels ; i++) { if (*tex & mask) *scr++ = syscolor16; else scr++; if (incs < 0) { if (mask == 0x80) mask = 0x01, tex--; else mask <<= 1; } else { if (mask == 0x01) mask = 0x80, tex++; else mask >>= 1; } } } void draw_hspan_8to16(Uint16 * scr, Uint8 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex != 0) *scr = colorequiv[*tex]; scr++; tex += incs; } } void draw_hspan_8to16_ablend(Uint16 * scr, Uint8 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex != 0) *scr = ablend(colorequiv[*tex], *scr); scr++; tex += incs; } } void draw_hspan_8to16_tablend(Uint16 * scr, Uint8 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex != 0) *scr = ablend((Uint16)(ghost1[colorequiv[*tex]] + ghost2[*scr]),*scr); scr++; tex += incs; } } void draw_hspan_8to16_translucent(Uint16 * scr, Uint8 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex != 0) *scr = ghost1[colorequiv[*tex]] + ghost2[*scr]; scr++; tex += incs; } } void draw_hspan_8to16_nocolorkey(Uint16 * scr, Uint8 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { *scr++ = colorequiv[*tex]; tex += incs; } } void draw_hspan_16to16(Uint16 * scr, Uint16 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex) *scr = *tex; scr++ ; tex += incs; } } void draw_hspan_16to16_ablend(Uint16 * scr, Uint16 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex) *scr = ablend(*tex, *scr); scr++ ; tex += incs; } } void draw_hspan_16to16_tablend(Uint16 * scr, Uint16 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex != 0) *scr = ablend((Uint16)(ghost1[*tex] + ghost2[*scr]),*scr); scr++; tex += incs; } } void draw_hspan_16to16_translucent(Uint16 * scr, Uint16 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { if (*tex != 0) *scr = ghost1[*tex] + ghost2[*scr]; scr++; tex += incs; } } void draw_hspan_16to16_nocolorkey(Uint16 * scr, Uint16 * tex, int pixels, int incs) { int i; for (i = 0 ; i < pixels ; i++) { *scr++ = *tex; tex += incs; } } /* * FUNCTION : gr_calculate_corners * * Calculate the screen coordinates of the corners of a graphic * when rotated and scaled in an specific angle * * PARAMS : * graph Pointer to the graphic object * x, y Pixel coordinates of the center on screen * angle Angle of rotation in miliangles * scalex, scaley Scaling ratio in percentaje (100 for original size) * corners Pointer to the output array of 4 points * * RETURN VALUE : * The screen coordinates of the points will be written * into the "corners" array * */ void gr_calculate_corners (GRAPH * dest, int screen_x, int screen_y, int flags, int angle, int scalex, int scaley, _POINTF * corners) { float center_x, center_y; float top_y, bot_y; float lef_x, rig_x; float scalexf, scaleyf; float cos_angle = (float) cos(angle * M_PI / -180000.0); float sin_angle = (float) sin(angle * M_PI / -180000.0); /* Adjust size to prevent integer conversion errors */ if (scalex < 0) scalex = 0; if (scalex > 100 && scalex < 250) scalex = ((scalex - 4) & ~3) + 6; if (scaley < 0) scaley = 0; if (scaley > 100 && scaley < 250) scaley = ((scaley - 4) & ~3) + 6; scalexf = scalex / 100.0 ; scaleyf = scaley / 100.0 ; /* Calculate the graphic center */ if (dest->ncpoints && dest->cpoints[0].x != CPOINT_UNDEFINED) { center_x = dest->cpoints[0].x; center_y = dest->cpoints[0].y; if (flags & B_HMIRROR) center_x = dest->width - 1 - center_x; if (flags & B_VMIRROR) center_y = dest->height - 1 - center_y; } else { center_x = dest->width / 2.0; center_y = dest->height / 2.0; } /* Calculate the non-rotated non-translated coordinates */ lef_x = - center_x * scalexf; rig_x = + (dest->width - center_x) * scalexf - 1; top_y = - center_y * scaleyf; bot_y = + (dest->height - center_y) * scaleyf - 1; /* Rotate and scale the coordinates */ /* Top-left, top-right, bottom-left, bottom-right */ corners[0].x = screen_x + (cos_angle * lef_x - sin_angle * top_y) + 0.5 ; corners[0].y = screen_y + (sin_angle * lef_x + cos_angle * top_y) + 0.5 ; corners[1].x = screen_x + (cos_angle * rig_x - sin_angle * top_y) + 0.5 ; corners[1].y = screen_y + (sin_angle * rig_x + cos_angle * top_y) + 0.5 ; corners[2].x = screen_x + (cos_angle * lef_x - sin_angle * bot_y) + 0.5 ; corners[2].y = screen_y + (sin_angle * lef_x + cos_angle * bot_y) + 0.5 ; corners[3].x = screen_x + (cos_angle * rig_x - sin_angle * bot_y) + 0.5 ; corners[3].y = screen_y + (sin_angle * rig_x + cos_angle * bot_y) + 0.5 ; } /* * FUNCTION : gr_get_bbox * * Calculate the bounding box of a graphic, when drawing it with * the gr_rotated_blit function * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * scrx, scry Pixel coordinates of the center on screen * angle Angle of rotation in miliangles * scalex, scaley Scaling ratio in percentaje (100 for original size) * gr Pointer to the graphic object to draw * * RETURN VALUE : * None * */ void gr_get_bbox (REGION * dest, REGION * clip, int x, int y, int flags, int angle, int scalex, int scaley, GRAPH * gr) { _POINTF corners[4]; _POINT min, max; int i; /* Calculate the coordinates of each corner in the graphic */ gr_calculate_corners (gr, x, y, flags, angle, scalex, scaley, corners); /* Calculate the bounding box */ min.x = max.x = corners[0].x; min.y = max.y = corners[0].y; for (i = 1 ; i < 4 ; i++) { if (min.x > corners[i].x) min.x = (int)corners[i].x; if (max.x < corners[i].x) max.x = (int)corners[i].x; if (min.y > corners[i].y) min.y = (int)corners[i].y; if (max.y < corners[i].y) max.y = (int)corners[i].y; } dest->x = min.x; dest->y = min.y; dest->x2 = max.x; dest->y2 = max.y; } /* * FUNCTION : gr_rotated_blit * * Draw a rotated and/or scaled bitmap * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * scrx, scry Pixel coordinates of the center on screen * angle Angle of rotation in miliangles * scalex, scaley Scaling ratio in percentaje (100 for original size) * gr Pointer to the graphic object to draw * * RETURN VALUE : * None * */ void gr_rotated_blit (GRAPH * dest, REGION * clip, int scrx, int scry, int flags, int angle, int scalex, int scaley, GRAPH * gr) { _POINTF corners[4]; _POINT min, max; VERTEX vertex[4]; int i; float half_texel_size; /* Data for the left line */ int left_steps; int left_pos; VECTOR left_texture_increment; VERTEX* left_start; VERTEX* left_end; /* Data for the right line */ int right_steps; int right_pos; VECTOR right_texture_increment; VERTEX* right_start; VERTEX* right_end; /* Pointer to the line drawing function */ DRAW_SPAN *draw_span = NULL; if (!dest) dest = scrbitmap; if (!dest->data || !gr->data) return; if (scalex <= 0) return; if (scaley <= 0) return; /* Update the parameters if the graphic is animated */ if(gr->current_keyframe >= 0) { angle += gr->keyframes[gr->current_keyframe].angle; flags ^= gr->keyframes[gr->current_keyframe].flags; } /* Calculate the coordinates of each corner in the graphic */ gr_calculate_corners (gr, scrx, scry, flags, angle, scalex, scaley, corners); /* Calculate the clipping coordinates */ if (clip) { min.x = MAX( clip->x, 0 ); min.y = MAX( clip->y, 0 ); max.x = MIN( clip->x2, (int)dest->width - 1 ); max.y = MIN( clip->y2, (int)dest->height - 1 ); } else { min.x = 0; min.y = 0; max.x = (int)dest->width - 1; max.y = (int)dest->height - 1; } /* The texture coordinates of each corner point are displaced to the center of the texel to sidestep precision errors */ half_texel_size = 50.0 / scalex; /* Fill the vertex array with the four obtained points */ for (i = 0; i < 4; i++) { vertex[i].x = (int)(corners[i].x); vertex[i].y = (int)(corners[i].y); } if (flags & B_HMIRROR) { vertex[1].s = vertex[3].s = half_texel_size ; vertex[0].s = vertex[2].s = gr->width - half_texel_size; } else { vertex[0].s = vertex[2].s = half_texel_size; vertex[1].s = vertex[3].s = gr->width - half_texel_size; } if (flags & B_VMIRROR) { vertex[2].t = vertex[3].t = half_texel_size; vertex[0].t = vertex[1].t = gr->height - half_texel_size; } else { vertex[0].t = vertex[1].t = half_texel_size; vertex[2].t = vertex[3].t = gr->height - half_texel_size; } /* Sort the vertex list in y coordinate order */ qsort (vertex, 4, sizeof(VERTEX), compare_vertex_y); /* Analize the bitmap if needed (find if no color key used */ if (gr->modified) bitmap_analize (gr) ; if (gr->info_flags & GI_NOCOLORKEY) { flags |= B_NOCOLORKEY ; } /* Setup the 16 bits translucency tables if necessay */ if (gr->blend_table) { ghost1 = gr->blend_table ; ghost2 = gr->blend_table + 65536 ; flags |= B_TRANSLUCENT ; } else if (flags & B_ALPHA) { if (dest->depth == 16) { ghost1 = gr_alpha16((flags & B_ALPHA_MASK) >> B_ALPHA_SHIFT); ghost2 = gr_alpha16(255-((flags & B_ALPHA_MASK) >> B_ALPHA_SHIFT)); } else if (dest->depth == 8) { ghost8 = gr_alpha8((flags & B_ALPHA_MASK) >> B_ALPHA_SHIFT); } flags |= B_TRANSLUCENT ; } else if (flags & B_TRANSLUCENT) { ghost1 = ghost2 = colorghost ; ghost8 = (Uint8 *)trans_table ; } /* if ((flags & B_TRANSLUCENT) && !trans_table_updated) gr_make_trans_table() ; */ #ifdef MMX_FUNCTIONS if (MMX_available) { ablend = MMX_additive_blend; }else{ #endif ablend = additive_blend; #ifdef MMX_FUNCTIONS } #endif /* Choose a line drawing function */ if (dest->depth == 8 && gr->depth == 8) { if (flags & B_TRANSLUCENT){ if(flags & B_ABLEND){ bt=0; draw_span = draw_span_8to8_tablend; }else if(flags & B_SBLEND){ bt=1; draw_span = draw_span_8to8_tablend; }else draw_span = draw_span_8to8_translucent; } else if (flags & B_ABLEND){ bt=0; draw_span = draw_span_8to8_ablend; }else if (flags & B_SBLEND){ bt=1; draw_span = draw_span_8to8_ablend; } else if (flags & B_NOCOLORKEY) draw_span = draw_span_8to8_nocolorkey; else draw_span = draw_span_8to8; } else if (dest->depth == 16 && gr->depth == 8) { if (flags & B_TRANSLUCENT){ if(flags & B_ABLEND){ bt=0; draw_span = draw_span_8to16_tablend; }else if(flags & B_SBLEND){ bt=1; draw_span = draw_span_8to16_tablend; }else draw_span = draw_span_8to16_translucent; } else if (flags & B_ABLEND){ bt=0; draw_span = draw_span_8to16_ablend; }else if (flags & B_SBLEND){ bt=1; draw_span = draw_span_8to16_ablend; } else if (flags & B_NOCOLORKEY) draw_span = draw_span_8to16_nocolorkey; else draw_span = draw_span_8to16; } else if (dest->depth == 16 && gr->depth == 16) { if (flags & B_TRANSLUCENT){ if(flags & B_ABLEND){ bt=0; draw_span = draw_span_16to16_tablend; }else if(flags & B_SBLEND){ bt=1; draw_span = draw_span_16to16_tablend; }else draw_span = draw_span_16to16_translucent; } else if (flags & B_ABLEND){ bt=0; draw_span = draw_span_16to16_ablend; }else if (flags & B_SBLEND){ bt=1; draw_span = draw_span_16to16_ablend; } else if (flags & B_NOCOLORKEY) draw_span = draw_span_16to16_nocolorkey; else draw_span = draw_span_16to16; } else if (dest->depth == 8 && gr->depth == 1) draw_span = draw_span_1to8; else if (dest->depth == 16 && gr->depth == 1) draw_span = draw_span_1to16; else gr_error ("Profundidad de color no soportada\n(gr_rotated_blit)") ; /* Fix por problemas de visualizacion */ if ((vertex[0].y>>1) == (vertex[1].y>>1)) { if ( (vertex[0].x > vertex[1].x && vertex[2].x < vertex[3].x) || (vertex[0].x < vertex[1].x && vertex[2].x > vertex[3].x) ) { VERTEX aux = vertex[0]; vertex[0]=vertex[1]; vertex[1]=aux; } } if ((vertex[2].y>>1) == (vertex[3].y>>1)) { if ( (vertex[0].x > vertex[1].x && vertex[2].x < vertex[3].x) || (vertex[0].x < vertex[1].x && vertex[2].x > vertex[3].x) ) { VERTEX aux = vertex[2]; vertex[2]=vertex[3]; vertex[3]=aux; } } /* Create the first two left and right line segments */ left_start = &vertex[0]; left_end = (vertex[1].x < vertex[2].x)? &vertex[1] : &vertex[2]; right_start = &vertex[0]; right_end = (vertex[1].x < vertex[2].x) ? &vertex[2] : &vertex[1]; if ((right_start->y>>1) == (right_end->y>>1)) { right_start = right_end; right_end = &vertex[3]; } left_steps = left_end->y - left_start->y; left_texture_increment.x = (left_end->s - left_start->s) / (float)(left_steps); left_texture_increment.y = (left_end->t - left_start->t) / (float)(left_steps); right_steps = right_end->y - right_start->y; right_texture_increment.x = (right_end->s - right_start->s) / (float)(right_steps); right_texture_increment.y = (right_end->t - right_start->t) / (float)(right_steps); left_pos = -1; right_pos = -1; /* Draw the graphic a line each time, navigating through the * left and right line segments until reaching the graphic bottom */ for (i = vertex[0].y ; i <= vertex[3].y ; i++) { int x, x2; float s, t, s2, t2; left_pos++; right_pos++; /* Calculate the left point coordinates in screen and texture */ x = left_start->x; s = left_start->s; t = left_start->t; if (left_pos > 0 && left_steps > 0) { x += (left_end->x - left_start->x) * left_pos / left_steps; s += left_texture_increment.x * left_pos ; t += left_texture_increment.y * left_pos ; } /* Calculate the right point coordinates in screen and texture */ x2 = right_start->x; s2 = right_start->s; t2 = right_start->t; if (right_pos > 0 && right_steps > 0) { x2 += (right_end->x - right_start->x) * right_pos / right_steps; s2 += right_texture_increment.x * right_pos ; t2 += right_texture_increment.y * right_pos ; } /* We don't calculate y/y2 coordinate positions, because they should be equal to i. However, precision errors may prevent it. */ /* Clip the resulting coordinates */ if (i >= min.y && i <= max.y) { if (x < min.x && x2 >= x) { s += (min.x-x) * ((s2-s) / (x2-x+1)); t += (min.x-x) * ((t2-t) / (x2-x+1)); x = min.x; } if (x2 > max.x && x2 >= x) { s2 -= (x2-max.x) * ((s2-s) / (x2-x+1)); t2 -= (x2-max.x) * ((t2-t) / (x2-x+1)); x2 = max.x; } /* Draw the resulting line */ if (x2 > x) draw_span (dest, gr, x, i, x2-x+1, (int)(s * 65536), (int)(t * 65536), (int)((s2-s)/(x2-x) * 65536), (int)((t2-t)/(x2-x) * 65536)); } /* If there is no more steps in the left vector, * advance to the next segment */ if (left_pos == left_steps) { left_start = left_end; left_end = &vertex[3]; left_pos = 0; left_steps = left_end->y - left_start->y; if (left_steps > 1) { left_texture_increment.x = (left_end->s - left_start->s) / (float)(left_steps); left_texture_increment.y = (left_end->t - left_start->t) / (float)(left_steps); } } /* Same for the right vector */ if (right_pos == right_steps) { right_start = right_end; right_end = &vertex[3]; right_pos = 0; right_steps = right_end->y - right_start->y; if (right_steps > 1) { right_texture_increment.x = (right_end->s - right_start->s) / (float)(right_steps); right_texture_increment.y = (right_end->t - right_start->t) / (float)(right_steps); } } } dest->modified = 1 ; } /* * FUNCTION : gr_blit * * Draw a bitmap (with no rotation or scaling, but with flags & clipping) * * PARAMS : * dest Destination bitmap or NULL for screen * clip Clipping region or NULL for the whole screen * scrx, scry Pixel coordinates of the center on screen * gr Pointer to the graphic object to draw * * RETURN VALUE : * None * */ void gr_blit (GRAPH * dest, REGION * clip, int scrx, int scry, int flags, GRAPH * gr) { _POINT min, max; _POINT center; int x, y, s, t, p, l, i; void * tex; void * scr; int tex_inc; int scr_inc; int direction; DRAW_HSPAN * draw_hspan = NULL; if (!dest) dest = scrbitmap ; if (!dest->data || !gr->data) return; /* Update the parameters if the graphic is animated */ if(gr->current_keyframe >= 0) { flags ^= gr->keyframes[gr->current_keyframe].flags; } /* Calculate the clipping coordinates */ if (clip) { min.x = MAX( clip->x, 0 ); min.y = MAX( clip->y, 0 ); max.x = MIN( clip->x2, (int)dest->width-1 ); max.y = MIN( clip->y2, (int)dest->height-1 ); } else { min.x = 0; min.y = 0; max.x = dest->width - 1; max.y = dest->height - 1; } /* Analize the bitmap if needed (find if no color key used */ if (gr->modified) bitmap_analize (gr) ; if (gr->info_flags & GI_NOCOLORKEY) flags |= B_NOCOLORKEY ; /* Setup the 16 bits translucency tables if necessay */ if (gr->blend_table) { ghost1 = gr->blend_table ; ghost2 = gr->blend_table + 65536 ; flags |= B_TRANSLUCENT ; } else if (flags & B_ALPHA) { if (dest->depth == 16) { ghost1 = gr_alpha16((flags & B_ALPHA_MASK) >> B_ALPHA_SHIFT); ghost2 = gr_alpha16(255-((flags & B_ALPHA_MASK) >> B_ALPHA_SHIFT)); } else if (dest->depth == 8) { ghost8 = gr_alpha8((flags & B_ALPHA_MASK) >> B_ALPHA_SHIFT); } flags |= B_TRANSLUCENT ; } else if (flags & B_TRANSLUCENT) { ghost1 = ghost2 = colorghost ; ghost8 = (Uint8 *)trans_table ; } /* if ((flags & B_TRANSLUCENT) && !trans_table_updated) gr_make_trans_table() ; */ #ifdef MMX_FUNCTIONS if (MMX_available) { ablend = MMX_additive_blend; }else{ #endif ablend = additive_blend; #ifdef MMX_FUNCTIONS } #endif /* Choose a line drawing function */ if (dest->depth == 8 && gr->depth == 8) { if (flags & B_TRANSLUCENT){ if(flags & B_ABLEND){ bt=0; draw_hspan = draw_hspan_8to8_tablend; }else if(flags & B_SBLEND){ bt=1; draw_hspan = draw_hspan_8to8_tablend; }else { #ifdef MMX_FUNCTIONS if (MMX_available){ draw_hspan = MMX_draw_hspan_8to8_translucent; } else { #endif draw_hspan = draw_hspan_8to8_translucent; #ifdef MMX_FUNCTIONS } #endif } } else if(flags & B_ABLEND){ bt=0; draw_hspan = draw_hspan_8to8_ablend; }else if (flags & B_SBLEND){ bt=1; draw_hspan = draw_hspan_8to8_ablend; } else if (flags & B_NOCOLORKEY) { #ifdef MMX_FUNCTIONS if (MMX_available){ draw_hspan = MMX_draw_hspan_8to8_nocolorkey; } else { #endif draw_hspan = draw_hspan_8to8_nocolorkey; #ifdef MMX_FUNCTIONS } #endif } else { #ifdef MMX_FUNCTIONS if (MMX_available){ draw_hspan = MMX_draw_hspan_8to8; } else { #endif draw_hspan = draw_hspan_8to8; #ifdef MMX_FUNCTIONS } #endif } } else if (dest->depth == 16 && gr->depth == 8) { if (flags & B_TRANSLUCENT){ if(flags & B_ABLEND){ bt=0; draw_hspan = draw_hspan_8to16_tablend; }else if(flags & B_SBLEND){ bt=1; draw_hspan = draw_hspan_8to16_tablend; }else draw_hspan = draw_hspan_8to16_translucent; } else if(flags & B_ABLEND){ bt=0; draw_hspan = draw_hspan_8to16_ablend; }else if (flags & B_SBLEND){ bt=1; draw_hspan = draw_hspan_8to16_ablend; } else if (flags & B_NOCOLORKEY) draw_hspan = draw_hspan_8to16_nocolorkey; else draw_hspan = draw_hspan_8to16; } else if (dest->depth == 16 && gr->depth == 16) { if (flags & B_TRANSLUCENT){ if(flags & B_ABLEND){ bt=0; draw_hspan = draw_hspan_16to16_tablend; }else if(flags & B_SBLEND){ bt=1; draw_hspan = draw_hspan_16to16_tablend; }else draw_hspan = draw_hspan_16to16_translucent; } else if(flags & B_ABLEND){ bt=0; draw_hspan = draw_hspan_16to16_ablend; }else if (flags & B_SBLEND){ bt=1; draw_hspan = draw_hspan_16to16_ablend; } else if (flags & B_NOCOLORKEY) { #ifdef MMX_FUNCTIONS if (MMX_available){ draw_hspan = MMX_draw_hspan_16to16_nocolorkey; } else { #endif draw_hspan = draw_hspan_16to16_nocolorkey; #ifdef MMX_FUNCTIONS } #endif } else { #ifdef MMX_FUNCTIONS if (MMX_available){ draw_hspan = MMX_draw_hspan_16to16; } else { #endif draw_hspan = draw_hspan_16to16; #ifdef MMX_FUNCTIONS } #endif } } else if (dest->depth == 8 && gr->depth == 1) draw_hspan = draw_hspan_1to8; else if (dest->depth == 16 && gr->depth == 1) draw_hspan = draw_hspan_1to16; else gr_error ("Profundidad de color no soportada\n(gr_blit)") ; /* Calculate the graphic center */ if (gr->ncpoints && gr->cpoints[0].x != CPOINT_UNDEFINED) { center.x = gr->cpoints[0].x ; center.y = gr->cpoints[0].y ; if (flags & B_HMIRROR) center.x = gr->width - 1 - center.x; if (flags & B_VMIRROR) center.y = gr->height - 1 - center.y; } else { center.x = gr->width / 2.0; center.y = gr->height / 2.0; } /* Calculate the initial texture and screen coordinates */ x = scrx - center.x; y = scry - center.y; p = gr->width; l = gr->height; s = t = 0; /* Clip the coordinates */ if (y < min.y) { l -= min.y - y; t += min.y - y; y = min.y; } if (y+l-1 > max.y) { l -= y + l - 1 - max.y ; } if (x < min.x) { p -= min.x - x; s += min.x - x; x = min.x; } if (x+p > max.x) { p -= x + p - 1 - max.x; } /* Mirror the texture coordinates if needed */ if (flags & B_HMIRROR) s = gr->width - 1 - s; if (flags & B_VMIRROR) t = gr->height - 1 - t; /* Calculate the initial pointers and advances */ posx = s; scr = (Uint8 *)dest->data + dest->pitch*y + x*dest->depth/8 ; tex = (Uint8 *)gr->data + gr->pitch*t + s*gr->depth/8 ; scr_inc = dest->pitch ; tex_inc = gr->pitch ; direction = 1; if (flags & B_VMIRROR) tex_inc = -tex_inc; if (flags & B_HMIRROR) direction = -1; if (p > 0) { for (i = 0 ; i < l ; i++) { (*draw_hspan) (scr, tex, p, direction); scr = (Uint8 *)scr + scr_inc; tex = (Uint8 *)tex + tex_inc; } } dest->modified = 1 ; } Fenix/fxi/src/f_sort.c0000644000000000000000000002770410607526740013663 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.85 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : f_sort.c * DESCRIPTION : FXI functions for array sorting */ #include #include #include "fxi.h" int keyoffset = 0; /* * Comparison functions used by sort_variables */ int compare_int (const Sint32 * a, const Sint32 * b) { return *(Sint32 *)((Uint8 *)a + keyoffset) - *(Sint32 *)((Uint8 *)b + keyoffset); } int compare_dword (const Uint32 * a, const Uint32 * b) { return *(Uint32 *)((Uint8 *)a + keyoffset) - *(Uint32 *)((Uint8 *)b + keyoffset); } int compare_word (const Uint16 * a, const Uint16 * b) { return *(Uint16 *)((Uint8 *)a + keyoffset) - *(Uint16 *)((Uint8 *)b + keyoffset); } int compare_short (const Sint16 * a, const Sint16 * b) { return *(Sint16 *)((Uint8 *)a + keyoffset) - *(Sint16 *)((Uint8 *)b + keyoffset); } int compare_byte (const Uint8 * a, const Uint8 * b) { return *(Uint8 *)((Uint8 *)a + keyoffset) - *(Uint8 *)((Uint8 *)b + keyoffset); } int compare_sbyte (const Sint8 * a, const Sint8 * b) { return *(Sint8 *)((Uint8 *)a + keyoffset) - *(Sint8 *)((Uint8 *)b + keyoffset); } int compare_float (const float * a, const float * b) { return *(float *)((Uint8 *)a + keyoffset) - *(float *)((Uint8 *)b + keyoffset); } int compare_string (const int * a, const int * b) { return strcmp(string_get(*(int *)((Uint8 *)a + keyoffset)), string_get(*(int *)((Uint8 *)b + keyoffset))); } /* * FUNCTION : dcb_typedef_reduce * * Utility function to convert a DCB TYPEDEF (reduced type definition * used in the DCB file instead of the full TYPEDEF of the compiler) * to the definition of a pointer to itself. * * Beware: it could cause a type to grow too much. In this case this * function will fail with a gr_con_printf and with no operation performed. * * PARAMS: * type Pointer to the type to be converted * * RETURN VALUE: * None * */ static void dcb_typedef_enlarge(DCB_TYPEDEF * type) { int i; for (i = 0 ; i < MAX_TYPECHUNKS ; i++) { if (i != TYPE_POINTER && i != TYPE_ARRAY) break; } if (i >= MAX_TYPECHUNKS-1) { gr_con_printf ("Tipo de dato demasiado complejo"); return; } for (i = MAX_TYPECHUNKS-1 ; i > 0 ; i--) { type->BaseType[i] = type->BaseType[i-1]; type->Count[i] = type->Count[i-1]; } type->BaseType[0] = TYPE_POINTER; } /* * FUNCTION : dcb_typedef_reduce * * Utility function to convert a DCB TYPEDEF (reduced type definition * used in the DCB file instead of the full TYPEDEF of the compiler) * to its pointed type. * * PARAMS: * type Pointer to the type to be converted * * RETURN VALUE: * None * */ static void dcb_typedef_reduce(DCB_TYPEDEF * type) { int i; for (i = 0 ; i < MAX_TYPECHUNKS-1 ; i++) { type->BaseType[i] = type->BaseType[i+1]; type->Count[i] = type->Count[i+1]; } } /* * FUNCTION : dcb_typedef_size * * Utility function to calculate the size of a variable using its * DCB TYPEDEF (reduced type definition used in the DCB file) * * PARAMS: * type Pointer to the type * * RETURN VALUE: * Size in bytes of the variable * */ static int dcb_typedef_size (const DCB_TYPEDEF * type) { int i = 0; int count = 1; while (type->BaseType[i] == TYPE_ARRAY) { count *= type->Count[i]; i++; } switch (type->BaseType[i]) { case TYPE_DWORD: case TYPE_INT: case TYPE_FLOAT: case TYPE_STRING: case TYPE_POINTER: return 4 * count; case TYPE_SHORT: case TYPE_WORD: return 2 * count; case TYPE_CHAR: case TYPE_SBYTE: case TYPE_BYTE: return count; case TYPE_STRUCT: { unsigned int maxoffset = 0; unsigned int n; DCB_TYPEDEF * maxvar = NULL; for (n = 0 ; n < dcb.varspace[type->Members].NVars ; n++) { if (dcb.varspace_vars[type->Members][n].Offset > maxoffset) { maxoffset = dcb.varspace_vars[type->Members][n].Offset; maxvar = &dcb.varspace_vars[type->Members][n].Type; } } if (maxvar == NULL) { gr_con_printf ("Estructura vaca"); return 0; } return count * maxoffset + dcb_typedef_size(maxvar); } default: gr_con_printf ("Tipo desconocido"); return 0; } } /* * FUNCTION : sort_variables * * Sorting function used by all FXI variants * * PARAMS: * data Pointer to the start of the array * key_offset Offset of the key variable inside each element * key_type Basic type (like TYPE_INT) of the key variable * element_size Size of a single element * elements Number of elements to be sorted * * RETURN VALUE: * 1 if succesful, 0 if error * */ static int sort_variables (void * data, int key_offset, int key_type, int element_size, int elements) { int (*compare)(const void *, const void *) = NULL; keyoffset = key_offset; switch (key_type) { case TYPE_INT: compare = compare_int; break; case TYPE_WORD: compare = compare_word; break; case TYPE_DWORD: compare = compare_dword; break; case TYPE_SHORT: compare = compare_short; break; case TYPE_BYTE: compare = compare_byte; break; case TYPE_SBYTE: compare = compare_sbyte; break; case TYPE_CHAR: compare = compare_byte; break; case TYPE_STRING: compare = compare_string; break; case TYPE_FLOAT: compare = compare_float; break; default: gr_con_printf ("Tipo de dato usado como clave de ordenacin invlido"); return 0; } qsort (data, elements, element_size, compare); return 1; } /** * SORT (variable) * Sorts an array of structs or simple values. If a struct, uses the first * variable as a key for sorting order. **/ int fxi_sort (INSTANCE * my, int * params) { // Get the description of the data to be sorted void * data = (void *)params[0]; DCB_TYPEDEF * type = (DCB_TYPEDEF *)params[1]; DCB_TYPEDEF copy = *type; int vars = params[2]; int element_size; // Is it valid? if (type->BaseType[0] != TYPE_ARRAY) { gr_con_printf ("Slo se permite ordenar un array de estructuras o valores"); return 0; } if (vars > 1) { gr_con_printf ("Intento de ordenar una estructura con un slo elemento"); return 0; } if (type->Count[0] < 2) { gr_con_printf ("Intento de ordenar un array con un slo elemento"); return 0; } // Get the key type dcb_typedef_reduce(©); element_size = dcb_typedef_size(©); // If an struct or array, get its first element for (;;) { while (copy.BaseType[0] == TYPE_ARRAY) dcb_typedef_reduce(©); if (copy.BaseType[0] == TYPE_STRUCT) copy = dcb.varspace_vars[copy.Members][0].Type; else break; } // Do the sorting return sort_variables (data, 0, copy.BaseType[0], element_size, type->Count[0]); } /** * KSORT (variable, key) * Sorts an array of structs, using the given variable as a key **/ int fxi_ksort (INSTANCE * my, int * params) { // Get the description of the data to be sorted void * data = (void *)params[0]; DCB_TYPEDEF * type = (DCB_TYPEDEF *)params[1]; DCB_TYPEDEF copy = *type; int vars = params[2]; int element_size; void * key_data = (void *)params[3]; DCB_TYPEDEF * key_type = (DCB_TYPEDEF *)params[4]; int key_vars = params[5]; // Is it valid? if (type->BaseType[0] != TYPE_ARRAY) { gr_con_printf ("Slo se permite ordenar un array de estructuras o valores"); return 0; } if (vars > 1) { gr_con_printf ("Intento de ordenar una estructura con un slo elemento"); return 0; } if (type->Count[0] < 2) { gr_con_printf ("Intento de ordenar un array con un slo elemento"); return 0; } // Check the key given dcb_typedef_reduce(©); element_size = dcb_typedef_size(©); if ((Uint8 *)key_data > (Uint8*)data + element_size || key_data < data) { gr_con_printf ("Intento de ordenar usando una clave externa al primer elemento"); return 0; } copy = *key_type; // If an struct or array, get its first element for (;;) { while (copy.BaseType[0] == TYPE_ARRAY) dcb_typedef_reduce(©); if (copy.BaseType[0] == TYPE_STRUCT) copy = dcb.varspace_vars[copy.Members][0].Type; else break; } // Do the sorting return sort_variables (data, (Uint8*)key_data - (Uint8*)data, copy.BaseType[0], element_size, type->Count[0]); } /** * SORT (variable, count) * Sorts an array of structs or simple values. If a struct, uses the first * variable as a key for sorting order. It accepts arrays of one element * or a pointer to an array, unlike the simple SORT version. **/ int fxi_sort_n (INSTANCE * my, int * params) { // Get the description of the data to be sorted void * data = (void *)params[0]; DCB_TYPEDEF * type = (DCB_TYPEDEF *)params[1]; DCB_TYPEDEF copy = *type; int vars = params[2]; int element_size; // Is it valid? if (type->BaseType[0] == TYPE_POINTER) { dcb_typedef_reduce(©); data = *(void **)data; } if (copy.BaseType[0] != TYPE_ARRAY) { dcb_typedef_enlarge(©); copy.BaseType[0] = TYPE_ARRAY; copy.Count[0] = 1; } if (vars > 1) { gr_con_printf ("Intento de ordenar una estructura con un slo elemento"); return 0; } // Get the key type dcb_typedef_reduce(©); element_size = dcb_typedef_size(©); // If an struct or array, get its first element for (;;) { while (copy.BaseType[0] == TYPE_ARRAY) dcb_typedef_reduce(©); if (copy.BaseType[0] == TYPE_STRUCT) copy = dcb.varspace_vars[copy.Members][0].Type; else break; } // Do the sorting return sort_variables (data, 0, copy.BaseType[0], element_size, params[3]); } /** * KSORT (variable, key, elements) * Sorts an array of structs, using the given variable as a key and * limiting the sorting to the first n elements. Accepts pointers or * single elements, unlike the previous version of KSORT above. **/ int fxi_ksort_n (INSTANCE * my, int * params) { // Get the description of the data to be sorted void * data = (void *)params[0]; DCB_TYPEDEF * type = (DCB_TYPEDEF *)params[1]; DCB_TYPEDEF copy = *type; int vars = params[2]; int element_size; void * key_data = (void *)params[3]; DCB_TYPEDEF * key_type = (DCB_TYPEDEF *)params[4]; int key_vars = params[5]; // Is it valid? if (type->BaseType[0] == TYPE_POINTER) { dcb_typedef_reduce(©); data = *(void **)data; } if (copy.BaseType[0] != TYPE_ARRAY) { // If the type is not an array or a pointer, it is a // pointer value already reduced by the bytecode dcb_typedef_enlarge(©); copy.BaseType[0] = TYPE_ARRAY; copy.Count[0] = 1; } if (vars > 1) { gr_con_printf ("Intento de ordenar una estructura con un slo elemento"); return 0; } // Check the key given dcb_typedef_reduce(©); element_size = dcb_typedef_size(©); if ((Uint8 *)key_data > (Uint8*)data + element_size || key_data < data) { gr_con_printf ("Intento de ordenar usando una clave externa al primer elemento"); return 0; } copy = *key_type; // If an struct or array, get its first element for (;;) { while (copy.BaseType[0] == TYPE_ARRAY) dcb_typedef_reduce(©); if (copy.BaseType[0] == TYPE_STRUCT) copy = dcb.varspace_vars[copy.Members][0].Type; else break; } // Do the sorting return sort_variables (data, (Uint8*)key_data - (Uint8*)data, copy.BaseType[0], element_size, params[6]); } Fenix/fxi/src/scaler_hq2x.c0000644000000000000000000013046110607526774014604 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* Porting from ScummVM by Splinter 2007 */ #include #include #include #include "fxi.h" #define PIXEL00_0 *(q) = w5; #define PIXEL00_10 *(q) = interpolate16_2(3,1,w5, w1); #define PIXEL00_11 *(q) = interpolate16_2(3,1,w5, w4); #define PIXEL00_12 *(q) = interpolate16_2(3,1,w5, w2); #define PIXEL00_20 *(q) = interpolate16_3(2,1,1,w5, w4, w2); #define PIXEL00_21 *(q) = interpolate16_3(2,1,1,w5, w1, w2); #define PIXEL00_22 *(q) = interpolate16_3(2,1,1,w5, w1, w4); #define PIXEL00_60 *(q) = interpolate16_3(5,2,1,w5, w2, w4); #define PIXEL00_61 *(q) = interpolate16_3(5,2,1,w5, w4, w2); #define PIXEL00_70 *(q) = interpolate16_3(6,1,1,w5, w4, w2); #define PIXEL00_90 *(q) = interpolate16_3(2,3,3,w5, w4, w2); #define PIXEL00_100 *(q) = interpolate16_3(14,1,1,w5, w4, w2); #define PIXEL01_0 *(q+1) = w5; #define PIXEL01_10 *(q+1) = interpolate16_2(3,1,w5, w3); #define PIXEL01_11 *(q+1) = interpolate16_2(3,1,w5, w2); #define PIXEL01_12 *(q+1) = interpolate16_2(3,1,w5, w6); #define PIXEL01_20 *(q+1) = interpolate16_3(2,1,1,w5, w2, w6); #define PIXEL01_21 *(q+1) = interpolate16_3(2,1,1,w5, w3, w6); #define PIXEL01_22 *(q+1) = interpolate16_3(2,1,1,w5, w3, w2); #define PIXEL01_60 *(q+1) = interpolate16_3(5,2,1,w5, w6, w2); #define PIXEL01_61 *(q+1) = interpolate16_3(5,2,1,w5, w2, w6); #define PIXEL01_70 *(q+1) = interpolate16_3(6,1,1,w5, w2, w6); #define PIXEL01_90 *(q+1) = interpolate16_3(2,3,3,w5, w2, w6); #define PIXEL01_100 *(q+1) = interpolate16_3(14,1,1,w5, w2, w6); #define PIXEL10_0 *(q+nextlineDst) = w5; #define PIXEL10_10 *(q+nextlineDst) = interpolate16_2(3,1,w5, w7); #define PIXEL10_11 *(q+nextlineDst) = interpolate16_2(3,1,w5, w8); #define PIXEL10_12 *(q+nextlineDst) = interpolate16_2(3,1,w5, w4); #define PIXEL10_20 *(q+nextlineDst) = interpolate16_3(2,1,1,w5, w8, w4); #define PIXEL10_21 *(q+nextlineDst) = interpolate16_3(2,1,1,w5, w7, w4); #define PIXEL10_22 *(q+nextlineDst) = interpolate16_3(2,1,1,w5, w7, w8); #define PIXEL10_60 *(q+nextlineDst) = interpolate16_3(5,2,1,w5, w4, w8); #define PIXEL10_61 *(q+nextlineDst) = interpolate16_3(5,2,1,w5, w8, w4); #define PIXEL10_70 *(q+nextlineDst) = interpolate16_3(6,1,1,w5, w8, w4); #define PIXEL10_90 *(q+nextlineDst) = interpolate16_3(2,3,3,w5, w8, w4); #define PIXEL10_100 *(q+nextlineDst) = interpolate16_3(14,1,1,w5, w8, w4); #define PIXEL11_0 *(q+1+nextlineDst) = w5; #define PIXEL11_10 *(q+1+nextlineDst) = interpolate16_2(3,1,w5, w9); #define PIXEL11_11 *(q+1+nextlineDst) = interpolate16_2(3,1,w5, w6); #define PIXEL11_12 *(q+1+nextlineDst) = interpolate16_2(3,1,w5, w8); #define PIXEL11_20 *(q+1+nextlineDst) = interpolate16_3(2,1,1,w5, w6, w8); #define PIXEL11_21 *(q+1+nextlineDst) = interpolate16_3(2,1,1,w5, w9, w8); #define PIXEL11_22 *(q+1+nextlineDst) = interpolate16_3(2,1,1,w5, w9, w6); #define PIXEL11_60 *(q+1+nextlineDst) = interpolate16_3(5,2,1,w5, w8, w6); #define PIXEL11_61 *(q+1+nextlineDst) = interpolate16_3(5,2,1,w5, w6, w8); #define PIXEL11_70 *(q+1+nextlineDst) = interpolate16_3(6,1,1,w5, w6, w8); #define PIXEL11_90 *(q+1+nextlineDst) = interpolate16_3(2,3,3,w5, w6, w8); #define PIXEL11_100 *(q+1+nextlineDst) = interpolate16_3(14,1,1,w5, w6, w8); #define YUV(x) RGBtoYUV[w ## x] int hq2xinited=0; #define RGBtoYUV _RGBtoYUV #define LUT16to32 _LUT16to32 static Uint32 *LUT16to32; static Uint32 *RGBtoYUV; /** * Interpolate two 16 bit pixels with the weights specified in the template * parameters. Used by the hq scaler family. * @note w1 and w2 must sum up to 2, 4, 8 or 16. */ static inline Uint16 interpolate16_2(int w1, int w2, Uint16 p1, Uint16 p2) { return ((((p1 & RedBlueMask) * w1 + (p2 & RedBlueMask) * w2) / (w1 + w2)) & RedBlueMask) | ((((p1 & GreenMask) * w1 + (p2 & GreenMask) * w2) / (w1 + w2)) & GreenMask); } /** * Interpolate three 16 bit pixels with the weights specified in the template * parameters. Used by the hq scaler family. * @note w1, w2 and w3 must sum up to 2, 4, 8 or 16. */ static inline Uint16 interpolate16_3(int w1, int w2, int w3, Uint16 p1, Uint16 p2, Uint16 p3) { return ((((p1 & RedBlueMask) * w1 + (p2 & RedBlueMask) * w2 + (p3 & RedBlueMask) * w3) / (w1 + w2 + w3)) & RedBlueMask) | ((((p1 & GreenMask) * w1 + (p2 & GreenMask) * w2 + (p3 & GreenMask) * w3) / (w1 + w2 + w3)) & GreenMask); } /** * Compare two YUV values (encoded 8-8-8) and check if they differ by more than * a certain hard coded threshold. Used by the hq scaler family. */ static inline int diffYUV(int yuv1, int yuv2) { static const int Ymask = 0x00FF0000; static const int Umask = 0x0000FF00; static const int Vmask = 0x000000FF; static const int trY = 0x00300000; static const int trU = 0x00000700; static const int trV = 0x00000006; int diff; int mask; diff = ((yuv1 & Ymask) - (yuv2 & Ymask)); mask = diff >> 31; // -1 if value < 0, 0 otherwise diff = (diff ^ mask) - mask; //-1: ~value + 1; 0: value if (diff > trY) return -1; diff = ((yuv1 & Umask) - (yuv2 & Umask)); mask = diff >> 31; // -1 if value < 0, 0 otherwise diff = (diff ^ mask) - mask; //-1: ~value + 1; 0: value if (diff > trU) return -1; diff = ((yuv1 & Vmask) - (yuv2 & Vmask)); mask = diff >> 31; // -1 if value < 0, 0 otherwise diff = (diff ^ mask) - mask; //-1: ~value + 1; 0: value if (diff > trV) return -1; return 0; /* return ( ( ABS((yuv1 & Ymask) - (yuv2 & Ymask)) > trY ) || ( ABS((yuv1 & Umask) - (yuv2 & Umask)) > trU ) || ( ABS((yuv1 & Vmask) - (yuv2 & Vmask)) > trV ) ); */ } static void inline hq2x_main ( int w1, int w2, int w3, int w4, int w5, int w6, int w7, int w8, int w9, Uint32 nextlineSrc, Uint32 nextlineDst, Uint16 *p, Uint16 *q, int skiplastline ) { int pattern = 0; const int yuv5 = YUV(5); if (w5 != w1 && diffYUV(yuv5, YUV(1))) pattern |= 0x0001; if (w5 != w2 && diffYUV(yuv5, YUV(2))) pattern |= 0x0002; if (w5 != w3 && diffYUV(yuv5, YUV(3))) pattern |= 0x0004; if (w5 != w4 && diffYUV(yuv5, YUV(4))) pattern |= 0x0008; if (w5 != w6 && diffYUV(yuv5, YUV(6))) pattern |= 0x0010; if (w5 != w7 && diffYUV(yuv5, YUV(7))) pattern |= 0x0020; if (w5 != w8 && diffYUV(yuv5, YUV(8))) pattern |= 0x0040; if (w5 != w9 && diffYUV(yuv5, YUV(9))) pattern |= 0x0080; switch (pattern) { case 0: case 1: case 4: case 32: case 128: case 5: case 132: case 160: case 33: case 129: case 36: case 133: case 164: case 161: case 37: case 165: PIXEL00_20 PIXEL01_20 if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_20 break; case 2: case 34: case 130: case 162: PIXEL00_22 PIXEL01_21 if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_20 break; case 16: case 17: case 48: case 49: PIXEL00_20 PIXEL01_22 if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_21 break; case 64: case 65: case 68: case 69: PIXEL00_20 PIXEL01_20 if ( !skiplastline ) PIXEL10_21 if ( !skiplastline ) PIXEL11_22 break; case 8: case 12: case 136: case 140: PIXEL00_21 PIXEL01_20 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_20 break; case 3: case 35: case 131: case 163: PIXEL00_11 PIXEL01_21 if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_20 break; case 6: case 38: case 134: case 166: PIXEL00_22 PIXEL01_12 if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_20 break; case 20: case 21: case 52: case 53: PIXEL00_20 PIXEL01_11 if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_21 break; case 144: case 145: case 176: case 177: PIXEL00_20 PIXEL01_22 if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_12 break; case 192: case 193: case 196: case 197: PIXEL00_20 PIXEL01_20 if ( !skiplastline ) PIXEL10_21 if ( !skiplastline ) PIXEL11_11 break; case 96: case 97: case 100: case 101: PIXEL00_20 PIXEL01_20 if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_22 break; case 40: case 44: case 168: case 172: PIXEL00_21 PIXEL01_20 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_20 break; case 9: case 13: case 137: case 141: PIXEL00_12 PIXEL01_20 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_20 break; case 18: case 50: PIXEL00_22 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_21 break; case 80: case 81: PIXEL00_20 PIXEL01_22 if ( !skiplastline ) PIXEL10_21 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_20 } break; case 72: case 76: PIXEL00_21 PIXEL01_20 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_22 break; case 10: case 138: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_20 } PIXEL01_21 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_20 break; case 66: PIXEL00_22 PIXEL01_21 if ( !skiplastline ) PIXEL10_21 if ( !skiplastline ) PIXEL11_22 break; case 24: PIXEL00_21 PIXEL01_22 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_21 break; case 7: case 39: case 135: PIXEL00_11 PIXEL01_12 if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_20 break; case 148: case 149: case 180: PIXEL00_20 PIXEL01_11 if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_12 break; case 224: case 228: case 225: PIXEL00_20 PIXEL01_20 if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_11 break; case 41: case 169: case 45: PIXEL00_12 PIXEL01_20 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_20 break; case 22: case 54: PIXEL00_22 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_21 break; case 208: case 209: PIXEL00_20 PIXEL01_22 if ( !skiplastline ) PIXEL10_21 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 104: case 108: PIXEL00_21 PIXEL01_20 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_22 break; case 11: case 139: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } PIXEL01_21 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_20 break; case 19: case 51: if (diffYUV(YUV(2), YUV(6))) { PIXEL00_11 PIXEL01_10 } else { PIXEL00_60 PIXEL01_90 } if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_21 break; case 146: case 178: PIXEL00_22 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 if ( !skiplastline ) PIXEL11_12 } else { PIXEL01_90 if ( !skiplastline ) PIXEL11_61 } if ( !skiplastline ) PIXEL10_20 break; case 84: case 85: PIXEL00_20 if (diffYUV(YUV(6), YUV(8))) { PIXEL01_11 if ( !skiplastline ) PIXEL11_10 } else { PIXEL01_60 if ( !skiplastline ) PIXEL11_90 } if ( !skiplastline ) PIXEL10_21 break; case 112: case 113: PIXEL00_20 PIXEL01_22 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL10_61 if ( !skiplastline ) PIXEL11_90 } break; case 200: case 204: PIXEL00_21 PIXEL01_20 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 if ( !skiplastline ) PIXEL11_11 } else { if ( !skiplastline ) PIXEL10_90 if ( !skiplastline ) PIXEL11_60 } break; case 73: case 77: if (diffYUV(YUV(8), YUV(4))) { PIXEL00_12 if ( !skiplastline ) PIXEL10_10 } else { PIXEL00_61 if ( !skiplastline ) PIXEL10_90 } PIXEL01_20 if ( !skiplastline ) PIXEL11_22 break; case 42: case 170: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 if ( !skiplastline ) PIXEL10_11 } else { PIXEL00_90 if ( !skiplastline ) PIXEL10_60 } PIXEL01_21 if ( !skiplastline ) PIXEL11_20 break; case 14: case 142: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 PIXEL01_12 } else { PIXEL00_90 PIXEL01_61 } if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_20 break; case 67: PIXEL00_11 PIXEL01_21 if ( !skiplastline ) PIXEL10_21 if ( !skiplastline ) PIXEL11_22 break; case 70: PIXEL00_22 PIXEL01_12 if ( !skiplastline ) PIXEL10_21 if ( !skiplastline ) PIXEL11_22 break; case 28: PIXEL00_21 PIXEL01_11 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_21 break; case 152: PIXEL00_21 PIXEL01_22 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_12 break; case 194: PIXEL00_22 PIXEL01_21 if ( !skiplastline ) PIXEL10_21 if ( !skiplastline ) PIXEL11_11 break; case 98: PIXEL00_22 PIXEL01_21 if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_22 break; case 56: PIXEL00_21 PIXEL01_22 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_21 break; case 25: PIXEL00_12 PIXEL01_22 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_21 break; case 26: case 31: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_21 break; case 82: case 214: PIXEL00_22 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_21 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 88: case 248: PIXEL00_21 PIXEL01_22 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 74: case 107: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } PIXEL01_21 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_22 break; case 27: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } PIXEL01_10 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_21 break; case 86: PIXEL00_22 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_21 if ( !skiplastline ) PIXEL11_10 break; case 216: PIXEL00_21 PIXEL01_22 if ( !skiplastline ) PIXEL10_10 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 106: PIXEL00_10 PIXEL01_21 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_22 break; case 30: PIXEL00_10 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_21 break; case 210: PIXEL00_22 PIXEL01_10 if ( !skiplastline ) PIXEL10_21 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 120: PIXEL00_21 PIXEL01_22 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_10 break; case 75: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } PIXEL01_21 if ( !skiplastline ) PIXEL10_10 if ( !skiplastline ) PIXEL11_22 break; case 29: PIXEL00_12 PIXEL01_11 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_21 break; case 198: PIXEL00_22 PIXEL01_12 if ( !skiplastline ) PIXEL10_21 if ( !skiplastline ) PIXEL11_11 break; case 184: PIXEL00_21 PIXEL01_22 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_12 break; case 99: PIXEL00_11 PIXEL01_21 if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_22 break; case 57: PIXEL00_12 PIXEL01_22 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_21 break; case 71: PIXEL00_11 PIXEL01_12 if ( !skiplastline ) PIXEL10_21 if ( !skiplastline ) PIXEL11_22 break; case 156: PIXEL00_21 PIXEL01_11 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_12 break; case 226: PIXEL00_22 PIXEL01_21 if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_11 break; case 60: PIXEL00_21 PIXEL01_11 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_21 break; case 195: PIXEL00_11 PIXEL01_21 if ( !skiplastline ) PIXEL10_21 if ( !skiplastline ) PIXEL11_11 break; case 102: PIXEL00_22 PIXEL01_12 if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_22 break; case 153: PIXEL00_12 PIXEL01_22 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_12 break; case 58: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_21 break; case 83: PIXEL00_11 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if ( !skiplastline ) PIXEL10_21 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 92: PIXEL00_21 PIXEL01_11 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 202: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } PIXEL01_21 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if ( !skiplastline ) PIXEL11_11 break; case 78: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } PIXEL01_12 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if ( !skiplastline ) PIXEL11_22 break; case 154: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_12 break; case 114: PIXEL00_22 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if ( !skiplastline ) PIXEL10_12 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 89: PIXEL00_12 PIXEL01_22 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 90: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 55: case 23: if (diffYUV(YUV(2), YUV(6))) { PIXEL00_11 PIXEL01_0 } else { PIXEL00_60 PIXEL01_90 } if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_21 break; case 182: case 150: PIXEL00_22 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 if ( !skiplastline ) PIXEL11_12 } else { PIXEL01_90 if ( !skiplastline ) PIXEL11_61 } if ( !skiplastline ) PIXEL10_20 break; case 213: case 212: PIXEL00_20 if (diffYUV(YUV(6), YUV(8))) { PIXEL01_11 if ( !skiplastline ) PIXEL11_0 } else { PIXEL01_60 if ( !skiplastline ) PIXEL11_90 } if ( !skiplastline ) PIXEL10_21 break; case 241: case 240: PIXEL00_20 PIXEL01_22 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL10_61 if ( !skiplastline ) PIXEL11_90 } break; case 236: case 232: PIXEL00_21 PIXEL01_20 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 if ( !skiplastline ) PIXEL11_11 } else { if ( !skiplastline ) PIXEL10_90 if ( !skiplastline ) PIXEL11_60 } break; case 109: case 105: if (diffYUV(YUV(8), YUV(4))) { PIXEL00_12 if ( !skiplastline ) PIXEL10_0 } else { PIXEL00_61 if ( !skiplastline ) PIXEL10_90 } PIXEL01_20 if ( !skiplastline ) PIXEL11_22 break; case 171: case 43: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 if ( !skiplastline ) PIXEL10_11 } else { PIXEL00_90 if ( !skiplastline ) PIXEL10_60 } PIXEL01_21 if ( !skiplastline ) PIXEL11_20 break; case 143: case 15: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 PIXEL01_12 } else { PIXEL00_90 PIXEL01_61 } if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_20 break; case 124: PIXEL00_21 PIXEL01_11 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_10 break; case 203: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } PIXEL01_21 if ( !skiplastline ) PIXEL10_10 if ( !skiplastline ) PIXEL11_11 break; case 62: PIXEL00_10 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_21 break; case 211: PIXEL00_11 PIXEL01_10 if ( !skiplastline ) PIXEL10_21 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 118: PIXEL00_22 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_10 break; case 217: PIXEL00_12 PIXEL01_22 if ( !skiplastline ) PIXEL10_10 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 110: PIXEL00_10 PIXEL01_12 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_22 break; case 155: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } PIXEL01_10 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_12 break; case 188: PIXEL00_21 PIXEL01_11 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_12 break; case 185: PIXEL00_12 PIXEL01_22 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_12 break; case 61: PIXEL00_12 PIXEL01_11 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_21 break; case 157: PIXEL00_12 PIXEL01_11 if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_12 break; case 103: PIXEL00_11 PIXEL01_12 if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_22 break; case 227: PIXEL00_11 PIXEL01_21 if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_11 break; case 230: PIXEL00_22 PIXEL01_12 if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_11 break; case 199: PIXEL00_11 PIXEL01_12 if ( !skiplastline ) PIXEL10_21 if ( !skiplastline ) PIXEL11_11 break; case 220: PIXEL00_21 PIXEL01_11 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 158: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_12 break; case 234: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } PIXEL01_21 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_11 break; case 242: PIXEL00_22 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if ( !skiplastline ) PIXEL10_12 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 59: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_21 break; case 121: PIXEL00_12 PIXEL01_22 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 87: PIXEL00_11 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_21 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 79: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } PIXEL01_12 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if ( !skiplastline ) PIXEL11_22 break; case 122: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 94: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 218: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 91: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 229: PIXEL00_20 PIXEL01_20 if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_11 break; case 167: PIXEL00_11 PIXEL01_12 if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_20 break; case 173: PIXEL00_12 PIXEL01_20 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_20 break; case 181: PIXEL00_20 PIXEL01_11 if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_12 break; case 186: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_12 break; case 115: PIXEL00_11 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if ( !skiplastline ) PIXEL10_12 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 93: PIXEL00_12 PIXEL01_11 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 206: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } PIXEL01_12 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if ( !skiplastline ) PIXEL11_11 break; case 205: case 201: PIXEL00_12 PIXEL01_20 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_10 } else { if ( !skiplastline ) PIXEL10_70 } if ( !skiplastline ) PIXEL11_11 break; case 174: case 46: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_10 } else { PIXEL00_70 } PIXEL01_12 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_20 break; case 179: case 147: PIXEL00_11 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_10 } else { PIXEL01_70 } if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_12 break; case 117: case 116: PIXEL00_20 PIXEL01_11 if ( !skiplastline ) PIXEL10_12 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_10 } else { if ( !skiplastline ) PIXEL11_70 } break; case 189: PIXEL00_12 PIXEL01_11 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_12 break; case 231: PIXEL00_11 PIXEL01_12 if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_11 break; case 126: PIXEL00_10 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_10 break; case 219: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } PIXEL01_10 if ( !skiplastline ) PIXEL10_10 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 125: if (diffYUV(YUV(8), YUV(4))) { PIXEL00_12 if ( !skiplastline ) PIXEL10_0 } else { PIXEL00_61 if ( !skiplastline ) PIXEL10_90 } PIXEL01_11 if ( !skiplastline ) PIXEL11_10 break; case 221: PIXEL00_12 if (diffYUV(YUV(6), YUV(8))) { PIXEL01_11 if ( !skiplastline ) PIXEL11_0 } else { PIXEL01_60 if ( !skiplastline ) PIXEL11_90 } if ( !skiplastline ) PIXEL10_10 break; case 207: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 PIXEL01_12 } else { PIXEL00_90 PIXEL01_61 } if ( !skiplastline ) PIXEL10_10 if ( !skiplastline ) PIXEL11_11 break; case 238: PIXEL00_10 PIXEL01_12 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 if ( !skiplastline ) PIXEL11_11 } else { if ( !skiplastline ) PIXEL10_90 if ( !skiplastline ) PIXEL11_60 } break; case 190: PIXEL00_10 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 if ( !skiplastline ) PIXEL11_12 } else { PIXEL01_90 if ( !skiplastline ) PIXEL11_61 } if ( !skiplastline ) PIXEL10_11 break; case 187: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 if ( !skiplastline ) PIXEL10_11 } else { PIXEL00_90 if ( !skiplastline ) PIXEL10_60 } PIXEL01_10 if ( !skiplastline ) PIXEL11_12 break; case 243: PIXEL00_11 PIXEL01_10 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL10_61 if ( !skiplastline ) PIXEL11_90 } break; case 119: if (diffYUV(YUV(2), YUV(6))) { PIXEL00_11 PIXEL01_0 } else { PIXEL00_60 PIXEL01_90 } if ( !skiplastline ) PIXEL10_12 if ( !skiplastline ) PIXEL11_10 break; case 237: case 233: PIXEL00_12 PIXEL01_20 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_100 } if ( !skiplastline ) PIXEL11_11 break; case 175: case 47: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_100 } PIXEL01_12 if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_20 break; case 183: case 151: PIXEL00_11 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_100 } if ( !skiplastline ) PIXEL10_20 if ( !skiplastline ) PIXEL11_12 break; case 245: case 244: PIXEL00_20 PIXEL01_11 if ( !skiplastline ) PIXEL10_12 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_100 } break; case 250: PIXEL00_10 PIXEL01_10 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 123: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } PIXEL01_10 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_10 break; case 95: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_10 if ( !skiplastline ) PIXEL11_10 break; case 222: PIXEL00_10 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_10 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 252: PIXEL00_21 PIXEL01_11 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_100 } break; case 249: PIXEL00_12 PIXEL01_22 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_100 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 235: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } PIXEL01_21 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_100 } if ( !skiplastline ) PIXEL11_11 break; case 111: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_100 } PIXEL01_12 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_22 break; case 63: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_100 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_21 break; case 159: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_100 } if ( !skiplastline ) PIXEL10_22 if ( !skiplastline ) PIXEL11_12 break; case 215: PIXEL00_11 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_100 } if ( !skiplastline ) PIXEL10_21 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 246: PIXEL00_22 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if ( !skiplastline ) PIXEL10_12 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_100 } break; case 254: PIXEL00_10 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_100 } break; case 253: PIXEL00_12 PIXEL01_11 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_100 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_100 } break; case 251: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } PIXEL01_10 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_100 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 239: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_100 } PIXEL01_12 if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_100 } if ( !skiplastline ) PIXEL11_11 break; case 127: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_100 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_20 } if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_20 } if ( !skiplastline ) PIXEL11_10 break; case 191: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_100 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_100 } if ( !skiplastline ) PIXEL10_11 if ( !skiplastline ) PIXEL11_12 break; case 223: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_20 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_100 } if ( !skiplastline ) PIXEL10_10 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_20 } break; case 247: PIXEL00_11 if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_100 } if ( !skiplastline ) PIXEL10_12 if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_100 } break; case 255: if (diffYUV(YUV(4), YUV(2))) { PIXEL00_0 } else { PIXEL00_100 } if (diffYUV(YUV(2), YUV(6))) { PIXEL01_0 } else { PIXEL01_100 } if (diffYUV(YUV(8), YUV(4))) { if ( !skiplastline ) PIXEL10_0 } else { if ( !skiplastline ) PIXEL10_100 } if (diffYUV(YUV(6), YUV(8))) { if ( !skiplastline ) PIXEL11_0 } else { if ( !skiplastline ) PIXEL11_100 } break; } } void InitLUT() { int r, g, b; int Y, u, v; int color; // Allocate the YUV/LUT buffers on the fly if needed. if (RGBtoYUV == 0) RGBtoYUV = (Uint32 *)malloc(65536 * sizeof(Uint32)); if (LUT16to32 == 0) LUT16to32 = (Uint32 *)malloc(65536 * sizeof(Uint32)); for (color = 0; color < 65536; ++color) { r = ((color & RedMask) >> RedShift) << (8 - RedBits); g = ((color & GreenMask) >> GreenShift) << (8 - GreenBits); b = ((color & BlueMask) >> BlueShift) << (8 - BlueBits); LUT16to32[color] = (r << 16) | (g << 8) | b; Y = (r + g + b) >> 2; u = 128 + ((r - b) >> 2); v = 128 + ((-r + 2 * g - b) >> 3); RGBtoYUV[color] = (Y << 16) | (u << 8) | v; } } void hq2x(Uint8 *srcPtr, Uint32 srcPitch, Uint8 *dstPtr, Uint32 dstPitch, int width, int height) { register int w1, w2, w3, w4, w5, w6, w7, w8, w9; const Uint32 nextlineSrc = srcPitch / sizeof(Uint16); Uint16 *p = (Uint16 *)srcPtr; const Uint32 nextlineDst = dstPitch / sizeof(Uint16); Uint16 *q = (Uint16 *)dstPtr; int tmpWidth; if (!hq2xinited) { InitLUT(); hq2xinited=1; } // +----+----+----+ // | | | | // | w1 | w2 | w3 | // +----+----+----+ // | | | | // | w4 | w5 | w6 | // +----+----+----+ // | | | | // | w7 | w8 | w9 | // +----+----+----+ /********************* Primera fila **************************/ w1 = 0; w4 = 0; w7 = 0; w2 = 0; w5 = *(p); w8 = *(p + nextlineSrc); tmpWidth = width-1; while (tmpWidth--) { p++; w3 = 0; w6 = *(p); w9 = *(p + nextlineSrc); hq2x_main( w1, w2, w3, w4, w5, w6, w7, w8, w9, nextlineSrc, nextlineDst, p, q, 0); w1 = w2; w4 = w5; w7 = w8; w2 = w3; w5 = w6; w8 = w9; q += 2; } /* Ultima columna de la primera fila */ p++; w3 = 0; w6 = 0; w9 = 0; hq2x_main( w1, w2, w3, w4, w5, w6, w7, w8, w9, nextlineSrc, nextlineDst, p, q, 0); w1 = w2; w4 = w5; w7 = w8; w2 = w3; w5 = w6; w8 = w9; q += 2; /* Proxima linea */ p += nextlineSrc - width; q += (nextlineDst - width) * 2; height-=2; /********************* cuerpo principal **************************/ while (height--) { // w1 = *(p - 1 - nextlineSrc); w4 = *(p - 1); w7 = *(p - 1 + nextlineSrc); w1 = 0; w4 = 0; w7 = 0; w2 = *(p - nextlineSrc); w5 = *(p); w8 = *(p + nextlineSrc); tmpWidth = width-1; while (tmpWidth--) { p++; w3 = *(p - nextlineSrc); w6 = *(p); w9 = *(p + nextlineSrc); hq2x_main( w1, w2, w3, w4, w5, w6, w7, w8, w9, nextlineSrc, nextlineDst, p, q, 0); w1 = w2; w4 = w5; w7 = w8; w2 = w3; w5 = w6; w8 = w9; q += 2; } /* Ultima columna de la fila N */ p++; w3 = 0; w6 = 0; w9 = 0; hq2x_main( w1, w2, w3, w4, w5, w6, w7, w8, w9, nextlineSrc, nextlineDst, p, q, 0); w1 = w2; w4 = w5; w7 = w8; w2 = w3; w5 = w6; w8 = w9; q += 2; p += nextlineSrc - width; q += (nextlineDst - width) * 2; } /********************* ultima linea **************************/ w1 = 0; w4 = 0; w7 = 0; w2 = *(p - nextlineSrc); w5 = *(p); w8 = 0; tmpWidth = width-1; while (tmpWidth--) { p++; w3 = *(p - nextlineSrc); w6 = *(p); w9 = 0; hq2x_main( w1, w2, w3, w4, w5, w6, w7, w8, w9, nextlineSrc, nextlineDst, p, q, 0); w1 = w2; w4 = w5; w7 = w8; w2 = w3; w5 = w6; w8 = w9; q += 2; } /* Ultima columna de la utima fila */ p++; w3 = 0; w6 = 0; w9 = 0; hq2x_main( w1, w2, w3, w4, w5, w6, w7, w8, w9, nextlineSrc, nextlineDst, p, q, 1); } Fenix/fxi/Makefile.am0000644000000000000000000000001410607526732013452 0ustar rootrootSUBDIRS=src Fenix/fxi/FXI.proj0000644000000000000000000015024610607526732012755 0ustar rootrootMIDEDPrf+1PrEnPrVrPrivRnPr DAccSPth/boot/develop/headers/beSPth/boot/develop/headers/cppSPth/boot/develop/headers/posixSPth/boot/develop/libSPth/boot/beos/system/libPPth{project}PPth/resPPth../commonPPth../includePPth/incPPth/src/Be_compat/(Objects.libbe_compat)foTS 0apDDhwNEs6'rtTG d.BaDGSGNOLerrornIXD nEDD be:media_nameWindow ActivatednIXD(nEDDnIXDPPth/boot/home/config/includePPth/boot/home/config/libTrgg gcc_linkapplication/x-mw-projectgcc_linkapplication/x-vnd.Be-elfexecutablegcc_linkapplication/x-vnd.Be.ar-archivecgcctext/*c++gcctext/*ccgcctext/*cpgcctext/*cppgcctext/*doctext/*exptext/*htext/*htmltext/*shshtext/*hwNE 2rtTG @aDGSagcc_linkogcc_linkrsrcsogcc_linkGPrfeGenBRsDtResDataGenBShDtShellData-noprofileGenB cccg gccLanguageGenB-cccggccCommonWarningGenB'cccggccWarningGenB*cccggccCodeGenerationGenB)cccgAdditionalGCCCompilerOptions-DTARGET_BEOSGenBmsanNASMOptions8P&@f}QP&@뒻? ?밻P&@H$u$S=B"섖섖M>#$>#>쀟>섖#л#>%SX_VQQ"섖 $$(G D)G >쀟섖>쀟섖M>>l)>G >쀟>섖G =!Y1 $(찼ؼj>섖>(P $ !(>쀟"섖 $K $L)($>쀟섖>쀟섖M>>t)>($ >쀟>섖($ =!Y섖옽K $$̽D$p$X_0$XW8@0ͯX_p$C$a $X_쐾XW$40$DX_ $ leC $TYNAhX_]C $TYNAhE0$cccg$϶ ETYNAhmsan4TYNAGenBdlcggccLinkerGenB'dlcgAdditionalGCCLinkerOptions8P&@f}QP&@뒻? ?밻P&@H$u$S=B"섖섖M>#$>#>쀟>섖#л#>%SX_VQQ"섖 $$(G D)G >쀟섖>쀟섖M>>l)>G >쀟>섖G =!Y1 $(찼ؼj>섖>(P $ !(>쀟"섖 $K $L)($>$섖>쀟섖M>>t)> $H >쀟>섖 $H =!Y섖옽K $(̽D$$ X_h $XWt(hͯX_$ C$$X_쐾XW$$$h0$DX_ $ leC $TYNAhX_]C $TYNAh Eh$msan$϶ ETYNAhdlcg4TYNAGenBGNOLUpdateProjGenBmwcxProjectPrefsx86application/x-vnd.Be-elfexecutable../bin/fxiSectPObjectshyDPrfA+\x ly"hxxLinklMime$ application/x-vnd.Be.ELF-objectMSFl Name be_compat.oLinkdMimeapplication/x-mw-libraryMSFlName mmx_main.oLinkgMimeapplication/x-mw-libraryMSFl"Namemmx_scale2x.oSectPResourceshyDPrfA+\x ly"hxxPLnkcB=mMimeapplication/x-be-resourceMSFlName fxi.rsrcSectPExternal ProjectsDPrfA+\x ly"hxxSbPrkMimeapplication/x-mw-projectMSFl&Namelibbe_compat.projSectPLibrariesrojectsDPrfA+\x ly"hxxLinkpMime'#application/x-vnd.Be-elfexecutableMSFl!Name x86/libbe.soLinklMime'#application/x-vnd.Be-elfexecutableMSFlName libdl.soLinknMime'#application/x-vnd.Be-elfexecutableMSFlName libglob.soLinkmMime'#application/x-vnd.Be-elfexecutableMSFlName libpng.soLinkmMime'#application/x-vnd.Be-elfexecutableMSFlName libSDL.soLinksMime'#application/x-vnd.Be-elfexecutableMSFl$NamelibSDL_mixer.soLinkkMime'#application/x-vnd.Be-elfexecutableMSFlName libz.soSectP*SourcessrojectsDPrfA+\x ly"hxxPreFZB=`Mime text/plainMSFl#Namemmx_compile.shFil1 `B=Mimetext/x-source-codeMSFlName dcbr.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName dirs.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1PB=Mimetext/x-source-codeMSFlName dirs.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName dirs.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1 B=Mimetext/x-source-codeMSFlName fbm.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1B=Mimetext/x-source-codeMSFlName fgc.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName fgc.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil10B=Mimetext/x-source-codeMSFlName files.cSrFlName files.hFil1a# B=Mimetext/x-source-codeMSFl"Namefnc_exports.cFil1B=Mimetext/x-source-codeMSFlName fpl.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fpl.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1<B=Mimetext/x-source-codeMSFlName f_bgload.cSrFlName SDL.hSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFlName SDL_main.hSrFl Name SDL_mixer.hSrFl Name SDL_mutex.hSrFl Name SDL_rwops.hSrFl!Name SDL_thread.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil10B=Mimetext/x-source-codeMSFlName f_cd.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1B=Mimetext/x-source-codeMSFl!Name f_joystick.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1 B=Mimetext/x-source-codeMSFlName f_sort.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1 B=Mimetext/x-source-codeMSFl Name g_blendop.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1& B=cMimetext/x-source-codeMSFlName g_blit.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fmath.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil10B=Mimetext/x-source-codeMSFl Name g_console.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1 `,B=Mimetext/x-source-codeMSFl#Nameg_conversion.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil14B=Mimetext/x-source-codeMSFlName g_draw.cSrFlName fbm.hSrFlName files.hSrFlName grlib.hSrFlName grlib_st.hSrFl"Nameinstance_st.hFil1 B=Mimetext/x-source-codeMSFlName g_flic.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1 B= Mimetext/x-source-codeMSFlName g_font.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1  B=.Mimetext/x-source-codeMSFlName g_fpg.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil19PB=2Mimetext/x-source-codeMSFlName g_main.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl Name be_compat.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1 B==Mimetext/x-source-codeMSFlName g_maps.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil10xB=CMimetext/x-source-codeMSFlName g_mode7.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fmath.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1:/ B=JMimetext/x-source-codeMSFlName g_pal.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName fgc.hSrFlName files.hSrFlName flic.hSrFlName fpl.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1`(B=QMimetext/x-source-codeMSFl!Name g_profiler.cFil1 B=UMimetext/x-source-codeMSFlName g_scroll.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil12B=YMimetext/x-source-codeMSFl!Name g_systexts.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1PB=\Mimetext/x-source-codeMSFlName g_texts.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1B=`Mimetext/x-source-codeMSFlName img_pcx.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1 B=cMimetext/x-source-codeMSFlName img_png.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1B=gMimetext/x-source-codeMSFlName instance.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1B=kMimetext/x-source-codeMSFlName i_copy.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1p B=nMimetext/x-source-codeMSFlName i_debug.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1B=qMimetext/x-source-codeMSFlName i_func.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName dirs.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fmath.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName regex.hSrFlName sound.hSrFlName sysprocs.hSrFl!Name sysprocs_p.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1E(B=Mimetext/x-source-codeMSFlName i_main.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1B=ͅMimetext/x-source-codeMSFl!Name i_saveload.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1  B=͈Mimetext/x-source-codeMSFlName main.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName font.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1 p,B=͍Mimetext/x-source-codeMSFlName pathfind.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1XpB=͑Mimetext/x-source-codeMSFlName regex.cSrFlName regex.hFil1 B=͚Mimetext/x-source-codeMSFlName sound.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1$B=͝Mimetext/x-source-codeMSFlName strings.cSrFl Name SDL_audio.hSrFl$NameSDL_byteorder.hSrFl Name SDL_mixer.hSrFl Name SDL_rwops.hSrFl Name SDL_types.hSrFl"NameSDL_version.hSrFl!Name begin_code.hSrFl!Name close_code.hSrFlName dcb.hSrFlName fbm.hSrFlName files.hSrFlName flic.hSrFlName fxi.hSrFlName grlib.hSrFlName grlib_st.hSrFl Name i_procdef.hSrFl#Namei_procdef_st.hSrFlName instance.hSrFlName offsets.hSrFlName pslang.hSrFlName sound.hSrFlName typedef.hSrFlName xctype.hSrFlName xstrings.hFil1@@B=͡Mimetext/x-source-codeMSFlName xctype.cSrFlName xctype.hSectPHeaderssrojectsDPrfA+\x ly"hxxIgFlYMimetext/x-source-codeMSFlName dcb.hIgFlZMimetext/x-source-codeMSFlName dirs.hIgFlYMimetext/x-source-codeMSFlName fbm.hIgFlYMimetext/x-source-codeMSFlName fgc.hIgFl[Mimetext/x-source-codeMSFlName files.hIgFl^Mimetext/x-source-codeMSFlName files_st.hIgFlZMimetext/x-source-codeMSFlName flic.hIgFl]Mimetext/x-source-codeMSFlName flic_st.hIgFl[Mimetext/x-source-codeMSFlName fmath.hIgFlaMimetext/x-source-codeMSFl"Namefnx_loadlib.hIgFlZMimetext/x-source-codeMSFlName font.hIgFlYMimetext/x-source-codeMSFlName fpl.hIgFl[Mimetext/x-source-codeMSFlName fxdll.hIgFlYMimetext/x-source-codeMSFlName fxi.hIgFl[Mimetext/x-source-codeMSFlName grlib.hIgFl^Mimetext/x-source-codeMSFlName grlib_st.hIgFl^Mimetext/x-source-codeMSFlName instance.hIgFlaMimetext/x-source-codeMSFl"Nameinstance_st.hIgFl_Mimetext/x-source-codeMSFl Name i_procdef.hIgFlbMimetext/x-source-codeMSFl#Namei_procdef_st.hIgFl]Mimetext/x-source-codeMSFlName offsets.hIgFlYMimetext/x-source-codeMSFlName png.hIgFl]Mimetext/x-source-codeMSFlName pngconf.hIgFl\Mimetext/x-source-codeMSFlName pslang.hIgFl[Mimetext/x-source-codeMSFlName regex.hIgFl[Mimetext/x-source-codeMSFlName sound.hIgFl`Mimetext/x-source-codeMSFl!Name sysprocs_p.hFenix/fxi/FXI.plg0000644000000000000000000000433210607526730012555 0ustar rootroot

Build Log

--------------------Configuration: FXI - Win32 Debug--------------------

Command Lines

Creating temporary file "C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSP10.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"..\bin\Debug/FXI.pdb" /debug /machine:I386 /out:"..\bin\Debug/FXI.exe" /pdbtype:sept .\Debug\fbm.obj .\Debug\fgc.obj .\Debug\fpl.obj .\Debug\g_blendop.obj .\Debug\g_blit.obj .\Debug\g_console.obj .\Debug\g_conversion.obj .\Debug\g_draw.obj .\Debug\g_flic.obj .\Debug\g_font.obj .\Debug\g_fpg.obj .\Debug\g_main.obj .\Debug\g_maps.obj .\Debug\g_mode7.obj .\Debug\g_pal.obj .\Debug\g_profiler.obj .\Debug\g_scroll.obj .\Debug\g_systexts.obj .\Debug\g_texts.obj .\Debug\img_pcx.obj .\Debug\img_png.obj .\Debug\mmx_hspan.obj .\Debug\mmx_main.obj .\Debug\mmx_scale2x.obj .\Debug\f_bgload.obj .\Debug\f_cd.obj .\Debug\f_joystick.obj .\Debug\f_sort.obj .\Debug\i_copy.obj .\Debug\i_debug.obj .\Debug\i_func.obj .\Debug\i_main.obj .\Debug\i_saveload.obj .\Debug\instance.obj .\Debug\pathfind.obj .\Debug\sound.obj .\Debug\png.obj .\Debug\pngerror.obj .\Debug\pnggccrd.obj .\Debug\pngget.obj .\Debug\pngmem.obj .\Debug\pngpread.obj .\Debug\pngread.obj .\Debug\pngrio.obj .\Debug\pngrtran.obj .\Debug\pngrutil.obj .\Debug\pngset.obj .\Debug\pngtrans.obj .\Debug\pngvcrd.obj .\Debug\pngwio.obj .\Debug\pngwrite.obj .\Debug\pngwtran.obj .\Debug\pngwutil.obj .\Debug\dcbr.obj .\Debug\dirs.obj .\Debug\files.obj .\Debug\fnc_exports.obj .\Debug\main.obj .\Debug\regex.obj .\Debug\strings.obj .\Debug\xctype.obj .\Debug\fxi.res ..\..\SDL_mixer\lib\SDL_mixer.lib ..\..\SDL\lib\SDLmain.lib ..\..\SDL\lib\SDL.lib ..\..\zlib\lib\zdll.lib ] Creating command line "link.exe @C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSP10.tmp"

Output Window

Linking...

Results

FXI.exe - 0 error(s), 0 warning(s)
Fenix/fxi/res/0000755000000000000000000000000010606775650012220 5ustar rootrootFenix/fxi/res/CVS/0000755000000000000000000000000010606775650012653 5ustar rootrootFenix/fxi/res/CVS/Repository0000644000000000000000000000001610601620506014732 0ustar rootrootFenix/fxi/res Fenix/fxi/res/CVS/Root0000644000000000000000000000007410601620506013502 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/fxi/res/CVS/Entries0000644000000000000000000000000210606775650014177 0ustar rootrootD Fenix/fxi/inc/0000755000000000000000000000000010607526734012176 5ustar rootrootFenix/fxi/inc/flic_st.h0000644000000000000000000001023110607526732013765 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __FLIC_ST_H #define __FLIC_ST_H #ifdef TARGET_MAC #include #else #include #endif #ifndef __GNUC__ #define __PACKED #define inline __inline #else #define __PACKED __attribute__ ((packed)) #endif #ifdef _MSC_VER #pragma pack(push, 1) #endif /* Reproduccin de FLI */ /* ------------------- */ typedef struct { Uint32 size; /* Size of FLIC including this header */ Uint16 type; /* File type 0xAF11, 0xAF12, 0xAF30, 0xAF44, ... */ Uint16 frames; /* Number of frames in first segment */ Uint16 width; /* FLIC width in pixels */ Uint16 height; /* FLIC height in pixels */ Uint16 depth; /* Bits per pixel (usually 8) */ Uint16 flags; /* Set to zero or to three */ Uint32 speed; /* Delay between frames */ Uint16 reserved1; /* Set to zero */ Uint32 created; /* Date of FLIC creation (FLC only) */ Uint32 creator; /* Serial number or compiler id (FLC only) */ Uint32 updated; /* Date of FLIC update (FLC only) */ Uint32 updater; /* Serial number (FLC only), see creator */ Uint16 aspect_dx; /* Width of square rectangle (FLC only) */ Uint16 aspect_dy; /* Height of square rectangle (FLC only) */ Uint16 ext_flags; /* EGI: flags for specific EGI extensions */ Uint16 keyframes; /* EGI: key-image frequency */ Uint16 totalframes; /* EGI: total number of frames (segments) */ Uint32 req_memory; /* EGI: maximum chunk size (uncompressed) */ Uint16 max_regions; /* EGI: max. number of regions in a CHK_REGION chunk */ Uint16 transp_num; /* EGI: number of transparent levels */ Uint8 reserved2[24]; /* Set to zero */ Uint32 oframe1; /* Offset to frame 1 (FLC only) */ Uint32 oframe2; /* Offset to frame 2 (FLC only) */ Uint8 reserved3[40]; /* Set to zero */ } __PACKED FLIC_HEADER; typedef union { struct { Uint32 size; /* Size of the chunk */ Uint16 type; /* Chunk type */ } header ; struct { Uint32 size; /* Size of the chunk */ Uint16 type; /* Chunk type: 12 */ Uint16 first_line; /* First line */ Uint16 line_count; /* Number of lines in the chunk */ Uint8 data[0]; } delta_fli ; struct { Uint32 size; /* Size of the chunk */ Uint16 type; /* Chunk type: 15, 12, etc. */ Uint8 data[0]; } raw ; } FLIC_CHUNK ; typedef struct { Uint32 size; /* Size of the frame, including subchunks */ Uint16 type; /* Chunk type: 0xF1FA */ Uint16 chunks; /* Number of subchunks */ Uint8 expand[8]; } FLIC_FRAME ; typedef struct { FLIC_HEADER header ; FLIC_CHUNK * chunk ; FLIC_FRAME * frame ; Uint32 frame_reserved ; GRAPH * bitmap ; file * fp ; int current_frame ; int speed_ms ; int last_frame_ms ; int finished ; } FLIC ; /* Tipos de chunk */ #define CHUNK_COLOR_256 4 #define CHUNK_COLOR_64 11 #define CHUNK_DELTA_FLI 12 #define CHUNK_DELTA_FLC 7 #define CHUNK_BLACK 13 #define CHUNK_BYTE_RUN 15 #define CHUNK_FLI_COPY 16 #define CHUNK_STAMP 18 #define CHUNK_PREFIX 0xF100 #define CHUNK_FRAME 0xF1FA #ifdef _MSC_VER #pragma pack(pop) #endif #endif Fenix/fxi/inc/instance.h0000644000000000000000000000466010607526734014161 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __INSTANCE_H #define __INSTANCE_H #include #include "i_procdef_st.h" /* Instancias. Una instancia se crea a partir de un proceso, pero en * realidad es independiente del proceso original */ extern void * globaldata ; extern void * localdata ; extern int local_size ; extern INSTANCE * first_instance ; extern INSTANCE * last_instance ; extern int must_exit ; extern int instance_getid () ; extern INSTANCE * instance_get (int id) ; extern INSTANCE * instance_getfather (INSTANCE * i) ; extern INSTANCE * instance_getson (INSTANCE * i) ; extern INSTANCE * instance_getbigbro (INSTANCE * i) ; extern INSTANCE * instance_getsmallbro (INSTANCE * i) ; extern INSTANCE * instance_new (PROCDEF * proc, INSTANCE * father) ; extern INSTANCE * instance_duplicate (INSTANCE * i) ; extern void instance_destroy (INSTANCE * r) ; extern void instance_dump (INSTANCE * father, int indent) ; extern void instance_dump_all () ; extern void instance_posupdate (INSTANCE * i) ; extern int instance_poschanged (INSTANCE * i) ; extern int instance_exists (INSTANCE * i) ; extern INSTANCE * instance_next_by_priority(); extern void instance_dirty (INSTANCE * i) ; /* Las siguientes funciones son el punto de entrada del intrprete */ extern int instance_go (INSTANCE * r) ; extern void instance_go_all () ; #endif Fenix/fxi/inc/instance_st.h0000644000000000000000000000614110607526734014663 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __INSTANCE_ST_H #define __INSTANCE_ST_H #define STACK_NO_RETURN_VALUE 0x8000 #define STACK_SIZE_MASK 0x7FFF /* Instancias. Una instancia se crea a partir de un proceso, pero en * realidad es independiente del proceso original */ typedef struct _instance { void * locdata ; void * pridata ; void * pubdata ; int * code ; int * codeptr ; int * exitcode ; struct _procdef * proc ; int private_size ; int public_size ; int first_run ; /* General list - unsorted */ struct _instance * next ; struct _instance * prev ; /* Dirty instances list */ struct _instance * next_dirty ; int is_dirty ; /* Hashed list */ struct _instance * next_by_priority ; struct _instance * prev_by_priority ; /* Function support */ /* struct _instance * waiting_for ; */ struct _instance * called_by ; /* The first integer at the stack is the stack size, with optional NO_RETURN_VALUE mask. The stack contents follows */ int * stack ; /* For debugging */ struct _procdef * inproc ; void * inpridata ; int breakpoint; } INSTANCE ; //#ifndef __I_PROCDEF_H //#include "i_procdef.h" //#endif /* Macros para acceder a datos locales o privados de una instancia */ #define LOCDWORD(a,b) ( *(Sint32 *) ((Uint8 *)(a->locdata)+b) ) #define LOCWORD(a,b) ( *(Uint16 *) ((Uint8 *)(a->locdata)+b) ) #define LOCBYTE(a,b) ( *(Uint8 *) ((Uint8 *)(a->locdata)+b) ) #define PRIDWORD(a,b) ( *(Sint32 *) ((Uint8 *)(a->pridata)+b) ) #define PRIWORD(a,b) ( *(Uint16 *) ((Uint8 *)(a->pridata)+b) ) #define PRIBYTE(a,b) ( *(Uint8 *) ((Uint8 *)(a->pridata)+b) ) #define PUBDWORD(a,b) ( *(Sint32 *) ((Uint8 *)(a->pubdata)+b) ) #define PUBWORD(a,b) ( *(Uint16 *) ((Uint8 *)(a->pubdata)+b) ) #define PUBBYTE(a,b) ( *(Uint8 *) ((Uint8 *)(a->pubdata)+b) ) #define GLODWORD(b) ( *(Sint32 *) ((Uint8 *)(globaldata)+b) ) #define GLOWORD(b) ( *(Uint16 *) ((Uint8 *)(globaldata)+b) ) #define GLOBYTE(b) ( *(Uint8 *) ((Uint8 *)(globaldata)+b) ) #define FIRST_INSTANCE_ID 65537 #endif Fenix/fxi/inc/CVS/0000755000000000000000000000000010607526734012631 5ustar rootrootFenix/fxi/inc/CVS/Repository0000644000000000000000000000001610601620504014710 0ustar rootrootFenix/fxi/inc Fenix/fxi/inc/CVS/Root0000644000000000000000000000007410601620504013460 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/fxi/inc/CVS/Entries0000644000000000000000000000106110607526734014163 0ustar rootroot/flic.h/1.1.1.1/Thu Apr 12 22:08:28 2007// /flic_st.h/1.2/Thu Apr 12 22:08:28 2007// /fmath.h/1.2/Thu Apr 12 22:08:28 2007// /font.h/1.1.1.1/Thu Apr 12 22:08:28 2007// /fxi.h/1.10/Thu Apr 12 22:08:28 2007// /grlib.h/1.8/Thu Apr 12 22:08:29 2007// /grlib_st.h/1.5/Thu Apr 12 22:08:29 2007// /i_procdef.h/1.2/Thu Apr 12 22:08:29 2007// /i_procdef_st.h/1.6/Thu Apr 12 22:08:29 2007// /instance.h/1.1.1.1/Thu Apr 12 22:08:29 2007// /instance_st.h/1.4/Thu Apr 12 22:08:29 2007// /sound.h/1.4/Thu Apr 12 22:08:29 2007// /sysprocs_p.h/1.4/Thu Apr 12 22:08:29 2007// D Fenix/fxi/inc/fmath.h0000644000000000000000000000535510607526732013454 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* Rutinas matemticas de punto fijo, basadas en Allegro */ #ifndef M_PI #define M_PI 3.14159265358979323846 /* pi */ #endif #ifndef MAX #define MAX(a,b) ((a)>(b) ? (a):(b)) #define MIN(a,b) ((a)<(b) ? (a):(b)) #endif typedef long int fixed ; extern fixed cos_table[90001] ; extern int cos_table_initialized ; extern void init_cos_tables() ; #ifndef __GNUC__ #define inline __inline #endif #ifdef DEBUG # define __INLINE static #else # define __INLINE static inline #endif //#define FIXED_PREC 12 #define FIXED_PREC 10000 #define FIXED_PREC_MED 5000 #define FIXED_PREC_DEC 1000 __INLINE fixed ftofix(double x) { return (long)(x * FIXED_PREC); } __INLINE float fixtof (fixed x) { return ((float)x) / FIXED_PREC ; } __INLINE fixed itofix(int x) { return x * FIXED_PREC ; } __INLINE int fixceil(fixed x) { int xd; if (x<0) { xd = x % FIXED_PREC ; x -= (FIXED_PREC + xd) ; } else if (x>0) { xd = x % FIXED_PREC ; x += (FIXED_PREC - xd) ; } return x ; } __INLINE int fixtoi(fixed x) { return x / FIXED_PREC ; } __INLINE fixed fcos(int x) { if (x < 0) x = -x ; if (x >= 360000) x %= 360000 ; if (x >= 270000) return cos_table[360000 - x] ; if (x >= 180000) return -cos_table[x - 180000] ; if (x >= 90000) return -cos_table[180000 - x] ; return cos_table[x] ; } __INLINE fixed fsin(int x) { if (x < 0) return -fsin(-x) ; if (x >= 360000) x %= 360000 ; if (x >= 270000) return -cos_table[x - 270000] ; if (x >= 180000) return -cos_table[270000 - x] ; if (x >= 90000) return cos_table[x - 90000 ] ; return cos_table[90000 - x] ; } __INLINE fixed fmul(int x, int y) { return ftofix (fixtof(x) * fixtof(y)) ; } __INLINE fixed fdiv(int x, int y) { return ftofix (fixtof(x) / fixtof(y)) ; } Fenix/fxi/inc/font.h0000644000000000000000000003302210607526734013315 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ unsigned char default_font[256*8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xC1, 0xF7, 0xC1, 0xFF, 0xDD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x1C, 0x3E, 0x7F, 0x1C, 0x1C, 0x1C, 0x1C, 0x00, 0x1C, 0x1C, 0x1C, 0x1C, 0x7F, 0x3E, 0x1C, 0x00, 0x00, 0x1C, 0x0E, 0xFF, 0x0E, 0x1C, 0x00, 0x00, 0x00, 0x38, 0x70, 0xFF, 0x70, 0x38, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0x36, 0x77, 0xFF, 0x77, 0x36, 0x00, 0x00, 0x00, 0x1C, 0x3E, 0x7F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7F, 0x3E, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x00, 0x00, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x7F, 0x36, 0x36, 0x7F, 0x36, 0x00, 0x00, 0x0C, 0x3F, 0x3C, 0x3F, 0x0F, 0x3F, 0x0C, 0x00, 0x73, 0x76, 0x0C, 0x18, 0x37, 0x67, 0x00, 0x00, 0x18, 0x3C, 0x18, 0x3F, 0x66, 0x3F, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x06, 0x00, 0x00, 0x30, 0x18, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x1E, 0x0C, 0x3F, 0x0C, 0x1E, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x3F, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x03, 0x06, 0x0C, 0x18, 0x30, 0x00, 0x00, 0x3E, 0x67, 0x6F, 0x7B, 0x73, 0x3E, 0x00, 0x00, 0x18, 0x78, 0x18, 0x18, 0x18, 0xFE, 0x00, 0x00, 0x3E, 0x63, 0x03, 0x3E, 0x60, 0x7F, 0x00, 0x00, 0x7E, 0x03, 0x3E, 0x03, 0x03, 0x7E, 0x00, 0x00, 0x0E, 0x1E, 0x36, 0x66, 0x7F, 0x06, 0x00, 0x00, 0x7F, 0x60, 0x7E, 0x03, 0x03, 0x7E, 0x00, 0x00, 0x3F, 0x60, 0x7E, 0x63, 0x63, 0x3E, 0x00, 0x00, 0x7F, 0x03, 0x06, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x3E, 0x63, 0x3E, 0x63, 0x63, 0x3E, 0x00, 0x00, 0x3E, 0x63, 0x63, 0x3F, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x06, 0x0C, 0x18, 0x0C, 0x06, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x00, 0x00, 0x3E, 0x63, 0x06, 0x0C, 0x00, 0x0C, 0x00, 0x00, 0x3E, 0x6F, 0x7F, 0x7F, 0x60, 0x3E, 0x00, 0x00, 0x3E, 0x63, 0x63, 0x7F, 0x63, 0x63, 0x00, 0x00, 0x7E, 0x63, 0x7E, 0x63, 0x63, 0x7E, 0x00, 0x00, 0x3F, 0x60, 0x60, 0x60, 0x60, 0x3F, 0x00, 0x00, 0x7E, 0x63, 0x63, 0x63, 0x63, 0x7E, 0x00, 0x00, 0x7F, 0x60, 0x7C, 0x60, 0x60, 0x7F, 0x00, 0x00, 0x7F, 0x60, 0x7F, 0x60, 0x60, 0x60, 0x00, 0x00, 0x3F, 0x60, 0x60, 0x6F, 0x63, 0x3F, 0x00, 0x00, 0x63, 0x63, 0x7F, 0x63, 0x63, 0x63, 0x00, 0x00, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x63, 0x3E, 0x00, 0x00, 0x66, 0x6C, 0x7C, 0x66, 0x63, 0x63, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7F, 0x00, 0x00, 0x63, 0x77, 0x7F, 0x63, 0x63, 0x63, 0x00, 0x00, 0x63, 0x73, 0x7B, 0x6F, 0x67, 0x63, 0x00, 0x00, 0x3E, 0x63, 0x63, 0x63, 0x63, 0x3E, 0x00, 0x00, 0x7E, 0x63, 0x63, 0x7E, 0x60, 0x60, 0x00, 0x00, 0x3E, 0x63, 0x63, 0x6F, 0x67, 0x3F, 0x00, 0x00, 0x7E, 0x63, 0x63, 0x7E, 0x66, 0x63, 0x00, 0x00, 0x3F, 0x60, 0x3E, 0x03, 0x03, 0x7E, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x63, 0x63, 0x63, 0x63, 0x63, 0x3E, 0x00, 0x00, 0x63, 0x63, 0x63, 0x36, 0x36, 0x1C, 0x00, 0x00, 0x63, 0x63, 0x6B, 0x6B, 0x6B, 0x36, 0x00, 0x00, 0x63, 0x36, 0x1C, 0x1C, 0x36, 0x63, 0x00, 0x00, 0xC3, 0xC3, 0x7E, 0x18, 0x18, 0x18, 0x00, 0x00, 0x7F, 0x06, 0x0C, 0x18, 0x30, 0x7F, 0x00, 0x00, 0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0x0F, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x00, 0x00, 0x78, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x1E, 0x33, 0x7C, 0x30, 0x30, 0x7F, 0x00, 0x00, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, 0x00, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x7C, 0x00, 0x00, 0x00, 0x3E, 0x60, 0x60, 0x60, 0x3E, 0x00, 0x00, 0x03, 0x03, 0x1F, 0x33, 0x33, 0x1F, 0x00, 0x00, 0x00, 0x1E, 0x33, 0x3E, 0x30, 0x1F, 0x00, 0x00, 0x1F, 0x30, 0x3C, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x1F, 0x33, 0x33, 0x1F, 0x03, 0x3E, 0x00, 0x30, 0x30, 0x3E, 0x33, 0x33, 0x33, 0x00, 0x0C, 0x00, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x00, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x66, 0x3C, 0x00, 0x30, 0x36, 0x36, 0x3E, 0x33, 0x33, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0xDB, 0xDB, 0xDB, 0xDB, 0x00, 0x00, 0x00, 0x3E, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x1E, 0x33, 0x33, 0x33, 0x1E, 0x00, 0x00, 0x00, 0x3E, 0x33, 0x33, 0x3E, 0x30, 0x30, 0x00, 0x00, 0x1F, 0x33, 0x33, 0x1F, 0x03, 0x03, 0x00, 0x00, 0x36, 0x38, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x1F, 0x30, 0x1E, 0x03, 0x3E, 0x00, 0x00, 0x18, 0x1E, 0x18, 0x18, 0x18, 0x0E, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x1E, 0x00, 0x00, 0x00, 0x33, 0x33, 0x1E, 0x1E, 0x0C, 0x00, 0x00, 0x00, 0x63, 0x63, 0x6B, 0x6B, 0x36, 0x00, 0x00, 0x00, 0x33, 0x1E, 0x0C, 0x1E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38, 0x1C, 0x7E, 0xEE, 0xEE, 0x7C, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x07, 0x0E, 0x7F, 0xFF, 0xFF, 0x7F, 0x70, 0xE0, 0x3C, 0x70, 0xE0, 0xFC, 0xE0, 0x70, 0x3C, 0x00, 0x7C, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x00, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0x00, 0x38, 0x38, 0xFE, 0x38, 0x38, 0x00, 0xFE, 0x00, 0x70, 0x38, 0x1C, 0x38, 0x70, 0x00, 0xFE, 0x00, 0x1C, 0x38, 0x70, 0x38, 0x1C, 0x00, 0xFE, 0x00, 0x0F, 0x1F, 0x1F, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0xFC, 0xFC, 0x78, 0x38, 0x38, 0x00, 0xFE, 0x00, 0x38, 0x38, 0x00, 0x00, 0x7F, 0xFE, 0x00, 0x7F, 0xFE, 0x00, 0x00, 0x3C, 0x7E, 0x7E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x0F, 0x0E, 0x0E, 0x0E, 0xFE, 0x7E, 0x3E, 0x1E, 0x7C, 0x7E, 0x7E, 0x7E, 0x7E, 0x00, 0x00, 0x00, 0x78, 0x1C, 0x38, 0x70, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x3E, 0x3E, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, } ; Fenix/fxi/inc/i_procdef_st.h0000644000000000000000000000347610607526734015021 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __I_PROCDEF_ST_H #define __I_PROCDEF_ST_H #include "instance_st.h" /* Definiciones de procesos, mucho ms simple que en el compilador */ typedef struct _procdef { int * pridata ; int * pubdata ; int * code ; int * exitcode ; int * strings ; int * pubstrings ; int private_size ; int public_size ; int code_size ; int string_count ; int pubstring_count ; int params ; int id ; int type ; int flags ; char * name ; int breakpoint; } PROCDEF ; #define PROC_USES_FRAME 0x01 #define PROC_USES_LOCALS 0x02 #define PROC_FUNCTION 0x04 #define PROC_USES_PUBLICS 0x08 /* Funciones del sistema */ typedef int SYSFUNC (INSTANCE *, int *) ; typedef struct _sysproc { int code ; char * name ; char * paramtypes ; int type ; int params ; SYSFUNC * func ; int id ; } SYSPROC ; #endif Fenix/fxi/inc/grlib_st.h0000644000000000000000000001635410607526734014165 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * HISTORY: 0.82 - New enhanced FONT struct * 0.81 - Added MAP_HEADER struct and magic header for gfx files * 0.74 - Added apptitle and icono for WM functions * */ #ifndef __GRLIB_ST_H #define __GRLIB_ST_H #include "fbm.h" /* -------------------------------------------------------------------- */ /* Librera grfica */ /* -------------------------------------------------------------------- */ enum { AlphaBits = 0, RedBits = 5, GreenBits = 6, BlueBits = 5, AlphaShift = RedBits+GreenBits+BlueBits, RedShift = GreenBits+BlueBits, GreenShift = BlueBits, BlueShift = 0, AlphaMask = ((1 << AlphaBits) - 1) << AlphaShift, RedMask = ((1 << RedBits) - 1) << RedShift, GreenMask = ((1 << GreenBits) - 1) << GreenShift, BlueMask = ((1 << BlueBits) - 1) << BlueShift, RedBlueMask = RedMask | BlueMask }; #define RESOLXY(r,x,y) \ if (LOCDWORD(r, RESOLUTION)>0) \ { \ (x) /= LOCDWORD(r,RESOLUTION) ; \ (y) /= LOCDWORD(r,RESOLUTION) ; \ } \ else if (LOCDWORD(r, RESOLUTION)<0) \ { \ (x) *= -LOCDWORD(r,RESOLUTION) ; \ (y) *= -LOCDWORD(r,RESOLUTION) ; \ } #define RESOLXYZ(r,x,y,z) \ if (LOCDWORD(r, RESOLUTION)>0) \ { \ (x) /= LOCDWORD(r,RESOLUTION) ; \ (y) /= LOCDWORD(r,RESOLUTION) ; \ (z) /= LOCDWORD(r,RESOLUTION) ; \ } \ else if (LOCDWORD(r, RESOLUTION)<0) \ { \ (x) *= -LOCDWORD(r,RESOLUTION) ; \ (y) *= -LOCDWORD(r,RESOLUTION) ; \ (z) *= -LOCDWORD(r,RESOLUTION) ; \ } /* Tipos y datos globales */ typedef struct _cpoint { short int x ; short int y ; } CPOINT ; typedef struct _bitmap { void * data ; /* Pointer to the bitmap data at current frame */ void * data_start ; /* Pointer to the bitmap data at first frame */ Uint32 pitch ; /* Bytes of distance between bitmap lines */ Uint32 width ; /* Width of a bitmap frame in pixels */ Uint32 widthb ; /* Width of a bitmap frame in bytes */ Uint32 height ; /* Height of a bitmap frame in pixels */ int code ; /* Identifier of the graphic (in the FPG) */ Uint32 depth ; /* Bits per pixel (1, 8, 16) */ Uint32 frames ; /* Number of frames */ Uint32 current_frame; /* Number of frame currently selected */ char name[64] ; /* Name of the graphic */ CPOINT * cpoints ; /* Pointer to the control points ([0] = center) */ Uint32 ncpoints; /* Number of control points */ Uint32 offset ; /* Offset of the graphic (in the FPG file) */ Sint16 * blend_table ; /* Pointer to 16 bits blend table if any */ int modified ; /* 1 if bitmap needs analysis */ int info_flags ; /* Analysis result (see bitmap_analize) */ FBM_SEQUENCE * sequences; /* Pointer to sequence array (from FBM file) */ FBM_KEYFRAME * keyframes; /* Pointer to keyframe array (from FBM file) */ Sint32 max_sequence; /* Number of maximum sequence index */ Sint32 max_keyframe; /* Number of maximum keyframe index */ /* Information about current animation sequence */ Uint32 last_frame; Uint32 next_time; Sint32 current_sequence; Sint32 current_keyframe; int end_of_sequence; /* 1 if the map is at the end of the sequence */ /* Linked list of all bitmaps in memory */ struct _bitmap * next; struct _bitmap * prev; } GRAPH ; // info_flags bits #define GI_NOCOLORKEY 1 #define CPOINT_UNDEFINED 32767 /* It's enough if X is set to this value */ enum { CHARSET_ISO8859 = 0, CHARSET_CP850 = 1 }; typedef struct _font { int charset; Uint32 bpp; struct _glyph { GRAPH * bitmap; int xoffset; int yoffset; int xadvance; int yadvance; } glyph[256] ; int maxheight; int maxwidth; } FONT ; typedef struct _grlib { GRAPH ** maps ; int map_reserved ; char name[64]; } GRLIB ; typedef struct _clipregion { int x ; int y ; int x2 ; /* Inclusive */ int y2 ; } REGION ; typedef struct _scrolldata { int fileid ; int graphid ; int backid ; REGION * region ; int flags ; int x0, y0 ; int posx0, posy0 ; int x1, y1 ; int posx1, posy1 ; int z ; INSTANCE * camera ; int ratio ; int speed ; REGION * region1 ; REGION * region2 ; int active ; GRAPH * graph ; GRAPH * back ; struct _scrolldata * follows ; } scrolldata ; typedef struct _keyequiv { int sdlk_equiv ; struct _keyequiv * next ; } key_equiv ; /* Bajo nivel */ /* ---------- */ /* Dibujo de primitivas */ #define DRAWOBJ_LINE 1 #define DRAWOBJ_RECT 2 #define DRAWOBJ_BOX 3 #define DRAWOBJ_CIRCLE 4 #define DRAWOBJ_FCIRCLE 5 #define DRAWOBJ_CURVE 6 typedef struct _drawing_object { int type; int x1; int y1; int x2; int y2; int x3; int y3; int x4; int y4; int level; /* Private */ int color8; int color16; int id; struct _drawing_object * next; } DRAWING_OBJECT; /* Flags para gr_blit */ /* #define B_HMIRROR 0x0001 #define B_VMIRROR 0x0002 #define B_TRANSLUCENT 0x0004 #define B_ALPHA 0x0008 #define B_ABLEND 0x0010 #define B_SBLEND 0x0020 #define B_NOCOLORKEY 0x0080 */ #define B_ALPHA_MASK 0xFF00 #define B_ALPHA_SHIFT 8 /* Graph Mode */ #define MODE_WINDOW 0x0000 #define MODE_16BITS 0x0010 #define MODE_2XSCALE 0x0100 #define MODE_FULLSCREEN 0x0200 #define MODE_DOUBLEBUFFER 0x0400 #define MODE_HARDWARE 0x0800 #define MODE_MODAL 0x1000 #define MODE_FRAMELESS 0x2000 /* CABECERAS DE FICHEROS */ #define MAP_MAGIC "map\x1A\x0D\x0A" #define M16_MAGIC "m16\x1A\x0D\x0A" #define M01_MAGIC "m01\x1A\x0D\x0A" #define PAL_MAGIC "pal\x1A\x0D\x0A" #define FNT_MAGIC "fnt\x1A\x0D\x0A" #define FNX_MAGIC "fnx\x1A\x0D\x0A" #define FPG_MAGIC "fpg\x1A\x0D\x0A" #ifdef _MSC_VER #pragma pack(push, 1) #endif typedef struct { Uint8 magic[8] ; Uint16 width ; Uint16 height ; Uint32 code ; Sint8 name[32] ; } #ifdef __GNU_C__ __attribute__ ((packed)) #endif MAP_HEADER ; #ifdef _MSC_VER #pragma pack(pop) #endif #endif Fenix/fxi/inc/flic.h0000644000000000000000000000256210607526732013267 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __FLIC_H #define __FLIC_H #include /* Reproduccin de FLI */ /* ------------------- */ extern FLIC * flic_open (const char * filename) ; extern void flic_destroy (FLIC * flic) ; extern FLIC * flic_do_frame (FLIC * flic) ; extern void flic_reset (FLIC * flic) ; extern FLIC * current_fli ; extern int current_fli_x ; extern int current_fli_y ; #endif Fenix/fxi/inc/sysprocs_p.h0000644000000000000000000000576610607526734014571 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : sysprocs_p.h * DESCRIPTION : Defines prototipes for internal Fenix system functions */ #ifndef __SYSPROCS_P_H #define __SYSPROCS_P_H /* CD Playing (f_cd.c) */ extern int fxi_cd_drives (INSTANCE * my, int * params); extern int fxi_cd_status (INSTANCE * my, int * params); extern int fxi_cd_name (INSTANCE * my, int * params); extern int fxi_cd_getinfo (INSTANCE * my, int * params); extern int fxi_cd_play (INSTANCE * my, int * params); extern int fxi_cd_playtracks (INSTANCE * my, int * params); extern int fxi_cd_eject (INSTANCE * my, int * params); extern int fxi_cd_pause (INSTANCE * my, int * params); extern int fxi_cd_resume (INSTANCE * my, int * params); extern int fxi_cd_stop (INSTANCE * my, int * params); extern int fxi_cd_numtracks (INSTANCE * my, int * params); extern int fxi_cd_getcurtrack (INSTANCE * my, int * params); /* Array sort functions (f_sort.c) */ extern int fxi_sort (INSTANCE * my, int * params); extern int fxi_sort_n (INSTANCE * my, int * params); extern int fxi_ksort (INSTANCE * my, int * params); extern int fxi_ksort_n (INSTANCE * my, int * params); /* Background load functions (f_bgload.c) */ extern int fxi_bgload_fpg (INSTANCE * my, int * params); extern int fxi_bgload_fgc (INSTANCE * my, int * params); /* Joystick functions (f_joystick.c) */ extern int fxi_joy_num (INSTANCE * my, int * params) ; extern int fxi_joy_name (INSTANCE * my, int * params) ; extern int fxi_joy_select (INSTANCE * my, int * params) ; extern int fxi_joy_buttons (INSTANCE * my, int * params) ; extern int fxi_joy_axes (INSTANCE * my, int * params) ; extern int fxi_joy_get_button (INSTANCE * my, int * params) ; extern int fxi_joy_get_position (INSTANCE * my, int * params) ; extern int fxi_joy_buttons_specific (INSTANCE * my, int * params) ; extern int fxi_joy_axes_specific (INSTANCE * my, int * params) ; extern int fxi_joy_get_button_specific (INSTANCE * my, int * params) ; extern int fxi_joy_get_position_specific (INSTANCE * my, int * params) ; #endif Fenix/fxi/inc/sound.h0000644000000000000000000000500510607526734013477 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __SOUND_H #define __SOUND_H #include "SDL_mixer.h" void sound_init (); void sound_close (); extern int sound_active ; extern int load_song (const char * filename); extern int play_song (int id , int loops); extern int unload_song (int id); extern int stop_song (); extern int pause_song (); extern int resume_song (); extern int is_playing_song (); extern int is_paused_song (); extern int set_song_volume (int volume); extern int load_wav (const char * filename); extern int play_wav (int id , int loops, int channel); extern int unload_wav (int id); extern int stop_wav (int id); extern int pause_wav (int id); extern int resume_wav (int id); extern int is_playing_wav (int id); extern int set_wav_volume (int id,int volume); extern int set_channel_volume (int id,int volume); extern int reserve_channels (int id); extern int set_panning (int canal,int left, int right); extern int set_position (int canal,int angle, int dist); extern int set_distance (int canal,int dist); extern int reverse_stereo (int canal,int flip); extern int fade_music_in (int id, int loops, int ms); extern int fade_music_off (int ms); /* ------------ */ /* CD-ROM Audio */ /* ------------ */ extern void ini_musiccd (); extern void cd_play (int track, int continuous); extern void cd_stop (); extern int cd_playing (); #endif Fenix/fxi/inc/i_procdef.h0000644000000000000000000000272710607526734014311 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __I_PROCDEF_H #define __I_PROCDEF_H #include extern int local_strings ; extern int * localstr ; extern PROCDEF * mainproc ; extern PROCDEF * procs ; extern int procdef_count ; extern PROCDEF * procdef_get (int n) ; extern PROCDEF * procdef_get_by_name (char * name) ; extern SYSPROC * sysproc_get (int code) ; extern int sysproc_add (char * name, char * paramtypes, int type, void * func) ; extern void sysproc_init() ; #endif Fenix/fxi/inc/fxi.h0000644000000000000000000001001610607526734013133 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : fxi.h * DESCRIPTION : Base includes in FXI and some vars and const defines * * HISTORY: * */ /* * VERSION */ #define FXI_VERSION "FXI " VERSION " " __DATE__ " " __TIME__ /* * HEADER FILES */ #ifdef TARGET_MAC #include #else #include #endif #include #include #include #include "files.h" #include "xctype.h" /* * CONSTANTS */ #ifndef M_PI #define M_PI 3.14159265358979323846 /* pi */ #endif #include "typedef.h" #if 0 #define TYPE_DWORD 0 #define TYPE_WORD 1 #define TYPE_BYTE 2 #define TYPE_STRING 3 #define TYPE_FLOAT 4 #define TYPE_POINTER 19 #endif /* * ENDIANESS TRICKS */ #if SDL_BYTEORDER == SDL_LIL_ENDIAN #define ARRANGE_DWORD(x) #define ARRANGE_WORD(x) #define ARRANGE_DWORDS(x,c) #define ARRANGE_WORDS(x,c) #else static __inline__ void DO_Swap16(Uint16 * D) { *D = ((*D<<8)|(*D>>8)); } static __inline__ void DO_Swap32(Uint32 * D) { *D = ((*D<<24)|((*D<<8)&0x00FF0000)|((*D>>8)&0x0000FF00)|(*D>>24)); } #define ARRANGE_DWORD(x) DO_Swap32(x) #define ARRANGE_WORD(x) DO_Swap16(x) #define ARRANGE_DWORDS(x,c) { \ int __n; \ Uint32 * __p = (Uint32 *)(x); \ for (__n = 0 ; __n < (int)(c) ; __n++) \ ARRANGE_DWORD(&__p[__n]); \ } #define ARRANGE_WORDS(x,c) { \ int __n; \ Uint16 * __p = (Uint16 *)(x); \ for (__n = 0 ; __n < (int)(c) ; __n++) \ ARRANGE_WORD(&__p[__n]); \ } #endif #ifndef WIN32 #define _snprintf snprintf #define _vsnprintf vsnprintf #endif /* * GLOBAL VARIABLES */ extern int debug ; /* 1 = Activate debug options */ extern int fxi ; /* 1 = EXE module is FXI.EXE */ #ifdef TARGET_MAC extern int current_file ; extern char files[][256] ; #endif /* * DEBUG FLAGS */ extern int report_audio ; extern int report_string ; extern int report_graphics ; #include "xstrings.h" #include "offsets.h" #include "pslang.h" #include "instance.h" #include "i_procdef.h" #include "grlib.h" #include "sound.h" #include "flic.h" extern void do_exit () ; extern int dcb_load (const char * filename) ; extern int dcb_load_from (file * fp, int offset) ; extern char * getid (unsigned int code) ; extern int path_find (GRAPH * bitmap, int sx, int sy, int dx, int dy, int options) ; extern int path_get (int * x, int * y) ; extern int path_set_wall (int n) ; /* Symbol table management (import/export functions) */ extern void fnc_init(); extern void fnc_export (const char * name, void * addr); extern void * fnc_import (const char * name); extern void fnc_show_information(); /* Save/load with type information */ #include "dcb.h" #include "files_st.h" extern int savetypes (file * file, void * data, DCB_TYPEDEF * var, int nvars); extern int loadtypes (file * file, void * data, DCB_TYPEDEF * var, int nvars); extern int copytypes (void * dst, void * src, DCB_TYPEDEF * var, int nvars, int reps); #include "fpl.h" Fenix/fxi/inc/grlib.h0000644000000000000000000004071510607526734013455 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __GRLIB_H #define __GRLIB_H #include "instance_st.h" #include "grlib_st.h" #define MAX_JOYS 32 /* -------------------------------------------------------------------- */ /* Librera grfica */ /* -------------------------------------------------------------------- */ extern int scr_initialized ; extern int audio_initialized ; extern int enable_16bits ; /* 1 = 16bpp MODE on */ extern int enable_filtering ; /* 1 = 16bpp filter MODE on */ extern Uint16 syscolor16 ; extern int syscolor8 ; /* Color for drawing primitives */ extern Uint16 fntcolor16 ; extern int fntcolor8 ; /* Color for drawing bitmap text */ extern Uint32 drawing_stipple; extern REGION regions[32] ; extern SDL_Surface * screen ; extern GRAPH * background ; extern GRAPH * scrbitmap ; extern GRLIB * syslib ; extern GRAPH * icono ; extern SDL_Joystick * _joysticks[MAX_JOYS]; extern SDL_Joystick * selected_joystick; extern scrolldata scrolls[10] ; extern int last_frame_ms ; extern char * apptitle ; extern key_equiv key_table[] ; extern unsigned char * keystate ; extern int keytab_initialized ; extern int scr_width ; extern int scr_height ; extern int full_screen ; extern int frameless ; extern int double_buffer ; extern int grab_input ; extern int window_status ; extern int focus_status ; extern int mouse_status ; extern int exit_status ; extern int background_dirty ; extern FONT * fonts[256] ; extern int font_count ; /* Inicializacin y control de tiempo */ /* ---------------------------------- */ extern void gr_init (int w, int h) ; extern void gr_set_fps (int fps, int max_jump) ; extern void gr_wait_frame () ; extern void gr_advance_timers () ; extern void gr_draw_frame () ; extern void gr_draw_screen (GRAPH * dest, int restore_type, int dump_type) ; extern void gr_error (const char *fmt, ...) ; extern void keytab_init () ; extern void keytab_free () ; extern int gr_key (int code) ; extern int gr_timer () ; extern Uint32 frame_count; extern Uint32 current_time; /* Objetos definidos por DLL */ /* ------------------------- */ extern int gr_new_object (int z, int (*info)(void *, REGION *), void (*draw)(void *, REGION *), void * what); extern void gr_hide_object (int id, int hidden); extern void gr_destroy_object (int id); extern int object_list_dirty; extern int object_list_unsorted; /* Paleta de colores */ /* ----------------- */ extern SDL_Color vpalette[256] ; extern SDL_Color palette[256] ; extern Uint16 colorequiv[256] ; /* Equivalencia paleta -> pantalla */ extern Uint16 colorghost[65536] ; /* Deja un color a 50% de intensidad */ extern GRAPH * background_8bits ; extern int background_8bits_used ; extern int background_is_black ; extern Uint8 trans_table[256][256] ; /* Tabla de transparencias 8 bits */ extern int trans_table_updated ; /* 1 = La tabla es utilizable */ extern Uint8 nearest_table[64][64][64] ; /* Conversin color -> paleta */ extern void gr_make_trans_table() ; extern void gr_fill_nearest_table() ; extern int palette_loaded ; /* Se ha cargado ya la paleta inicial ? */ extern int palette_changed ; /* Poner a 1 cuando se cambien colores */ extern int fade_on ; /* Hay un fade activo? */ extern int fade_step ; /* Si lo hay, posicin (0=off) */ extern int gr_read_pal (file * file) ; extern void gr_refresh_palette () ; extern void gr_fade_init (int pr, int pg, int pb, int speed) ; extern void gr_fade_step () ; extern void gr_roll_palette (int color0, int num, int inc) ; extern int gr_find_nearest_color (int r, int g, int b) ; extern void gr_set_rgb (int c, int r, int g, int b) ; extern int gr_rgb (int r, int g, int b) ; extern void gr_get_rgb (int color, int *r, int *g, int *b) ; extern void gr_set_colors (int color, int num, Uint8 * pal) ; extern void gr_get_colors (int color, int num, Uint8 * pal) ; /* Blend ops */ /* --------- */ extern Sint16 * blend_create () ; extern void blend_free () ; extern void blend_init (Sint16 * blend) ; extern void blend_translucency (Sint16 * blend, float ammount) ; extern void blend_intensity (Sint16 * blend, float ammount) ; extern void blend_tint (Sint16 * blend, float ammount, Uint8 cr, Uint8 cg, Uint8 cb) ; extern void blend_swap (Sint16 * blend) ; extern void blend_assign (GRAPH * bitmap, Sint16 * blend) ; extern void blend_apply (GRAPH * bitmap, Sint16 * blend) ; extern void blend_grayscale (Sint16 * blend, int method) ; /* FBM/FGC/FPL files */ /* ----------------- */ extern GRAPH * fbm_load_from (file * fp, int fgc_depth); extern GRAPH * fbm_load (const char * filename); extern int fbm_save (GRAPH * graph, const char * filename); extern int fbm_save_to (GRAPH * map, file * fp, int with_palette); extern Uint32 fbm_size (GRAPH * graph, int with_header, int with_palette); extern int fgc_load (const char * filename); extern int fgc_save (int id, const char * filename); extern int fpl_load_from (file * fp); extern int fpl_save (const char * filename); extern const char * fbm_error; extern const char * fgc_error; extern const char * fpl_error; /* Gestin de bitmaps y libreras de grficos */ /* ------------------------------------------ */ extern int gr_load_map (const char * filename) ; extern int gr_load_png (const char * filename) ; extern int gr_load_pcx (const char * filename) ; extern int gr_load_fpg (const char * filename) ; extern int gr_load_pal (const char * filename) ; extern int gr_save_pal (const char * filename) ; extern int gr_save_png (GRAPH * gr, const char * filename) ; extern GRLIB * grlib_get (int libid) ; extern void grlib_init () ; extern int grlib_new () ; extern void grlib_destroy (int libid) ; extern int grlib_add_map (int libid, GRAPH * map) ; extern int grlib_unload_map (int libid, int mapcode) ; extern GRAPH * bitmap_new (int code, int w, int h, int depth, int frames) ; extern GRAPH * bitmap_clone (GRAPH * t) ; extern GRAPH * bitmap_new_syslib (int w, int h, int depth, int frames) ; extern GRAPH * bitmap_get (int libid, int mapcode) ; extern void bitmap_destroy (GRAPH * map) ; extern void bitmap_add_cpoint (GRAPH *map, int x, int y) ; extern void bitmap_set_cpoint (GRAPH * map, Uint32 point, int x, int y); extern void bitmap_analize (GRAPH * bitmap) ; extern void bitmap_animate (GRAPH * bitmap) ; extern void bitmap_animate_to (GRAPH * bitmap, int pos, int speed) ; extern int bitmap_next_code (); extern void bitmap_16bits_conversion(); /* Regiones */ /* -------- */ extern void region_define (int region, int x, int y, int width, int height) ; extern void region_union (REGION * a, REGION * b) ; extern int region_is_empty (REGION * a) ; extern int region_is_out (REGION * a, REGION * b) ; extern REGION * region_new (int x, int y, int width, int height); extern void region_destroy (REGION *); extern REGION * region_get (int n); /* Alto nivel */ /* ---------- */ extern void draw_instance_at (INSTANCE * i, REGION * r, int x, int y) ; extern void draw_instance (INSTANCE * i, REGION * clip) ; extern void instance_update_bbox(INSTANCE * i) ; extern GRAPH * instance_graph (INSTANCE * i) ; extern int instance_visible (INSTANCE * i); extern void scroll_region (int nscroll, REGION * r) ; /* Textos */ /* ------ */ /* Opciones para gr_font_newfrombitmap */ #define NFB_FIXEDWIDTH 1 extern int gr_font_load (char * filename) ; extern int gr_load_bdf (const char * filename) ; extern int gr_load_ttf (const char * filename, int size, int bpp, int fg, int bg) ; extern int gr_font_save (int fontid, const char * filename) ; extern int gr_font_new () ; extern int gr_font_newfrombitmap (char * chardata, int width, int height, int options) ; extern int gr_font_systemfont (char * chardata) ; extern void gr_font_destroy (int fontid) ; extern FONT * gr_font_get (int id); extern void gr_text_setcolor (int c) ; extern int gr_text_getcolor () ; extern int gr_text_new (int fontid, int x, int y, int centered, const char * text) ; extern int gr_text_new_var (int fontid, int x, int y, int centered, const void * var, int type) ; extern void gr_text_move (int textid, int x, int y) ; extern void gr_text_destroy (int textid) ; extern int gr_text_margintop (int fontid, const unsigned char * text) ; extern int gr_text_width (int fontid, const unsigned char * text) ; extern int gr_text_widthn (int fontid, const unsigned char * text, int n) ; extern int gr_text_height (int fontid, const unsigned char * text) ; extern int gr_text_put (GRAPH * dest, REGION * region, int fontid, int x, int y, const unsigned char * text) ; extern GRAPH * gr_text_bitmap (int fontid, const char * text, int centered) ; // Tipos para gr_text_new_var #define TEXT_TEXT 1 #define TEXT_STRING 2 #define TEXT_INT 3 #define TEXT_FLOAT 4 #define TEXT_WORD 5 #define TEXT_BYTE 6 #define TEXT_CHARARRAY 7 #define TEXT_SHORT 8 #define TEXT_DWORD 9 #define TEXT_SBYTE 10 #define TEXT_CHAR 11 /* Bajo nivel */ /* ---------- */ /* Las funciones grficas admiten dest=0 para referirse a la pantalla. * Para poder usar esta funcionalidad, debe estar bloqueada antes */ extern int gr_lock_screen () ; extern void gr_unlock_screen () ; extern void gr_mark_rect (int x, int y, int width, int height); extern void gr_mark_instance (INSTANCE *); /* Primitivas grficas */ extern void gr_clear (GRAPH * dest) ; extern void gr_clear_as (GRAPH * dest, int color) ; extern void gr_put_pixel (GRAPH * dest, int x, int y, int color) ; extern int gr_get_pixel (GRAPH * dest, int x, int y) ; extern void gr_setcolor (int c) ; extern void gr_setalpha (int alpha); extern void gr_vline (GRAPH * dest, REGION * clip, int x, int y, int h) ; extern void gr_hline (GRAPH * dest, REGION * clip, int x, int y, int w) ; extern void gr_line (GRAPH * dest, REGION * clip, int x, int y, int w, int h) ; extern void gr_box (GRAPH * dest, REGION * clip, int x, int y, int w, int h) ; extern void gr_rectangle (GRAPH * dest, REGION * clip, int x, int y, int w, int h) ; extern void gr_circle (GRAPH * dest, REGION * clip, int x, int y, int r) ; extern void gr_fcircle (GRAPH * dest, REGION * clip, int x, int y, int r) ; extern void gr_bezier (GRAPH * dest, REGION * clip, int * params) ; extern int gr_drawing_new (DRAWING_OBJECT drawing, int z) ; extern void gr_drawing_destroy (int id) ; extern void gr_drawing_move (int id, int x, int y) ; /* Bitmaps */ extern void gr_blit (GRAPH * dest, REGION * clip, int x, int y, int flags, GRAPH * gr) ; extern void gr_get_bbox (REGION * dest, REGION * clip, int x, int y, int flags, int angle, int scalex, int scaley, GRAPH * gr) ; extern void gr_rotated_blit (GRAPH * dest, REGION * clip, int x, int y, int flags, int angle, int scalex, int scaley, GRAPH * gr) ; /* Scroll */ /* ------ */ extern void gr_scroll_start (int n, int fileid, int graphid, int backid, int region, int flags) ; extern void gr_scroll_stop (int n) ; extern void gr_scroll_draw (int n, int do_drawing, REGION * clipping) ; extern void gr_scroll_bbox (int n, REGION * r) ; extern int gr_scroll_active (int n) ; extern int gr_scroll_is_fullscreen () ; /* Modo 7 */ /* ------ */ extern void gr_mode7_start (int n, int fileid, int inid, int outid, int region, int inclination) ; extern void gr_mode7_stop (int n) ; extern void gr_mode7_draw (int n) ; extern int gr_mode7_active (int n) ; extern void gr_mode7_bbox (int n, REGION * r) ; /* Consola del sistema */ /* ------------------- */ extern int show_console ; extern void gr_sys_color (int cfg, int cbg) ; extern void gr_sys_puts (GRAPH * map, int x, int y, Uint8 * str, int len) ; extern void gr_sys_putchar (GRAPH * map, int ox, int oy, Uint8 c) ; extern void gr_con_printf (const char *fmt, ...) ; extern void gr_con_putline (char * text) ; extern void gr_con_show (int doit) ; extern void gr_con_draw () ; extern void gr_con_getkey (int key, int sym) ; extern void gr_con_scroll (int direction) ; extern void gr_con_lateral_scroll (int direction); extern void gr_con_do (const char * command) ; /* Profiler */ /* -------- */ extern void gprof_init (); extern void gprof_begin (const char * name); extern void gprof_end (const char * name); extern void gprof_frame (); extern void gprof_dump (const char * filename); extern void gprof_reset (); extern void gprof_draw (GRAPH * dest); extern void gprof_toggle(); /* Versiones MMX de rutinas internas (no exportables) */ /* -------------------------------------------------- */ #ifdef WIN32 #ifndef __GNUC__ #define MMX_FUNCTIONS #endif extern int MMX_available; extern void MMX_init(); extern void MMX_draw_hspan_8to8_nocolorkey (Uint8 * scr, Uint8 * tex, int pixels, int incs); extern void MMX_draw_hspan_8to8_translucent (Uint8 * scr, Uint8 * tex, int pixels, int incs); extern void MMX_draw_hspan_8to8 (Uint8 * scr, Uint8 * tex, int pixels, int incs); extern void MMX_draw_hspan_16to16 (Uint16 * scr, Uint16 * tex, int pixels, int incs); extern void MMX_draw_hspan_16to16_translucent (Uint16 * scr, Uint16 * tex, int pixels, int incs); extern void MMX_draw_hspan_16to16_nocolorkey (Uint16 * scr, Uint16 * tex, int pixels, int incs); #endif /* Rutinas de conversin entre formatos */ extern void gr_convert16_ScreenTo565 (Uint16 * ptr, int len); extern void gr_convert16_565ToScreen (Uint16 * ptr, int len); extern void gr_fade16 (GRAPH * graph, int r, int g, int b); extern Uint16 * gr_alpha16 (int alpha); extern Uint8 * gr_alpha8 (int alpha); /* Rutinas del Mame's 2xScale algorithm */ extern void scale2x(Uint8 *srcPtr, Uint32 srcPitch, Uint8 *dstPtr, Uint32 dstPitch, int width, int height); /*extern void scale2x32(Uint8 *srcPtr, Uint32 srcPitch, Uint8 *dstPtr, Uint32 dstPitch, int width, int height);*/ /* Rutinas del ScummVM's HQ2x algorithm */ extern void hq2x(Uint8 *srcPtr, Uint32 srcPitch, Uint8 *dstPtr, Uint32 dstPitch, int width, int height); /* Otras rutinas de SCALE */ extern void scale_normal2x(Uint8 *srcPtr, Uint32 srcPitch, Uint8 *dstPtr, Uint32 dstPitch, int width, int height); extern void scanline2x(Uint8 *srcPtr, Uint32 srcPitch, Uint8 *dstPtr, Uint32 dstPitch, int width, int height); #endif Fenix/fxi/Makefile0000644000000000000000000003062110607744626013071 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # fxi/Makefile. Generated from Makefile.in by configure. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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. srcdir = . top_srcdir = .. pkgdatadir = $(datadir)/fenix pkglibdir = $(libdir)/fenix pkgincludedir = $(includedir)/fenix top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /bin/install -c 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 = i686-pc-mingw32 host_triplet = i686-pc-mingw32 target_triplet = i686-pc-mingw32 ACLOCAL = ${SHELL} /c/Fenix/missing --run aclocal-1.7 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /c/Fenix/missing --run tar AUTOCONF = ${SHELL} /c/Fenix/missing --run autoconf AUTOHEADER = ${SHELL} /c/Fenix/missing --run autoheader AUTOMAKE = ${SHELL} /c/Fenix/missing --run automake-1.7 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -O3 -finline-functions -ffast-math -I/usr/local/include COMMON_CFLAGS = -I/usr/local/include -DTARGET_Win32 -DWIN32 -D_WIN32 COMMON_LIBS = -L/usr/local/lib -lz -lshlwapi CPP = gcc -E CPPFLAGS = CYGPATH_W = echo DEFS = -DPACKAGE_NAME=\"fenix\" -DPACKAGE_TARNAME=\"fenix\" -DPACKAGE_VERSION=\"0.92a\" -DPACKAGE_STRING=\"fenix\ 0.92a\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"fenix\" -DVERSION=\"0.92a\" -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 DEPDIR = .deps DO_FPG = DO_FPG_FALSE = # DO_FPG_TRUE = DO_FXC = DO_FXC_FALSE = # DO_FXC_TRUE = DO_FXI = DO_FXI_FALSE = # DO_FXI_TRUE = DO_MAP = DO_MAP_FALSE = # DO_MAP_TRUE = ECHO_C = ECHO_N = -n ECHO_T = EGREP = grep -E EXEEXT = .exe HAVE_WINDRES_FALSE = # HAVE_WINDRES_TRUE = INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = LIBOBJS = LIBS = -L/usr/local/lib LTLIBOBJS = MAINT = # MAINTAINER_MODE_FALSE = MAINTAINER_MODE_TRUE = # MAKEINFO = ${SHELL} /c/Fenix/missing --run makeinfo OBJEXT = o PACKAGE = fenix PACKAGE_BUGREPORT = PACKAGE_NAME = fenix PACKAGE_STRING = fenix 0.92a PACKAGE_TARNAME = fenix PACKAGE_VERSION = 0.92a PATH_SEPARATOR = : SDL_CFLAGS = -I/usr/local/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main SDL_CONFIG = /usr/local/bin/sdl-config SDL_LIBS = -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows SET_MAKE = SHELL = /bin/sh STRIP = VERSION = 0.92a WINDRES = windres ac_ct_CC = gcc ac_ct_STRIP = ac_ct_WINDRES = windres am__fastdepCC_FALSE = # am__fastdepCC_TRUE = am__include = include am__quote = bindir = ${exec_prefix}/bin build = i686-pc-mingw32 build_alias = build_cpu = i686 build_os = mingw32 build_vendor = pc datadir = ${prefix}/share exec_prefix = ${prefix} host = i686-pc-mingw32 host_alias = host_cpu = i686 host_os = mingw32 host_vendor = pc includedir = ${prefix}/include infodir = ${prefix}/info install_sh = /c/Fenix/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localstatedir = ${prefix}/var mandir = ${prefix}/man oldincludedir = /usr/include prefix = /usr/local program_transform_name = s,x,x, sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com sysconfdir = ${prefix}/etc target = i686-pc-mingw32 target_alias = target_cpu = i686 target_os = mingw32 target_vendor = pc SUBDIRS = src subdir = fxi mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive DIST_COMMON = Makefile.am Makefile.in DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu fxi/Makefile Makefile: # $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (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): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ clean-generic clean-recursive ctags ctags-recursive distclean \ distclean-generic distclean-recursive distclean-tags distdir \ dvi dvi-am dvi-recursive info info-am info-recursive install \ install-am install-data install-data-am install-data-recursive \ install-exec install-exec-am install-exec-recursive \ install-info install-info-am install-info-recursive install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \ ps-recursive tags tags-recursive uninstall uninstall-am \ uninstall-info-am uninstall-info-recursive uninstall-recursive # 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: Fenix/include/0000755000000000000000000000000010607744630012257 5ustar rootrootFenix/include/fgc.h0000644000000000000000000000502310607527000013155 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : fgc.h * DESCRIPTION : Fenix Graphic Collection headers and documentation * * HISTORY: 0.85 - first version */ #ifndef __FGC_H #define __FGC_H #define FGC_VERSION 0x0100 #define FGC_MAGIC "FenixLibrary\x1A\x0D\x0A" // FGC files don't use any compression whatsoever, but they // natively support .gz expansion typedef struct { char magic[16]; // "FenixLibrary\x1A\x0D\x0A" + '\x00' Uint32 version; // Version code ((major << 16) | minor) Uint8 name[64]; // ASCIIZ name of the library Uint32 depth; // 1, 8, 16 or 24 Uint32 count; // Number of graphics in the library Uint32 palette; // Offset of the palette Uint32 offset[0]; // Offset to each graphic in the file // (0 = start of the file, including header, for all offsets) } FGC_HEADER; // Palette information follows, but only if the library has a 8 bit depth // There are 256 RGB triplets with a range of 0-255 for each color // [768 bytes of optional information] // // The loading function should honor the offset present in the header. // This allows to extend the file format mantaining backward compatibility // // The graphics are exactly in the same format as a FBM file with // the following changes: // // - The "header", "version" and "depth" are not present (the header // begins with the graphic name, see fbm.h for details) // // - The palette is never present if the graphics are 8 bits // (there is already one before the graphic information) #endif Fenix/include/CVS/0000755000000000000000000000000010607744630012712 5ustar rootrootFenix/include/CVS/Repository0000644000000000000000000000001610601620520014772 0ustar rootrootFenix/include Fenix/include/CVS/Root0000644000000000000000000000007410601620520013542 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/include/CVS/Entries0000644000000000000000000000142710607744630014252 0ustar rootroot/dcb.h/1.6/Thu Apr 12 22:09:04 2007// /dirs.h/1.4/Thu Apr 12 22:09:04 2007// /fbm.h/1.2/Thu Apr 12 22:09:04 2007// /fgc.h/1.2/Thu Apr 12 22:09:04 2007// /files.h/1.2/Thu Apr 12 22:09:05 2007// /files_st.h/1.3/Thu Apr 12 22:09:05 2007// /fnc_exports.h/1.2/Thu Apr 12 22:09:05 2007// /fnx_loadlib.h/1.4/Thu Apr 12 22:09:05 2007// /fpl.h/1.3/Thu Apr 12 22:09:05 2007// /fxdll.h/1.6/Thu Apr 12 22:09:06 2007// /offsets.h/1.4/Thu Apr 12 22:09:06 2007// /pslang.h/1.11/Thu Apr 12 22:09:07 2007// /regex.h/1.2/Thu Apr 12 22:09:07 2007// /typedef.h/1.2/Thu Apr 12 22:09:08 2007// /typedef_st.h/1.2/Thu Apr 12 22:09:08 2007// /xctype.h/1.2/Thu Apr 12 22:09:08 2007// /xctype_st.h/1.2/Thu Apr 12 22:09:08 2007// /xstrings.h/1.3/Thu Apr 12 22:09:09 2007// /sysprocs.h/1.17/Fri Apr 13 18:19:05 2007// D Fenix/include/dcb.h0000644000000000000000000001177610607527000013162 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : dcb.h * DESCRIPTION : Data compiled block information * * HISTORY: Corrected DCB_PROC_SIZE TO 48 */ #ifndef __DCB_H #define __DCB_H #ifdef TARGET_MAC #include #else #include #endif #ifndef __TYPEDEF_H #include "typedef.h" #endif #define DCB_DEBUG 1 #ifdef _MSC_VER #pragma pack(push, 1) #endif /* Opcin del GNU C para que la estructura ocupe el mnimo de memoria */ #ifdef __GNUC__ #define __PACKED __attribute__ ((packed)) #else #define __PACKED #endif /* Estructura del fichero .dcb */ /* Please update the version's high-number between Fenix versions */ #define DCB_VERSION 0x0600 typedef struct { Uint8 Name[60] ; Uint32 Code ; } __PACKED DCB_ID ; #define DCB_FILE_COMPRESSED 1 typedef struct { Uint8 Name[55] ; Uint8 Flags ; Uint32 SFile ; Uint32 OFile ; } __PACKED DCB_FILE ; typedef struct { Uint32 NFile ; Uint32 NLine ; Uint32 NCol ; Uint32 OCode ; } __PACKED DCB_SENTENCE ; #define NO_MEMBERS 0xFFFFFFFF typedef struct { Uint8 BaseType [MAX_TYPECHUNKS] ; Uint32 Count [MAX_TYPECHUNKS] ; Uint32 Members ; } __PACKED DCB_TYPEDEF ; typedef struct { DCB_TYPEDEF Type ; /* 40 bytes */ Uint32 ID ; Uint32 Offset ; Uint32 Varspace ; } __PACKED DCB_VAR ; typedef struct { Uint32 NVars ; Uint32 OVars ; } __PACKED DCB_VARSPACE ; typedef struct /* Cabecera de cada proceso */ { Uint32 ID ; Uint32 Flags ; Uint32 NParams ; Uint32 NPriVars ; Uint32 NPriStrings ; Uint32 NPubVars ; Uint32 NPubStrings ; Uint32 NSentences ; Uint32 SPrivate ; Uint32 SPublic ; Uint32 SCode ; Uint32 OPrivate ; Uint32 OPriVars ; Uint32 OPriStrings ; Uint32 OPublic ; Uint32 OPubVars ; Uint32 OPubStrings ; Uint32 OCode ; Uint32 OSentences ; Uint32 OExitCode ; } __PACKED DCB_PROC_DATA ; typedef struct /* Cabecera de cada proceso */ { DCB_PROC_DATA data; /* Estructura que se carga desde el fichero */ DCB_SENTENCE * sentence ; DCB_VAR * privar ; DCB_VAR * pubvar ; } __PACKED DCB_PROC ; typedef struct /* Cabecera general del fichero */ { Uint8 Header[8] ; /* "DCB" */ Uint32 Version ; /* 0x0100 para versin 1.0 */ Uint32 NProcs ; Uint32 NFiles ; Uint32 NID ; Uint32 NStrings ; Uint32 NLocStrings ; Uint32 NLocVars ; Uint32 NGloVars ; Uint32 NVarSpaces ; Uint32 SGlobal ; Uint32 SLocal ; Uint32 SText ; Uint32 NImports ; Uint32 NSourceFiles ; Uint32 __reserved1[3] ; Uint32 OProcsTab ; Uint32 OID ; Uint32 OStrings ; Uint32 OText ; Uint32 OGlobal ; Uint32 OGloVars ; Uint32 OLocal ; Uint32 OLocVars ; Uint32 OLocStrings ; Uint32 OVarSpaces ; Uint32 OFilesTab ; Uint32 OImports ; Uint32 OSourceFiles ; Uint32 __reserved2[3] ; } __PACKED DCB_HEADER_DATA ; typedef struct /* Cabecera general del fichero */ { DCB_HEADER_DATA data; /* Estructura que se carga desde el fichero */ DCB_ID * id ; DCB_VAR * glovar ; DCB_VAR * locvar ; DCB_PROC * proc ; DCB_FILE * file ; DCB_VARSPACE * varspace ; DCB_VAR ** varspace_vars ; Uint32 * imports ; char *** sourcelines ; int * sourcecount ; } __PACKED DCB_HEADER ; extern DCB_HEADER dcb ; #ifdef _MSC_VER #pragma pack(pop) #endif #endif Fenix/include/xstrings.h0000644000000000000000000001042010607527004014300 0ustar rootroot/****************************************************************************/ /* */ /* Fenix - Videogame compiler/interpreter */ /* Current release : PROJECT 1.0 - 0.84 */ /* Last stable release : */ /* Project documentation : http://fenix.divsite.net */ /* */ /****************************************************************************/ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* */ /****************************************************************************/ /* Copyright 1999 Jos Luis Cebrin Page */ /* Copyright 2002 FENIX PROJECT 1.0 TEAM */ /****************************************************************************/ /****************************************************************************/ /* FILE : xstrings.h */ /* DESCRIPTION : Strings management. Includes any function related to */ /* variable-length strings. */ /****************************************************************************/ /* HISTORY : 29/01/2001 (jlceb) string_internal no longer used */ /****************************************************************************/ #ifndef __XSTRINGS_H #define __XSTRINGS_H #ifdef TARGET_MAC #include #endif extern void string_init () ; extern const char * string_get (int code) ; extern void string_dump () ; extern void string_load (file *) ; extern void string_save (file *) ; extern int string_new (const char * ptr) ; extern int string_newa (const char * ptr, unsigned count) ; extern void string_use (int code) ; extern void string_discard (int code) ; extern int string_add (int code1, int code2) ; extern int string_compile (const char * * source) ; extern int string_itoa (int n) ; extern int string_uitoa (unsigned int n) ; extern int string_ftoa (float n) ; extern int string_ptoa (void * n) ; extern int string_comp (int code1, int code2) ; extern int string_casecmp (int code1, int code2) ; extern int string_char (int n, int nchar) ; extern int string_substr (int code, int first, int len) ; extern int string_find (int code1, int code2, int first) ; extern int string_ucase (int code1) ; extern int string_lcase (int code1) ; extern int string_strip (int code) ; extern int string_pad (int code, int length, int align) ; extern int string_format (double number, int dec, char point, char thousands) ; extern int string_concat (int code1, char * str2) ; extern void string_coalesce() ; extern void string_load (file * fp); #endif Fenix/include/fnc_exports.h0000644000000000000000000000016510607527000014752 0ustar rootroot#ifndef _FNC_EXPORTS_H #define _FNC_EXPORTS_H #error This file is obsolete and should not be used #endif Fenix/include/files.h0000644000000000000000000000566010607527000013527 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __FILES_H #define __FILES_H #include /* Funciones de acceso a ficheros */ /* ------------------------------ */ /* Ahora mismo son casi wrappers de stdio.h, pero en el futuro * el tipo "file" puede ser una estructura y las funciones, * ofrecer soporte transparente para ficheros PAK, etc. */ extern file * file_open (const char * filename, char * mode) ; extern int file_read (file * fp, void * buffer, int len) ; extern int file_readSint8 (file * fp, Sint8 * buffer) ; extern int file_readUint8 (file * fp, Uint8 * buffer) ; extern int file_readSint16 (file * fp, Sint16 * buffer) ; extern int file_readUint16 (file * fp, Uint16 * buffer) ; extern int file_readSint32 (file * fp, Sint32 * buffer) ; extern int file_readUint32 (file * fp, Uint32 * buffer) ; extern int file_write (file * fp, void * buffer, int len) ; extern int file_writeSint8 (file * fp, Sint8 * buffer) ; extern int file_writeUint8 (file * fp, Uint8 * buffer) ; extern int file_writeSint16 (file * fp, Sint16 * buffer) ; extern int file_writeUint16 (file * fp, Uint16 * buffer) ; extern int file_writeSint32 (file * fp, Sint32 * buffer) ; extern int file_writeUint32 (file * fp, Uint32 * buffer) ; extern int file_gets (file * fp, char * buffer, int len) ; extern int file_puts (file * fp, const char * buffer) ; extern int file_size (file * fp) ; extern int file_pos (file * fp) ; extern int file_seek (file * fp, int pos, int where) ; extern void file_addp (const char * path) ; extern void file_close (file * fp) ; extern int file_exists (const char * filename) ; extern void file_add_xfile (file * fp, long offset, char * name, int size) ; extern int file_eof (file * fp) ; extern FILE * file_fp (file * fp) ; extern int opened_files; #endif Fenix/include/fxdll.h0000644000000000000000000017127610607527002013547 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __FXDLL_H #define __FXDLL_H #define FNXDLL #ifdef TARGET_MAC #include #else #include #endif #include #include #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif #if defined(MAIN_FILE) || !defined(MULTIPLE_FILES) #define FXEXTERN #else #define FXEXTERN extern #endif /* * Declaracion de funciones */ /***************************************************** * fxi.h *****************************************************/ FXEXTERN int * _debug ; /* 1 = Actovate debug options */ FXEXTERN int * _fxi ; /* 1 = EXE module is FXI.EXE */ FXEXTERN int * _enable_16bits ; /* 1 = 16bpp MODE on */ FXEXTERN int * _enable_filtering ; /* 1 = 16bpp filter MODE on */ FXEXTERN Uint32 * _frame_count ; FXEXTERN Uint32 * _current_time ; FXEXTERN SDL_Surface * * _screen ; #define debug ( * _debug ) #define fxi ( * _fxi ) #define enable_16bits ( * _enable_16bits ) #define enable_filtering ( * _enable_filtering ) #define screen ( * _screen ) #define frame_count ( * _frame_count ) #define current_time ( * _current_time ) FXEXTERN int * _syscolor8 ; FXEXTERN int * _syscolor16 ; FXEXTERN int * _fntcolor8 ; FXEXTERN int * _fntcolor16 ; #define syscolor8 (*_syscolor8) #define syscolor16 (*_syscolor16) #define fntcolor8 (*_fntcolor8) #define fntcolor16 (*_fntcolor16) FXEXTERN int * _drawing_stipple; #define drawing_stipple (*_drawing_stipple) FXEXTERN int * _report_audio ; FXEXTERN int * _report_string ; FXEXTERN int * _report_graphics ; #define report_audio (* _report_audio ) #define report_string (* _report_string ) #define report_graphics (* _report_graphics ) FXEXTERN void (* _gr_error )(const char *fmt, ...) ; FXEXTERN void (* _do_exit )() ; FXEXTERN int (* _dcb_load )(const char * filename) ; FXEXTERN char * (* _getid )(unsigned int code) ; FXEXTERN int (* _path_find )(GRAPH * bitmap, int sx, int sy, int dx, int dy, int options) ; FXEXTERN int (* _path_get )(int * x, int * y) ; FXEXTERN int (* _path_set_wall )(int n) ; #define gr_error (* _gr_error) #define do_exit (* _do_exit) #define dcb_load (* _dcb_load) #define getid (* _getid) #define path_find (* _path_find) #define path_get (* _path_get) #define path_set_wall (* _path_set_wall) /***************************************************** * files.h *****************************************************/ FXEXTERN file * (*_file_open )(const char * filename, char * mode) ; FXEXTERN int (*_file_read )(file * fp, void * buffer, int len) ; FXEXTERN int (*_file_write )(file * fp, const void * buffer, int len) ; FXEXTERN int (*_file_gets )(file * fp, char * buffer, int len) ; FXEXTERN int (*_file_puts )(file * fp, const char * buffer) ; FXEXTERN int (*_file_size )(file * fp) ; FXEXTERN int (*_file_pos )(file * fp) ; FXEXTERN int (*_file_seek )(file * fp, int pos, int where) ; FXEXTERN void (*_file_addp )(const char * path) ; FXEXTERN void (*_file_close )(file * fp) ; FXEXTERN int (*_file_exists )(const char * filename) ; FXEXTERN void (*_file_add_xfile )(file * fp, long offset, char * name, int size) ; FXEXTERN int (*_file_eof )(file * fp) ; FXEXTERN FILE * (*_file_fp )(file * fp) ; #define file_open (*_file_open) #define file_read (*_file_read) #define file_write (*_file_write) #define file_gets (*_file_gets) #define file_size (*_file_size) #define file_pos (*_file_pos) #define file_seek (*_file_seek) #define file_addp (*_file_addp) #define file_close (*_file_close) #define file_exists (*_file_exists) #define file_add_xfile (*_file_add_xfile) #define file_eof (*_file_eof) #define file_fp (*_file_fp) /***************************************************** * strings.h *****************************************************/ FXEXTERN void (*_string_init )() ; FXEXTERN const char * (*_string_get )(int code) ; FXEXTERN void (*_string_dump )() ; FXEXTERN void (*_string_load )(file *) ; FXEXTERN void (*_string_save )(file *) ; FXEXTERN int (*_string_new )(const char * ptr) ; FXEXTERN int (*_string_newa )(const char * ptr, unsigned count) ; FXEXTERN void (*_string_use )(int code) ; FXEXTERN void (*_string_discard )(int code) ; FXEXTERN int (*_string_add )(int code1, int code2) ; FXEXTERN int (*_string_compile )(const char * * source) ; FXEXTERN int (*_string_itoa )(int n) ; FXEXTERN int (*_string_ftoa )(float n) ; FXEXTERN int (*_string_ptoa )(void * n) ; FXEXTERN int (*_string_comp )(int code1, int code2) ; FXEXTERN int (*_string_casecmp )(int code1, int code2) ; FXEXTERN int (*_string_char )(int n, int nchar) ; FXEXTERN int (*_string_substr )(int code, int first, int len) ; FXEXTERN int (*_string_find )(int code1, int code2, int first) ; FXEXTERN int (*_string_ucase )(int code1) ; FXEXTERN int (*_string_lcase )(int code1) ; FXEXTERN int (*_string_strip )(int code1) ; FXEXTERN int (*_string_pad )(int code, int length, int align) ; FXEXTERN int (*_string_format )(double number, int dec, char point, char thousands) ; FXEXTERN void (*_string_coalesce)() ; FXEXTERN int (*_string_concat )(int code1, char * str2) ; #define string_init (*_string_init) #define string_get (*_string_get) #define string_dump (*_string_dump) #define string_load (*_string_load) #define string_save (*_string_save) #define string_new (*_string_new) #define string_newa (*_string_newa) #define string_use (*_string_use) #define string_discard (*_string_discard) #define string_add (*_string_add) #define string_compile (*_string_compile) #define string_itoa (*_string_itoa) #define string_ftoa (*_string_ftoa) #define string_ptoa (*_string_ptoa) #define string_comp (*_string_comp) #define string_casecmp (*_string_casecmp) #define string_char (*_string_char) #define string_substr (*_string_substr) #define string_find (*_string_find) #define string_ucase (*_string_ucase) #define string_lcase (*_string_lcase) #define string_strip (*_string_strip) #define string_pad (*_string_pad) #define string_format (*_string_format) #define string_coalesce (*_string_coalesce) #define string_concat (*_string_concat) /***************************************************** * xctype.h *****************************************************/ FXEXTERN int * _dos_chars ; /* 1 = Cdigo fuente en caracteres MS-DOS */ FXEXTERN char ** _c_type ; FXEXTERN unsigned char ** _c_upper ; FXEXTERN unsigned char ** _c_lower ; FXEXTERN unsigned char (*_convert )(unsigned char c) ; FXEXTERN void (*_init_c_type)() ; FXEXTERN unsigned char ** _dos_to_win ; FXEXTERN unsigned char ** _win_to_dos ; #define dos_chars (* _dos_chars ) #define c_type (* _c_type ) #define c_upper (* _c_upper ) #define c_lower (* _c_lower ) #define dos_to_win (* _dos_to_win) #define win_to_dos (* _win_to_dos) #define convert (* _convert ) #define init_c_type (* _init_c_type) /* * typedef.h */ FXEXTERN TYPEDEF (*_typedef_new )(BASETYPE type) ; FXEXTERN TYPEDEF (*_typedef_enlarge )(TYPEDEF base) ; FXEXTERN TYPEDEF (*_typedef_reduce )(TYPEDEF base) ; FXEXTERN int (*_typedef_size )(TYPEDEF t) ; FXEXTERN int (*_typedef_subsize )(TYPEDEF t, int c) ; FXEXTERN void (*_typedef_describe )(char * buffer, TYPEDEF t) ; FXEXTERN TYPEDEF (*_typedef_pointer )(TYPEDEF to) ; FXEXTERN TYPEDEF * (*_typedef_by_name )(int code) ; FXEXTERN void (*_typedef_name )(TYPEDEF t, int code) ; #define typedef_new (*_typedef_new) #define typedef_enlarge (*_typedef_enlarge) #define typedef_reduce (*_typedef_reduce) #define typedef_size (*_typedef_size) #define typedef_subsize (*_typedef_subsize) #define typedef_describe (*_typedef_describe) #define typedef_pointer (*_typedef_pointer) #define typedef_by_name (*_typedef_by_name) #define typedef_name (*_typedef_name) /***************************************************** * flic.h *****************************************************/ FXEXTERN FLIC * (*_flic_open )(const char * filename) ; FXEXTERN void (*_flic_destroy )(FLIC * flic) ; FXEXTERN FLIC * (*_flic_do_frame )(FLIC * flic) ; FXEXTERN void (*_flic_reset )(FLIC * flic) ; FXEXTERN FLIC * *_current_fli ; FXEXTERN int *_current_fli_x ; FXEXTERN int *_current_fli_y ; #define current_fli (*_current_fli ) #define current_fli_x (*_current_fli_x ) #define current_fli_y (*_current_fli_y ) #define flic_open (*_flic_open) #define flic_destroy (*_flic_destroy) #define flic_do_frame (*_flic_do_frame) #define flic_reset (*_flic_reset) /***************************************************** * grlib.h *****************************************************/ FXEXTERN int * _scr_initialized ; FXEXTERN REGION ** _regions ; FXEXTERN GRAPH ** _background ; FXEXTERN GRAPH ** _scrbitmap ; FXEXTERN GRLIB ** _syslib ; FXEXTERN GRAPH ** _icono ; FXEXTERN int * _last_frame_ms ; FXEXTERN char ** _apptitle ; FXEXTERN key_equiv ** _key_table ; FXEXTERN unsigned char ** _keystate ; FXEXTERN int * _keytab_initialized ; FXEXTERN int * _scr_width ; FXEXTERN int * _scr_height ; FXEXTERN int * _full_screen ; FXEXTERN int * _double_buffer ; FXEXTERN int * _exit_status ; FXEXTERN int * _grab_input ; FXEXTERN int * _window_status ; FXEXTERN int * _focus_status ; FXEXTERN int * _mouse_status ; #define scr_initialized ( * _scr_initialized ) #define regions ( * _regions ) #define background ( * _background ) #define scrbitmap ( * _scrbitmap ) #define syslib ( * _syslib ) #define icono ( * _icono ) #define last_frame_ms ( * _last_frame_ms ) #define joy_x ( * _joy_x ) #define joy_y ( * _joy_y ) #define joy_b ( * _joy_b ) #define apptitle ( * _apptitle ) #define key_table ( * _key_table ) #define keystate ( * _keystate ) #define keytab_initialized ( * _keytab_initialized ) #define scr_width ( * _scr_width ) #define scr_height ( * _scr_height ) #define full_screen ( * _full_screen ) #define window_status ( * _window_status ) #define focus_status ( * _focus_status ) #define mouse_status ( * _mouse_status ) #define exit_status ( * _exit_status ) #define grab_input ( * _grab_input ) #define double_buffer ( * _double_buffer ) FXEXTERN char (*_nearest_table)[64][64][64]; FXEXTERN void (*_gr_fill_nearest_table)(); #define nearest_table (*_nearest_table) #define gr_fill_nearest_table (*_gr_fill_nearest_table) /* Inicializacin y control de tiempo */ /* ---------------------------------- */ FXEXTERN void (*_gr_init )(int w, int h) ; FXEXTERN void (*_gr_set_fps )(int fps, int max_jump) ; FXEXTERN void (*_gr_wait_frame )() ; FXEXTERN void (*_gr_advance_timers )() ; FXEXTERN void (*_gr_draw_frame )() ; FXEXTERN void (*_gr_draw_screen )(GRAPH * dest, int restore_type, int dump_type) ; FXEXTERN void (*_keytab_init )() ; FXEXTERN void (*_keytab_free )() ; FXEXTERN int (*_gr_key )(int code) ; FXEXTERN int (*_gr_timer )() ; #define gr_init (*_gr_init) #define gr_set_fps (*_gr_set_fps) #define gr_wait_frame (*_gr_wait_frame) #define gr_advance_timers (*_gr_advance_timers) #define gr_draw_frame (*_gr_draw_frame) #define gr_draw_screen (*_gr_draw_screen) #define keytab_init (*_keytab_init) #define keytab_free (*_keytab_free) #define gr_key (*_gr_key) #define gr_timer (*_gr_timer) /* Objetos definidos por DLL */ /* ------------------------- */ FXEXTERN int (*_gr_new_object )(int z, int (*info)(void *, REGION *), void (*draw)(void *, REGION *), void * what); FXEXTERN void (*_gr_hide_object )(int id, int hidden); FXEXTERN void (*_gr_destroy_object)(int id); #define gr_new_object (*_gr_new_object) #define gr_hide_object (*_gr_hide_object) #define gr_destroy_object (*_gr_destroy_object) /* Paleta de colores */ /* ----------------- */ FXEXTERN SDL_Color ** _vpalette ; FXEXTERN SDL_Color (* _palette)[] ; FXEXTERN Uint16 * _colorequiv ; /* Equivalencia paleta -> pantalla */ FXEXTERN Uint16 (* _colorghost)[] ; /* Deja un color a 50% de intensidad */ FXEXTERN GRAPH ** _background_8bits ; FXEXTERN int * _background_8bits_used ; FXEXTERN int * _background_is_black ; FXEXTERN Uint8 * _trans_table ; /* Tabla de transparencias 8 bits */ FXEXTERN int * _trans_table_updated ; /* 1 = La tabla es utilizable */ FXEXTERN void (*_gr_make_trans_table)() ; #define gr_make_trans_table (*_gr_make_trans_table) FXEXTERN int * _palette_loaded ; /* Se ha cargado ya la paleta inicial ? */ FXEXTERN int * _palette_changed ; /* Poner a 1 cuando se cambien colores */ FXEXTERN int * _fade_on ; /* Hay un fade activo? */ FXEXTERN int * _fade_step ; /* Si lo hay, posicin (0=off) */ FXEXTERN int (*_gr_read_pal )(file * file) ; FXEXTERN void (*_gr_refresh_palette )() ; FXEXTERN void (*_gr_fade_init )(int r, int g, int b, int speed, int dir) ; FXEXTERN void (*_gr_fade_step )() ; FXEXTERN void (*_gr_roll_palette )(int color0, int num, int inc) ; FXEXTERN int (*_gr_find_nearest_color )(int r, int g, int b) ; FXEXTERN void (*_gr_set_rgb )(int c, int r, int g, int b) ; FXEXTERN int (*_gr_rgb )(int r, int g, int b) ; FXEXTERN void (*_gr_get_rgb )(int color, int *r, int *g, int *b) ; FXEXTERN void (*_gr_set_colors )(int color, int num, Uint8 * pal) ; FXEXTERN void (*_gr_get_colors )(int color, int num, Uint8 * pal) ; #define gr_read_pal (*_gr_read_pal) #define gr_refresh_palette (*_gr_refresh_palette) #define gr_fade_init (*_gr_fade_init) #define gr_fade_step (*_gr_fade_step) #define gr_roll_palette (*_gr_roll_palette) #define gr_find_nearest_color (*_gr_find_nearest_color) #define gr_set_rgb (*_gr_set_rgb) #define gr_rgb (*_gr_rgb) #define gr_get_rgb (*_gr_get_rgb) #define gr_set_colors (*_gr_set_colors) #define gr_get_colors (*_gr_get_colors) #define vpalette (* _vpalette ) #define gpalette (* _palette ) #define colorequiv ( _colorequiv ) #define colorghost (* _colorghost ) #define background_8bits (* _background_8bits ) #define background_8bits_used (* _background_8bits_used ) #define background_is_black (* _background_is_black ) #define trans_table ( _trans_table ) #define trans_table_updated (* _trans_table_updated ) #define palette_loaded (* _palette_loaded ) #define palette_changed (* _palette_changed ) #define fade_on (* _fade_on ) #define fade_step (* _fade_step ) /* Blend ops */ /* --------- */ FXEXTERN Sint16 * (*_blend_create )() ; FXEXTERN void (*_blend_free )(Sint16 *blend) ; FXEXTERN void (*_blend_init )(Sint16 * blend) ; FXEXTERN void (*_blend_translucency )(Sint16 * blend, float ammount) ; FXEXTERN void (*_blend_intensity )(Sint16 * blend, float ammount) ; FXEXTERN void (*_blend_tint )(Sint16 * blend, float ammount, Uint8 cr, Uint8 cg, Uint8 cb) ; FXEXTERN void (*_blend_swap )(Sint16 * blend) ; FXEXTERN void (*_blend_assign )(GRAPH * bitmap, Sint16 * blend) ; FXEXTERN void (*_blend_apply )(GRAPH * bitmap, Sint16 * blend) ; FXEXTERN void (*_blend_grayscale )(Sint16 * blend, int method) ; #define blend_create (*_blend_create) #define blend_free (*_blend_free) #define blend_init (*_blend_init) #define blend_translucency (*_blend_translucency) #define blend_intensity (*_blend_intensity) #define blend_tint (*_blend_tint) #define blend_swap (*_blend_swap) #define blend_assign (*_blend_assign) #define blend_apply (*_blend_apply) #define blend_grayscale (*_blend_grayscale) /* Gestin de bitmaps y libreras de grficos */ /* ------------------------------------------ */ FXEXTERN int (*_gr_load_map )(const char * filename) ; FXEXTERN int (*_gr_load_png )(const char * filename) ; FXEXTERN int (*_gr_load_pcx )(const char * filename) ; FXEXTERN int (*_gr_load_fpg )(const char * filename) ; FXEXTERN int (*_gr_load_pal )(const char * filename) ; FXEXTERN int (*_gr_save_pal )(const char * filename) ; FXEXTERN int (*_gr_save_map )(GRAPH * gr, const char * filename) ; FXEXTERN int (*_gr_save_fpg )(GRAPH * gr, const char * filename) ; FXEXTERN int (*_gr_save_png )(GRAPH * gr, const char * filename) ; FXEXTERN int (*_grlib_new )() ; FXEXTERN void (*_grlib_destroy )(int libid) ; FXEXTERN int (*_grlib_add_map )(int libid, GRAPH * map) ; FXEXTERN int (*_grlib_unload_map )(int libid, int mapcode) ; FXEXTERN GRAPH * (*_bitmap_new )(int code, int w, int h, int depth, int frames) ; FXEXTERN GRAPH * (*_bitmap_clone )(GRAPH *) ; FXEXTERN GRAPH * (*_bitmap_new_syslib)(int w, int h, int depth,int frames) ; FXEXTERN GRAPH * (*_bitmap_get )(int libid, int mapcode) ; FXEXTERN void (*_bitmap_destroy )(GRAPH * map) ; FXEXTERN void (*_bitmap_add_cpoint)(GRAPH *map, int x, int y) ; FXEXTERN void (*_bitmap_set_cpoint)(GRAPH *map, int index, int x, int y) ; FXEXTERN void (*_bitmap_analize )(GRAPH * bitmap) ; FXEXTERN void (*_bitmap_animate )(GRAPH * bitmap) ; FXEXTERN void (*_bitmap_animate_to)(GRAPH * bitmap, int pos, int speed) ; #define gr_load_map (*_gr_load_map) #define gr_load_png (*_gr_load_png) #define gr_load_pcx (*_gr_load_pcx) #define gr_load_fpg (*_gr_load_fpg) #define gr_load_pal (*_gr_load_pal) #define gr_save_pal (*_gr_save_pal) #define gr_save_map (*_gr_save_map) #define gr_save_fpg (*_gr_save_fpg) #define gr_save_png (*_gr_save_png) #define grlib_new (*_grlib_new) #define grlib_destroy (*_grlib_destroy) #define grlib_add_map (*_grlib_add_map) #define grlib_unload_map (*_grlib_unload_map) #define bitmap_new (*_bitmap_new) #define bitmap_clone (*_bitmap_clone) #define bitmap_new_syslib (*_bitmap_new_syslib) #define bitmap_get (*_bitmap_get) #define bitmap_destroy (*_bitmap_destroy) #define bitmap_add_cpoint (*_bitmap_add_cpoint) #define bitmap_set_cpoint (*_bitmap_set_cpoint) #define bitmap_analize (*_bitmap_analize) #define bitmap_animate (*_bitmap_animate) #define bitmap_animate_to (*_bitmap_animate_to) /* Regiones */ /* -------- */ FXEXTERN void (*_region_define )(int region, int x, int y, int width, int height) ; FXEXTERN void (*_region_union )(REGION * a, REGION * b) ; FXEXTERN int (*_region_is_empty )(REGION * a) ; FXEXTERN int (*_region_is_out )(REGION * a, REGION * b) ; FXEXTERN REGION * (*_region_new )(int x, int y, int width, int height); FXEXTERN void (*_region_destroy )(REGION *); FXEXTERN REGION * (*_region_get )(int n); #define region_define (*_region_define) #define region_union (*_region_union) #define region_is_empty (*_region_is_empty) #define region_is_out (*_region_is_out) #define region_new (*_region_new) #define region_destroy (*_region_destroy) #define region_get (*_region_get) /* Alto nivel */ /* ---------- */ FXEXTERN void (*_draw_instance_at )(INSTANCE * i, REGION * r, int x, int y) ; FXEXTERN void (*_draw_instance )(INSTANCE * i, REGION * clip) ; FXEXTERN void (*_instance_update_bbox)(INSTANCE * i) ; FXEXTERN GRAPH * (*_instance_graph )(INSTANCE * i) ; FXEXTERN void (*_scroll_region )(int nscroll, REGION * r) ; #define draw_instance_at (*_draw_instance_at) #define draw_instance (*_draw_instance) #define instance_update_bbox (*_instance_update_bbox) #define instance_graph (*_instance_graph) #define scroll_region (*_scroll_region) /* Soporte DUMP_TYPE */ /* ----------------- */ FXEXTERN void (*_gr_mark_rect )(int x, int y, int width, int height); FXEXTERN void (*_gr_mark_instance )(INSTANCE * r); #define gr_mark_rect (*_gr_mark_rect) #define gr_mark_instance (*_gr_mark_instance) /* Textos */ /* ------ */ FXEXTERN int (*_gr_load_bdf )(const char * filename) ; #define gr_load_bdf (*_gr_load_bdf) FXEXTERN int (*_gr_font_load )(char * filename) ; FXEXTERN int (*_gr_font_save )(int fontid, const char * filename) ; FXEXTERN int (*_gr_font_new )() ; FXEXTERN int (*_gr_font_newfrombitmap)(char * chardata, int width, int height, int options) ; FXEXTERN int (*_gr_font_systemfont )(char * chardata) ; FXEXTERN void (*_gr_font_destroy )(int fontid) ; FXEXTERN FONT * (*_gr_font_get )(int id); #define gr_font_load (*_gr_font_load) #define gr_font_save (*_gr_font_save) #define gr_font_new (*_gr_font_new) #define gr_font_newfrombitmap (*_gr_font_newfrombitmap) #define gr_font_systemfont (*_gr_font_systemfont) #define gr_font_destroy (*_gr_font_destroy) #define gr_font_get (*_gr_font_get) FXEXTERN void (*_gr_text_setcolor )(int c) ; FXEXTERN int (*_gr_text_getcolor )() ; FXEXTERN int (*_gr_text_new )(int fontid, int x, int y, int centered, const char * text) ; FXEXTERN int (*_gr_text_new_var )(int fontid, int x, int y, int centered, const void * var, int type) ; FXEXTERN void (*_gr_text_move )(int textid, int x, int y) ; FXEXTERN void (*_gr_text_destroy )(int textid) ; FXEXTERN int (*_gr_text_margintop )(int fontid, const unsigned char * text) ; FXEXTERN int (*_gr_text_width )(int fontid, const unsigned char * text) ; FXEXTERN int (*_gr_text_widthn )(int fontid, const unsigned char * text, int n) ; FXEXTERN int (*_gr_text_height )(int fontid, const unsigned char * text) ; FXEXTERN int (*_gr_text_put )(GRAPH * dest, REGION * clip, int fontid, int x, int y, const unsigned char * text) ; FXEXTERN GRAPH * (*_gr_text_bitmap )(int fontid, const char * text, int centered) ; #define gr_text_setcolor (*_gr_text_setcolor) #define gr_text_getcolor (*_gr_text_getcolor) #define gr_text_new (*_gr_text_new) #define gr_text_new_var (*_gr_text_new_var) #define gr_text_move (*_gr_text_move) #define gr_text_destroy (*_gr_text_destroy) #define gr_text_margintop (*_gr_text_margintop) #define gr_text_width (*_gr_text_width) #define gr_text_height (*_gr_text_height) #define gr_text_put (*_gr_text_put) #define gr_text_bitmap (*_gr_text_bitmap) #define gr_text_widthn (*_gr_text_widthn) /* Bajo nivel */ /* ---------- */ /* Las funciones grficas admiten dest=0 para referirse a la pantalla. * Para poder usar esta funcionalidad, debe estar bloqueada antes */ FXEXTERN int (*_gr_lock_screen )() ; FXEXTERN void (*_gr_unlock_screen )() ; #define gr_lock_screen (*_gr_lock_screen) #define gr_unlock_screen (*_gr_unlock_screen) /* Primitivas grficas */ FXEXTERN void (*_gr_clear )(GRAPH * dest) ; FXEXTERN void (*_gr_clear_as )(GRAPH * dest, int color) ; FXEXTERN void (*_gr_put_pixel )(GRAPH * dest, int x, int y, int color) ; FXEXTERN int (*_gr_get_pixel )(GRAPH * dest, int x, int y) ; #define gr_clear (*_gr_clear) #define gr_clear_as (*_gr_clear_as) #define gr_get_pixel (*_gr_get_pixel) #define gr_put_pixel (*_gr_put_pixel) FXEXTERN void (*_gr_setcolor )(int c) ; FXEXTERN void (*_gr_setalpha )(int a) ; FXEXTERN void (*_gr_vline )(GRAPH * dest, REGION * clip, int x, int y, int h) ; FXEXTERN void (*_gr_hline )(GRAPH * dest, REGION * clip, int x, int y, int w) ; FXEXTERN void (*_gr_line )(GRAPH * dest, REGION * clip, int x, int y, int w, int h) ; FXEXTERN void (*_gr_box )(GRAPH * dest, REGION * clip, int x, int y, int w, int h) ; FXEXTERN void (*_gr_rectangle )(GRAPH * dest, REGION * clip, int x, int y, int w, int h) ; FXEXTERN void (*_gr_circle )(GRAPH * dest, REGION * clip, int x, int y, int r) ; FXEXTERN void (*_gr_fcircle )(GRAPH * dest, REGION * clip, int x, int y, int r) ; FXEXTERN void (*_gr_bezier )(GRAPH * dest, REGION * clip, int * params) ; FXEXTERN int (*_gr_drawing_new )(DRAWING_OBJECT drawing, int z) ; FXEXTERN void (*_gr_drawing_destroy )(int id) ; FXEXTERN void (*_gr_drawing_move )(int id, int x, int y) ; #define gr_setcolor (*_gr_setcolor) #define gr_setalpha (*_gr_setalpha) #define gr_vline (*_gr_vline) #define gr_hline (*_gr_hline) #define gr_line (*_gr_line) #define gr_box (*_gr_box) #define gr_rectangle (*_gr_rectangle) #define gr_circle (*_gr_circle) #define gr_fcircle (*_gr_fcircle) #define gr_bezier (*_gr_bezier) #define gr_drawing_new (*_gr_drawing_new) #define gr_drawing_destroy (*_gr_drawing_destroy) #define gr_drawing_move (*_gr_drawing_toggle) /* Bitmaps */ FXEXTERN void (*_gr_blit )(GRAPH * dest, REGION * clip, int x, int y, int flags, GRAPH * gr) ; FXEXTERN void (*_gr_get_bbox )(REGION * dest, REGION * clip, int x, int y, int flags, int angle, int scalex, int scaley, GRAPH * gr) ; FXEXTERN void (*_gr_rotated_blit )(GRAPH * dest, REGION * clip, int scrx, int scry, int flags, int angle, int scalex, int scaley, GRAPH * gr) ; #define gr_blit (*_gr_blit) #define gr_get_bbox (*_gr_get_bbox) #define gr_rotated_blit (*_gr_rotated_blit) FXEXTERN void (*_gr_convert16_ScreenTo565) (Uint16 * ptr, int len); FXEXTERN void (*_gr_convert16_565ToScreen) (Uint16 * ptr, int len); FXEXTERN void (*_gr_fade16) (GRAPH * graph, int r, int g, int b); FXEXTERN Uint16 * (*_gr_alpha16)(int alpha); FXEXTERN Uint8 * (*_gr_alpha8 )(int alpha); #define gr_convert16_ScreenTo565 (*_gr_convert16_ScreenTo565) #define gr_convert16_565ToScreen (*_gr_convert16_565ToScreen) #define gr_fade16 (*_gr_fade16) #define gr_alpha16 (*_gr_alpha16) #define gr_alpha8 (*_gr_alpha8) /* Scroll */ /* ------ */ FXEXTERN void (*_gr_scroll_start )(int n, int fileid, int graphid, int backid, int region, int flags) ; FXEXTERN void (*_gr_scroll_stop )(int n) ; FXEXTERN void (*_gr_scroll_draw )(int n, int do_drawing, REGION * clipping) ; FXEXTERN int (*_gr_scroll_active )(int n) ; FXEXTERN int (*_gr_scroll_is_fullscreen )() ; #define gr_scroll_start (*_gr_scroll_start) #define gr_scroll_stop (*_gr_scroll_stop) #define gr_scroll_draw (*_gr_scroll_draw) #define gr_scroll_active (*_gr_scroll_active) #define gr_scroll_is_fullscreen (*_gr_scroll_is_fullscreen) /* Modo 7 */ /* ------ */ FXEXTERN void (*_gr_mode7_start )(int n, int fileid, int inid, int outid, int region, int inclination) ; FXEXTERN void (*_gr_mode7_stop )(int n) ; FXEXTERN void (*_gr_mode7_draw )(int n) ; FXEXTERN int (*_gr_mode7_active )(int n) ; #define gr_mode7_start (*_gr_mode7_start) #define gr_mode7_stop (*_gr_mode7_stop) #define gr_mode7_draw (*_gr_mode7_draw) #define gr_mode7_active (*_gr_mode7_active) /* Consola del sistema */ /* ------------------- */ FXEXTERN void (*_gr_sys_color )(int cfg, int cbg) ; FXEXTERN void (*_gr_sys_puts )(GRAPH * map, int x, int y, Uint8 * str, int len) ; FXEXTERN void (*_gr_sys_putchar )(GRAPH * map, int ox, int oy, Uint8 c) ; #define gr_sys_color (*_gr_sys_color) #define gr_sys_puts (*_gr_sys_puts) #define gr_sys_putchar (*_gr_sys_putchar) FXEXTERN void (*_gr_con_printf )(const char *fmt, ...) ; FXEXTERN void (*_gr_con_putline )(char * text) ; FXEXTERN void (*_gr_con_show )(int doit) ; FXEXTERN void (*_gr_con_draw )() ; FXEXTERN void (*_gr_con_getkey )(int key, int sym) ; FXEXTERN void (*_gr_con_scroll )(int direction) ; FXEXTERN void (*_gr_con_do )(const char * command) ; #define gr_con_printf (*_gr_con_printf) #define gr_con_putline (*_gr_con_putline) #define gr_con_show (*_gr_con_show) #define gr_con_draw (*_gr_con_draw) #define gr_con_getkey (*_gr_con_getkey) #define gr_con_scroll (*_gr_con_scroll) #define gr_con_do (*_gr_con_do) /* Profiler */ /* -------- */ FXEXTERN void (*_gprof_init )(); FXEXTERN void (*_gprof_begin )(const char * name); FXEXTERN void (*_gprof_end )(const char * name); FXEXTERN void (*_gprof_frame )(); FXEXTERN void (*_gprof_dump )(const char * filename); FXEXTERN void (*_gprof_reset )(); FXEXTERN void (*_gprof_draw )(GRAPH * dest); FXEXTERN void (*_gprof_toggle )(); #define gprof_init (*_gprof_init) #define gprof_begin (*_gprof_begin) #define gprof_end (*_gprof_end) #define gprof_frame (*_gprof_frame) #define gprof_dump (*_gprof_dump) #define gprof_reset (*_gprof_reset) #define gprof_draw (*_gprof_draw) #define gprof_toggle (*_gprof_toggle) /***************************************************** * i_procdef.h *****************************************************/ FXEXTERN int *_local_strings ; FXEXTERN int ** _localstr ; #define local_strings (* _local_strings ) #define localstr (* _localstr ) FXEXTERN PROCDEF **_mainproc ; FXEXTERN PROCDEF *(*_procdef_get)(int n) ; #define procdef_get (*_procdef_get) #define mainproc (*_mainproc) FXEXTERN SYSPROC * (*_sysproc_get )(int code) ; FXEXTERN int (*_sysproc_add )(char * name, char * paramtypes, int type, void * func) ; FXEXTERN void (*_sysproc_init)() ; #define sysproc_get (*_sysproc_get) #define sysproc_add (*_sysproc_add) #define sysproc_init (*_sysproc_init) /***************************************************** * instance.h *****************************************************/ FXEXTERN void **_globaldata ; FXEXTERN void **_localdata ; FXEXTERN int *_local_size ; FXEXTERN INSTANCE **_first_instance ; FXEXTERN INSTANCE **_last_instance ; #define globaldata (*_globaldata ) #define localdata (*_localdata ) #define local_size (*_local_size ) #define first_instance (*_first_instance ) #define last_instance (*_last_instance ) /***************************************************** * sound.h *****************************************************/ FXEXTERN void (*_sound_init )(); FXEXTERN void (*_sound_close )(); FXEXTERN int * _sound_active; #define sound_init (*_sound_init) #define sound_close (*_sound_close) #define sound_active (*_sound_active) FXEXTERN int (*_load_song) (const char * filename); FXEXTERN int (*_play_song) (int id , int loops); FXEXTERN int (*_unload_song) (int id); FXEXTERN int (*_stop_song) (); FXEXTERN int (*_pause_song) (); FXEXTERN int (*_resume_song) (); FXEXTERN int (*_is_playing_song) (); FXEXTERN int (*_set_song_volume) (int volume); #define load_song (*_load_song) #define play_song (*_play_song) #define unload_song (*_unload_song) #define stop_song (*_stop_song) #define pause_song (*_pause_song) #define resume_song (*_resume_song) #define is_playing_song (*_is_playing_song) #define set_song_volume (*_set_song_volume) FXEXTERN int (*_load_wav) (const char * filename); FXEXTERN int (*_play_wav) (int id , int loops, int channel); FXEXTERN int (*_unload_wav) (int id); FXEXTERN int (*_stop_wav) (int id); FXEXTERN int (*_pause_wav) (int id); FXEXTERN int (*_resume_wav) (int id); FXEXTERN int (*_is_playing_wav) (int id); FXEXTERN int (*_set_wav_volume) (int id,int volume); FXEXTERN int (*_set_channel_volume)(int id,int volume); FXEXTERN int (*_reserve_channels) (int id); FXEXTERN int (*_set_panning) (int canal,int left, int right); FXEXTERN int (*_set_position) (int canal,int angle, int dist); FXEXTERN int (*_set_distance) (int canal,int dist); FXEXTERN int (*_reverse_stereo) (int canal,int flip); #define load_wav (*_load_wav) #define play_wav (*_play_wav) #define unload_wav (*_unload_wav) #define stop_wav (*_stop_wav) #define pause_wav (*_pause_wav) #define resume_wav (*_resume_wav) #define is_playing_wav (*_is_playing_wav) #define set_wav_volume (*_set_wav_volume) #define set_channel_volume (*_set_channel_volume) #define reserve_channels (*_reserve_channels) #define set_panning (*_set_panning) #define set_position (*_set_position) #define set_distance (*_set_distance) #define reverse_stereo (*_reverse_stereo) FXEXTERN int (*_fade_music_in) (int id, int loops, int ms) ; FXEXTERN int (*_fade_music_off)(int ms) ; FXEXTERN void (*_ini_musiccd) () ; FXEXTERN void (*_cd_play) (int track, int continuous) ; FXEXTERN void (*_cd_stop) () ; FXEXTERN int (*_cd_playing) () ; #define fade_music_in (*_fade_music_in) #define fade_music_off (*_fade_music_off) #define ini_musiccd (*_ini_musiccd) #define cd_play (*_cd_play) #define cd_stop (*_cd_stop) #define cd_playing (*_cd_playing) /***************************************************** * instance.h *****************************************************/ FXEXTERN int * _must_exit ; #define must_exit (*_must_exit ) FXEXTERN int (*_instance_getid )() ; FXEXTERN INSTANCE * (*_instance_get )(int id) ; FXEXTERN INSTANCE * (*_instance_getfather )(INSTANCE * i) ; FXEXTERN INSTANCE * (*_instance_getson )(INSTANCE * i) ; FXEXTERN INSTANCE * (*_instance_getbigbro )(INSTANCE * i) ; FXEXTERN INSTANCE * (*_instance_getsmallbro )(INSTANCE * i) ; FXEXTERN INSTANCE * (*_instance_new )(PROCDEF * proc, INSTANCE * father) ; FXEXTERN INSTANCE * (*_instance_duplicate )(INSTANCE * i) ; FXEXTERN void (*_instance_destroy )(INSTANCE * r) ; FXEXTERN void (*_instance_posupdate )(INSTANCE * i) ; FXEXTERN int (*_instance_poschanged )(INSTANCE * i) ; FXEXTERN void (*_instance_dump )(INSTANCE * father, int indent) ; FXEXTERN void (*_instance_dump_all )() ; #define instance_getid (*_instance_getid) #define instance_get (*_instance_get) #define instance_getfather (*_instance_getfather) #define instance_getson (*_instance_getson) #define instance_getbigbro (*_instance_getbigbro) #define instance_getsmallbro (*_instance_getsmallbro) #define instance_new (*_instance_new) #define instance_duplicate (*_instance_duplicate) #define instance_destroy (*_instance_destroy) #define instance_dump (*_instance_dump) #define instance_dump_all (*_instance_dump_all) #define instance_poschanged (*_instance_poschanged) #define instance_posupdate (*_instance_posupdate) /* Las siguientes funciones son el punto de entrada del intrprete */ FXEXTERN int (*_instance_go )(INSTANCE * r) ; FXEXTERN void (*_instance_go_all )() ; #define instance_go (*_instance_go) #define instance_go_all (*_instance_go_all) /***************************************************** * Otros *****************************************************/ FXEXTERN void (*_fnc_export) (const char * name, void * addr); #define fnc_export (*_fnc_export) #ifndef WIN32 #define FENIX_MainDLL void #else #define FENIX_MainDLL void __stdcall #endif #define COMMON_PARAMS \ void *(*FENIX_import)(char *name),\ void (*FENIX_export)(char * name, char * paramtypes, int type, void * func) #define FENIX_DLLImport \ _gprof_init = FENIX_import ( "gprof_init" ); \ _gprof_begin = FENIX_import ( "gprof_begin" ); \ _gprof_frame = FENIX_import ( "gprof_frame" ); \ _gprof_end = FENIX_import ( "gprof_end" ); \ _gprof_dump = FENIX_import ( "gprof_dump" ); \ _gprof_reset = FENIX_import ( "gprof_reset" ); \ _gprof_draw = FENIX_import ( "gprof_draw" ); \ _gprof_toggle = FENIX_import ( "gprof_toggle" ); \ _file_open = FENIX_import ( "file_open" ); \ _file_read = FENIX_import ( "file_read" ); \ _file_write = FENIX_import ( "file_write" ); \ _file_gets = FENIX_import ( "file_gets" ); \ _file_puts = FENIX_import ( "file_puts" ); \ _file_size = FENIX_import ( "file_size" ); \ _file_pos = FENIX_import ( "file_pos" ); \ _file_seek = FENIX_import ( "file_seek" ); \ _file_addp = FENIX_import ( "file_addp" ); \ _file_close = FENIX_import ( "file_close" ); \ _file_exists = FENIX_import ( "file_exists" ); \ _file_add_xfile = FENIX_import ( "file_add_xfile" ); \ _file_eof = FENIX_import ( "file_eof" ); \ _file_fp = FENIX_import ( "file_fp" ); \ _string_init = FENIX_import ( "string_init" ); \ _string_get = FENIX_import ( "string_get" ); \ _string_dump = FENIX_import ( "string_dump" ); \ _string_load = FENIX_import ( "string_load" ); \ _string_new = FENIX_import ( "string_new" ); \ _string_newa = FENIX_import ( "string_newa" ); \ _string_use = FENIX_import ( "string_use" ); \ _string_discard = FENIX_import ( "string_discard" ); \ _string_add = FENIX_import ( "string_add" ); \ _string_itoa = FENIX_import ( "string_itoa" ); \ _string_ftoa = FENIX_import ( "string_ftoa" ); \ _string_ptoa = FENIX_import ( "string_ptoa" ); \ _string_comp = FENIX_import ( "string_comp" ); \ _string_casecmp = FENIX_import ( "string_casecmp" ); \ _string_char = FENIX_import ( "string_char" ); \ _string_substr = FENIX_import ( "string_substr" ); \ _string_find = FENIX_import ( "string_find" ); \ _string_ucase = FENIX_import ( "string_ucase" ); \ _string_lcase = FENIX_import ( "string_lcase" ); \ _string_strip = FENIX_import ( "string_strip" ); \ _string_pad = FENIX_import ( "string_pad" ); \ _string_format = FENIX_import ( "string_format" ); \ _string_coalesce = FENIX_import ( "string_coalesce" ); \ _string_concat = FENIX_import ( "string_concat" ); \ _dos_chars = FENIX_import ( "dos_chars" ); \ _c_type = FENIX_import ( "c_type" ); \ _c_upper = FENIX_import ( "c_upper" ); \ _c_lower = FENIX_import ( "c_lower" ); \ _convert = FENIX_import ( "convert" ); \ _init_c_type = FENIX_import ( "init_c_type" ); \ _dos_to_win = FENIX_import ( "dos_to_win" ); \ _win_to_dos = FENIX_import ( "win_to_dos" ); \ _flic_open = FENIX_import ( "flic_open" ); \ _flic_destroy = FENIX_import ( "flic_destroy" ); \ _flic_do_frame = FENIX_import ( "flic_do_frame" ); \ _flic_reset = FENIX_import ( "flic_reset" ); \ _current_fli = FENIX_import ( "current_fli" ); \ _current_fli_x = FENIX_import ( "current_fli_x" ); \ _current_fli_y = FENIX_import ( "current_fli_y" ); \ _debug = FENIX_import ( "debug" ); \ _fxi = FENIX_import ( "fxi" ); \ _enable_16bits = FENIX_import ( "enable_16bits" ); \ _enable_filtering = FENIX_import ( "enable_filtering" ); \ _report_string = FENIX_import ( "report_string" ); \ _report_graphics = FENIX_import ( "report_graphics" ); \ _gr_error = FENIX_import ( "gr_error" ); \ _do_exit = FENIX_import ( "do_exit" ); \ _dcb_load = FENIX_import ( "dcb_load" ); \ _getid = FENIX_import ( "getid" ); \ _path_find = FENIX_import ( "path_find" ); \ _path_get = FENIX_import ( "path_get" ); \ _path_set_wall = FENIX_import ( "path_set_wall" ); \ _scr_initialized = FENIX_import ( "scr_initialized" ); \ _regions = FENIX_import ( "regions" ); \ _background = FENIX_import ( "background" ); \ _scrbitmap = FENIX_import ( "scrbitmap" ); \ _syslib = FENIX_import ( "syslib" ); \ _icono = FENIX_import ( "icono" ); \ _last_frame_ms = FENIX_import ( "last_frame_ms" ); \ _apptitle = FENIX_import ( "apptitle" ); \ _key_table = FENIX_import ( "key_table" ); \ _keystate = FENIX_import ( "keystate" ); \ _keytab_initialized = FENIX_import ( "keytab_initialized" ); \ _gr_key = FENIX_import ( "gr_key" ); \ _gr_timer = FENIX_import ( "gr_timer" ); \ _scr_width = FENIX_import ( "scr_width" ); \ _scr_height = FENIX_import ( "scr_height" ); \ _full_screen = FENIX_import ( "full_screen" ); \ _double_buffer = FENIX_import ( "double_buffer" ); \ _gr_init = FENIX_import ( "gr_init" ); \ _gr_set_fps = FENIX_import ( "gr_set_fps" ); \ _gr_wait_frame = FENIX_import ( "gr_wait_frame" ); \ _gr_advance_timers = FENIX_import ( "gr_advance_timers" ); \ _gr_draw_frame = FENIX_import ( "gr_draw_frame" ); \ _gr_draw_screen = FENIX_import ( "gr_draw_screen" ); \ _gr_new_object = FENIX_import ( "gr_new_object" ); \ _gr_hide_object = FENIX_import ( "gr_hide_object" ); \ _gr_destroy_object = FENIX_import ( "gr_destroy_object" ); \ _keytab_init = FENIX_import ( "keytab_init" ); \ _keytab_free = FENIX_import ( "keytab_free" ); \ _vpalette = FENIX_import ( "vpalette" ); \ _palette = FENIX_import ( "palette" ); \ _colorequiv = FENIX_import ( "colorequiv" ); \ _colorghost = FENIX_import ( "colorghost" ); \ _background_8bits = FENIX_import ( "background_8bits" ); \ _background_8bits_used = FENIX_import ( "background_8bits_used" ); \ _background_is_black = FENIX_import ( "background_is_black" ); \ _trans_table = FENIX_import ( "trans_table" ); \ _trans_table_updated = FENIX_import ( "trans_table_updated" ); \ _gr_make_trans_table = FENIX_import ( "gr_make_trans_table" ); \ _palette_loaded = FENIX_import ( "palette_loaded" ); \ _palette_changed = FENIX_import ( "palette_changed" ); \ _fade_on = FENIX_import ( "fade_on" ); \ _fade_step = FENIX_import ( "fade_step" ); \ _gr_read_pal = FENIX_import ( "gr_read_pal" ); \ _gr_refresh_palette = FENIX_import ( "gr_refresh_palette" ); \ _gr_fade_init = FENIX_import ( "gr_fade_init" ); \ _gr_fade_step = FENIX_import ( "gr_fade_step" ); \ _gr_roll_palette = FENIX_import ( "gr_roll_palette" ); \ _gr_find_nearest_color = FENIX_import ( "gr_find_nearest_color" ); \ _gr_set_rgb = FENIX_import ( "gr_set_rgb" ); \ _gr_rgb = FENIX_import ( "gr_rgb" ); \ _gr_get_rgb = FENIX_import ( "gr_get_rgb" ); \ _gr_set_colors = FENIX_import ( "gr_set_colors" ); \ _gr_get_colors = FENIX_import ( "gr_get_colors" ); \ _blend_create = FENIX_import ( "blend_create" ); \ _blend_free = FENIX_import ( "blend_free" ); \ _blend_init = FENIX_import ( "blend_init" ); \ _blend_translucency = FENIX_import ( "blend_translucency" ); \ _blend_intensity = FENIX_import ( "blend_intensity" ); \ _blend_tint = FENIX_import ( "blend_tint" ); \ _blend_swap = FENIX_import ( "blend_swap" ); \ _blend_assign = FENIX_import ( "blend_assign" ); \ _blend_apply = FENIX_import ( "blend_apply" ); \ _blend_grayscale = FENIX_import ( "blend_grayscale" ); \ _gr_load_map = FENIX_import ( "gr_load_map" ); \ _gr_load_png = FENIX_import ( "gr_load_png" ); \ _gr_load_pcx = FENIX_import ( "gr_load_pcx" ); \ _gr_load_fpg = FENIX_import ( "gr_load_fpg" ); \ _gr_load_pal = FENIX_import ( "gr_load_pal" ); \ _gr_save_pal = FENIX_import ( "gr_save_pal" ); \ _gr_save_map = FENIX_import ( "gr_save_map" ); \ _gr_save_fpg = FENIX_import ( "gr_save_fpg" ); \ _gr_save_png = FENIX_import ( "gr_save_png" ); \ _grlib_new = FENIX_import ( "grlib_new" ); \ _grlib_destroy = FENIX_import ( "grlib_destroy" ); \ _grlib_add_map = FENIX_import ( "grlib_add_map" ); \ _grlib_unload_map = FENIX_import ( "grlib_unload_map" ); \ _bitmap_new = FENIX_import ( "bitmap_new" ); \ _bitmap_clone = FENIX_import ( "bitmap_clone" ); \ _bitmap_new_syslib = FENIX_import ( "bitmap_new_syslib" ); \ _bitmap_get = FENIX_import ( "bitmap_get" ); \ _bitmap_destroy = FENIX_import ( "bitmap_destroy" ); \ _bitmap_add_cpoint = FENIX_import ( "bitmap_add_cpoint" ); \ _bitmap_set_cpoint = FENIX_import ( "bitmap_set_cpoint" ); \ _bitmap_analize = FENIX_import ( "bitmap_analize" ); \ _bitmap_animate = FENIX_import ( "bitmap_animate" ); \ _bitmap_animate_to = FENIX_import ( "bitmap_animate_to" ); \ _region_define = FENIX_import ( "region_define" ); \ _region_union = FENIX_import ( "region_union" ); \ _region_is_empty = FENIX_import ( "region_is_empty" ); \ _region_is_out = FENIX_import ( "region_is_out" ); \ _region_new = FENIX_import ( "region_new" ); \ _region_destroy = FENIX_import ( "region_destroy" ); \ _region_get = FENIX_import ( "region_get" ); \ _draw_instance_at = FENIX_import ( "draw_instance_at" ); \ _draw_instance = FENIX_import ( "draw_instance" ); \ _instance_update_bbox = FENIX_import ( "instance_update_bbox" ); \ _instance_graph = FENIX_import ( "instance_graph" ); \ _scroll_region = FENIX_import ( "scroll_region" ); \ _gr_font_get = FENIX_import ( "gr_font_get" ); \ _gr_font_load = FENIX_import ( "gr_font_load" ); \ _gr_load_bdf = FENIX_import ( "gr_load_bdf" ); \ _gr_font_systemfont = FENIX_import ( "gr_font_systemfont" ); \ _gr_font_destroy = FENIX_import ( "gr_font_destroy" ); \ _gr_font_save = FENIX_import ( "gr_font_save" ); \ _gr_font_new = FENIX_import ( "gr_font_new" ); \ _gr_font_newfrombitmap = FENIX_import ( "gr_font_newfrombitmap" ); \ _gr_text_setcolor = FENIX_import ( "gr_text_setcolor" ); \ _gr_text_getcolor = FENIX_import ( "gr_text_getcolor" ); \ _gr_text_new = FENIX_import ( "gr_text_new" ); \ _gr_text_new_var = FENIX_import ( "gr_text_new_var" ); \ _gr_text_move = FENIX_import ( "gr_text_move" ); \ _gr_text_destroy = FENIX_import ( "gr_text_destroy" ); \ _gr_text_margintop = FENIX_import ( "gr_text_margintop" ); \ _gr_text_width = FENIX_import ( "gr_text_width" ); \ _gr_text_widthn = FENIX_import ( "gr_text_widthn" ); \ _gr_text_height = FENIX_import ( "gr_text_height" ); \ _gr_text_put = FENIX_import ( "gr_text_put" ); \ _gr_text_bitmap = FENIX_import ( "gr_text_bitmap" ); \ _gr_lock_screen = FENIX_import ( "gr_lock_screen" ); \ _gr_unlock_screen = FENIX_import ( "gr_unlock_screen" ); \ _gr_clear = FENIX_import ( "gr_clear" ); \ _gr_clear_as = FENIX_import ( "gr_clear_as" ); \ _gr_put_pixel = FENIX_import ( "gr_put_pixel" ); \ _gr_get_pixel = FENIX_import ( "gr_get_pixel" ); \ _gr_setcolor = FENIX_import ( "gr_setcolor" ); \ _gr_vline = FENIX_import ( "gr_vline" ); \ _gr_hline = FENIX_import ( "gr_hline" ); \ _gr_line = FENIX_import ( "gr_line" ); \ _gr_box = FENIX_import ( "gr_box" ); \ _gr_rectangle = FENIX_import ( "gr_rectangle" ); \ _gr_circle = FENIX_import ( "gr_circle" ); \ _gr_fcircle = FENIX_import ( "gr_fcircle" ); \ _gr_blit = FENIX_import ( "gr_blit" ); \ _gr_get_bbox = FENIX_import ( "gr_get_bbox" ); \ _gr_rotated_blit = FENIX_import ( "gr_rotated_blit" ); \ _gr_scroll_start = FENIX_import ( "gr_scroll_start" ); \ _gr_scroll_stop = FENIX_import ( "gr_scroll_stop" ); \ _gr_scroll_draw = FENIX_import ( "gr_scroll_draw" ); \ _gr_scroll_active = FENIX_import ( "gr_scroll_active" ); \ _gr_scroll_is_fullscreen = FENIX_import ( "gr_scroll_is_fullscreen" ); \ _gr_mode7_start = FENIX_import ( "gr_mode7_start" ); \ _gr_mode7_stop = FENIX_import ( "gr_mode7_stop" ); \ _gr_mode7_draw = FENIX_import ( "gr_mode7_draw" ); \ _gr_mode7_active = FENIX_import ( "gr_mode7_active" ); \ _gr_sys_color = FENIX_import ( "gr_sys_color" ); \ _gr_sys_puts = FENIX_import ( "gr_sys_puts" ); \ _gr_sys_putchar = FENIX_import ( "gr_sys_putchar" ); \ _gr_con_printf = FENIX_import ( "gr_con_printf" ); \ _gr_con_putline = FENIX_import ( "gr_con_putline" ); \ _gr_con_show = FENIX_import ( "gr_con_show" ); \ _gr_con_draw = FENIX_import ( "gr_con_draw" ); \ _gr_con_getkey = FENIX_import ( "gr_con_getkey" ); \ _gr_con_scroll = FENIX_import ( "gr_con_scroll" ); \ _gr_con_do = FENIX_import ( "gr_con_do" ); \ _gr_convert16_565ToScreen = FENIX_import ( "gr_convert16_565ToScreen" ); \ _gr_convert16_ScreenTo565 = FENIX_import ( "gr_convert16_ScreenTo565" ); \ _gr_fade16 = FENIX_import ( "gr_fade16" ); \ _local_strings = FENIX_import ( "local_strings" ); \ _localstr = FENIX_import ( "localstr" ); \ _mainproc = FENIX_import ( "mainproc" ); \ _procdef_get = FENIX_import ( "procdef_get" ); \ _sysproc_get = FENIX_import ( "sysproc_get" ); \ _sysproc_add = FENIX_import ( "sysproc_add" ); \ _sysproc_init = FENIX_import ( "sysproc_init" ); \ _globaldata = FENIX_import ( "globaldata" ); \ _localdata = FENIX_import ( "localdata" ); \ _local_size = FENIX_import ( "local_size" ); \ _first_instance = FENIX_import ( "first_instance" ); \ _last_instance = FENIX_import ( "last_instance" ); \ _must_exit = FENIX_import ( "must_exit" ); \ _instance_getid = FENIX_import ( "instance_getid" ); \ _instance_get = FENIX_import ( "instance_get" ); \ _instance_getfather = FENIX_import ( "instance_getfather" ); \ _instance_getson = FENIX_import ( "instance_getson" ); \ _instance_getbigbro = FENIX_import ( "instance_getbigbro" ); \ _instance_getsmallbro = FENIX_import ( "instance_getsmallbro" ); \ _instance_new = FENIX_import ( "instance_new" ); \ _instance_duplicate = FENIX_import ( "instance_duplicate" ); \ _instance_destroy = FENIX_import ( "instance_destroy" ); \ _instance_dump = FENIX_import ( "instance_dump" ); \ _instance_dump_all = FENIX_import ( "instance_dump_all" ); \ _instance_go = FENIX_import ( "instance_go" ); \ _instance_go_all = FENIX_import ( "instance_go_all" ); \ _instance_posupdate = FENIX_import ( "instance_posupdate" ); \ _instance_poschanged = FENIX_import ( "instance_poschanged" ); \ _sound_active = FENIX_import ( "sound_active" ); \ _sound_init = FENIX_import ( "sound_init" ); \ _sound_close = FENIX_import ( "sound_close" ); \ _load_song = FENIX_import ( "load_song" ); \ _play_song = FENIX_import ( "play_song" ); \ _unload_song = FENIX_import ( "unload_song" ); \ _stop_song = FENIX_import ( "stop_song" ); \ _pause_song = FENIX_import ( "pause_song" ); \ _resume_song = FENIX_import ( "resume_song" ); \ _is_playing_song = FENIX_import ( "is_playing_song" ); \ _set_song_volume = FENIX_import ( "set_song_volume" ); \ _load_wav = FENIX_import ( "load_wav" ); \ _play_wav = FENIX_import ( "play_wav" ); \ _unload_wav = FENIX_import ( "unload_wav" ); \ _stop_wav = FENIX_import ( "stop_wav" ); \ _pause_wav = FENIX_import ( "pause_wav" ); \ _resume_wav = FENIX_import ( "resume_wav" ); \ _is_playing_wav = FENIX_import ( "is_playing_wav" ); \ _set_wav_volume = FENIX_import ( "set_wav_volume" ); \ _set_channel_volume = FENIX_import ( "set_channel_volume" ); \ _reserve_channels = FENIX_import ( "reserve_channels" ); \ _ini_musiccd = FENIX_import ( "ini_musiccd" ); \ _cd_play = FENIX_import ( "cd_play" ); \ _cd_stop = FENIX_import ( "cd_stop" ); \ _cd_playing = FENIX_import ( "cd_playing" ); \ _fnc_export = FENIX_import ( "fnc_export" ); \ _screen = FENIX_import ( "screen" ); \ _gr_font_get = FENIX_import ( "gr_font_get" ); \ _gr_alpha8 = FENIX_import ( "gr_alpha8" ); \ _gr_alpha16 = FENIX_import ( "gr_alpha16" ); \ _syscolor16 = FENIX_import ( "syscolor16" ); \ _fntcolor16 = FENIX_import ( "fntcolor16" ); \ _syscolor8 = FENIX_import ( "syscolor8" ); \ _fntcolor8 = FENIX_import ( "fntcolor8" ); \ _frame_count = FENIX_import ( "frame_count" ); \ _current_time = FENIX_import ( "current_time" ); \ _drawing_stipple = FENIX_import ( "drawing_stipple" ); \ _gr_setalpha = FENIX_import ( "gr_setalpha" ); \ _gr_bezier = FENIX_import ( "gr_bezier" ); \ _gr_drawing_new = FENIX_import ( "gr_drawing_new" ); \ _gr_drawing_destroy = FENIX_import ( "gr_drawing_destroy" ); \ _gr_drawing_move = FENIX_import ( "gr_drawing_move" ); \ _gr_fill_nearest_table = FENIX_import ( "gr_fill_nearest_table" ); \ _gr_mark_rect = FENIX_import ( "gr_mark_rect" ); \ _gr_mark_instance = FENIX_import ( "gr_mark_instance" ); \ _nearest_table = FENIX_import ( "nearest_table" ); #ifdef __cplusplus } #endif /* Keyboard codes */ #define KEY_0 11 #define KEY_1 2 #define KEY_2 3 #define KEY_3 4 #define KEY_4 5 #define KEY_5 6 #define KEY_6 7 #define KEY_7 8 #define KEY_8 9 #define KEY_9 10 #define KEY_A 30 #define KEY_B 48 #define KEY_BACKSLASH 43 #define KEY_BACKSPACE 14 #define KEY_C 46 #define KEY_CAPSLOCK 58 #define KEY_CARET 40 #define KEY_COMMA 51 #define KEY_D 32 #define KEY_DELETE 83 #define KEY_DOWN 80 #define KEY_E 18 #define KEY_END 79 #define KEY_EQUALS 90 #define KEY_ESCAPE 1 #define KEY_F10 68 #define KEY_F11 87 #define KEY_F12 88 #define KEY_F1 59 #define KEY_F2 60 #define KEY_F 33 #define KEY_F3 61 #define KEY_F4 62 #define KEY_F5 63 #define KEY_F6 64 #define KEY_F7 65 #define KEY_F8 66 #define KEY_F9 67 #define KEY_G 34 #define KEY_GREATER 91 #define KEY_H 35 #define KEY_HOME 71 #define KEY_I 23 #define KEY_INSERT 82 #define KEY_J 36 #define KEY_K 37 #define KEY_KP0 11 #define KEY_KP1 2 #define KEY_KP2 3 #define KEY_KP3 4 #define KEY_KP4 5 #define KEY_KP5 6 #define KEY_KP6 7 #define KEY_KP7 8 #define KEY_KP8 9 #define KEY_KP9 10 #define KEY_KP_DIVIDE 53 #define KEY_KP_ENTER 28 #define KEY_KP_MINUS 74 #define KEY_KP_MULTIPLY 55 #define KEY_KP_PERIOD 52 #define KEY_KP_PLUS 78 #define KEY_L 38 #define KEY_LEFT 75 #define KEY_LEFTBRACKET 26 #define KEY_LESS 89 #define KEY_LMETA 56 #define KEY_LSHIFT 42 #define KEY_M 50 #define KEY_MINUS 12 #define KEY_N 49 #define KEY_NUMLOCK 69 #define KEY_O 24 #define KEY_P 25 #define KEY_PAGEDOWN 81 #define KEY_PAGEUP 73 #define KEY_PERIOD 52 #define KEY_PLUS 13 #define KEY_Q 16 #define KEY_QUESTION 92 #define KEY_QUOTE 41 #define KEY_R 19 #define KEY_RETURN 28 #define KEY_RIGHT 77 #define KEY_RIGHTBRACKET 27 #define KEY_RMETA 56 #define KEY_RSHIFT 54 #define KEY_S 31 #define KEY_SCROLLOCK 70 #define KEY_SEMICOLON 39 #define KEY_SLASH 53 #define KEY_SPACE 57 #define KEY_T 20 #define KEY_TAB 15 #define KEY_U 22 #define KEY_UP 72 #define KEY_V 47 #define KEY_W 17 #define KEY_X 45 #define KEY_Y 21 #define KEY_Z 44 #define KEY_RALT 93 #define KEY_RCTRL 94 #define KEY_LALT 95 #define KEY_LCTRL 96 #define KEY_MENU 97 #endif Fenix/include/pslang.h0000644000000000000000000002111310607527002013702 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __PSLANG_H #define __PSLANG_H /* Constantes comunes */ #define MOD_POS 1 #define MOD_PAT 2 #define MOD_VOLUME 3 #define MOD_TIME 4 #define MOD_NUMPOS 5 #define MOD_NAME 10 #define MOD_TYPE 11 /* Algunas definiciones comunes */ #define STATUS_DEAD 0 #define STATUS_KILLED 1 #define STATUS_RUNNING 2 #define STATUS_SLEEPING 3 #define STATUS_FROZEN 4 #define STATUS_WAITING_MASK 0x8000 /* #define STATUS_WAITING 7 #define STATUS_WAITING_DEAD 8 */ #define SCALE_NONE 0x0000 #define SCALE_SCALE2X 0x0001 #define SCALE_HQ2X 0x0002 #define SCALE_SCANLINE2X 0x0003 #define SCALE_NOFILTER 0x0004 /* Flags para gr_blit */ #define B_HMIRROR 0x0001 #define B_VMIRROR 0x0002 #define B_TRANSLUCENT 0x0004 #define B_ALPHA 0x0008 #define B_ABLEND 0x0010 #define B_SBLEND 0x0020 #define B_NOCOLORKEY 0x0080 /* --------------------- */ /* Flags para mnemnicos */ /* --------------------- */ /* Nmero de parmetros */ #define MN_0_PARAMS (0x00) #define MN_1_PARAMS (0x80) #define MN_PARAMS(code) (((code) & 0x80) >> 7) /* Mascara */ #define MN_MASK 0xFF /* Tipo de dato */ #define MN_DWORD (0x000) #define MN_WORD (0x100) #define MN_BYTE (0x200) #define MN_STRING (0x300) #define MN_FLOAT (0x400) #define MN_UNSIGNED (0x800) #define MN_TYPEOF(code) ((code) & 0xF00) /* -------------------- */ /* Cdigos de mnemnico */ /* -------------------- */ /* Salidas */ #define MN_END (0x00| MN_0_PARAMS) #define MN_RETURN (0x01| MN_0_PARAMS) #define MN_FRAME (0x02| MN_0_PARAMS) /* Operaciones con la pila */ #define MN_DUP (0x03| MN_0_PARAMS) #define MN_PUSH (0x04| MN_1_PARAMS) #define MN_POP (0x05| MN_0_PARAMS) /* Control Switch */ #define MN_SWITCH (0x06| MN_0_PARAMS) #define MN_CASE (0x07| MN_0_PARAMS) #define MN_CASE_R (0x08| MN_0_PARAMS) /* Llamadas */ #define MN_CALL (0x09| MN_1_PARAMS) #define MN_SYSCALL (0x0A| MN_1_PARAMS) #define MN_PROC (0x0B| MN_1_PARAMS) #define MN_SYSPROC (0x0C| MN_1_PARAMS) #define MN_CLONE (0x0D| MN_1_PARAMS) #define MN_TYPE (0x0E| MN_1_PARAMS) #define MN_DEBUG (0x0F| MN_0_PARAMS) /* Direccionamiento */ #define MN_INDEX (0x10| MN_1_PARAMS) #define MN_ARRAY (0x11| MN_1_PARAMS) #define MN_PRIVATE (0x12| MN_1_PARAMS) #define MN_LOCAL (0x13| MN_1_PARAMS) #define MN_GLOBAL (0x14| MN_1_PARAMS) #define MN_REMOTE (0x15| MN_1_PARAMS) #define MN_PTR (0x16| MN_0_PARAMS) /* Acceso a variables */ #define MN_GET_PRIV (0x17| MN_1_PARAMS) #define MN_GET_LOCAL (0x18| MN_1_PARAMS) #define MN_GET_GLOBAL (0x19| MN_1_PARAMS) #define MN_GET_REMOTE (0x1A| MN_1_PARAMS) /* Control de flujo */ #define MN_JUMP (0x1B| MN_1_PARAMS) #define MN_JFALSE (0x1C| MN_1_PARAMS) #define MN_JTRUE (0x1D| MN_1_PARAMS) #define MN_JTFALSE (0x1E| MN_1_PARAMS) #define MN_JTTRUE (0x1F| MN_1_PARAMS) #define MN_JNOCASE (0x20| MN_1_PARAMS) /* Operaciones unarias - aceptan tipos de dato numricos */ #define MN_NEG (0x21| MN_0_PARAMS) #define MN_NOT (0x22| MN_0_PARAMS) /* Operaciones binarias - Aceptan tipos de dato numricos */ #define MN_MUL (0x23| MN_0_PARAMS) #define MN_DIV (0x24| MN_0_PARAMS) #define MN_ADD (0x25| MN_0_PARAMS) #define MN_SUB (0x26| MN_0_PARAMS) #define MN_MOD (0x27| MN_0_PARAMS) #define MN_ROR (0x28| MN_0_PARAMS) #define MN_ROL (0x29| MN_0_PARAMS) #define MN_AND (0x2A| MN_0_PARAMS) #define MN_OR (0x2B| MN_0_PARAMS) #define MN_XOR (0x2C| MN_0_PARAMS) /* Comparaciones binarias */ #define MN_EQ (0x2D| MN_0_PARAMS) #define MN_NE (0x2E| MN_0_PARAMS) #define MN_GT (0x2F| MN_0_PARAMS) #define MN_LT (0x30| MN_0_PARAMS) #define MN_GTE (0x31| MN_0_PARAMS) #define MN_LTE (0x32| MN_0_PARAMS) /* Post/pre-operadores */ #define MN_POSTINC (0x33| MN_1_PARAMS) #define MN_POSTDEC (0x34| MN_1_PARAMS) #define MN_INC (0x35| MN_1_PARAMS) #define MN_DEC (0x36| MN_1_PARAMS) /* Alteracin directa de variables */ #define MN_LET (0x37| MN_0_PARAMS) #define MN_VARADD (0x38| MN_0_PARAMS) #define MN_VARSUB (0x39| MN_0_PARAMS) #define MN_VARMUL (0x3A| MN_0_PARAMS) #define MN_VARDIV (0x3B| MN_0_PARAMS) #define MN_VARMOD (0x3C| MN_0_PARAMS) #define MN_VARXOR (0x3D| MN_0_PARAMS) #define MN_VARAND (0x3E| MN_0_PARAMS) #define MN_VAROR (0x3F| MN_0_PARAMS) #define MN_VARROR (0x40| MN_0_PARAMS) #define MN_VARROL (0x41| MN_0_PARAMS) /* Funciones de cadena */ #define MN_SUBSTR (0x42| MN_0_PARAMS) #define MN_CHRSTR (0x43| MN_0_PARAMS) #define MN_INT2STR (0x44| MN_1_PARAMS) #define MN_FLOAT2STR (0x45| MN_1_PARAMS) #define MN_CHR2STR (0x46| MN_1_PARAMS) /* Optimizaciones */ #define MN_LETNP (0x47| MN_0_PARAMS) /* Operadores Bitwise */ #define MN_BNOT (0x48| MN_0_PARAMS) #define MN_BAND (0x49| MN_0_PARAMS) #define MN_BOR (0x4A| MN_0_PARAMS) #define MN_BXOR (0x4B| MN_0_PARAMS) /* Funciones de conversin */ #define MN_INT2FLOAT (0x50| MN_1_PARAMS) #define MN_FLOAT2INT (0x51| MN_1_PARAMS) #define MN_A2STR (0x60| MN_1_PARAMS) #define MN_STR2A (0x61| MN_1_PARAMS) #define MN_STRACAT (0x62| MN_1_PARAMS) #define MN_INT2WORD (0x63| MN_1_PARAMS) #define MN_INT2BYTE (0x64| MN_1_PARAMS) /* Mnemnicos inexistentes - usados por el compilador internamente */ #define MN_REPEAT (0x70| MN_1_PARAMS) #define MN_BREAK (0x71| MN_1_PARAMS) #define MN_BRFALSE (0x72| MN_1_PARAMS) #define MN_RETRUE (0x73| MN_1_PARAMS) #define MN_REFALSE (0x74| MN_1_PARAMS) /* Funciones de cadena (2) */ #define MN_POINTER2STR (0x75| MN_1_PARAMS) #define MN_POINTER2BOL (0x76| MN_1_PARAMS) #define MN_STR2INT (0x77| MN_1_PARAMS) #define MN_STR2FLOAT (0x78| MN_1_PARAMS) #define MN_STR2CHR (0x79| MN_1_PARAMS) /* Tratamiento de Locales a proceso */ #define MN_PUBLIC (0x7A| MN_1_PARAMS) /* Direccionamiento */ #define MN_GET_PUBLIC (0x7B| MN_1_PARAMS) /* Acceso a variables */ #define MN_REMOTE_PUBLIC (0x7C| MN_1_PARAMS) /* Direccionamiento */ #define MN_GET_REMOTE_PUBLIC (0x7D| MN_1_PARAMS) /* Acceso a variables */ /* Depurado */ #define MN_SENTENCE (0x7F| MN_1_PARAMS) /* Max: 0x7F */ #endif Fenix/include/dirs.h0000644000000000000000000000316710607527000013366 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : dirs.h * DESCRIPTION : Base include for directory functions * * HISTORY: * */ #ifndef __DIRS_H #define __DIRS_H #ifdef WIN32 #include #else #include #include #endif #include extern char * base_dir ; #ifdef WIN32 extern int base_drive ; #endif extern char * dir_path_convert(const char *path) ; extern char * dir_current(void) ; extern int dir_change(const char *dir) ; extern int dir_create(const char *dir) ; extern int dir_delete(const char *dir) ; extern int dir_deletefile(const char *filename) ; #endif Fenix/include/xctype_st.h0000644000000000000000000000324410607527004014447 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #define ISALPHA(c) (c_type [(unsigned char)c] & CTYPE_ALPHA) #define ISSPACE(c) (c_type [(unsigned char)c] & CTYPE_SPACE) #define ISNUM(c) (c_type [(unsigned char)c] & CTYPE_NUM) #define ISALNUM(c) (c_type [(unsigned char)c] & CTYPE_ALNUM) #define ISWORDCHAR(c) (c_type [(unsigned char)c] & CTYPE_WORDCHAR) #define ISWORDFIRST(c) (c_type [(unsigned char)c] & CTYPE_WORDFIRST) #define TOUPPER(c) (c_upper[(unsigned char)c]) #define TOLOWER(c) (c_lower[(unsigned char)c]) #define CTYPE_ALPHA 1 #define CTYPE_NUM 2 #define CTYPE_WORDCHAR 4 #define CTYPE_WORDFIRST 8 #define CTYPE_SPACE 16 #define CTYPE_ALNUM 32 Fenix/include/files_st.h0000644000000000000000000000331510607527000014230 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __FILES_ST_H #define __FILES_ST_H #include /* Funciones de acceso a ficheros */ /* ------------------------------ */ /* Ahora mismo son casi wrappers de stdio.h, pero en el futuro * el tipo "file" puede ser una estructura y las funciones, * ofrecer soporte transparente para ficheros PAK, etc. */ #define F_XFILE 1 #define F_FILE 2 #define F_GZFILE 3 #include #ifndef MAX_PATH #define MAX_PATH 260 #endif #ifdef TARGET_Win32 #define PATH_SEP "\\" #define PATH_BACKSLASH #else #define PATH_SEP "/" #define PATH_SLASH #endif typedef struct { int type ; FILE * fp ; gzFile gz ; int n ; int error ; char name[MAX_PATH]; long pos ; int eof ; } file ; #endif Fenix/include/fpl.h0000644000000000000000000000370610607527000013205 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : fpl.h * DESCRIPTION : Fenix Palette headers and documentation * * HISTORY: 0.85 - first version */ #ifndef __FPL_H #define __FPL_H #define FPL_VERSION 0x0100 #define FPL_VALID_DEPTH(a) ((a) == 8) // FPL files don't use any compression whatsoever, but they // natively support .gz expansion typedef struct { char magic[16]; // "FenixPalette\x1A\x0D\x0A" + '\x00' Uint32 version; // Version code ((major << 16) | minor) Uint32 depth; // currently supports only 8 bits palettes } FPL_HEADER; #define FPL_MAGIC "FenixPalette\x1A\x0D\x0A" // Palette information follows. Only 8 bpp color palettes supported. // There are 256 RGB triplets with a range of 0-255 for each color // [768 bytes of information] // Prototipos int fpl_load_from (file * fp); int fpl_save_to (file * fp); int fpl_save (const char * filename); int fpl_load (const char * filename); #endif Fenix/include/fnx_loadlib.h0000644000000000000000000000405210607527000014700 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef _FNX_LOADLIB_H #define _FNX_LOADLIB_H /* WIN32 INCLUDES */ #ifdef WIN32 #include #include #endif #ifdef TARGET_MAC #include #include #define __stdcall #endif #ifdef TARGET_Linux #include #include #define __stdcall #endif #ifdef TARGET_LinuxPPC #include #include #define __stdcall #endif #ifdef TARGET_BEOS #include #include #endif #ifdef TARGET_BSD #include #include #define __stdcall #endif typedef void (__stdcall * dlfunc) (void *(*)(const char *), int (*)(char *, char *, int, void *)); #ifdef WIN32 #define dlopen(a,b) LoadLibrary(a) #define dlsym(a,b) (dlfunc)GetProcAddress(a,b) static char * dlerror (void) { static char * buffer = "Could not load library." ; return buffer; } #endif #endif Fenix/include/fbm.h0000644000000000000000000001007510607527000013165 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : fbm.h * DESCRIPTION : Fenix Bitmap headers and documentation * * HISTORY: 0.85 - first version */ #ifndef __FBM_H #define __FBM_H #define FBM_VERSION 0x0100 #define FBM_VALID_DEPTH(a) ((a) == 8 || (a) == 16 || (a) == 24 || (a) == 1) #define FBM_MAX_WIDTH 8192 #define FBM_MAX_HEIGHT 8192 // FBM files don't use any compression whatsoever, but they // natively support .gz expansion typedef struct { char magic[16]; // "FenixBitmap \x1A\x0D\x0A" + '\x00' Uint32 version; // Version code ((major << 16) | minor) Uint32 depth; // 1, 8, 16 or 24 } FBM_FILE_HEADER; typedef struct { Uint8 name[64]; // ASCIIZ name of the graphic Uint32 width; // Width in pixels Uint32 height; // Height in pixels Uint32 flags; // See enum FBM_FLAGS Uint32 code; // Graphics code (for library index) Uint32 max_frame; // Number of different frames, less 1 (0 if only 1 frame) Uint32 max_sequence; // Number of sequences, less 1 Uint32 max_keyframe; // Number of keyframes, less 1 Uint32 max_point; // Maximum index of all the control points Uint32 points; // Number of control points present in file } FBM_HEADER; # define FBM_MAGIC "FenixBitmap \x1A\x0D\x0A" // Sequence information follows, as many as the "max_frame" values + 1 // [44 bytes for each sequence] : see FBM_SEQUENCE typedef struct { Uint8 name[32]; // Name of the animation sequence, i.e. "Walking" Uint32 first_keyframe; // First keyframe in sequence Uint32 last_keyframe; // Last keyframe in sequence Sint32 next_sequence; // Next sequence to play after this one ends } FBM_SEQUENCE; // Keyframe information follows, as many as the "max_keyframe" value + 1 // [12 bytes for each keyframe] : see FBM_KEYFRAME typedef struct { Uint32 frame; // Number of frame to show Uint32 angle; // Frame to add to the one used by the process Uint32 flags; // Flags to XOR to the ones used by the process Uint32 pause; // Pause for the next frame, in ms } FBM_KEYFRAME; // Control point information follows, as many as the "points" value // (undefined control points are not present in the file at all) // [12 bytes for each control point] : see FBM_CONTROL_POINT typedef struct { Uint32 index; // 0 for center, >= 1 otherwise Sint32 x; // Does not need to be inside Sint32 y; // Does not need to be inside } FBM_CONTROL_POINT; // Palette information follows, but only if the graphic has a 8 bit depth // There are 256 RGB triplets with a range of 0-255 for each color // [768 bytes of optional information] // Graphic data follows, uncompressed and with left->right, top->bottom order // Each frame counts as an additional graphic of the same size // Graphics with depth = 24 are stored as RGB888 with Intel order // Graphics with depth = 16 are stored as RGB565 with Intel order // Graphics with depth = 1 are padded to the byte boundary each row enum FBM_FLAGS { FBM_NOCOLORKEY = 1, // No color equals exactly 0 }; #endif Fenix/include/offsets.h0000644000000000000000000001202410607527002014070 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* ------------------------------------------ */ /* Offsets de los datos globales predefinidos */ /* ------------------------------------------ */ #define MOUSEX 4*0 #define MOUSEY 4*1 #define MOUSEGRAPH 4*2 #define MOUSEFILE 4*3 #define MOUSEZ 4*4 #define MOUSEANGLE 4*5 #define MOUSESIZE 4*6 #define MOUSEFLAGS 4*7 #define MOUSEREGION 4*8 #define MOUSELEFT 4*9 #define MOUSEMIDDLE 4*10 #define MOUSERIGHT 4*11 #define MOUSEWHEELUP 4*12 #define MOUSEWHEELDOWN 4*13 #define SCROLLS 4*14 /* Siguen 10 estructuras scroll de tamao 20 */ #define JOYLEFT 4*214 #define JOYRIGHT 4*215 #define JOYUP 4*216 #define JOYDOWN 4*217 #define JOYBUTTON1 4*218 #define JOYBUTTON2 4*219 #define JOYBUTTON3 4*220 #define JOYBUTTON4 4*221 #define SETUPCARD 4*222 #define SETUPPORT 4*223 #define SETUPIRQ 4*224 #define SETUPDMA 4*225 #define SETUPDMA2 4*226 #define SETUPMASTER 4*227 #define SETUPSOUNDFX 4*228 #define SETUPCDAUDIO 4*229 #define TIMER 4*230 /* Siguen 9 temporizadores adicionales */ #define TEXTZ 4*240 #define FADING 4*241 #define SHIFTSTATUS 4*242 #define ASCII 4*243 #define SCANCODE 4*244 #define JOYFILTER 4*245 #define JOYSTATUS 4*246 #define RESTORETYPE 4*247 #define DUMPTYPE 4*248 #define MAXPROCESSTIME 4*249 #define M7STRUCTS 4*250 /* Siguen 10 estructuras de tamao 10 */ /* Extras */ #define FPS 4*350 #define TEXT_FLAGS 4*351 #define PANSEP 4*352 #define REVERB 4*353 #define VOLUME 4*354 #define SOUND_FREQ 4*355 #define SOUND_MODE 4*356 #define GRAPH_MODE 4*357 #define SCALE_MODE 4*358 #define ARGC 4*359 #define ARGV_TABLE 4*360 /* 32+1 cadenas */ #define SPEED_GAUGE 4*393 #define FRAME_TIME 4*394 #define REGEX_REG 4*395 /* 16 cadenas */ #define ALPHA_STEPS 4*411 /* FILEINFO struct */ #define FILE_PATH 4*412 #define FILE_NAME 4*413 #define FILE_DIRECTORY 4*414 #define FILE_HIDDEN 4*415 #define FILE_READONLY 4*416 #define FILE_SIZE 4*417 #define FILE_CREATED 4*418 #define FILE_MODIFIED 4*419 #define FULL_SCREEN 4*420 #define EXIT_STATUS 4*421 #define WINDOW_STATUS 4*422 #define FOCUS_STATUS 4*423 #define MOUSE_STATUS 4*424 #define CD_TRACK 4*425 #define CD_FRAME 4*426 #define CD_TRACKS 4*427 #define CD_MINUTE 4*428 #define CD_SECOND 4*429 #define CD_SUBFRAME 4*430 #define CD_MINUTES 4*431 #define CD_SECONDS 4*432 #define CD_FRAMES 4*433 #define CD_TRACKINFO 4*434 // 400 INTs #define FXI_OS 4*834 #define SOUND_CHANNELS 4*835 /* ----------------------------------------- */ /* Offsets de los datos locales predefinidos */ /* ----------------------------------------- */ #define PROCESS_ID 4*0 #define ID_SCAN 4*1 #define PROCESS_TYPE 4*2 #define TYPE_SCAN 4*3 #define STATUS 4*4 #define CHANGED 4*5 #define XGRAPH_FLAGS 4*6 #define SAVED_STATUS 4*7 #define PREV_Z 4*8 #define DISTANCE_1 4*9 #define DISTANCE_2 4*10 #define FRAME_PERCENT 4*11 #define BOX_X0 4*12 #define BOX_Y0 4*13 #define BOX_X1 4*14 #define BOX_Y1 4*15 #define FATHER 4*16 #define SON 4*17 #define SMALLBRO 4*18 #define BIGBRO 4*19 #define PRIORITY 4*20 #define CTYPE 4*21 #define CFLAGS 4*22 #define COORDX 4*23 #define COORDY 4*24 #define COORDZ 4*25 #define GRAPHID 4*26 #define FLAGS 4*27 #define GRAPHSIZE 4*28 #define ANGLE 4*29 #define REGIONID 4*30 #define FILEID 4*31 #define XGRAPH 4*32 #define HEIGHT 4*33 #define RESOLUTION 4*34 #define ALPHA 4*35 #define GRAPHSIZEX 4*36 #define GRAPHSIZEY 4*37 #define BLENDOP 4*38 #define SAVED_X 4*39 #define SAVED_Y 4*40 #define SAVED_GRAPH 4*41 #define SAVED_ANGLE 4*42 #define SAVED_ALPHA 4*43 #define SAVED_BLENDOP 4*44 #define SAVED_SIZE 4*45 #define SAVED_SIZEX 4*46 #define SAVED_SIZEY 4*47 #define SAVED_FLAGS 4*48 #define SAVED_FILE 4*49 #define SAVED_XGRAPH 4*50 #define SAVED_PRIORITY 4*51 Fenix/include/typedef.h0000644000000000000000000000341510607527004014065 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __TYPEDEF_H #define __TYPEDEF_H #include /* Tipos de dato */ extern TYPEDEF typedef_new (BASETYPE type) ; extern TYPEDEF typedef_enlarge (TYPEDEF base) ; extern TYPEDEF typedef_reduce (TYPEDEF base) ; extern int typedef_size (TYPEDEF t) ; extern int typedef_subsize (TYPEDEF t, int c) ; extern void typedef_describe (char * buffer, TYPEDEF t) ; extern TYPEDEF typedef_pointer (TYPEDEF to) ; extern int typedef_tcount (TYPEDEF t) ; extern int typedef_is_equal (TYPEDEF a, TYPEDEF b); extern TYPEDEF * typedef_by_name (int code) ; extern void typedef_name (TYPEDEF t, int code) ; extern int mntype (TYPEDEF type, int accept_structs); #endif Fenix/include/regex.h0000644000000000000000000004560310607527002013542 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __REGEXP_LIBRARY_H__ #define __REGEXP_LIBRARY_H__ /* POSIX says that must be included (by the caller) before . */ #ifdef VMS /* VMS doesn't have `size_t' in , even though POSIX says it should be there. */ #include #endif /* The following bits are used to determine the regexp syntax we recognize. The set/not-set meanings are chosen so that Emacs syntax remains the value 0. The bits are given in alphabetical order, and the definitions shifted by one from the previous bit; thus, when we add or remove a bit, only one other definition need change. */ typedef unsigned reg_syntax_t; /* If this bit is not set, then \ inside a bracket expression is literal. If set, then such a \ quotes the following character. */ #define RE_BACKSLASH_ESCAPE_IN_LISTS (1) /* If this bit is not set, then + and ? are operators, and \+ and \? are literals. If set, then \+ and \? are operators and + and ? are literals. */ #define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) /* If this bit is set, then character classes are supported. They are: [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. If not set, then character classes are not supported. */ #define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) /* If this bit is set, then ^ and $ are always anchors (outside bracket expressions, of course). If this bit is not set, then it depends: ^ is an anchor if it is at the beginning of a regular expression or after an open-group or an alternation operator; $ is an anchor if it is at the end of a regular expression, or before a close-group or an alternation operator. This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because POSIX draft 11.2 says that * etc. in leading positions is undefined. We already implemented a previous draft which made those constructs invalid, though, so we haven't changed the code back. */ #define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) /* If this bit is set, then special characters are always special regardless of where they are in the pattern. If this bit is not set, then special characters are special only in some contexts; otherwise they are ordinary. Specifically, * + ? and intervals are only special when not after the beginning, open-group, or alternation operator. */ #define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) /* If this bit is set, then *, +, ?, and { cannot be first in an re or immediately after an alternation or begin-group operator. */ #define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) /* If this bit is set, then . matches newline. If not set, then it doesn't. */ #define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) /* If this bit is set, then . doesn't match NUL. If not set, then it does. */ #define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) /* If this bit is set, nonmatching lists [^...] do not match newline. If not set, they do. */ #define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) /* If this bit is set, either \{...\} or {...} defines an interval, depending on RE_NO_BK_BRACES. If not set, \{, \}, {, and } are literals. */ #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) /* If this bit is set, +, ? and | aren't recognized as operators. If not set, they are. */ #define RE_LIMITED_OPS (RE_INTERVALS << 1) /* If this bit is set, newline is an alternation operator. If not set, newline is literal. */ #define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) /* If this bit is set, then `{...}' defines an interval, and \{ and \} are literals. If not set, then `\{...\}' defines an interval. */ #define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) /* If this bit is set, (...) defines a group, and \( and \) are literals. If not set, \(...\) defines a group, and ( and ) are literals. */ #define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) /* If this bit is set, then \ matches . If not set, then \ is a back-reference. */ #define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) /* If this bit is set, then | is an alternation operator, and \| is literal. If not set, then \| is an alternation operator, and | is literal. */ #define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) /* If this bit is set, then an ending range point collating higher than the starting range point, as in [z-a], is invalid. If not set, then when ending range point collates higher than the starting range point, the range is ignored. */ #define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) /* If this bit is set, then an unmatched ) is ordinary. If not set, then an unmatched ) is invalid. */ #define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is stored in the pattern buffer, so changing this does not affect already-compiled regexps. */ extern reg_syntax_t re_syntax_options; /* Define combinations of the above bits for the standard possibilities. (The [[[ comments delimit what gets put into the Texinfo file, so don't delete them!) */ /* [[[begin syntaxes]]] */ #define RE_SYNTAX_EMACS 0 #define RE_SYNTAX_AWK \ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ | RE_UNMATCHED_RIGHT_PAREN_ORD) #define RE_SYNTAX_POSIX_AWK \ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS) #define RE_SYNTAX_GREP \ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ | RE_NEWLINE_ALT) #define RE_SYNTAX_EGREP \ (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ | RE_NO_BK_VBAR) #define RE_SYNTAX_POSIX_EGREP \ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES) /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ #define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC #define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC /* Syntax bits common to both basic and extended POSIX regex syntax. */ #define _RE_SYNTAX_POSIX_COMMON \ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) #define RE_SYNTAX_POSIX_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM) /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this isn't minimal, since other operators, such as \`, aren't disabled. */ #define RE_SYNTAX_POSIX_MINIMAL_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) #define RE_SYNTAX_POSIX_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ | RE_UNMATCHED_RIGHT_PAREN_ORD) /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */ #define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) /* [[[end syntaxes]]] */ /* Maximum number of duplicates an interval can allow. Some systems (erroneously) define this in other header files, but we want our value, so remove any previous define. */ #ifdef RE_DUP_MAX #undef RE_DUP_MAX #endif #define RE_DUP_MAX ((1 << 15) - 1) /* POSIX `cflags' bits (i.e., information for `regcomp'). */ /* If this bit is set, then use extended regular expression syntax. If not set, then use basic regular expression syntax. */ #define REG_EXTENDED 1 /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ #define REG_ICASE (REG_EXTENDED << 1) /* If this bit is set, then anchors do not match at newline characters in the string. If not set, then anchors do match at newlines. */ #define REG_NEWLINE (REG_ICASE << 1) /* If this bit is set, then report only success or fail in regexec. If not set, then returns differ between not matching and errors. */ #define REG_NOSUB (REG_NEWLINE << 1) /* POSIX `eflags' bits (i.e., information for regexec). */ /* If this bit is set, then the beginning-of-line operator doesn't match the beginning of the string (presumably because it's not the beginning of a line). If not set, then the beginning-of-line operator does match the beginning of the string. */ #define REG_NOTBOL 1 /* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) /* If any error codes are removed, changed, or added, update the `re_error_msg' table in regex.c. */ typedef enum { REG_NOERROR = 0, /* Success. */ REG_NOMATCH, /* Didn't find a match (for regexec). */ /* POSIX regcomp return error codes. (In the order listed in the standard.) */ REG_BADPAT, /* Invalid pattern. */ REG_ECOLLATE, /* Not implemented. */ REG_ECTYPE, /* Invalid character class name. */ REG_EESCAPE, /* Trailing backslash. */ REG_ESUBREG, /* Invalid back reference. */ REG_EBRACK, /* Unmatched left bracket. */ REG_EPAREN, /* Parenthesis imbalance. */ REG_EBRACE, /* Unmatched \{. */ REG_BADBR, /* Invalid contents of \{\}. */ REG_ERANGE, /* Invalid range end. */ REG_ESPACE, /* Ran out of memory. */ REG_BADRPT, /* No preceding re for repetition op. */ /* Error codes we've added. */ REG_EEND, /* Premature end. */ REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ } reg_errcode_t; /* This data structure represents a compiled pattern. Before calling the pattern compiler, the fields `buffer', `allocated', `fastmap', `translate', and `no_sub' can be set. After the pattern has been compiled, the `re_nsub' field is available. All other fields are private to the regex routines. */ struct re_pattern_buffer { /* [[[begin pattern_buffer]]] */ /* Space that holds the compiled pattern. It is declared as `unsigned char *' because its elements are sometimes used as array indexes. */ unsigned char *buffer; /* Number of bytes to which `buffer' points. */ unsigned long allocated; /* Number of bytes actually used in `buffer'. */ unsigned long used; /* Syntax setting with which the pattern was compiled. */ reg_syntax_t syntax; /* Pointer to a fastmap, if any, otherwise zero. re_search uses the fastmap, if there is one, to skip over impossible starting points for matches. */ char *fastmap; /* Either a translate table to apply to all characters before comparing them, or zero for no translation. The translation is applied to a pattern when it is compiled and to a string when it is matched. */ char *translate; /* Number of subexpressions found by the compiler. */ size_t re_nsub; /* Zero if this pattern cannot match the empty string, one else. Well, in truth it's used only in `re_search_2', to see whether or not we should use the fastmap, so we don't set this absolutely perfectly; see `re_compile_fastmap' (the `duplicate' case). */ unsigned can_be_null : 1; /* If REGS_UNALLOCATED, allocate space in the `regs' structure for `max (RE_NREGS, re_nsub + 1)' groups. If REGS_REALLOCATE, reallocate space if necessary. If REGS_FIXED, use what's there. */ #define REGS_UNALLOCATED 0 #define REGS_REALLOCATE 1 #define REGS_FIXED 2 unsigned regs_allocated : 2; /* Set to zero when `regex_compile' compiles a pattern; set to one by `re_compile_fastmap' if it updates the fastmap. */ unsigned fastmap_accurate : 1; /* If set, `re_match_2' does not return information about subexpressions. */ unsigned no_sub : 1; /* If set, a beginning-of-line anchor doesn't match at the beginning of the string. */ unsigned not_bol : 1; /* Similarly for an end-of-line anchor. */ unsigned not_eol : 1; /* If true, an anchor at a newline matches. */ unsigned newline_anchor : 1; /* [[[end pattern_buffer]]] */ }; typedef struct re_pattern_buffer regex_t; /* search.c (search_buffer) in Emacs needs this one opcode value. It is defined both in `regex.c' and here. */ #define RE_EXACTN_VALUE 1 /* Type for byte offsets within the string. POSIX mandates this. */ typedef int regoff_t; /* This is the structure we store register match data in. See regex.texinfo for a full description of what registers match. */ struct re_registers { unsigned num_regs; regoff_t *start; regoff_t *end; }; /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, `re_match_2' returns information about at least this many registers the first time a `regs' structure is passed. */ #ifndef RE_NREGS #define RE_NREGS 30 #endif /* POSIX specification for registers. Aside from the different names than `re_registers', POSIX uses an array of structures, instead of a structure of arrays. */ typedef struct { regoff_t rm_so; /* Byte offset from string's start to substring's start. */ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ } regmatch_t; /* Declarations for routines. */ /* To avoid duplicating every routine declaration -- once with a prototype (if we are ANSI), and once without (if we aren't) -- we use the following macro to declare argument types. This unfortunately clutters up the declarations a bit, but I think it's worth it. */ #if __STDC__ #define _RE_ARGS(args) args #else /* not __STDC__ */ #define _RE_ARGS(args) () #endif /* not __STDC__ */ /* Sets the current default syntax to SYNTAX, and return the old syntax. You can also simply assign to the `re_syntax_options' variable. */ extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax)); /* Compile the regular expression PATTERN, with length LENGTH and syntax given by the global `re_syntax_options', into the buffer BUFFER. Return NULL if successful, and an error string if not. */ extern const char *re_compile_pattern _RE_ARGS ((const char *pattern, int length, struct re_pattern_buffer *buffer)); /* Compile a fastmap for the compiled pattern in BUFFER; used to accelerate searches. Return 0 if successful and -2 if was an internal error. */ extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer)); /* Search in the string STRING (with length LENGTH) for the pattern compiled into BUFFER. Start searching at position START, for RANGE characters. Return the starting position of the match, -1 for no match, or -2 for an internal error. Also return register information in REGS (if REGS and BUFFER->no_sub are nonzero). */ extern int re_search _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, int length, int start, int range, struct re_registers *regs)); /* Like `re_search', but search in the concatenation of STRING1 and STRING2. Also, stop searching at index START + STOP. */ extern int re_search_2 _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1, int length1, const char *string2, int length2, int start, int range, struct re_registers *regs, int stop)); /* Like `re_search', but return how many characters in STRING the regexp in BUFFER matched, starting at position START. */ extern int re_match _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, int length, int start, struct re_registers *regs)); /* Relates to `re_match' as `re_search_2' relates to `re_search'. */ extern int re_match_2 _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1, int length1, const char *string2, int length2, int start, struct re_registers *regs, int stop)); /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated with malloc, and must each be at least `NUM_REGS * sizeof (regoff_t)' bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ extern void re_set_registers _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs, unsigned num_regs, regoff_t *starts, regoff_t *ends)); /* 4.2 bsd compatibility. */ extern char *re_comp _RE_ARGS ((const char *)); extern int re_exec _RE_ARGS ((const char *)); /* POSIX compatibility. */ extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags)); extern int regexec _RE_ARGS ((const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags)); extern size_t regerror _RE_ARGS ((int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)); extern void regfree _RE_ARGS ((regex_t *preg)); #endif /* not __REGEXP_LIBRARY_H__ */ /* Local variables: make-backup-files: t version-control: t trim-versions-without-asking: nil End: */ Fenix/include/xctype.h0000644000000000000000000000255610607527004013746 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #include extern int dos_chars ; /* 1 = Cdigo fuente en caracteres MS-DOS */ extern char c_type[256] ; extern unsigned char c_upper[256] ; extern unsigned char c_lower[256] ; extern unsigned char convert (unsigned char c) ; extern void init_c_type () ; extern unsigned char dos_to_win[256] ; extern unsigned char win_to_dos[256] ; Fenix/include/typedef_st.h0000644000000000000000000000445510607527004014600 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ #ifndef __TYPEDEF_ST_H #define __TYPEDEF_ST_H /* Tipos de dato */ typedef enum { TYPE_UNDEFINED = 0, TYPE_INT = 1, TYPE_DWORD = 2, TYPE_SHORT = 3, TYPE_WORD = 4, TYPE_SBYTE = 5, TYPE_BYTE = 6, TYPE_CHAR = 8, TYPE_FLOAT = 9, TYPE_STRING = 16, TYPE_ARRAY = 17, TYPE_STRUCT = 18, TYPE_POINTER = 19 } BASETYPE ; typedef struct _typechunk { BASETYPE type ; int count ; /* Para type == TYPE_ARRAY */ } TYPECHUNK ; #define MAX_TYPECHUNKS 6 typedef struct _typedef { TYPECHUNK chunk[MAX_TYPECHUNKS] ; int depth ; struct _varspace * varspace ; } TYPEDEF ; #define typedef_is_numeric(t) (t.chunk[0].type < 16) #define typedef_is_integer(t) (t.chunk[0].type < 8) #define typedef_is_float(t) (t.chunk[0].type == TYPE_FLOAT) #define typedef_is_string(t) (t.chunk[0].type == TYPE_STRING) #define typedef_is_struct(t) (t.chunk[0].type == TYPE_STRUCT) #define typedef_is_array(t) (t.chunk[0].type == TYPE_ARRAY) #define typedef_is_pointer(t) (t.chunk[0].type == TYPE_POINTER) #define typedef_count(t) (t.chunk[0].count) #define typedef_base(t) (t.chunk[0].type) #define typedef_members(t) (t.varspace) #define typedef_is_unsigned(t) (t.chunk[0].type <= 8 && !(t.chunk[0].type & 1)) #endif Fenix/include/sysprocs.h0000644000000000000000000006677210607744630014337 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.84 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : sysprocs.h * DESCRIPTION : Defines FENIX language function SPECS and handlers ** */ /* * IN FXI: SYSMACRO returns a function pointer * IN FXC: Already defined to return 0 */ #ifndef SYSMACRO #define SYSMACRO(a) a #endif #define MAX_SYSPROCS 2048 /* ATENCION!!!! Esta tabla debe estar ordenada segun el elemento Code !!!! No desordenarla !!! 06/11/09 Splinter (jj_arg@yahoo.com) */ SYSPROC sysprocs[MAX_SYSPROCS] = { /* Depurado */ { 0x00, "SAY" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_say) }, /* Matemticas */ { 0x10, "RAND" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_rand) }, { 0x11, "RAND_SEED" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_rand_seed) }, { 0x12, "ABS" , "F" , TYPE_FLOAT , 1 , SYSMACRO(fxi_abs) }, { 0x13, "POW" , "FF" , TYPE_FLOAT , 2 , SYSMACRO(fxi_pow) }, { 0x14, "FGET_ANGLE" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_fget_angle) }, { 0x15, "FGET_DIST" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_fget_dist) }, { 0x16, "NEAR_ANGLE" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_near_angle) }, { 0x17, "ADVANCE" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_advance) }, { 0x18, "XADVANCE" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_xadvance) }, { 0x19, "SQRT" , "F" , TYPE_FLOAT , 1 , SYSMACRO(fxi_sqrt) }, { 0x20, "COS" , "F" , TYPE_FLOAT , 1 , SYSMACRO(fxi_cos) }, { 0x21, "SIN" , "F" , TYPE_FLOAT , 1 , SYSMACRO(fxi_sin) }, { 0x22, "TAN" , "F" , TYPE_FLOAT , 1 , SYSMACRO(fxi_tan) }, { 0x23, "ACOS" , "F" , TYPE_FLOAT , 1 , SYSMACRO(fxi_acos) }, { 0x24, "ASIN" , "F" , TYPE_FLOAT , 1 , SYSMACRO(fxi_asin) }, { 0x25, "ATAN" , "F" , TYPE_FLOAT , 1 , SYSMACRO(fxi_atan) }, /* Interaccin entre procesos */ { 0x30, "GET_ANGLE" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_get_angle) }, { 0x31, "GET_DIST" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_get_dist) }, { 0x32, "GET_DISTX" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_get_distx) }, { 0x33, "GET_DISTY" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_get_disty) }, { 0x34, "GET_ID" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_get_id) }, { 0x35, "COLLISION" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_collision) }, { 0x36, "SIGNAL" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_signal) }, { 0x37, "LET_ME_ALONE" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_let_me_alone) }, { 0x38, "EXIT" , "SI" , TYPE_DWORD , 2 , SYSMACRO(fxi_exit) }, { 0x39, "EXIT" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_exit_1) }, { 0x3A, "EXIT" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_exit_0) }, /* Entrada/Salida */ { 0x50, "KEY" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_key) }, { 0x51, "GET_JOY_BUTTON" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_joy_get_button) }, { 0x52, "GET_JOY_POSITION" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_joy_get_position) }, { 0x53, "SELECT_JOY" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_joy_select) }, { 0x54, "NUMBER_JOY" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_joy_num) }, { 0x55, "JOY_NAME" , "I" , TYPE_STRING , 1 , SYSMACRO(fxi_joy_name) }, { 0x56, "JOY_BUTTONS" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_joy_buttons) }, { 0x57, "JOY_AXES" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_joy_axes) }, { 0x58, "GET_JOY_BUTTON" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_joy_get_button_specific) }, { 0x59, "GET_JOY_POSITION" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_joy_get_position_specific) }, { 0x5A, "JOY_BUTTONS" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_joy_buttons_specific) }, { 0x5B, "JOY_AXES" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_joy_axes_specific) }, /* Inicializacin y carga */ { 0x60, "SET_MODE" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_set_mode) }, { 0x61, "SET_FPS" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_set_fps) }, { 0x62, "LOAD_MAP" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_map) }, { 0x63, "LOAD_FPG" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_fpg) }, { 0x64, "UNLOAD_MAP" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_unload_map) }, { 0x64, "UNLOAD_FBM" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_unload_map) }, { 0x65, "UNLOAD_FPG" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_unload_fpg) }, { 0x65, "UNLOAD_FGC" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_unload_fpg) }, { 0x66, "GRAPHIC_SET" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_graphic_set) }, { 0x67, "GRAPHIC_INFO" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_graphic_info) }, /* Puntos de control */ { 0x68, "GET_POINT" , "IIIPP" , TYPE_DWORD , 5 , SYSMACRO(fxi_get_point) }, { 0x69, "GET_REAL_POINT" , "IPP" , TYPE_DWORD , 3 , SYSMACRO(fxi_get_real_point) }, { 0x6A, "SET_POINT" , "IIIII" , TYPE_DWORD , 5 , SYSMACRO(fxi_set_point) }, { 0x6B, "SET_CENTER" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_set_center) }, /* Regiones */ { 0x6D, "DEFINE_REGION" , "IIIII" , TYPE_DWORD , 5 , SYSMACRO(fxi_define_region) }, { 0x6E, "OUT_REGION" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_out_region) }, /* Fondo de pantalla */ { 0x70, "PUT" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_put) }, { 0x71, "XPUT" , "IIIIIIII",TYPE_DWORD , 8 , SYSMACRO(fxi_xput) }, { 0x72, "PUT_PIXEL" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_put_pixel) }, { 0x73, "PUT_SCREEN" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_put_screen) }, { 0x74, "CLEAR_SCREEN" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_clear_screen) }, { 0x75, "GET_PIXEL" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_get_pixel) }, /* Bitmaps */ { 0x78, "MAP_BLOCK_COPY" , "IIIIIIIIII",TYPE_DWORD, 10 , SYSMACRO(fxi_map_block_copy) }, { 0x79, "MAP_GET_PIXEL" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_map_get_pixel) }, { 0x7A, "MAP_PUT" , "IIIII" , TYPE_DWORD , 5 , SYSMACRO(fxi_map_put) }, { 0x7B, "MAP_XPUT" , "IIIIIIII",TYPE_DWORD , 8 , SYSMACRO(fxi_map_xput) }, { 0x7C, "MAP_PUT_PIXEL" , "IIIII" , TYPE_DWORD , 5 , SYSMACRO(fxi_map_put_pixel) }, { 0x7D, "NEW_MAP" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_new_map) }, { 0x7E, "MAP_CLEAR" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_map_clear) }, { 0x7F, "MAP_CLONE" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_map_clone) }, { 0x80, "MAP_NAME" , "II" , TYPE_STRING , 2 , SYSMACRO(fxi_map_name) }, { 0x81, "MAP_SET_NAME" , "IIS" , TYPE_DWORD , 3 , SYSMACRO(fxi_map_set_name) }, { 0x82, "MAP_EXISTS" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_map_exists) }, { 0x83, "MAP_XPUTNP" , "IIIIIIIIIII",TYPE_DWORD , 10 , SYSMACRO(fxi_map_xputnp) }, { 0x84, "FPG_EXISTS" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_fpg_exists) }, /* FPG */ { 0x88, "FPG_ADD" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_fpg_add) }, { 0x8B, "NEW_FPG" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_fpg_new) }, { 0x8B, "FPG_NEW" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_fpg_new) }, /* Textos */ { 0x90, "LOAD_FNT" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_fnt) }, { 0x91, "UNLOAD_FNT" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_unload_fnt) }, { 0x92, "WRITE" , "IIIIS" , TYPE_DWORD , 5 , SYSMACRO(fxi_write) }, { 0x93, "WRITE_INT" , "IIIIP" , TYPE_DWORD , 5 , SYSMACRO(fxi_write_int) }, { 0x94, "MOVE_TEXT" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_move_text) }, { 0x95, "DELETE_TEXT" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_delete_text) }, { 0x96, "WRITE_IN_MAP" , "ISI" , TYPE_DWORD , 3 , SYSMACRO(fxi_write_in_map) }, { 0x97, "TEXT_WIDTH" , "IS" , TYPE_DWORD , 2 , SYSMACRO(fxi_text_width) }, { 0x98, "TEXT_HEIGHT" , "IS" , TYPE_DWORD , 2 , SYSMACRO(fxi_text_height) }, { 0x99, "SAVE_FNT" , "IS" , TYPE_DWORD , 2 , SYSMACRO(fxi_save_fnt) }, { 0x9A, "LOAD_BDF" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_bdf) }, /* Fecha/Hora */ { 0x9D, "GET_TIMER" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_get_timer) }, { 0x9E, "TIME" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_time) }, { 0x9F, "FTIME" , "SI" , TYPE_STRING , 2 , SYSMACRO(fxi_ftime) }, /* Ficheros */ { 0xA0, "SAVE" , "SV++" , TYPE_DWORD , 4 , SYSMACRO(fxi_save) }, { 0xA1, "LOAD" , "SV++" , TYPE_DWORD , 4 , SYSMACRO(fxi_load) }, { 0xA2, "FOPEN" , "SI" , TYPE_DWORD , 2 , SYSMACRO(fxi_fopen) }, { 0xA3, "FCLOSE" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_fclose) }, { 0xA4, "FREAD" , "IV++" , TYPE_DWORD , 4 , SYSMACRO(fxi_fread) }, { 0xA5, "FWRITE" , "IV++" , TYPE_DWORD , 4 , SYSMACRO(fxi_fwrite) }, { 0xA6, "FSEEK" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_fseek) }, { 0xA7, "FTELL" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_ftell) }, { 0xA8, "FLENGTH" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_filelength) }, { 0xA9, "FPUTS" , "IS" , TYPE_DWORD , 2 , SYSMACRO(fxi_fputs) }, { 0xAA, "FGETS" , "I" , TYPE_STRING , 1 , SYSMACRO(fxi_fgets) }, { 0xAB, "FEOF" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_feof) }, { 0xAC, "FILE" , "S" , TYPE_STRING , 1 , SYSMACRO(fxi_file) }, /* Modo 7 */ { 0xC0, "START_MODE7" , "IIIIII", TYPE_DWORD , 6 , SYSMACRO(fxi_start_mode7) }, { 0xC1, "STOP_MODE7" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_stop_mode7) }, /* Scroll */ { 0xC2, "START_SCROLL" , "IIIIII", TYPE_DWORD , 6 , SYSMACRO(fxi_start_scroll) }, { 0xC3, "STOP_SCROLL" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_stop_scroll) }, { 0xC4, "MOVE_SCROLL" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_move_scroll) }, /* Animaciones FLI */ { 0xC5, "START_FLI" , "SII" , TYPE_DWORD , 3 , SYSMACRO(fxi_start_fli) }, { 0xC6, "END_FLI" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_end_fli) }, { 0xC7, "FRAME_FLI" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_frame_fli) }, { 0xC8, "RESET_FLI" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_reset_fli) }, /* Tratamiento de cadenas */ { 0xD0, "LEN" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_strlen) }, { 0xD1, "UCASE" , "S" , TYPE_STRING , 1 , SYSMACRO(fxi_strupper) }, { 0xD2, "LCASE" , "S" , TYPE_STRING , 1 , SYSMACRO(fxi_strlower) }, { 0xD3, "SUBSTR" , "SII" , TYPE_STRING , 3 , SYSMACRO(fxi_substr) }, { 0xD4, "FIND" , "SS" , TYPE_DWORD , 2 , SYSMACRO(fxi_strfind) }, { 0xD5, "ITOA" , "I" , TYPE_STRING , 1 , SYSMACRO(fxi_itos) }, { 0xD6, "FTOA" , "F" , TYPE_STRING , 1 , SYSMACRO(fxi_ftos) }, { 0xD7, "ATOI" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_stoi) }, { 0xD8, "ATOF" , "S" , TYPE_FLOAT , 1 , SYSMACRO(fxi_stof) }, { 0xD9, "ASC" , "S" , TYPE_BYTE , 1 , SYSMACRO(fxi_asc) }, { 0xDA, "CHR" , "I" , TYPE_STRING , 1 , SYSMACRO(fxi_chr) }, /* Extensiones adicionales */ { 0xE0, "LOAD_PNG" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_png) }, { 0xE1, "LOAD_PCX" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_pcx) }, { 0xEB, "MAP_BUFFER" , "II" , TYPE_POINTER, 2 , SYSMACRO(fxi_map_buffer) }, { 0xEC, "SET_COLORS" , "IIP" , TYPE_DWORD , 3 , SYSMACRO(fxi_set_colors) }, { 0xED, "GET_COLORS" , "IIP" , TYPE_DWORD , 3 , SYSMACRO(fxi_get_colors) }, { 0xEE, "EXISTS" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_running) }, /* Manipulacion de Memoria */ { 0xEF, "MEMORY_TOTAL" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_memory_total) }, { 0xF0, "ALLOC" , "I" , TYPE_POINTER, 1 , SYSMACRO(fxi_alloc) }, { 0xF1, "FREE" , "P" , TYPE_DWORD , 1 , SYSMACRO(fxi_free) }, { 0xF2, "REALLOC" , "PI" , TYPE_POINTER, 2 , SYSMACRO(fxi_realloc) }, { 0xF3, "MEMCMP" , "PPI" , TYPE_DWORD , 3 , SYSMACRO(fxi_memcmp) }, { 0xF4, "MEMSET" , "PBI" , TYPE_DWORD , 3 , SYSMACRO(fxi_memset) }, { 0xF5, "MEMSETW" , "PWI" , TYPE_DWORD , 3 , SYSMACRO(fxi_memsetw) }, { 0xF6, "MEMCOPY" , "PPI" , TYPE_DWORD , 3 , SYSMACRO(fxi_memcopy) }, { 0xF7, "MEMORY_FREE" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_memory_free) }, /* Funciones de primitivas */ { 0xF8, "DRAWING_MAP" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_drawing_map) }, { 0xF9, "DRAWING_COLOR" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_drawing_color) }, { 0xFA, "DRAW_LINE" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_line) }, { 0xFB, "DRAW_RECT" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_rect) }, { 0xFC, "DRAW_BOX" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_box) }, { 0xFD, "DRAW_CIRCLE" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_circle) }, { 0xFE, "DRAW_FCIRCLE" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_fcircle) }, { 0xFF, "SET_TEXT_COLOR" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_set_text_color) }, /* Bsqueda de caminos*/ { 0x100,"PATH_FIND" , "IIIIIII",TYPE_DWORD , 7 , SYSMACRO(fxi_path_find) }, { 0x101,"PATH_GETXY" , "PP" , TYPE_DWORD , 2 , SYSMACRO(fxi_path_getxy) }, { 0x102,"PATH_WALL" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_path_wall) }, /* Blendops */ { 0x110,"BLENDOP_NEW" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_create_blendop) }, { 0x111,"BLENDOP_IDENTITY" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_blendop_identity) }, { 0x112,"BLENDOP_TINT" , "IFIII" , TYPE_DWORD , 5 , SYSMACRO(fxi_blendop_tint) }, { 0x113,"BLENDOP_TRANSLUCENCY" , "IF" , TYPE_DWORD , 2 , SYSMACRO(fxi_blendop_translucency) }, { 0x114,"BLENDOP_INTENSITY" , "IF" , TYPE_DWORD , 2 , SYSMACRO(fxi_blendop_intensity) }, { 0x115,"BLENDOP_SWAP" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_blendop_swap) }, { 0x116,"BLENDOP_ASSIGN" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_blendop_assign) }, { 0x117,"BLENDOP_APPLY" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_blendop_apply) }, { 0x118,"BLENDOP_FREE" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_destroy_blendop) }, { 0x119,"BLENDOP_GRAYSCALE" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_blendop_grayscale) }, /* WM */ { 0x120, "SET_TITLE" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_set_title) } , { 0x121, "SET_ICON" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_set_icon) } , /* Extended Write */ { 0x122, "WRITE_VAR" ,"IIIIV++", TYPE_DWORD , 7 , SYSMACRO(fxi_write_var) }, { 0x123, "WRITE_FLOAT" , "IIIIP" , TYPE_DWORD , 5 , SYSMACRO(fxi_write_float) }, { 0x124, "WRITE_STRING" , "IIIIP" , TYPE_DWORD , 5 , SYSMACRO(fxi_write_string) }, /* Nuevas funciones de sonido */ { 0x130, "LOAD_SONG" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_song) }, { 0x131, "PLAY_SONG" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_play_song) }, { 0x132, "UNLOAD_SONG" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_unload_song) }, { 0x133, "STOP_SONG" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_stop_song) }, { 0x134, "PAUSE_SONG" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_pause_song) }, { 0x135, "RESUME_SONG" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_resume_song) }, { 0x136, "SET_SONG_VOLUME" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_set_song_volume) }, { 0x137, "IS_PLAYING_SONG" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_is_playing_song) }, { 0x138, "LOAD_WAV" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_wav) }, { 0x139, "PLAY_WAV" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_play_wav) }, { 0x13A, "UNLOAD_WAV" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_unload_wav) }, { 0x13B, "STOP_WAV" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_stop_wav) }, { 0x13C, "PAUSE_WAV" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_pause_wav) }, { 0x13D, "RESUME_WAV" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_resume_wav) }, { 0x13E, "IS_PLAYING_WAV" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_is_playing_wav) }, { 0x13F, "SET_WAV_VOLUME" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_set_wav_volume) }, { 0x140, "FADE_MUSIC_IN" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_fade_music_in) }, { 0x141, "FADE_MUSIC_OFF" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_fade_music_off) }, { 0x142, "SET_CHANNEL_VOLUME" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_set_channel_volume) }, { 0x143, "RESERVE_CHANNELS" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_reserve_channels) }, { 0x148, "SET_PANNING" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_set_panning) }, { 0x149, "SET_POSITION" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_set_position) }, { 0x14A, "SET_DISTANCE" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_set_distance) }, { 0x14B, "REVERSE_STEREO" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_reverse_stereo) }, { 0x14C, "PLAY_WAV" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_play_wav_channel) }, /* funciones de MAQ */ { 0x150, "GRAYSCALE" , "IIB" , TYPE_DWORD , 3 , SYSMACRO(fxi_grayscale) }, { 0x151, "RGBSCALE" , "IIFFF" , TYPE_DWORD , 5 , SYSMACRO(fxi_rgbscale)}, { 0x152, "BLUR" , "IIB" , TYPE_DWORD , 3 , SYSMACRO(fxi_blur)}, { 0x153, "FILTER" , "IIP" , TYPE_DWORD , 3 , SYSMACRO(fxi_filter)}, { 0x154, "QUICKSORT" , "PIIIBB", TYPE_DWORD , 6 , SYSMACRO(fxi_quicksort)}, /* Paleta de colores */ { 0x160, "LOAD_PAL" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_pal) }, { 0x161, "FADE" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_fade) }, { 0x162, "FADE_ON" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_fade_on) }, { 0x163, "FADE_OFF" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_fade_off) }, { 0x164, "ROLL_PALETTE" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_roll_palette) }, { 0x165, "CONVERT_PALETTE" , "IIP" , TYPE_DWORD , 3 , SYSMACRO(fxi_convert_palette) }, { 0x166, "FIND_COLOR" , "BBB" , TYPE_DWORD , 3 , SYSMACRO(fxi_find_color) }, { 0x167, "RGB" , "BBB" , TYPE_DWORD , 3 , SYSMACRO(fxi_rgb) }, { 0x168, "GET_RGB" , "IPPP" , TYPE_DWORD , 4 , SYSMACRO(fxi_get_rgb) }, { 0x169, "LOAD_FPL" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_fpl) }, /* Nuevas funciones en la 0.83 */ { 0x16A, "GET_SCREEN" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_get_screen) }, { 0x16B, "SET_MODE" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_set_mode_3) }, { 0x16C, "SUBSTR" , "SI" , TYPE_STRING , 2 , SYSMACRO(fxi_substr2) }, { 0x16D, "TRIM" , "S" , TYPE_STRING , 1 , SYSMACRO(fxi_trim) }, { 0x16E, "FORMAT" , "I" , TYPE_STRING , 1 , SYSMACRO(fxi_formatI) }, { 0x16F, "FORMAT" , "F" , TYPE_STRING , 1 , SYSMACRO(fxi_formatF) }, { 0x170, "FORMAT" , "FI" , TYPE_STRING , 2 , SYSMACRO(fxi_formatFI) }, { 0x171, "STRREV" , "S" , TYPE_STRING , 1 , SYSMACRO(fxi_strrev) }, { 0x172, "FIND" , "SSI" , TYPE_DWORD , 3 , SYSMACRO(fxi_strfindSSI) }, { 0x173, "LPAD" , "SI" , TYPE_STRING , 2 , SYSMACRO(fxi_lpad) }, { 0x174, "RPAD" , "SI" , TYPE_STRING , 2 , SYSMACRO(fxi_rpad) }, { 0x175, "STRCASECMP" , "SS" , TYPE_DWORD , 2 , SYSMACRO(fxi_strcasecmp) }, { 0x176, "SAVE_PNG" , "IIS" , TYPE_DWORD , 3 , SYSMACRO(fxi_save_png) }, { 0x177, "REGEX" , "SS" , TYPE_DWORD , 2 , SYSMACRO(fxi_regex) }, { 0x178, "REGEX_REPLACE" , "SSS" , TYPE_STRING , 3 , SYSMACRO(fxi_regex_replace) }, { 0x179, "SPLIT" , "SSPI" , TYPE_DWORD , 4 , SYSMACRO(fxi_split) }, { 0x17A, "JOIN" , "SPI" , TYPE_STRING , 3 , SYSMACRO(fxi_join) }, { 0x17B, "DRAW_CURVE" , "IIIIIIIII", TYPE_DWORD,9 , SYSMACRO(fxi_bezier) }, { 0x17C, "DRAWING_Z" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_drawing_at) }, { 0x17D, "DELETE_DRAW" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_delete_drawing) }, { 0x17E, "MOVE_DRAW" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_move_drawing) }, { 0x17F, "DRAWING_ALPHA" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_drawing_alpha) }, /* Nuevas funciones en la 0.84 */ { 0x180, "CD" , "" , TYPE_STRING , 0 , SYSMACRO(fxi_cd) } , { 0x181, "CHDIR" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_chdir) }, { 0x182, "MKDIR" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_mkdir) } , { 0x183, "RMDIR" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_rmdir) } , { 0x184, "FILE_EXISTS" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_file_exists) } , { 0x185, "GLOB" , "S" , TYPE_STRING , 1 , SYSMACRO(fxi_glob) }, { 0x186, "CD" , "S" , TYPE_STRING , 1 , SYSMACRO(fxi_chdir) } , { 0x187, "RM" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_rm) } , { 0x18F, "SET_MODE" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_set_mode_2) }, { 0x190, "GET_TEXT_COLOR" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_get_text_color) }, { 0x199, "NEW_FNT" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_fnt_new) }, { 0x199, "FNT_NEW" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_fnt_new) }, { 0x19A, "GET_GLYPH" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_get_glyph) }, { 0x19B, "SET_GLYPH" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_set_glyph) }, { 0x19C, "SET_MODE" , "IIII" , TYPE_DWORD , 4 , SYSMACRO(fxi_set_mode_4) }, { 0x19D, "DRAWING_STIPPLE" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_drawing_stipple) }, { 0x19E, "SAVE_PAL" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_save_pal) }, { 0x19F, "SAVE_FPL" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_save_fpl) }, /* Nuevas funciones en la 0.85 */ { 0x1A0, "#COPY#" , "PV++I" , TYPE_POINTER, 5 , SYSMACRO(fxi_copy_struct) }, /* Carga de archivos */ { 0x1A1, "LOAD_FBM" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_fbm) }, { 0x1A2, "SAVE_FBM" , "IIS" , TYPE_DWORD , 3 , SYSMACRO(fxi_save_fbm) }, { 0x1A3, "LOAD_FGC" , "S" , TYPE_DWORD , 1 , SYSMACRO(fxi_load_fgc) }, { 0x1A4, "SAVE_FGC" , "IS" , TYPE_DWORD , 2 , SYSMACRO(fxi_save_fgc) }, /* Funciones de manejo de CD */ { 0x1A5, "CD_DRIVES" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_cd_drives) }, { 0x1A6, "CD_STATUS" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_cd_status) }, { 0x1A7, "CD_NAME" , "I" , TYPE_STRING , 1 , SYSMACRO(fxi_cd_name) }, { 0x1A8, "CD_GETINFO" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_cd_getinfo) }, { 0x1A9, "CD_PLAY" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_cd_play) }, { 0x1AA, "CD_PLAY" , "III" , TYPE_DWORD , 3 , SYSMACRO(fxi_cd_playtracks) }, { 0x1AB, "CD_STOP" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_cd_stop) }, { 0x1AC, "CD_PAUSE" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_cd_pause) }, { 0x1AD, "CD_RESUME" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_cd_resume) }, { 0x1AE, "CD_EJECT" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_cd_eject) }, { 0x1AF, "CD_NUMTRACKS" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_cd_numtracks) }, { 0x1B0, "CD_CURRTRACK" , "I" , TYPE_DWORD , 1 , SYSMACRO(fxi_cd_getcurtrack) }, /* Funciones de ventana */ { 0x1B1, "MINIMIZE" , "" , TYPE_DWORD , 0 , SYSMACRO(fxi_minimize) }, { 0x1B2, "MOVE_WINDOW" , "II" , TYPE_DWORD , 2 , SYSMACRO(fxi_move_window) }, /* Funciones sort */ { 0x1B3, "KSORT" , "V++V++", TYPE_DWORD , 6 , SYSMACRO(fxi_ksort) }, { 0x1B4, "KSORT" , "V++V++I",TYPE_DWORD , 7 , SYSMACRO(fxi_ksort_n) }, { 0x1B5, "SORT" , "V++I" , TYPE_DWORD , 4 , SYSMACRO(fxi_sort_n) }, { 0x1B6, "SORT" , "V++" , TYPE_DWORD , 3 , SYSMACRO(fxi_sort) }, /* Carga de archivos */ { 0x1B7, "LOAD_FPG" , "SP" , TYPE_DWORD , 2 , SYSMACRO(fxi_bgload_fpg) }, { 0x1B8, "LOAD_FGC" , "SP" , TYPE_DWORD , 2 , SYSMACRO(fxi_bgload_fgc) }, { 0x1C0, "GETENV" , "S" , TYPE_STRING , 1 , SYSMACRO(fxi_getenv) }, { 0 , 0 , "" , 0 , 0 , 0 } } ; Fenix/info.html0000644000000000000000000001474310607526674012474 0ustar rootroot

LEEME

Qu es Fenix?

Fenix es un lenguaje de programacin interpretado tipo script diseado para crear y ejecutar juegos 2D. Incluye una extensa librera grfica y de sonido y un motor 2D que convierte la programacin de juegos en una tarea fcil. Sus caractersticas principales son:

  • Dibujo rpido de sprites con rotado, escalado, animacin y transparencia
  • Deteccin de colisiones a nivel de pixel
  • Soporta el formato grfico PNG
  • Rutinas de scroll tipo "parallax"
  • Mltiples regiones en pantalla con o sin scroll
  • Librera de sonido basada en MikMod
  • Entrada por teclado, ratn y joystick
  • Modos de 256 y 65536 colores
  • Compatible con Linux y Windows/DirectX

El lenguaje en s est orientado a juegos. Un proceso (o funcin) puede crearse como un objeto grfico en pantalla. Slo con cambiar ciertas variables locales predefinidas y usando la sentencia FRAME, el proceso quedar residente ejecutndose en multitarea cooperativa, animndose y movindose en pantalla simplemente con cambiar las variables locales y ejecutando la sentencia FRAME en un bucle. Se proporcionan funciones para detener, matar, alterar o buscar procesos en ejecucin, y puedes ejecutar un mismo proceso mltiples veces para obtener en pantalla varios objetos con el mismo comportamiento. Habr una introduccin ms completa en el futuro Manual de Introduccin y tutoriales.

Incluso programadores experimentados encontrarn en Fenix una herramienta til. El lenguaje en s soporta muchas de las caractersticas comunmente encontradas en los lenguajes procedurales, tales como mltiples tipos de dato (INT, WORD, BYTE, STRING, FLOAT), punteros, tablas multidimensionales, estructuras, y las sentencias habituales de control de flujo.

Fenix se distribuye bajo los trminos de la GNU General Public License, con lo que las fuentes estn disponibles y eres libre de extenderlas o hacer tu propia versin.

Es Fenix un compilador de DIV?

DIV Games Studio es un entorno comercial de desarrollo de juegos que incorpora entorno, depurador, profiler, editor grfico e instalador. Fenix slo proporciona un compilador y un intrprete. Sin embargo, las grandes similitudes entre el lenguaje de DIV y Fenix a menudo sugieren la pregunta.

Mientras Fenix est inspirado por DIV, no son compatibles. El lenguaje de DIV toma prestadas varias caractersticas de C, Pascal y otros lenguajes comunes, de la misma forma que Fenix toma prestadas caractersticas de DIV. Varios juegos antiguos de DIV funcionan en Fenix con pocos cambios, intencionadamente: Fenix soporta programas escritos con una sintaxis similar al DIV en lugar de la propia. Sin embargo muchas funciones de librera de DIV no estn presentes en Fenix o lo estn en forma diferente. Notablemente las funciones de Modo 7, las de cadena, y las de Modo 8 (inexistentes en Fenix).

Escribir un documento comparando las equivalencias entre DIV y Fenix cuando se aproxime la versin 1.0.

Cul es el estado de desarrollo?

Actualmente, Fenix no est acabado. Hay bugs por encontrar, algunas caractersticas no acaban de funcionar, y hay desarrollo por hacer en reas como control de errores y optimizacin. Cosas como documentacin, chequeo y escribir programas por ejemplo necesitan bastante trabajo. La ltima versin es la 0.7 *beta*.

Sin embargo, Fenix ha avanzado desde su concepcin inicial, y creo que ya es bastante utilizable, aunque no tan estable como lo ser en el futuro. No hay caractersticas nuevas por aadir antes de la versin 1.0, y Fenix est ahora en fase de depurado.

Mira la pgina de bugs conocidos para obtener una lista actualizada de los bugs ms importantes.

Dnde puedo obtenerlo?

La pgina web de Fenix ha cambiado de localizacin varias veces. Hay un redirector en http://pagina.de/fenixc Adems, Fenix est hospedado por SourceForge. La pgina puede actualmente encontrarse en: http://fenix.sourceforge.net/

Quin lo ha escrito?

En realidad Fenix ha sido programado inicialmente por una sla persona. Puedes escribirme a jlceb@cir.es. Un nmero de personas est contribuyendo en reas como documentacin, pruebas, y programas auxiliares. Eventualmente habr una lista actualizada en el fichero CREDITS, a acompaar a la distribucin.

Cmo se usa?

En el paquete includo tienes un programa de ejemplo, de nombre test.prg. Simplemente ejecuta:

FXC TEST.PRG
FXI TEST.DCB

Estas dos sentencias deberan compilar el programa y ejecutarlo seguidamente. Si todo funciona correctamente, examina el manual de referencia en el fichero fenix-ref.pdf. Este manual contiene informacin sobre cmo utilizar las utilidades includas, as como el compilador y el intrprete. Tambin documenta el lenguaje y la librera. En este sentido, su propsito es nicamente servir de referencia y no de introduccin o tutorial. Es la referencia ms actualizada (y en muchos casos la nica) disponible. sala como fuente principal de informacin.

Habr un Manual de Introduccin en el futuro. Su escritura an no ha sido comenzada, y no vendra mal una ayuda en este tema.

Hay algn juego hecho con l?

Hay algunos juegos simples escritos con el propsito de ilustrar y probar el lenguaje. Puedes bajrtelos, con cdigo fuente completo y comentado, en la web de Fenix.

Soy un programador. Cmo puedo ayudar?

En primer lugar, ten en cuenta que el cdigo de Fenix es complejo, mal escrito, indocumentado, y est en C.

Si an quieres unirte al desarrollo, bjate las fuentes. Puedes hacerlo va CVS (sencillo en Linux, pesadillesco en Windows). Ve a http://www.sourceforge.net y lee las guas de CVS. Puedes obtener un paquete actualizado diariamente de todo el rbol CVS en http://cvs.sourceforge.net/cvstarballs/fenix-cvsroot.tar.gz.

Licencia

Este programa slo puede distribuirse segn los trminos de la GNU General Public License, en su versin 2.0 o en cualquier versin posterior, a tu eleccin.

Debes haber recibido una copia de dicha licencia junto con este programa. Si no es as, ponte en contacto conmigo en jlceb@cir.es lo ms urgentemente posible. Fenix/INSTALL0000644000000000000000000002237510607526656011704 0ustar rootrootCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. Fenix/install-sh0000644000000000000000000001270110607526674012644 0ustar rootroot#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else : fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else : fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 Fenix/Makefile.am0000644000000000000000000000024310607526656012675 0ustar rootrootif DO_FXC t_fxc=fxc endif if DO_FXI t_fxi=fxi endif if DO_MAP t_map=map endif if DO_FPG t_fpg=fpg endif SUBDIRS = $(t_fxc) $(t_fxi) $(t_map) $(t_fpg) Fenix/Makefile.in0000644000000000000000000004031010607526660012700 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_CFLAGS = @COMMON_CFLAGS@ COMMON_LIBS = @COMMON_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DO_FPG = @DO_FPG@ DO_FPG_FALSE = @DO_FPG_FALSE@ DO_FPG_TRUE = @DO_FPG_TRUE@ DO_FXC = @DO_FXC@ DO_FXC_FALSE = @DO_FXC_FALSE@ DO_FXC_TRUE = @DO_FXC_TRUE@ DO_FXI = @DO_FXI@ DO_FXI_FALSE = @DO_FXI_FALSE@ DO_FXI_TRUE = @DO_FXI_TRUE@ DO_MAP = @DO_MAP@ DO_MAP_FALSE = @DO_MAP_FALSE@ DO_MAP_TRUE = @DO_MAP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ HAVE_WINDRES_FALSE = @HAVE_WINDRES_FALSE@ HAVE_WINDRES_TRUE = @HAVE_WINDRES_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_WINDRES = @ac_ct_WINDRES@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ @DO_FXC_TRUE@t_fxc = fxc @DO_FXI_TRUE@t_fxi = fxi @DO_MAP_TRUE@t_map = map @DO_FPG_TRUE@t_fpg = fpg SUBDIRS = $(t_fxc) $(t_fxi) $(t_map) $(t_fpg) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ Makefile.in NEWS aclocal.m4 config.guess config.sub configure \ configure.in depcomp install-sh missing mkinstalldirs DIST_SUBDIRS = fxc fxi map fpg all: all-recursive .SUFFIXES: am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (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): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = . distdir = $(PACKAGE)-$(VERSION) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist $(am__remove_distdir) GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/=build mkdir $(distdir)/=inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ && rm -f $(distdir).tar.gz \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' distuninstallcheck: cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf autom4te.cache maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ clean-generic clean-recursive ctags ctags-recursive dist \ dist-all dist-gzip distcheck distclean distclean-generic \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am dvi-recursive info info-am \ info-recursive install install-am install-data install-data-am \ install-data-recursive install-exec install-exec-am \ install-exec-recursive install-info install-info-am \ install-info-recursive install-man install-recursive \ install-strip installcheck installcheck-am installdirs \ installdirs-am installdirs-recursive maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive mostlyclean \ mostlyclean-generic mostlyclean-recursive pdf pdf-am \ pdf-recursive ps ps-am ps-recursive tags tags-recursive \ uninstall uninstall-am uninstall-info-am \ uninstall-info-recursive uninstall-recursive # 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: Fenix/map/0000755000000000000000000000000010631334454011405 5ustar rootrootFenix/map/Makefile.in0000644000000000000000000003103710607527006013456 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_CFLAGS = @COMMON_CFLAGS@ COMMON_LIBS = @COMMON_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DO_FPG = @DO_FPG@ DO_FPG_FALSE = @DO_FPG_FALSE@ DO_FPG_TRUE = @DO_FPG_TRUE@ DO_FXC = @DO_FXC@ DO_FXC_FALSE = @DO_FXC_FALSE@ DO_FXC_TRUE = @DO_FXC_TRUE@ DO_FXI = @DO_FXI@ DO_FXI_FALSE = @DO_FXI_FALSE@ DO_FXI_TRUE = @DO_FXI_TRUE@ DO_MAP = @DO_MAP@ DO_MAP_FALSE = @DO_MAP_FALSE@ DO_MAP_TRUE = @DO_MAP_TRUE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ HAVE_WINDRES_FALSE = @HAVE_WINDRES_FALSE@ HAVE_WINDRES_TRUE = @HAVE_WINDRES_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_WINDRES = @ac_ct_WINDRES@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ bin_PROGRAMS = map INCLUDES = $(COMMON_CFLAGS) map_LDADD = $(COMMON_LIBS) -lz -lungif -lpng SOURCE_FILES = map.c @HAVE_WINDRES_TRUE@map_SOURCES = $(SOURCE_FILES) map_resource.rc @HAVE_WINDRES_FALSE@map_SOURCES = $(SOURCE_FILES) subdir = map mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = bin_PROGRAMS = map$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__map_SOURCES_DIST = map.c map_resource.rc am__objects_1 = map.$(OBJEXT) @HAVE_WINDRES_TRUE@am_map_OBJECTS = $(am__objects_1) \ @HAVE_WINDRES_TRUE@ map_resource.$(OBJEXT) @HAVE_WINDRES_FALSE@am_map_OBJECTS = $(am__objects_1) map_OBJECTS = $(am_map_OBJECTS) map_DEPENDENCIES = map_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/map.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(am__map_SOURCES_DIST) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(map_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj .rc $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu map/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) map$(EXEEXT): $(map_OBJECTS) $(map_DEPENDENCIES) @rm -f map$(EXEEXT) $(LINK) $(map_LDFLAGS) $(map_OBJECTS) $(map_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'` uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(PROGRAMS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-depend distclean-generic distclean-tags distdir dvi \ dvi-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am .rc.o: $(WINDRES) $< -I../../include -o $@ # 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: Fenix/map/CVS/0000755000000000000000000000000010607744630012044 5ustar rootrootFenix/map/CVS/Repository0000644000000000000000000000001210601620520014120 0ustar rootrootFenix/map Fenix/map/CVS/Root0000644000000000000000000000007410601620520012674 0ustar rootroot:pserver:anonymous@fenix.cvs.sourceforge.net:/cvsroot/fenix Fenix/map/CVS/Entries0000644000000000000000000000065610607744630013407 0ustar rootroot/MAP.APS/1.3/Thu Apr 12 22:09:09 2007/-kb/ /MAP.dsp/1.2/Thu Apr 12 22:09:09 2007// /MAP.plg/1.2/Thu Apr 12 22:09:09 2007// /Makefile.am/1.3/Thu Apr 12 22:09:10 2007// /Makefile.in/1.6/Thu Apr 12 22:09:10 2007// /map.c/1.4/Thu Apr 12 22:09:11 2007// /map.ico/1.3/Thu Apr 12 22:09:11 2007/-kb/ /map_resource.rc/1.1/Thu Apr 12 22:09:11 2007/-kb/ /resource.h/1.2/Thu Apr 12 22:09:11 2007// /Makefile/1.28/Fri Apr 13 18:19:06 2007// D Fenix/map/MAP.plg0000644000000000000000000001134210607527004012525 0ustar rootroot

Build Log

--------------------Configuration: MAP - Win32 Debug--------------------

Command Lines

Creating temporary file "C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSP14.tmp" with contents [ /nologo /MLd /W3 /Gm /GX /ZI /Od /I "..\..\libpng" /I "..\..\zlib\include" /I "..\..\libungif\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\Fenix\Fenix\map\map.c" "C:\Fenix\libpng\pngwutil.c" "C:\Fenix\libpng\png.c" "C:\Fenix\libpng\pngerror.c" "C:\Fenix\libpng\pnggccrd.c" "C:\Fenix\libpng\pngget.c" "C:\Fenix\libpng\pngmem.c" "C:\Fenix\libpng\pngpread.c" "C:\Fenix\libpng\pngread.c" "C:\Fenix\libpng\pngrio.c" "C:\Fenix\libpng\pngrtran.c" "C:\Fenix\libpng\pngrutil.c" "C:\Fenix\libpng\pngset.c" "C:\Fenix\libpng\pngtrans.c" "C:\Fenix\libpng\pngvcrd.c" "C:\Fenix\libpng\pngwio.c" "C:\Fenix\libpng\pngwrite.c" "C:\Fenix\libpng\pngwtran.c" "C:\Fenix\libungif\lib\quantize.c" "C:\Fenix\libungif\lib\dev2gif.c" "C:\Fenix\libungif\lib\dgif_lib.c" "C:\Fenix\libungif\lib\egif_lib.c" "C:\Fenix\libungif\lib\getarg.c" "C:\Fenix\libungif\lib\gif_err.c" "C:\Fenix\libungif\lib\gif_font.c" "C:\Fenix\libungif\lib\gifalloc.c" "C:\Fenix\libungif\lib\qprintf.c" ] Creating command line "cl.exe @C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSP14.tmp" Creating temporary file "C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSP15.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"..\bin\Debug/MAP.pdb" /debug /machine:I386 /out:"..\bin\Debug/MAP.exe" /pdbtype:sept .\Debug\map.obj .\Debug\map.res .\Debug\pngwutil.obj .\Debug\png.obj .\Debug\pngerror.obj .\Debug\pnggccrd.obj .\Debug\pngget.obj .\Debug\pngmem.obj .\Debug\pngpread.obj .\Debug\pngread.obj .\Debug\pngrio.obj .\Debug\pngrtran.obj .\Debug\pngrutil.obj .\Debug\pngset.obj .\Debug\pngtrans.obj .\Debug\pngvcrd.obj .\Debug\pngwio.obj .\Debug\pngwrite.obj .\Debug\pngwtran.obj .\Debug\quantize.obj .\Debug\dev2gif.obj .\Debug\dgif_lib.obj .\Debug\egif_lib.obj .\Debug\getarg.obj .\Debug\gif_err.obj .\Debug\gif_font.obj .\Debug\gifalloc.obj .\Debug\qprintf.obj ..\..\zlib\lib\zdll.lib ] Creating command line "link.exe @C:\DOCUME~1\CARLOS~1\CONFIG~1\Temp\RSP15.tmp"

Output Window

Compiling... map.c pngwutil.c png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c pngvcrd.c pngwio.c pngwrite.c pngwtran.c quantize.c dev2gif.c c:\fenix\libungif\lib\dev2gif.c(98) : warning C4101: 'j' : unreferenced local variable c:\fenix\libungif\lib\dev2gif.c(98) : warning C4101: 'k' : unreferenced local variable c:\fenix\libungif\lib\dev2gif.c(411) : warning C4101: 'ScreenByte' : unreferenced local variable c:\fenix\libungif\lib\dev2gif.c(413) : warning C4101: 'BufferOffset' : unreferenced local variable c:\fenix\libungif\lib\dev2gif.c(412) : warning C4101: 'i' : unreferenced local variable c:\fenix\libungif\lib\dev2gif.c(412) : warning C4101: 'j' : unreferenced local variable c:\fenix\libungif\lib\dev2gif.c(412) : warning C4101: 'k' : unreferenced local variable c:\fenix\libungif\lib\dev2gif.c(413) : warning C4101: 'Bit' : unreferenced local variable Generating Code... Compiling... dgif_lib.c c:\fenix\libungif\lib\dgif_lib.c(63) : warning C4013: 'open' undefined; assuming extern returning int c:\fenix\libungif\lib\dgif_lib.c(74) : warning C4013: 'close' undefined; assuming extern returning int c:\fenix\libungif\lib\dgif_lib.c(921) : warning C4101: 'Error' : unreferenced local variable c:\fenix\libungif\lib\dgif_lib.c(921) : warning C4101: 'i' : unreferenced local variable c:\fenix\libungif\lib\dgif_lib.c(921) : warning C4101: 'j' : unreferenced local variable egif_lib.c c:\fenix\libungif\lib\egif_lib.c(69) : warning C4013: 'open' undefined; assuming extern returning int c:\fenix\libungif\lib\egif_lib.c(91) : warning C4013: 'close' undefined; assuming extern returning int c:\fenix\libungif\lib\egif_lib.c(196) : warning C4101: 'Size' : unreferenced local variable c:\fenix\libungif\lib\egif_lib.c(270) : warning C4101: 'Size' : unreferenced local variable c:\fenix\libungif\lib\egif_lib.c(607) : warning C4101: 'NewKey' : unreferenced local variable c:\fenix\libungif\lib\egif_lib.c(606) : warning C4101: 'NewCode' : unreferenced local variable getarg.c gif_err.c gif_font.c gifalloc.c qprintf.c Generating Code... Linking...

Results

MAP.exe - 0 error(s), 19 warning(s)
Fenix/map/Makefile.am0000644000000000000000000000040510607527004013436 0ustar rootrootbin_PROGRAMS=map .rc.o: $(WINDRES) $< -I../../include -o $@ INCLUDES = $(COMMON_CFLAGS) map_LDADD=$(COMMON_LIBS) -lz -lungif -lpng SOURCE_FILES=map.c if HAVE_WINDRES map_SOURCES = $(SOURCE_FILES) map_resource.rc else map_SOURCES = $(SOURCE_FILES) endif Fenix/map/map.ico0000644000000000000000000000627610607527006012671 0ustar rootroot ( @ DDDDDDDDDEFGIIJJJJKKKKJJJJIHGEEDDEDEDEDk<<ܝ<<CBRS_HIDE_INPLACE0x0008L?CBRS_SIZE_DYNAMIC0x0004L@CBRS_SIZE_FIXED0x0002LACBRS_FLOATING0x0001LBCBRS_GRIPPER0x00400000LDCBRS_ORIENT_HORZ(CBRS_ALIGN_TOP|CBRS_ALIGN_BOTTOM)FCBRS_ORIENT_VERT(CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT)GCBRS_ORIENT_ANY(CBRS_ORIENT_HORZ|CBRS_ORIENT_VERT)HCBRS_ALL0x0040FFFFLJCBRS_NOALIGN0x00000000LOCBRS_LEFT(CBRS_ALIGN_LEFT|CBRS_BORDER_RIGHT)PCBRS_TOP(CBRS_ALIGN_TOP|CBRS_BORDER_BOTTOM)QCBRS_RIGHT(CBRS_ALIGN_RIGHT|CBRS_BORDER_LEFT)RCBRS_BOTTOM(CBRS_ALIGN_BOTTOM|CBRS_BORDER_TOP)SID_INDICATOR_EXT0xE700YID_INDICATOR_CAPS0xE701ZID_INDICATOR_NUM0xE702[ID_INDICATOR_SCRL0xE703\ID_INDICATOR_OVR0xE704]ID_INDICATOR_REC0xE705^ID_INDICATOR_KANA0xE706_ID_SEPARATOR0aAFX_IDS_APP_TITLE0xE000AFX_IDS_IDLEMESSAGE0xE001AFX_IDS_HELPMODEMESSAGE0xE002AFX_IDS_APP_TITLE_EMBEDDING0xE003AFX_IDS_COMPANY_NAME0xE004AFX_IDS_OBJ_TITLE_INPLACE0xE005ID_FILE_NEW0xE100ID_FILE_OPEN0xE101ID_FILE_CLOSE0xE102ID_FILE_SAVE0xE103ID_FILE_SAVE_AS0xE104ID_FILE_PAGE_SETUP0xE105ID_FILE_PRINT_SETUP0xE106ID_FILE_PRINT0xE107ID_FILE_PRINT_DIRECT0xE108ID_FILE_PRINT_PREVIEW0xE109ID_FILE_UPDATE0xE10AID_FILE_SAVE_COPY_AS0xE10BID_FILE_SEND_MAIL0xE10CID_FILE_MRU_FIRST0xE110ID_FILE_MRU_FILE10xE110ID_FILE_MRU_FILE20xE111ID_FILE_MRU_FILE30xE112ID_FILE_MRU_FILE40xE113ID_FILE_MRU_FILE50xE114ID_FILE_MRU_FILE60xE115ID_FILE_MRU_FILE70xE116ID_FILE_MRU_FILE80xE117ID_FILE_MRU_FILE90xE118ID_FILE_MRU_FILE100xE119ID_FILE_MRU_FILE110xE11AID_FILE_MRU_FILE120xE11BID_FILE_MRU_FILE130xE11CID_FILE_MRU_FILE140xE11DID_FILE_MRU_FILE150xE11EID_FILE_MRU_FILE160xE11FID_FILE_MRU_LAST0xE11FID_EDIT_CLEAR0xE120ID_EDIT_CLEAR_ALL0xE121ID_EDIT_COPY0xE122ID_EDIT_CUT0xE123ID_EDIT_FIND0xE124ID_EDIT_PASTE0xE125ID_EDIT_PASTE_LINK0xE126ID_EDIT_PASTE_SPECIAL0xE127ID_EDIT_REPEAT0xE128ID_EDIT_REPLACE0xE129ID_EDIT_SELECT_ALL0xE12AID_EDIT_UNDO0xE12BID_EDIT_REDO0xE12CID_WINDOW_NEW0xE130ID_WINDOW_ARRANGE0xE131ID_WINDOW_CASCADE0xE132ID_WINDOW_TILE_HORZ0xE133ID_WINDOW_TILE_VERT0xE134ID_WINDOW_SPLIT0xE135ID_APP_ABOUT0xE140ID_APP_EXIT0xE141ID_HELP_INDEX0xE142ID_HELP_FINDER0xE143ID_HELP_USING0xE144ID_CONTEXT_HELP0xE145ID_HELP0xE146ID_DEFAULT_HELP0xE147ID_NEXT_PANE0xE150ID_PREV_PANE0xE151ID_FORMAT_FONT0xE160ID_OLE_INSERT_NEW0xE200ID_OLE_EDIT_LINKS0xE201ID_OLE_EDIT_CONVERT0xE202ID_OLE_EDIT_CHANGE_ICON0xE203ID_OLE_EDIT_PROPERTIES0xE204ID_OLE_VERB_FIRST0xE210AFX_ID_PREVIEW_CLOSE0xE300AFX_ID_PREVIEW_NUMPAGE0xE301AFX_ID_PREVIEW_NEXT0xE302AFX_ID_PREVIEW_PREV0xE303AFX_ID_PREVIEW_PRINT0xE304AFX_ID_PREVIEW_ZOOMIN0xE305AFX_ID_PREVIEW_ZOOMOUT0xE306ID_VIEW_TOOLBAR0xE800ID_VIEW_STATUS_BAR0xE801ID_VIEW_REBAR0xE804 ID_VIEW_AUTOARRANGE0xE805 ID_VIEW_SMALLICON0xE810 ID_VIEW_LARGEICON0xE811 ID_VIEW_LIST0xE812ID_VIEW_DETAILS0xE813ID_VIEW_LINEUP0xE814ID_VIEW_BYNAME0xE815AFX_ID_VIEW_MINIMUMID_VIEW_SMALLICONAFX_ID_VIEW_MAXIMUMID_VIEW_BYNAMEID_RECORD_FIRST0xE900ID_RECORD_LAST0xE901ID_RECORD_NEXT0xE902ID_RECORD_PREV0xE903IDC_STATIC(-1)"AFX_IDS_SCSIZE0xEF00+AFX_IDS_SCMOVE0xEF01,AFX_IDS_SCMINIMIZE0xEF02-AFX_IDS_SCMAXIMIZE0xEF03.AFX_IDS_SCNEXTWINDOW0xEF04/AFX_IDS_SCPREVWINDOW0xEF050AFX_IDS_SCCLOSE0xEF061AFX_IDS_SCRESTORE0xEF122AFX_IDS_SCTASKLIST0xEF133AFX_IDS_MDICHILD0xEF1F5AFX_IDS_DESKACCESSORY0xEFDA7AFX_IDS_OPENFILE0xF000:AFX_IDS_SAVEFILE0xF001;AFX_IDS_ALLFILTER0xF002<AFX_IDS_UNTITLED0xF003=AFX_IDS_SAVEFILECOPY0xF004>AFX_IDS_PREVIEW_CLOSE0xF005?AFX_IDS_UNNAMED_FILE0xF006@AFX_IDS_HIDE0xF011AAFX_IDP_NO_ERROR_AVAILABLE0xF020DAFX_IDS_NOT_SUPPORTED_EXCEPTION0xF021EAFX_IDS_RESOURCE_EXCEPTION0xF022FAFX_IDS_MEMORY_EXCEPTION0xF023GAFX_IDS_USER_EXCEPTION0xF024HAFX_IDS_PRINTONPORT0xF040KAFX_IDS_ONEPAGE0xF041LAFX_IDS_TWOPAGE0xF042MAFX_IDS_PRINTPAGENUM0xF043NAFX_IDS_PREVIEWPAGEDESC0xF044OAFX_IDS_PRINTDEFAULTEXT0xF045PAFX_IDS_PRINTDEFAULT0xF046QAFX_IDS_PRINTFILTER0xF047RAFX_IDS_PRINTCAPTION0xF048SAFX_IDS_PRINTTOFILE0xF049TAFX_IDS_OBJECT_MENUITEM0xF080XAFX_IDS_EDIT_VERB0xF081YAFX_IDS_ACTIVATE_VERB0xF082ZAFX_IDS_CHANGE_LINK0xF083[AFX_IDS_AUTO0xF084\AFX_IDS_MANUAL0xF085]AFX_IDS_FROZEN0xF086^AFX_IDS_ALL_FILES0xF087_AFX_IDS_SAVE_MENU0xF088aAFX_IDS_UPDATE_MENU0xF089bAFX_IDS_SAVE_AS_MENU0xF08AcAFX_IDS_SAVE_COPY_AS_MENU0xF08BdAFX_IDS_EXIT_MENU0xF08CeAFX_IDS_UPDATING_ITEMS0xF08DfAFX_IDS_METAFILE_FORMAT0xF08EhAFX_IDS_DIB_FORMAT0xF08FiAFX_IDS_BITMAP_FORMAT0xF090jAFX_IDS_LINKSOURCE_FORMAT0xF091kAFX_IDS_EMBED_FORMAT0xF092lAFX_IDS_PASTELINKEDTYPE0xF094nAFX_IDS_UNKNOWNTYPE0xF095oAFX_IDS_RTF_FORMAT0xF096pAFX_IDS_TEXT_FORMAT0xF097qAFX_IDS_INVALID_CURRENCY0xF098sAFX_IDS_INVALID_DATETIME0xF099tAFX_IDS_INVALID_DATETIMESPAN0xF09AuAFX_IDP_INVALID_FILENAME0xF100xAFX_IDP_FAILED_TO_OPEN_DOC0xF101yAFX_IDP_FAILED_TO_SAVE_DOC0xF102zAFX_IDP_ASK_TO_SAVE0xF103{AFX_IDP_FAILED_TO_CREATE_DOC0xF104|AFX_IDP_FILE_TOO_LARGE0xF105}AFX_IDP_FAILED_TO_START_PRINT0xF106~AFX_IDP_FAILED_TO_LAUNCH_HELP0xF107AFX_IDP_INTERNAL_FAILURE0xF108AFX_IDP_COMMAND_FAILURE0xF109AFX_IDP_FAILED_MEMORY_ALLOC0xF10AAFX_IDP_UNREG_DONE0xF10BAFX_IDP_UNREG_FAILURE0xF10CAFX_IDP_DLL_LOAD_FAILED0xF10DAFX_IDP_DLL_BAD_VERSION0xF10EAFX_IDP_PARSE_INT0xF110AFX_IDP_PARSE_REAL0xF111AFX_IDP_PARSE_INT_RANGE0xF112AFX_IDP_PARSE_REAL_RANGE0xF113AFX_IDP_PARSE_STRING_SIZE0xF114AFX_IDP_PARSE_RADIO_BUTTON0xF115AFX_IDP_PARSE_BYTE0xF116AFX_IDP_PARSE_UINT0xF117AFX_IDP_PARSE_DATETIME0xF118AFX_IDP_PARSE_CURRENCY0xF119AFX_IDP_FAILED_INVALID_FORMAT0xF120AFX_IDP_FAILED_INVALID_PATH0xF121AFX_IDP_FAILED_DISK_FULL0xF122AFX_IDP_FAILED_ACCESS_READ0xF123AFX_IDP_FAILED_ACCESS_WRITE0xF124AFX_IDP_FAILED_IO_ERROR_READ0xF125AFX_IDP_FAILED_IO_ERROR_WRITE0xF126AFX_IDP_STATIC_OBJECT0xF180AFX_IDP_FAILED_TO_CONNECT0xF181AFX_IDP_SERVER_BUSY0xF182AFX_IDP_BAD_VERB0xF183AFX_IDS_NOT_DOCOBJECT0xF184AFX_IDP_FAILED_TO_NOTIFY0xF185AFX_IDP_FAILED_TO_LAUNCH0xF186AFX_IDP_ASK_TO_UPDATE0xF187AFX_IDP_FAILED_TO_UPDATE0xF188AFX_IDP_FAILED_TO_REGISTER0xF189AFX_IDP_FAILED_TO_AUTO_REGISTER0xF18AAFX_IDP_FAILED_TO_CONVERT0xF18BAFX_IDP_GET_NOT_SUPPORTED0xF18CAFX_IDP_SET_NOT_SUPPORTED0xF18DAFX_IDP_ASK_TO_DISCARD0xF18EAFX_IDP_FAILED_TO_CREATE0xF18FAFX_IDP_FAILED_MAPI_LOAD0xF190AFX_IDP_INVALID_MAPI_DLL0xF191AFX_IDP_FAILED_MAPI_SEND0xF192AFX_IDP_FILE_NONE0xF1A0AFX_IDP_FILE_GENERIC0xF1A1AFX_IDP_FILE_NOT_FOUND0xF1A2AFX_IDP_FILE_BAD_PATH0xF1A3AFX_IDP_FILE_TOO_MANY_OPEN0xF1A4AFX_IDP_FILE_ACCESS_DENIED0xF1A5AFX_IDP_FILE_INVALID_FILE0xF1A6AFX_IDP_FILE_REMOVE_CURRENT0xF1A7AFX_IDP_FILE_DIR_FULL0xF1A8AFX_IDP_FILE_BAD_SEEK0xF1A9AFX_IDP_FILE_HARD_IO0xF1AAAFX_IDP_FILE_SHARING0xF1ABAFX_IDP_FILE_LOCKING0xF1ACAFX_IDP_FILE_DISKFULL0xF1ADAFX_IDP_FILE_EOF0xF1AEAFX_IDP_ARCH_NONE0xF1B0AFX_IDP_ARCH_GENERIC0xF1B1AFX_IDP_ARCH_READONLY0xF1B2AFX_IDP_ARCH_ENDOFFILE0xF1B3AFX_IDP_ARCH_WRITEONLY0xF1B4AFX_IDP_ARCH_BADINDEX0xF1B5AFX_IDP_ARCH_BADCLASS0xF1B6AFX_IDP_ARCH_BADSCHEMA0xF1B7AFX_IDS_OCC_SCALEUNITS_PIXELS0xF1C0AFX_IDS_STATUS_FONT0xF230AFX_IDS_TOOLTIP_FONT0xF231AFX_IDS_UNICODE_FONT0xF232AFX_IDS_MINI_FONT0xF233AFX_IDP_SQL_CONNECT_FAIL0xF281AFX_IDP_SQL_RECORDSET_FORWARD_ONLY0xF282AFX_IDP_SQL_EMPTY_COLUMN_LIST0xF283AFX_IDP_SQL_FIELD_SCHEMA_MISMATCH0xF284AFX_IDP_SQL_ILLEGAL_MODE0xF285AFX_IDP_SQL_MULTIPLE_ROWS_AFFECTED0xF286AFX_IDP_SQL_NO_CURRENT_RECORD0xF287AFX_IDP_SQL_NO_ROWS_AFFECTED0xF288AFX_IDP_SQL_RECORDSET_READONLY0xF289AFX_IDP_SQL_SQL_NO_TOTAL0xF28AAFX_IDP_SQL_ODBC_LOAD_FAILED0xF28BAFX_IDP_SQL_DYNASET_NOT_SUPPORTED0xF28CAFX_IDP_SQL_SNAPSHOT_NOT_SUPPORTED0xF28DAFX_IDP_SQL_API_CONFORMANCE0xF28EAFX_IDP_SQL_SQL_CONFORMANCE0xF28FAFX_IDP_SQL_NO_DATA_FOUND0xF290AFX_IDP_SQL_ROW_UPDATE_NOT_SUPPORTED0xF291AFX_IDP_SQL_ODBC_V2_REQUIRED0xF292AFX_IDP_SQL_NO_POSITIONED_UPDATES0xF293AFX_IDP_SQL_LOCK_MODE_NOT_SUPPORTED0xF294AFX_IDP_SQL_DATA_TRUNCATED0xF295AFX_IDP_SQL_ROW_FETCH0xF296AFX_IDP_SQL_INCORRECT_ODBC0xF297AFX_IDP_SQL_UPDATE_DELETE_FAILED0xF298AFX_IDP_SQL_DYNAMIC_CURSOR_NOT_SUPPORTED0xF299AFX_IDP_SQL_FIELD_NOT_FOUND0xF29AAFX_IDP_SQL_BOOKMARKS_NOT_SUPPORTED0xF29BAFX_IDP_SQL_BOOKMARKS_NOT_ENABLED0xF29CAFX_IDS_DELETED0xF29DAFX_IDP_DAO_ENGINE_INITIALIZATION0xF2B0AFX_IDP_DAO_DFX_BIND0xF2B1AFX_IDP_DAO_OBJECT_NOT_OPEN0xF2B2AFX_IDP_DAO_ROWTOOSHORT0xF2B3AFX_IDP_DAO_BADBINDINFO0xF2B4AFX_IDP_DAO_COLUMNUNAVAILABLE0xF2B5AFX_IDS_HTTP_TITLE0xF2D1 AFX_IDS_HTTP_NO_TEXT0xF2D2AFX_IDS_HTTP_BAD_REQUEST0xF2D3AFX_IDS_HTTP_AUTH_REQUIRED0xF2D4AFX_IDS_HTTP_FORBIDDEN0xF2D5AFX_IDS_HTTP_NOT_FOUND0xF2D6AFX_IDS_HTTP_SERVER_ERROR0xF2D7AFX_IDS_HTTP_NOT_IMPLEMENTED0xF2D8AFX_IDC_LISTBOX100AFX_IDC_CHANGE101AFX_IDC_PRINT_DOCNAME201AFX_IDC_PRINT_PRINTERNAME202AFX_IDC_PRINT_PORTNAME203 AFX_IDC_PRINT_PAGENUM204!ID_APPLY_NOW0x3021$ID_WIZBACK0x3023%ID_WIZNEXT0x3024&ID_WIZFINISH0x3025'AFX_IDC_TAB_CONTROL0x3020(AFX_IDD_NEWTYPEDLG30721;AFX_IDD_PRINTDLG30722<AFX_IDD_PREVIEW_TOOLBAR30723=AFX_IDD_INSERTOBJECT30724@AFX_IDD_CHANGEICON30725AAFX_IDD_CONVERT30726BAFX_IDD_PASTESPECIAL30727CAFX_IDD_EDITLINKS30728DAFX_IDD_FILEBROWSE30729EAFX_IDD_BUSY30730FAFX_IDD_OBJECTPROPERTIES30732HAFX_IDD_CHANGESOURCE30733IAFX_IDC_CONTEXTHELP30977MAFX_IDC_MAGNIFY30978NAFX_IDC_SMALLARROWS30979OAFX_IDC_HSPLITBAR30980PAFX_IDC_VSPLITBAR30981QAFX_IDC_NODROPCRSR30982RAFX_IDC_TRACKNWSE30983SAFX_IDC_TRACKNESW30984TAFX_IDC_TRACKNS30985UAFX_IDC_TRACKWE30986VAFX_IDC_TRACK4WAY30987WAFX_IDC_MOVE4WAY30988XAFX_IDB_MINIFRAME_MENU30994[AFX_IDB_CHECKLISTBOX_NT30995^AFX_IDB_CHECKLISTBOX_9530996_AFX_IDR_PREVIEW_ACCEL30997bAFX_IDI_STD_MDIFRAME31233eAFX_IDI_STD_FRAME31234fAFX_IDC_FONTPROP1000lAFX_IDC_FONTNAMES1001mAFX_IDC_FONTSTYLES1002nAFX_IDC_FONTSIZES1003oAFX_IDC_STRIKEOUT1004pAFX_IDC_UNDERLINE1005qAFX_IDC_SAMPLEBOX1006rAFX_IDC_COLOR_BLACK1100uAFX_IDC_COLOR_WHITE1101vAFX_IDC_COLOR_RED1102wAFX_IDC_COLOR_GREEN1103xAFX_IDC_COLOR_BLUE1104yAFX_IDC_COLOR_YELLOW1105zAFX_IDC_COLOR_MAGENTA1106{AFX_IDC_COLOR_CYAN1107|AFX_IDC_COLOR_GRAY1108}AFX_IDC_COLOR_LIGHTGRAY1109~AFX_IDC_COLOR_DARKRED1110AFX_IDC_COLOR_DARKGREEN1111AFX_IDC_COLOR_DARKBLUE1112AFX_IDC_COLOR_LIGHTBROWN1113AFX_IDC_COLOR_DARKMAGENTA1114AFX_IDC_COLOR_DARKCYAN1115AFX_IDC_COLORPROP1116AFX_IDC_SYSTEMCOLORS1117AFX_IDC_PROPNAME1201AFX_IDC_PICTURE1202AFX_IDC_BROWSE1203AFX_IDC_CLEAR1204AFX_IDD_PROPPAGE_COLOR32257AFX_IDD_PROPPAGE_FONT32258AFX_IDD_PROPPAGE_PICTURE32259AFX_IDB_TRUETYPE32384AFX_IDS_PROPPAGE_UNKNOWN0xFE01AFX_IDS_COLOR_DESKTOP0xFE04AFX_IDS_COLOR_APPWORKSPACE0xFE05AFX_IDS_COLOR_WNDBACKGND0xFE06AFX_IDS_COLOR_WNDTEXT0xFE07AFX_IDS_COLOR_MENUBAR0xFE08AFX_IDS_COLOR_MENUTEXT0xFE09AFX_IDS_COLOR_ACTIVEBAR0xFE0AAFX_IDS_COLOR_INACTIVEBAR0xFE0BAFX_IDS_COLOR_ACTIVETEXT0xFE0CAFX_IDS_COLOR_INACTIVETEXT0xFE0DAFX_IDS_COLOR_ACTIVEBORDER0xFE0EAFX_IDS_COLOR_INACTIVEBORDER0xFE0FAFX_IDS_COLOR_WNDFRAME0xFE10AFX_IDS_COLOR_SCROLLBARS0xFE11AFX_IDS_COLOR_BTNFACE0xFE12AFX_IDS_COLOR_BTNSHADOW0xFE13AFX_IDS_COLOR_BTNTEXT0xFE14AFX_IDS_COLOR_BTNHIGHLIGHT0xFE15AFX_IDS_COLOR_DISABLEDTEXT0xFE16AFX_IDS_COLOR_HIGHLIGHT0xFE17AFX_IDS_COLOR_HIGHLIGHTTEXT0xFE18AFX_IDS_REGULAR0xFE19AFX_IDS_BOLD0xFE1AAFX_IDS_ITALIC0xFE1BAFX_IDS_BOLDITALIC0xFE1CAFX_IDS_SAMPLETEXT0xFE1DAFX_IDS_DISPLAYSTRING_FONT0xFE1EAFX_IDS_DISPLAYSTRING_COLOR0xFE1FAFX_IDS_DISPLAYSTRING_PICTURE0xFE20AFX_IDS_PICTUREFILTER0xFE21AFX_IDS_PICTYPE_UNKNOWN0xFE22AFX_IDS_PICTYPE_NONE0xFE23AFX_IDS_PICTYPE_BITMAP0xFE24AFX_IDS_PICTYPE_METAFILE0xFE25AFX_IDS_PICTYPE_ICON0xFE26AFX_IDS_COLOR_PPG0xFE28AFX_IDS_COLOR_PPG_CAPTION0xFE29AFX_IDS_FONT_PPG0xFE2AAFX_IDS_FONT_PPG_CAPTION0xFE2BAFX_IDS_PICTURE_PPG0xFE2CAFX_IDS_PICTURE_PPG_CAPTION0xFE2DAFX_IDS_PICTUREBROWSETITLE0xFE30AFX_IDS_BORDERSTYLE_00xFE31AFX_IDS_BORDERSTYLE_10xFE32AFX_IDS_VERB_EDIT0xFE40AFX_IDS_VERB_PROPERTIES0xFE41AFX_IDP_PICTURECANTOPEN0xFE83AFX_IDP_PICTURECANTLOAD0xFE84AFX_IDP_PICTURETOOLARGE0xFE85AFX_IDP_PICTUREREADFAILED0xFE86AFX_IDP_E_ILLEGALFUNCTIONCALL0xFEA0AFX_IDP_E_OVERFLOW0xFEA1AFX_IDP_E_OUTOFMEMORY0xFEA2AFX_IDP_E_DIVISIONBYZERO0xFEA3AFX_IDP_E_OUTOFSTRINGSPACE0xFEA4AFX_IDP_E_OUTOFSTACKSPACE0xFEA5AFX_IDP_E_BADFILENAMEORNUMBER0xFEA6AFX_IDP_E_FILENOTFOUND0xFEA7AFX_IDP_E_BADFILEMODE0xFEA8AFX_IDP_E_FILEALREADYOPEN0xFEA9AFX_IDP_E_DEVICEIOERROR0xFEAAAFX_IDP_E_FILEALREADYEXISTS0xFEABAFX_IDP_E_BADRECORDLENGTH0xFEACAFX_IDP_E_DISKFULL0xFEADAFX_IDP_E_BADRECORDNUMBER0xFEAEAFX_IDP_E_BADFILENAME0xFEAFAFX_IDP_E_TOOMANYFILES0xFEB0AFX_IDP_E_DEVICEUNAVAILABLE0xFEB1AFX_IDP_E_PERMISSIONDENIED0xFEB2AFX_IDP_E_DISKNOTREADY0xFEB3AFX_IDP_E_PATHFILEACCESSERROR0xFEB4AFX_IDP_E_PATHNOTFOUND0xFEB5AFX_IDP_E_INVALIDPATTERNSTRING0xFEB6AFX_IDP_E_INVALIDUSEOFNULL0xFEB7AFX_IDP_E_INVALIDFILEFORMAT0xFEB8AFX_IDP_E_INVALIDPROPERTYVALUE0xFEB9AFX_IDP_E_INVALIDPROPERTYARRAYINDEX0xFEBAAFX_IDP_E_SETNOTSUPPORTEDATRUNTIME0xFEBBAFX_IDP_E_SETNOTSUPPORTED0xFEBCAFX_IDP_E_NEEDPROPERTYARRAYINDEX0xFEBDAFX_IDP_E_SETNOTPERMITTED0xFEBEAFX_IDP_E_GETNOTSUPPORTEDATRUNTIME0xFEBFAFX_IDP_E_GETNOTSUPPORTED0xFEC0AFX_IDP_E_PROPERTYNOTFOUND0xFEC1AFX_IDP_E_INVALIDCLIPBOARDFORMAT0xFEC2AFX_IDP_E_INVALIDPICTURE0xFEC3AFX_IDP_E_PRINTERERROR0xFEC4AFX_IDP_E_CANTSAVEFILETOTEMP0xFEC5AFX_IDP_E_SEARCHTEXTNOTFOUND0xFEC6AFX_IDP_E_REPLACEMENTSTOOLONG0xFEC7!!$HWB0  C:\Developement\Fenix\MAP\resource.h C:\Archivos de programa\Microsoft Visual Studio\VC98\MFC\INCLUDE/afxres.h C:\Archivos de programa\Microsoft Visual Studio\VC98\MFC\INCLUDE/winres.he map.ico~$HWB0 14101IDI_ICON1C:\Developement\Fenix\MAP\MAP.rc$TEXTINCLUDE1$TEXTINCLUDE2$TEXTINCLUDE3$$l$HWB0 %DHWB  0 T e0 TEXTINCLUDE0  TEXTINCLUDE0 (TEXTINCLUDE0 <PHWB0 JHWB0 ~LHWB0 Fenix/map/map.c0000644000000000000000000007115410607527006012336 0ustar rootroot/* * Fenix - Videogame compiler/interpreter * Current release : FENIX - PROJECT 1.0 - R 0.75 * Last stable release : * Project documentation : http://fenix.divsite.net * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright 1999 Jos Luis Cebrin Page * Copyright 2002 Fenix Team * */ /* * FILE : map.c * DESCRIPTION : MAP Utility * * HISTORY: * */ #include #include #include #include #include #include #include #include #include typedef unsigned int Uint32 ; typedef signed int Sint32 ; typedef unsigned short Uint16 ; typedef signed short Sint16 ; typedef unsigned char Uint8 ; typedef signed char Sint8 ; #define MAXPATH 1024 #define MAXFILES 256 #define MAXPARAMS 64 char files[MAXFILES][MAXPATH] ; int n_files = 0 ; char * policy = "wb" ; #define AC_LIST 1 #define AC_PALETTE 2 #define AC_16BITS 3 #define AC_TO_PNG 4 #define AC_TO_MAP 5 #define AC_NOTRANS 6 #define AC_UPDATE 7 int action = AC_LIST ; int n_commands ; char * commands[256] ; /* "Traduccin" de un color determinado a 0, en PNGs de 16 bits */ int do_zeroc = 0 ; Uint16 zeroc[2][3] = { { 0, 0, 0 }, { 0, 0, 0 } } ; void fatal_error (char * fmt, ...) { va_list ap ; fflush (stdout) ; va_start (ap, fmt) ; vfprintf (stderr, fmt, ap) ; fprintf (stderr, "\n") ; va_end (ap) ; exit (1) ; } void set_extension (const char * filename, const char * ext, char * buffer) { char * ptr ; const char * fptr ; /* Concatena la extensin al nombre de fichero */ strcpy (buffer, filename) ; ptr = strchr (buffer, '.') ; if (ptr) strcpy (ptr, ext) ; else strcat (buffer, ext) ; /* Pone la extensin en maysculas si el nombre lo est */ for (fptr = filename ; *fptr ; fptr++) if (*fptr >= 'a' && *fptr <= 'z') break ; if (!*fptr) { for (ptr = buffer ; *ptr ; ptr++) *ptr = toupper(*ptr) ; } } void help () { printf ("MAP Utility v0.75\nCopyright (C) 1999 Jos Luis Cebrin Page\nCopyright (C) 2002 Fenix Team\n" "This utility comes with ABSOLUTELY NO WARRANTY; map -h for details\n\n") ; printf ("Usage: map [option] file \n" "\n" " -l Describes MAP file (default option)\n" " -p Extract palette file (.PAL) from the graphic\n" " -c Convert MAP file to 16bpp format\n" " -g Convert MAP file to PNG file\n" " -m Convert PNG or GIF file to MAP file\n" " -s Modify MAP file parameters\n" " -n Remove MAP file transparency\n" " -z=# PNG transparent color ('0' color) range\n" " -# Compresion level (0-9 NOTE: 0 DIV compatible for 8bpps MAP files)\n" "\n" "Options for -l/-m/-c: (# means integer value)\n" "\n" " +name=... Change the name for the MAP (up to 32 characters)\n" " +id=# Change MAP code (0-999))\n" " +center=[#,#] Change center for the MAP (control point 0)\n" " +animation=... Animation sequence for ANIMATED MAPS\n" " +speed=# Frame duration (ms) for each animation frame\n" " +#=[#,#] Control point definition\n" "\n") ; } /* ----------------------------------------------------------------- */ typedef struct { Uint8 magic[8] ; Uint16 width ; Uint16 height ; Uint32 code ; Sint8 name[32] ; } #ifdef __GNU_C__ __attribute__ ((packed)) #endif MAP_HEADER ; #define F_NCPOINTS 0x0FFF #define F_ANIMATION 0x1000 typedef struct { MAP_HEADER header ; Uint8 * palette ; void * data ; Sint16 * cpoints ; Sint16 * animation ; Sint16 n_flags ; char filename[12] ; int depth ; int frames ; int animation_length ; int animation_speed ; } MAP ; #define PALETTE_SIZE (768+576) #define MAP_MAGIC "map\x1A\x0D\x0A" #define M16_MAGIC "m16\x1A\x0D\x0A" #define PAL_MAGIC "pal\x1A\x0D\x0A" #define FNT_MAGIC "fnt\x1A\x0D\x0A" #define FPG_MAGIC "fpg\x1A\x0D\x0A" void save_map (const char * filename, MAP * map) { long len ; gzFile * file = gzopen (filename, policy) ; if (!file) fatal_error ("%s: error al crear", filename) ; gzwrite (file, &map->header, sizeof(MAP_HEADER)) ; if (map->depth == 8) gzwrite (file, map->palette, PALETTE_SIZE) ; gzwrite (file, &map->n_flags, 2) ; if (map->n_flags & F_NCPOINTS) gzwrite (file, map->cpoints, 4 * (map->n_flags & F_NCPOINTS)) ; if (map->n_flags & F_ANIMATION) { gzwrite (file, &map->frames, 2) ; gzwrite (file, &map->animation_length, 2) ; gzwrite (file, &map->animation_speed, 2) ; gzwrite (file, map->animation, 2 * map->animation_length) ; } len = map->header.width * map->header.height * map->frames ; if (map->depth == 16) len *= 2 ; gzwrite (file, map->data, len) ; gzclose (file) ; printf (" => %s\n", filename) ; } MAP * load_gif (const char * filename) { int i ; GifFileType * file ; MAP * map ; ColorMapObject * pal ; file = DGifOpenFileName (filename) ; if (!file) return NULL ; DGifSlurp (file) ; map = (MAP *) malloc(sizeof(MAP)) ; map->frames = file->ImageCount ; map->depth = 8 ; map->cpoints = 0 ; map->n_flags = 0 ; map->animation_speed = 250 ; memcpy (map->header.magic, MAP_MAGIC, 8) ; strncpy (map->header.name, filename, 32) ; map->header.name[31] = 0 ; /* Paleta de colores */ map->palette = (void *)malloc(PALETTE_SIZE) ; pal = file->SColorMap ; if (!pal) pal = file->SavedImages[0].ImageDesc.ColorMap ; if (!pal) fatal_error ("El GIF no contiene una paleta de colores") ; if (pal->ColorCount > 255) fatal_error ("El GIF tiene ms de 256 colores") ; memset (map->palette, 0, PALETTE_SIZE) ; for (i = 0 ; i < pal->ColorCount ; i++) { map->palette[i*3 ] = ((pal->Colors[i].Red >> 2) & 0x3F) ; map->palette[i*3+1] = ((pal->Colors[i].Green >> 2)& 0x3F) ; map->palette[i*3+2] = ((pal->Colors[i].Blue >> 2)& 0x3F) ; } /* Tamao de la imagen */ map->header.width = file->SWidth ; map->header.height = file->SHeight ; for (i = 0 ; i < map->frames ; i++) { int w, h ; w = file->SavedImages[i].ImageDesc.Width ; h = file->SavedImages[i].ImageDesc.Height ; w += file->SavedImages[i].ImageDesc.Left ; h += file->SavedImages[i].ImageDesc.Top ; if (w > map->header.width) map->header.width = w ; if (h > map->header.height) map->header.height = h ; } /* Procesa las imgenes del GIF */ map->data = malloc(map->header.width * map->header.height * map->frames) ; memset (map->data, 0, map->header.width * map->header.height * map->frames) ; for (i = 0 ; i < map->frames ; i++) { Uint8 * line = (Uint8 *)map->data + map->header.width * i ; Uint8 * base, * bptr, * ptr ; int x, y, bw, bg ; line += file->SavedImages[i].ImageDesc.Top * map->header.width * map->frames ; base = file->SavedImages[i].RasterBits ; bw = file->SavedImages[i].ImageDesc.Width ; bg = file->SBackGroundColor ; /* Busca e interpreta la extensin de control de animaciones */ for (x = 0 ; x < file->SavedImages[i].ExtensionBlockCount ; x++) { ExtensionBlock * ext = &file->SavedImages[i].ExtensionBlocks[x] ; if (ext->Function == 0xf9) { bg = (Uint8)ext->Bytes[3] ; map->animation_speed = 10 * (((int)ext->Bytes[2] << 8) + ext->Bytes[1]) ; } else printf ("Unknown function 0x%02X at frame %d\n", ext->Function, x) ; } map->palette[bg*3 ] = map->palette[0] ; map->palette[bg*3+1] = map->palette[1] ; map->palette[bg*3+2] = map->palette[2] ; /* Copia la primera imagen sobre el resto */ if (i > 0) for (y = 0 ; y < map->header.height ; y++ ) { ptr = (Uint8 *)map->data + map->header.width * map->frames * y ; bptr = ptr + map->header.width * i ; memcpy (bptr, ptr, map->header.width) ; } /* Copia la imagen */ for (y = 0 ; y < file->SavedImages[i].ImageDesc.Height ; y++ ) { bptr = base + bw*y ; ptr = line + file->SavedImages[i].ImageDesc.Left ; for (x = 0 ; x < bw ; x++) { if ((*bptr) == bg) *ptr++ = 0 ; else if (*bptr == 0) *ptr++ = bg ; else *ptr++ = *bptr ; bptr++ ; } line += map->header.width * map->frames ; } } /* Animacin */ map->animation_length = 0 ; map->animation = NULL ; if (map->frames > 1) { map->n_flags |= F_ANIMATION ; map->animation_length = map->frames ; map->animation = malloc(map->frames * 2) ; for (i = 0 ; i < map->frames ; i++) map->animation[i] = i+1 ; } return map ; } MAP * load_map (const char * filename) { gzFile file = gzopen (filename, "rb") ; MAP * map ; int error = 0, len, clen ; if (!file) fatal_error ("%s: fichero no encontrado", filename) ; map = (MAP *) malloc(sizeof(MAP)) ; gzread (file, &map->header, sizeof(map->header)) ; strncpy (map->filename, filename, 12) ; /* Extensin: ficheros MAP de 16 bits */ if (strcmp (map->header.magic, M16_MAGIC) == 0) { len = map->header.width * map->header.height * 2 ; map->depth = 16 ; map->palette = 0 ; } else { if (strcmp (map->header.magic, MAP_MAGIC) != 0) fatal_error ("%s: no es un fichero MAP", filename) ; len = map->header.width * map->header.height ; map->depth = 8 ; map->palette = (void *)malloc(PALETTE_SIZE) ; if (gzread (file, map->palette, PALETTE_SIZE) < PALETTE_SIZE) error = 1 ; } gzread (file, &map->n_flags, 2) ; clen = (map->n_flags & F_NCPOINTS) * 4 ; map->cpoints = (Sint16 *)malloc(clen+4) ; map->animation_length = 0 ; map->animation_speed = 50 ; map->frames = 1 ; map->animation = NULL ; if (map->n_flags & F_NCPOINTS) if (gzread (file, map->cpoints, clen) < clen) error = 1 ; if (map->n_flags & F_ANIMATION) { if (gzread (file, &map->frames, 2) < 2) error = 1 ; if (gzread (file, &map->animation_length, 2) < 2) error = 1 ; if (gzread (file, &map->animation_speed, 2) < 2) error = 1 ; clen = 2 * map->animation_length ; map->animation = (Sint16 *)malloc(clen+2) ; if (gzread (file, map->animation, clen) < clen) error = 1 ; len *= map->frames ; } map->data = malloc(len) ; if (gzread (file, map->data, len ) < len ) error = 1 ; gzclose (file) ; if (error) fatal_error ("%s: fichero truncado", filename) ; return map ; } void save_png (const char * filename, MAP * map) { FILE * file = fopen (filename, "wb") ; png_structp png_ptr ; png_infop info_ptr ; png_uint_32 k, i ; png_bytep *rowpointers ; png_colorp palette ; Uint32 * data, * ptr ; Uint16 * orig ; if (!file) fatal_error ("%s: error al crear", filename) ; rowpointers = malloc( sizeof(png_bytep) * map->header.height ); if ( !rowpointers ) { fclose(file) ; return ; } png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0) ; info_ptr = png_create_info_struct (png_ptr) ; if (!png_ptr || !info_ptr) { free ( rowpointers ) ; fatal_error ("Sin memoria") ; } if (setjmp(png_ptr->jmpbuf)) { free ( rowpointers ) ; fclose (file) ; png_destroy_write_struct (&png_ptr, NULL) ; fatal_error ("%s: error al escribir", filename) ; } png_init_io (png_ptr, file) ; if (map->depth == 8) { png_set_IHDR (png_ptr, info_ptr, map->header.width, map->header.height, 8, PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE) ; palette = (png_colorp) png_malloc (png_ptr, 256*sizeof(png_color)) ; if (!palette) { free ( rowpointers ) ; fclose (file); fatal_error ("Sin memoria") ; } for (k = 0 ; k < 256 ; k++) { palette[k].red = map->palette[k*3]*4 ; palette[k].green = map->palette[k*3+1]*4 ; palette[k].blue = map->palette[k*3+2]*4 ; } png_set_PLTE (png_ptr, info_ptr, palette, 256) ; png_write_info (png_ptr, info_ptr) ; for (k = 0 ; k < map->header.height ; k++) rowpointers[k] = (Uint8 *)map->data + map->header.width*k ; png_write_image (png_ptr, rowpointers) ; free (info_ptr->palette) ; info_ptr->palette = NULL ; } else { png_set_IHDR (png_ptr, info_ptr, map->header.width, map->header.height, 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE) ; png_write_info (png_ptr, info_ptr) ; data = malloc (map->header.width * map->header.height * map->frames * 4) ; if (!data) { free ( rowpointers ) ; fclose (file); fatal_error ("Sin memoria") ; } for (k = 0 ; k < map->header.height ; k++) { ptr = data + map->header.width * k ; orig = (Uint16 *)map->data + map->header.width * map->frames * k ; rowpointers[k] = (Uint8 *)ptr ; for (i = 0 ; i < map->header.width ; i++) { if (*orig == 0) *ptr = 0x00000000 ; else *ptr = ((*orig & 0xf800) >> 8) | ((*orig & 0x07e0) << 5) | ((*orig & 0x001f) << 19)| 0xFF000000 ; orig++ ; ptr++ ; } } png_write_image (png_ptr, rowpointers) ; free (data) ; data = NULL ; } png_write_end (png_ptr, info_ptr) ; free ( rowpointers ) ; fclose (file); printf (" => %s\n", filename) ; } int png_code = 1 ; MAP * load_png (const char * filename) { MAP * bitmap ; unsigned int n, x ; int k ; Uint16 * ptr ; Uint32 * orig ; Uint32 * row ; FILE * png ; png_bytep *rowpointers ; png_structp png_ptr ; png_infop info_ptr, end_info ; png_uint_32 width, height, rowbytes ; png_colorp palette ; int depth, color ; bitmap = load_gif (filename) ; if (bitmap) return bitmap ; /* Abre el fichero y se asegura de que screen est inicializada */ png = fopen (filename, "rb") ; if (!png) fatal_error ("No existe %s\n", filename) ; /* Prepara las estructuras internas */ png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0) ; if (!png_ptr) fatal_error ("Error al cargar PNG") ; info_ptr = png_create_info_struct (png_ptr) ; end_info = png_create_info_struct (png_ptr) ; if (!info_ptr || !end_info) fatal_error ("Error al cargar PNG") ; /* Rutina de error */ if (setjmp (png_ptr->jmpbuf)) { png_destroy_read_struct (&png_ptr, &info_ptr, &end_info) ; fclose (png) ; return 0 ; } /* Recupera informacin sobre el PNG */ png_init_io (png_ptr, png) ; png_read_info (png_ptr, info_ptr) ; png_get_IHDR (png_ptr, info_ptr, &width, &height, &depth, &color, 0, 0 , 0) ; row = malloc( sizeof(Uint32) * width ); if ( !row ) { fclose (png) ; return 0 ; } rowpointers = malloc( sizeof(png_bytep) * height ); if ( !rowpointers ) { fclose (png) ; free ( row ) ; return 0 ; } if (color == PNG_COLOR_TYPE_GRAY || color == PNG_COLOR_TYPE_GRAY_ALPHA) fatal_error ("No se soportan PNG en escala de grises") ; /* Configura los distintos modos disponibles */ if (depth < 8) png_set_expand(png_ptr) ; if (depth == 16) png_set_strip_16(png_ptr) ; if (color == PNG_COLOR_TYPE_RGB) png_set_filler (png_ptr, 0xFF, PNG_FILLER_AFTER) ; png_set_bgr(png_ptr) ; /* Recupera el fichero, convirtiendo a 16 bits si es preciso */ rowbytes = png_get_rowbytes (png_ptr, info_ptr) ; bitmap = (MAP *) malloc(sizeof(MAP)) ; if (!bitmap) { fclose (png) ; free ( rowpointers ) ; free ( row ) ; return 0 ; } bitmap->palette = (void *)malloc(PALETTE_SIZE) ; bitmap->data = malloc(width*height*(color == PNG_COLOR_TYPE_PALETTE ? 1:2)) ; bitmap->cpoints = 0 ; bitmap->n_flags = 0 ; bitmap->frames = 1 ; bitmap->header.width = (Uint16) width ; bitmap->header.height = (Uint16) height ; bitmap->header.code = png_code++ ; bitmap->animation_speed = 250 ; strncpy (bitmap->header.name, filename, 32) ; bitmap->header.name[31] = 0 ; if (strchr(bitmap->header.name, '.')) *(strchr(bitmap->header.name, '.')) = 0 ; strncpy (bitmap->filename, bitmap->header.name, 12) ; if (color == PNG_COLOR_TYPE_PALETTE) { memcpy (bitmap->header.magic, MAP_MAGIC, 8) ; bitmap->depth = 8 ; palette = (png_colorp) png_malloc (png_ptr, 256*sizeof(png_color)) ; if (!palette) fatal_error ("Sin memoria") ; png_get_PLTE (png_ptr, info_ptr, &palette, &k) ; for (k-- ; k >= 0 ; k--) { bitmap->palette[k*3] = palette[k].red/4 ; bitmap->palette[k*3+1] = palette[k].green/4 ; bitmap->palette[k*3+2] = palette[k].blue/4 ; } for (n = 0 ; n < height ; n++) rowpointers[n] = ((Uint8*)bitmap->data) + n*width ; png_read_image (png_ptr, rowpointers) ; if (do_zeroc) { char tr[256] ; for (k = 0 ; k < 256 ; k++) if (palette[k].red >= zeroc[0][0] && palette[k].red <= zeroc[1][0] && palette[k].green >= zeroc[0][1] && palette[k].green <= zeroc[1][1] && palette[k].blue >= zeroc[0][2] && palette[k].blue <= zeroc[1][2]) tr[k] = 0 ; else tr[k] = k ; for (n = 0 ; n < height ; n++) for (x = 0 ; x < width ; x++) rowpointers[n][x] = tr[rowpointers[n][x]] ; } } else { memcpy (bitmap->header.magic, M16_MAGIC, 8) ; bitmap->depth = 16 ; ptr = (Uint16*) bitmap->data ; for (n = 0 ; n < height ; n++) { rowpointers[0] = (void *)row ; png_read_rows (png_ptr, rowpointers, 0, 1) ; orig = row ; for (x = 0 ; x < width ; x++) { if (do_zeroc) if (((*orig & 0x0000FF) >> 0) >= zeroc[0][0] && ((*orig & 0x0000FF) >> 0) <= zeroc[1][0] && ((*orig & 0x00FF00) >> 8) >= zeroc[0][1] && ((*orig & 0x00FF00) >> 8) <= zeroc[1][1] && ((*orig & 0xFF0000) >> 16) >= zeroc[0][2] && ((*orig & 0xFF0000) >> 16) <= zeroc[1][2]) *orig = 0x00000000 ; if ((*orig) & 0x80000000) { *ptr = ((*orig & 0x0000F8) >> 3)| ((*orig & 0x00FC00) >> 5)| ((*orig & 0xF80000) >> 8) ; if (!*ptr) (*ptr)++ ; } else *ptr = 0 ; ptr++, orig++ ; } } } /* Fin */ png_read_end (png_ptr, 0) ; fclose (png) ; free ( rowpointers ) ; free ( row ) ; return bitmap ; } void free_map (MAP * map) { if (map->depth == 8 && map->palette) free (map->palette) ; if (map->n_flags & F_NCPOINTS) free (map->cpoints) ; free (map->data) ; free (map) ; } void data_notrans (MAP * map) { int n = map->header.width * map->header.height * map->frames ; Uint8 * palette = map->palette ; if (map->depth == 16) { Uint16 * ptr = (Uint16 *) map->data ; while (n--) { if (*ptr == 0) *ptr = 1 ; ptr++ ; } } else if (map->palette) { Uint8 * ptr = (Uint8 *) map->data ; int i, b = 1, bc, c ; bc = palette[3] + palette[4] + palette[5] ; for (i = 1 ; i < 256 ; i++) { c = palette[i*3] + palette[i*3+1] + palette[i*3+2] ; if (c < bc) bc = c, b = i ; } while (n--) { if (*ptr == 0) *ptr = b ; ptr++ ; } } } Uint16 * data_8to16 (Uint8 * palette, Uint8 * data, int len) { Uint16 convert[256] ; Uint16 * buffer, * ptr ; int n, r, g, b ; buffer = (Uint16 *) malloc (len * 2) ; if (!buffer) fatal_error ("Error: sin memoria") ; for (n = 1 ; n < 256 ; n++) { r = ((palette[n*3] >> 1) << 11) ; g = (palette[n*3+1] << 5) ; b = (palette[n*3+2] >> 1) ; assert ((r & 0xF800) == r) ; assert ((g & 0x07E0) == g) ; assert ((b & 0x001F) == b) ; convert[n] = (r|g|b) ; if (convert[n] == 0) convert[n]++ ; } convert[0] = 0 ; for (n = 0, ptr = buffer ; n < len ; n++) { *ptr++ = convert[*data++] ; } return buffer ; } void convert_map (MAP * map) { Uint16 * data ; int len ; if (map->depth == 16) return ; len = map->header.width * map->header.height * map->frames ; data = data_8to16 (map->palette, map->data, len) ; free (map->data) ; map->data = data ; memcpy (map->header.magic, M16_MAGIC, 8) ; map->depth = 16 ; } void save_pal (const char * filename, char * palette) { FILE * file = fopen (filename, "wb") ; if (!file) fatal_error ("%s: error al crear", filename) ; fwrite (PAL_MAGIC, 8, 1, file) ; fwrite (palette, PALETTE_SIZE, 1, file) ; fclose (file) ; printf (" => %s\n", filename) ; } char * load_pal (const char * filename) { gzFile * file = gzopen (filename, "rb") ; char header[8] ; char * here = malloc (PALETTE_SIZE) ; if (!file) fatal_error ("%s: fichero no existente", filename) ; if (!here) fatal_error ("Sin memoria") ; gzread (file, header, 8) ; if (strcmp (header, MAP_MAGIC) == 0) gzseek (file, 48, SEEK_SET) ; else if (strcmp (header, FPG_MAGIC) != 0 && strcmp (header, FNT_MAGIC) != 0 && strcmp (header, PAL_MAGIC) != 0) fatal_error ("%s: no es un fichero de paleta vlido", filename) ; gzread (file, here, PALETTE_SIZE) ; gzclose (file) ; return here ; } void list_map (const char * filename, MAP * map, int verbose) { int i ; char buffer[32], name[36] = "" ; memcpy (buffer, map->header.name, 31) ; buffer[31] = 0 ; if (buffer[0]) sprintf (name, "\"%s\" ", buffer) ; printf ("%s: %s%dx%d pixels (%d bits)", filename, name, map->header.width, map->header.height, map->depth) ; if (verbose) { printf ("\n") ; for (i = 0 ; i < (map->n_flags & F_NCPOINTS) ; i++) { if (map->cpoints[2*i] == -1 && map->cpoints[2*i+1] == -1) continue ; if (i == 0) printf (" centro: ") ; else printf (" pto%3d: ", i) ; printf ("%3d,%-3d\n", map->cpoints[2*i], map->cpoints[2*i+1]) ; } if (map->n_flags & F_ANIMATION) { printf (" %d frames (%dms): ", map->frames, map->animation_speed) ; for (i = 0 ; i < map->animation_length ; i++) printf ("%3d", map->animation[i]) ; printf ("\n") ; } } } void set_cpoint (MAP * map, int no, int x, int y) { int n ; if (!map->cpoints) { map->cpoints = (Sint16 *) malloc(4*(no+1)) ; for (n = 0 ; n < no ; n++) map->cpoints[n*2] = map->cpoints[n*2+1] = -1 ; map->n_flags = ((map->n_flags & ~F_NCPOINTS) | (no+1)) ; } else if ((map->n_flags & F_NCPOINTS) < no+1) { map->cpoints = (Sint16 *) realloc(map->cpoints, 4*(no+1)) ; for (n = (map->n_flags & F_NCPOINTS) ; n < no ; n++) map->cpoints[n*2] = map->cpoints[n*2+1] = -1 ; map->n_flags = ((map->n_flags & ~F_NCPOINTS) | (no+1)) ; } map->cpoints[no*2] = x ; map->cpoints[no*2+1] = y ; } /* ----------------------------------------------------------------- */ void parse_rgbrange (char * text, Uint16 * range) { Uint16 n = 0, *c = range ; while (*text && !isdigit(*text)) text++ ; while (*text && n < 6) { *c = atoi(text) ; while (isdigit(*text)) text++ ; while (*text && !isdigit(*text)) text++ ; n++, c++ ; } if (n == 3) { range[3] = range[0] ; range[4] = range[1] ; range[5] = range[2] ; } printf ("Rango de color: #%02X%02X%02X - #%02X%02X%02X\n", range[0], range[1], range[2], range[3], range[4], range[5]) ; } void parse_coords (char * text, int * x, int * y) { char * comma ; if (!*text) { *x = *y = -1 ; return ; } comma = strchr (text, ',') ; if (!comma) fatal_error ("Se requieren dos coordenadas") ; *x = atoi(text) ; *y = atoi(comma+1) ; if (*x < 0 || *y < 0) fatal_error ("Coordenadas incorrectas") ; } void parse_animation (char * text, MAP * map) { Sint16 frames[1024], n_frames = 0, max_frame = 1 ; if (map->animation) { free (map->animation) ; map->animation = NULL ; map->header.width *= map->frames ; map->frames = 1 ; } while (isspace(*text)) text++ ; while (n_frames < 1024 && isdigit(*text)) { frames[n_frames] = atoi(text) ; if (frames[n_frames] < 1) frames[n_frames] = 1 ; if (frames[n_frames] > max_frame) max_frame = frames[n_frames] ; n_frames++ ; text = strchr (text, ',') ; if (!text) break ; text++ ; while (isspace(*text)) text++ ; } if (!n_frames) { map->n_flags &= ~F_ANIMATION ; return ; } map->n_flags |= F_ANIMATION ; map->frames = max_frame ; map->animation_length = n_frames ; map->animation = (Sint16 *) malloc(n_frames * 2) ; memcpy (map->animation, frames, n_frames * 2) ; if ((map->header.width / map->frames) * map->frames != map->header.width) fatal_error ("El ancho no es mltiplo de %d\n", map->frames) ; map->header.width /= map->frames ; } void do_command (char * command, MAP * map) { char * equal ; char name[128] ; char param[128] ; int x, y ; equal = strchr (command, '=') ; if (!equal) equal = strchr (command, ':') ; if (!equal) fatal_error ("Comando '%s' sin signo '='\n", command) ; strncpy (name, command, 128) ; name[equal-command] = 0 ; strncpy (param, equal+1, 128) ; param[127] = 0 ; if (strcmp (name, "name") == 0) { strncpy (map->header.name, param, 31) ; } else if (strcmp (name, "center") == 0) { parse_coords (param, &x, &y) ; set_cpoint (map, 0, x, y) ; } else if (strcmp (name, "animation") == 0) { parse_animation (param, map) ; } else if (strcmp (name, "id") == 0) { map->header.code = atoi(param) ; } else if (strcmp (name, "speed") == 0) { map->animation_speed = atoi(param) ; } else if (*name >= '0' && *name <= '9') { parse_coords (param, &x, &y) ; set_cpoint (map, atoi(name), x, y) ; } else fatal_error ("Comando '%s' desconocido", command) ; } void do_commands (MAP * map) { int i ; for (i = 0 ; i < n_commands ; i++) do_command (commands[i], map) ; } /* ----------------------------------------------------------------- */ int main (int argc, char ** argv) { int i ; char * ptr ; char filename[MAXPATH] ; MAP * map ; for (i = 1 ; i < argc ; i++) { if (argv[i][0] == '+') { if (n_commands == 256) fatal_error ("Demasiados comandos") ; commands[n_commands++] = argv[i]+1 ; if (argc > i) memcpy (&argv[i], &argv[i+1], sizeof(char *) * (argc-i)) ; argc--, i-- ; } else if (argv[i][0] == '-') { ptr = argv[i] + 1 ; while (*ptr) if (isdigit(*ptr)) { policy = strdup ("wb ") ; policy[2] = *ptr++ ; } else switch (tolower(*ptr++)) { case 'p': action = AC_PALETTE ; break ; case 'c': action = AC_16BITS ; break ; case 's': action = AC_UPDATE ; break ; case 'm': action = AC_TO_MAP ; break ; case 'g': action = AC_TO_PNG ; break ; case 'l': action = AC_LIST ; break ; case 'n': action = AC_NOTRANS ; break ; case 'h': help() ; return -1 ; case 'z': do_zeroc = 1 ; parse_rgbrange (ptr, (Uint16*)&zeroc) ; while (*ptr) ptr++ ; break ; default: fatal_error ("Error: opcin -%c no reconocida\n", *ptr) ; } if (argc > i) memcpy (&argv[i], &argv[i+1], sizeof(char *) * (argc-i)) ; argc-- ; i-- ; } } if (argc <= 1) { help() ; exit(0) ; } switch (action) { case AC_LIST: for (i = 1 ; i < argc ; i++) { map = load_map (argv[i]) ; if (!map) continue ; if (n_commands) { do_commands (map) ; list_map (argv[i], map, 1) ; save_map (argv[i], map) ; } else list_map (argv[i], map, 1) ; free_map (map) ; } break ; case AC_PALETTE: for (i = 1 ; i < argc ; i++) { map = load_map (argv[i]) ; if (!map) continue ; list_map (argv[i], map, 0) ; if (map->depth != 8) fatal_error (": No contiene ninguna paleta") ; set_extension (argv[i], ".pal", filename) ; save_pal (filename, map->palette) ; free_map (map) ; } break ; case AC_16BITS: for (i = 1 ; i < argc ; i++) { map = load_map (argv[i]) ; if (!map) continue ; do_commands(map) ; list_map (argv[i], map, 0) ; convert_map (map) ; save_map (argv[i], map) ; free_map (map) ; } break ; case AC_NOTRANS: for (i = 1 ; i < argc ; i++) { map = load_map (argv[i]) ; if (!map) continue ; list_map (argv[i], map, 1) ; do_commands(map) ; data_notrans(map) ; save_map (argv[i], map) ; free_map (map) ; } break ; case AC_UPDATE: for (i = 1 ; i < argc ; i++) { map = load_map (argv[i]) ; if (!map) continue ; do_commands(map) ; list_map (argv[i], map, 1) ; save_map (argv[i], map) ; free_map (map) ; } break ; case AC_TO_MAP: for (i = 1 ; i < argc ; i++) { map = load_png (argv[i]) ; if (!map) continue ; do_commands(map) ; list_map (argv[i], map, 1) ; set_extension (argv[i], ".map", filename) ; save_map (filename, map) ; free_map (map) ; } break ; case AC_TO_PNG: for (i = 1 ; i < argc ; i++) { map = load_map (argv[i]) ; if (!map) continue ; do_commands(map) ; list_map (argv[i], map, 0) ; set_extension (argv[i], ".png", filename) ; save_png (filename, map) ; free_map (map) ; } break ; } exit(0); } Fenix/map/Makefile0000644000000000000000000003005310607744630013052 0ustar rootroot# Makefile.in generated by automake 1.7.1 from Makefile.am. # map/Makefile. Generated from Makefile.in by configure. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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. srcdir = . top_srcdir = .. pkgdatadir = $(datadir)/fenix pkglibdir = $(libdir)/fenix pkgincludedir = $(includedir)/fenix top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /bin/install -c 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 = i686-pc-mingw32 host_triplet = i686-pc-mingw32 target_triplet = i686-pc-mingw32 ACLOCAL = ${SHELL} /c/Fenix/missing --run aclocal-1.7 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /c/Fenix/missing --run tar AUTOCONF = ${SHELL} /c/Fenix/missing --run autoconf AUTOHEADER = ${SHELL} /c/Fenix/missing --run autoheader AUTOMAKE = ${SHELL} /c/Fenix/missing --run automake-1.7 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -O3 -finline-functions -ffast-math -I/usr/local/include COMMON_CFLAGS = -I/usr/local/include -DTARGET_Win32 -DWIN32 -D_WIN32 COMMON_LIBS = -L/usr/local/lib -lz -lshlwapi CPP = gcc -E CPPFLAGS = CYGPATH_W = echo DEFS = -DPACKAGE_NAME=\"fenix\" -DPACKAGE_TARNAME=\"fenix\" -DPACKAGE_VERSION=\"0.92a\" -DPACKAGE_STRING=\"fenix\ 0.92a\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"fenix\" -DVERSION=\"0.92a\" -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 DEPDIR = .deps DO_FPG = DO_FPG_FALSE = # DO_FPG_TRUE = DO_FXC = DO_FXC_FALSE = # DO_FXC_TRUE = DO_FXI = DO_FXI_FALSE = # DO_FXI_TRUE = DO_MAP = DO_MAP_FALSE = # DO_MAP_TRUE = ECHO_C = ECHO_N = -n ECHO_T = EGREP = grep -E EXEEXT = .exe HAVE_WINDRES_FALSE = # HAVE_WINDRES_TRUE = INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s LDFLAGS = LIBOBJS = LIBS = -L/usr/local/lib LTLIBOBJS = MAINT = # MAINTAINER_MODE_FALSE = MAINTAINER_MODE_TRUE = # MAKEINFO = ${SHELL} /c/Fenix/missing --run makeinfo OBJEXT = o PACKAGE = fenix PACKAGE_BUGREPORT = PACKAGE_NAME = fenix PACKAGE_STRING = fenix 0.92a PACKAGE_TARNAME = fenix PACKAGE_VERSION = 0.92a PATH_SEPARATOR = : SDL_CFLAGS = -I/usr/local/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main SDL_CONFIG = /usr/local/bin/sdl-config SDL_LIBS = -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows SET_MAKE = SHELL = /bin/sh STRIP = VERSION = 0.92a WINDRES = windres ac_ct_CC = gcc ac_ct_STRIP = ac_ct_WINDRES = windres am__fastdepCC_FALSE = # am__fastdepCC_TRUE = am__include = include am__quote = bindir = ${exec_prefix}/bin build = i686-pc-mingw32 build_alias = build_cpu = i686 build_os = mingw32 build_vendor = pc datadir = ${prefix}/share exec_prefix = ${prefix} host = i686-pc-mingw32 host_alias = host_cpu = i686 host_os = mingw32 host_vendor = pc includedir = ${prefix}/include infodir = ${prefix}/info install_sh = /c/Fenix/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localstatedir = ${prefix}/var mandir = ${prefix}/man oldincludedir = /usr/include prefix = /usr/local program_transform_name = s,x,x, sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com sysconfdir = ${prefix}/etc target = i686-pc-mingw32 target_alias = target_cpu = i686 target_os = mingw32 target_vendor = pc bin_PROGRAMS = map INCLUDES = $(COMMON_CFLAGS) map_LDADD = $(COMMON_LIBS) -lz -lungif -lpng SOURCE_FILES = map.c map_SOURCES = $(SOURCE_FILES) map_resource.rc #map_SOURCES = $(SOURCE_FILES) subdir = map mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = bin_PROGRAMS = map$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__map_SOURCES_DIST = map.c map_resource.rc am__objects_1 = map.$(OBJEXT) am_map_OBJECTS = $(am__objects_1) \ map_resource.$(OBJEXT) #am_map_OBJECTS = $(am__objects_1) map_OBJECTS = $(am_map_OBJECTS) map_DEPENDENCIES = map_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles DEP_FILES = ./$(DEPDIR)/map.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(am__map_SOURCES_DIST) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(map_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj .rc $(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu map/Makefile Makefile: # $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) map$(EXEEXT): $(map_OBJECTS) $(map_DEPENDENCIES) @rm -f map$(EXEEXT) $(LINK) $(map_LDFLAGS) $(map_OBJECTS) $(map_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c include ./$(DEPDIR)/map.Po distclean-depend: -rm -rf ./$(DEPDIR) .c.o: if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ fi # source='$<' object='$@' libtool=no \ # depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ fi # source='$<' object='$@' libtool=no \ # depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ # $(CCDEPMODE) $(depcomp) \ # $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'` uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(PROGRAMS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-depend distclean-generic distclean-tags distdir dvi \ dvi-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am .rc.o: $(WINDRES) $< -I../../include -o $@ # 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: Fenix/missing0000644000000000000000000002403610607526674012243 0ustar rootroot#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 Fenix/mkinstalldirs0000644000000000000000000000370410607526674013451 0ustar rootroot#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here Fenix/NEWS0000644000000000000000000005320010607745100011324 0ustar rootroot0.92a - Fix para evitar reentradas dentro de la funcion bitmap_16bits_conversion, llamada por gr_init (set_mode) - Correccion substr, por incorrecto calculo con negativos. 0.92 - Fix en prototipo de funciones que devuelve punteros. - Se optimiza funcion unload_map. - Se agrega chequeo de NULL en funcion bitmap_get. - Se corrige soporte de archivos fli/flc. - Los ejecutables vuelven a tener iconos. - Se corrige caidas provocadas por descarga de fuentes, ahora si se descarga un fuente en uso, el texto que lo usa es eliminado limpiamente. - Se corrige comportamiento de funcion SUBSTR. - Se agregan las siguientes funciones: CD_NUMTRACKS(cdnumber) - Devuelve la cantidad de tracks disponibles en el CD especificado. CD_CURRTRACK(cdnumber) - Nro de la pista actual. - Se agrega control de parametros invalidos en las funciones de CD, esto provocaba cuelgues. - Se corrige operacionesn de rotacion de bits, para darle soporte a los distintos tipos de datos SIGNED/UNSIGNED. - Se reeimplementa operaciones con fixed (punto flotante), se mejora performance y precision. Afecta a comandos tipo ADVANCE y de modo7. - Se corrige funciones ADVANCE, donde en ocaciones si la distancia era 1, no avanzaba. (Esta relacionado con el punto de "operaciones con fixed") - Se corrige y completa soporte de mapas animados. - Se corrige refresco de pantalla en operaciones que actualizan los blendop. - Se corrige refresco de pantalla al actualizar, cargar o cualquier otra operacion sobre las paletas. - Correcciones varias en refresco de pantalla. - Se corrige operaciones asociadas con fade. (Paleta) - Se quitaron varios errores criticos y ahora algunas funciones que antes hacian abortar el programa, ahora hacen uso del retorno de error. - Se corrige valores retornados por la funcion GET_REAL_POINT cuando el punto de control en cuestion no esta definido. - Se corrige falta de refresco cuando se modifica el tamano de una region. - PUT_SCREEN no aborta la ejecucion si se quiere usar un mapa inexistente. - Se reescribe y corrige funcion FILTER. - Se reescribe y corrige funcion BLUR. - GRAYSCALE no aborta la ejecucion si se quiere usar un mapa diferente a 16 bits de profundidad de color. - Se agrega funcion MEMCMP(pointer addr1, pointer addr2, int size), para comparar areas de memoria, y retorna 0 si son iguales o distinto de 0 si son diferentes. - Se trimean lineas de debug (trace de ejecucion o debug a archivo) - Se corrige inicializaciones en funcion instance_new y se corrige logica de instance_duplicate, esto afectaba al comando CLONE, y provocaba cuelgues aleatorios - Se agregan a la consola de debug los comandos KILLALL, WEAKUPALL, SLEEPALL, FREEZEALL. - Se corrige creacion, borrado y movimientos de primitivas draw, causado en un mal manejo de asignacion y borrado. Provocaba que aparezcan draws eliminados o que se eliminen draws que no se deseaba. 0.91 - Anuncia error de compilacion ante uso de operacion de modulo con datos flotantes - Agregado de mnomicos para operaciones de modulo con unsigned word, unsigned byte y unsigned. - Fix a problema que requeria especificar tipo de dato en inicializacion de array. (Generico) - Correccion y optimizacion de funciones QUICKSORT, KSORT, SORT (en todas sus formas) - Se corrige copy de estructuras, se cambia el prototipo de la funcion #COPY#, se le agrega un parametro que define la cantidad de ocurrencias (array) de la structura - Se corrige inicializacion de segmentos float en structura o array de structura, antes no eran tomados dichos valores. - Se corrige inicializacion arrays de structs sin dimension (dimensionado automatico) - Se agregan constantes SEEK_SET, SEEK_CUR y SEEK_END - Correccion en problema de dibujado de procesos, al no detectar bien el estado del mismo - Correcciones varias en el manejo de estructuras - Nuevos comandos en la consola de debug: DOFRAME Continua la ejecucion de todos los procesos, hasta el siguiente frame y retorna a la consola de debug RUN proc [args] Ejecuta un proceso KILL proc Elimina un proceso WEAKUP proc Despierta un proceso SLEEP proc Duerme un proceso FREEZE proc Congela un proceso 0.90.2 - Evento ONEXIT, permite especificar codigo que se ejecuta cuando un proceso muere o termina - Se reescribio y mejoro forma de ejecucion de funciones/procesos. El funcionamiento es el siguiente: 1) Los procesos y las funciones congelan al padre o proceso/funcion llamador. 2) FRAME despierta al padre solo en los casos de procesos. 3) FRAME en las funciones no despierta al padre. (Atencion a esto, porque cambia el funcionamiento actual) 4) END, RETURN o fin de proceso/funcion, liberan al padre, tanto en procesos como funciones. 5) Al morir un proceso se ejecuta el evento ONEXIT, el proceso queda en estatus DEAD, si este ejecuta otro proceso o funcion pasa a WAITING_DEAD. 6) No se permite cambiar el estatus (enviar signal) a procesos en estado DEAD. - Se agrego funciones de depurado. En la consola de comandos se agregan: TRACE Ejecuta 1 instruccion y retorna a la consola de comandos. BREAK proc Agrega un breakpoint sobre ejecucion de proc (se pueden especificar instancias o tipos de funcion) BREAK Lista breakpoints definidos DELETE proc Elimina un breakpoint (los breakpoints sobre una instancia determinada se eliminan cuando esta muere) CONTINUE Continua la ejecucion (Simil a ALT+C) - Ahora se puede deslizar el contenido de la ventana de debug a los costados, con CTRL+ - Bugs varios en linux, que producia caidas cuando se actualizaba la paleta despues de un segundo set_mode, y entraba en la funcion gr_blit_rotate. - Operadores logicos AND y OR, ahora tienen funcionalidad logica completa, esto significa que si la primera expresion (izquierda) define el resultado de la expresion completa, las evaluaciones terminan ahi. (compilador) - Se corrigio tratamiento de punteros en expresiones logicas y binarias (compilador) - Soporte de mnomico JTRUE (compilador) - Agregado de mnomicos JTFALSE y JTTRUE (compilador+interprete) (Jmp Test..., no haces descarga del stack del valor testeado) - Solucionado el problema donde era necesario especificar STRING en inicializacion de array no tipificado conteniendo STRINGS. - WAITING es un bitflag, sobre cualquier estado y significa que el proceso esta esperando retorno de otro proceso. 0.90 - Soporte de BLEND en graficos rotados - Fix de primitivo (0.84b) bug en rotado y escalado que hacia caer el proceso en ciertos casos - Fix de bug en compilador donde si se usa 0ffffffffh, el compilador lo interpretaba como 08000000h. - Algunos chequeos extra en funciones de font. - Soporte de blend, alpha, stipple, etc. en funcion draw_circle - Distincion entre operadores logicos y bitwise, ahora los operadores son: * Logicos: and && or || xor ^^ not ! * Bitwise band & bor | bxor ^ bnot ~ - Ahora las condiciones true son valores distinto de 0, y false igual a 0 (como Dios manda) - Bug fix en capa de reproduccion de cd, que tras inicializacion de la libereria de sonido (ejecucion de cualquier funcion de sonido, no cd) el sistema de cd dejaba de funcionar... - Signals instantaneos sobre el padre, si son efectuados desde un hijo - Bug fix en declare de variables para referenciar publicas - Correccion en primitivas draw_circle y draw_fcircle donde sobredibujaban algunas lineas y puntos. - Fix funcion glob, para corregir error de duplicacion de primera entrada e informacion del path del archivo - Correccion en asignacion de valores en la declaracion de variables sin tipo (INT) - Correcciones minimas en compilador - Correccion de bug en funciones que contienen frame y el valor de retorno es descartado. Error "Stack Overflow!" - Correccion en set_glyph, donde no setea valores default de avance si el bitmap adicionado no tenia puntos de control - Fix en funciones de informacion de memoria disponible y total, se les cambio el prototipo, ahora devuelven INT - Correccion en funcion file_gets - Se quitaron muchos warnings de compilacion que en algunos casos podrian ser errores graves en momento de ejecucion - Se agrego variable SHOW_COLOR en consola de debug, el valor permitido es un color RGB - Se agrego expresiones mas complejas tanto en asignacion de valores a variables de consola, como a expresiones en la misma. - Ahora es posible escribir en la consola valores (segun la terminacion del numero) en hexadecimal(h), decimal, binario(b) u octal(o). - Correccion en ventana de informacion de profile, que faltaba 1 dato de los 4 que se esperaba. 0.89d - Correccion formula de blend subtractivo - Correccion en funciones MKDIR, CD - Correccion en alt+w en modo debug cuando la pantalla se inicia en fullscreen por medio de la variable full_screen - Correccion en el rotado y escalado de mapas - Ahora alt+x en debug, sale inmediatamente 0.89c - Algunos chequeos extra en funciones con sonido, para evitar caidas ante paso de valores invalidos. - Se corrige problema con carga de musicas formatos mod. - Se agrega funcion GETENV() - EXIT() sale inmediatamente. - Se corrige funcion graphic_set, en el centrado de coordenadas (punto de control 0). - Se corrige problema con blend (subtractive), se restaban al revez. - Se incluyen constantes, para usar como flags en map_xput y afines: B_HMIRROR 1 B_VMIRROR 2 B_TRANSLUCENT 4 B_ALPHA 8 B_ABLEND 16 B_SBLEND 32 B_NOCOLORKEY 128 0.89b - Correccion en prototipado de procesos/funciones - Correcciones varias en mecanismo de scroll - Habilitado funcion "move_scroll()" - Correccion de apertura de archivos en Windows Vista 0.89a - Correccion en compilacion con punteros a structuras - Correccion en consola de debug al querer mostar idproce.variable[indice] - Algunos aspectos esteticos en la consola de debug (colores en help y otras cosas) que habia quitado por error. 0.89 - Se corrije y se deja funcional todo el esquema de stub. - Se agrega inicializacion de la SDL en el compilador, antes no lo hacia, entonces no se guardaban los datos segun byteorder. - Correccion en visualizacion de arrays en consola de debug. - Fix general al modulo files, para carga de archivos. - Modificacion del sound.c para dar soporte a carga desde un archivo stub de los sonidos SDL. (Tambien usada ahora para archivos comunes) - Se corrigen byteorder en algunos cuantos datos. - Se quita limite de tamano en carga y grabacion de png. - Se corrige bug en grabacion de strings a archivos. - Se agrega variable de consola de debug "FILES" que muestra la cantidad de archivos en uso (abiertos). - Correccion de bug en acceso/operacion con variables locales, publicas y privadas, lo que provocaba extranos comportamientos con datos tipo BYTE y WORD (y variantes) - Se agrega identificador "DECLARE" que nos permite declarar prototipos de funciones/procesos, con sus variables, antes de su uso. Esto es el punto pendiente que quedaba para completar el sistema de variables publicas. Por ejemplo: /* Declaracion del prototipo */ declare process localvar() public priv1; // Variable Local glob1; // Variable Local private int text1, text2, text3, text4, text5; end end /* Funcion */ process localvar(); /* Si ya se hizo previamente un DECLARE de este proceso no se permiten declarar variables en este punto */ begin loc1=0; glob1=0; while(1); frame();end end - POINTER deja de ser basetype, que hacia que expresiones del tipo "string pointer pointer a, pointer b;" transmitan incrementalmente la cantidad de "pointers" entre cada una de las variables declaradas, el verdadero basetype de la linea ejemplo es "string". 0.88d - Fix assert en compilacion donde las funciones no coinciden en la cantidad de parametros - Si bien no eran necesarias, se agregan las siguientes funciones por cuestion de claridad: LOAD_FPL UNLOAD_FGC UNLOAD_FBM - Posibilidad de cambiar tamao de la consola de debug (Variables de debug: CONSOLE_LINES, CONSOLE_COLUMNS) - Correccion en actualizacion menores de pantalla en 8bits de profundidad - Ahora la consola debug congela toda actualizacion y procesamiento fenix - Ahora la instruccion "DEBUG;" congela inmediatamente la ejecucion, ya no espera al proximo frame. - Se elimino mensaje de aviso "Failed to open message file: msg/en.msg", puesto que no es un error y confunde. 0.88c - Fix en funcion gr_calculate_corners, que hacia que no se actualicen los rects cuando la coordenada dentro del area de dibujo correspondia a 0 para alguno de los ejes x o y. 0.88b - Fix en mnemonicos tipo strings, al acceder a datos de variables de procesos - Fix en informacion de trace de debug - Cambio de logica de apertura de joysticks - Inclusion de tipos de datos incorporados en la version 0.84b que no estaban soportados en algunas funciones - Fix varios en funcion glob() 0.88a - Se corrige problema de rotado y resize con ciertos valores que hacia que en ciertos casos el grafico dibujado sea un triangulo - Se agrega RESOLUTION con valores negativos, que hace que en vez de dividir las coordenadas, las multiplica por el valor indicado - Se agrega a la consola de debug el soporte de asignacion de variables a los tipos de datos faltantes. Ahora el soporte de cambiar valores de variables desde la consola de debug es mas completo. Quedan exentos los tipos de datos POINTER, STRUCT, ARRAY. - Se corrije representacion visual de algunos tipos de datos en consola de debug - Las strings en la consola de debug se pueden especificar tanto con comillas dobles, como con comillas simples. - Se cambia constantes que definen el modo de escalado "SCALE_MODE", ahora: SCALE_NONE desactiva escalado SCALE_SCALE2X actual filtro de escalado 2x (tambien se puede activar usando el flag como hasta ahora en la variable "graph_mode" y la variable SCALE_MODE=SCALE_NONE) SCALE_HQ2X escalado 2x, con filtro hq2x (mayor calidad, menor performance) SCALE_SCANLINE2X escalado 2x, con filtro scanline SCALE_NORMAL2X o SCALE_NOFILTER escalado 2x, sin filtro 0.88 - Se corrige problema de parpadeo graficos causado por problemas en el cambio de las Z en la version 0.87e - Se elimina uso de MessageBox para errores criticos en el interprete (fxi) en windows, por problemas con la SDL, la salida se hace sobre stderr.txt - Se agregan los siguientes filtros de escalado: scale2x, hq2x, scanline2x, normal2x Para esto se agrega una nueva variable global denominada "scale_mode", el simple seteo de esta variable hace que se realice el escalado, los valores posibles de la misma son: SCALE_NOFILTER desactiva escalado SCALE_SCALE2X actual filtro de escalado 2x (tambien se puede activar usando el flag como hasta ahora en la variable "graph_mode") SCALE_HQ2X escalado 2x, con filtro hq2x (mayor calidad, menor performance) SCALE_SCANLINE2X escalado 2x, con filtro scanline SCALE_NORMAL2X escalado 2x, sin filtro NOTA: Si escalado se encuentra activado, ya sea por setear la nueva variable o por usar el flag en "graph_mode", se permite intercambiar de filtros cambiando la variable sin tener que usar set_mode. - Soporte de hasta 32 joysticks (segun plataforma), a las ya conocidas funciones se agregan las siguientes: GET_JOY_BUTTON(joystick, boton) GET_JOY_POSITION(joystick, axis) JOY_BUTTONS(joystick) JOY_AXES(joystick) 0.87e - Se corrige error de interpretacion de orden de las prioridades introducido en la 0.84b, cuando mayor es el valor de la variable "priority" primero se ejecuta el proceso - Ahora si Z cambia, el proceso es considerado en el proximo redibujado (frame) - Normalizacion de funcionalidad BLEND - Se habilita scale2x en MAC y LINUX-PPC - Mode7, se corrige inicializacion de m[...] en start_mode7, lo que provocaba que al volver a usar un mismo mode7 levantaba con los datos anteriores - Se arreglo configure.in para que incluya la lib X11 si esta esta disponible - Se agrego soporte MMX, pero se deshabilito por dar un rendimiento menor al standard sin mmx, y debido a caidas del proceso sin motivo aparente. - Fix fpg_add, no actualizaba contador de puntos de control, con lo que parecia que el nuevo grafico no tenia puntos de control. 0.87d - Se agrega funcion RESERVE_CHANNELS(NChannels) donde NChannels son la cantidad de canales a reservar (desde el 0) devuelve cantidad de canales reservados, -1 si error. - Fix en destroy_instances que hacia que al matar un proceso hijo menor con hijos los hijos no se relacionen bien con sus "nuevo" hermano mayor. - Fix varios de mensajes de debug, y errores graves - Se cambiaron algunas cosas de lugar y se ubicaron en el lugar correcto - Ahora la consola de debug puede ser invocada en el siguiente FRAME usando la sentencia "DEBUG;" en el codigo. - Ahora la consola bloquea la ejecucion de cualquier proceso. - Se agregan nuevos comandos de debug. - Se agrega variable de consola DEBUG la que permite habilitar/deshabilitar el log de debug. 0.87c - Se reescribe todo el sistema de eliminacion de instancias, puestos que no reconstruian bien las estructuras. Algunos bugs mas en el modulo de instancias. - Las signals vuelven a efectivizarse en el mismo frame - Se agregan las siguientes constantes: OS_BSD STATUS_DEAD STATUS_KILLED STATUS_RUNNING STATUS_SLEEPING STATUS_FROZEN STATUS_WAITING - Se corrigio bug en descarga de map/fpg - Se modificaron y emprolijaron opciones de debugging 0.87b - Se agregan 2 nuevas funciones PLAY_WAV(wav pointer, number of loops (-1 infinite loops)[, channel (-1 any channel)]) GET_TIMER(), devuelve un contador timer con precision en milisegundos. - Se corrije funcion move_window 0.87a - Se corrije validaciones para controlar previa declaracion de variables. Ahora se permite declarar variables locales/publicas/privadas dentro de un proceso o funcion con el mismo nombre que las globales. - Se corrije error que impedia inicializar punteros a 0. 0.87 - Se cambia version a 0.87 que deberia haber sido asi a partir de los cambios de variables locales - Vuelve a tener sentido la compilacion con debug - Se agrega ";" como finalizador de expresion IF, debido a que ahora no se usa mas ":" como separador de instrucciones, solo se permite en IF y en WHILE (quizas deberia ser eliminado) 0.86h+ - Se corrije declaraciones de elementos array dentro de una misma linea (separador por comma), puesto que se transformaban en arrays de mas dimensiones... - Fix por caidas en el tiempo al usar delete_text... por falta de chequeo en cadenas nulas... 0.86h 0.86g - Reescritura de la solucion de liberacion de strings en el retorno de una llamada a una funcion. - Se deshizo el cambio de la estructura dcb, pero como ahora se graba cierta info que era opcional, se cambio numero de version del DCB - Ahora la liberacion soporta correctamente, strings, array de strings y STRUCTS con strings 0.86f - Fix en liberacion de strings al usar funciones locales (no instancias) - Nueva version de dcb con almacenado de informacion de tipo de variables privadas (incluidos los argumentos) - Se elimino codigo imnecesario de variables publicas en funciones locales - Ahora las strings staticas se cargan del dcb con contador de uso en 0 y con flag de reservada, para no ser descartadas... (algo muy interno) 0.86e 0.86d 0.86c 0.86b 0.86a 0.86 - Fix de orden de codigos de instrucciones (sysprocs.h, cambio temporal). Cadas si se cargaban dlls con muchas funciones. - Compile_varspace, se elimin parmetros collision1 y collision2, se agreg collision como array, para de esta forma poder incluir X spaces de colisin. - Concepto de variables "pblicas" (locales) por proceso. Esto hace que se puedan definir variables locales para un solo proceso determinado y no para todos los procesos. - Declaracion LOCAL, PUBLIC y PRIVATE, en cualquier orden dentro de un Process y dentro del cuerpo del programa. - Se incorpora nombre de proceso como tipo de dato. Esto sirve para referenciar variables pblicas (y locales), dentro de un proceso de tipo especfico. Es necesario para poder usar la nueva funcionalidad de variables pblicas. El tipo de dato finalmente termina siendo un "int" para mantener compatibilidad. - Se mantiene compatibilidad con LOCAL global. Se pueden definir variables locales comunes a todos los procesos y otras locales por proceso. - Redefinicin de prototipos de funciones en pathfind.c por conflicto con funciones en C - Enable funciones MMX en GNUC - Nuevo formato dcb, se hacen uso de sizeof de las estructuras utilizadas (antes se usaba tamao sumado a mano, muy problemtico) y se agrega las secciones de datos pblicas. - Algunos free de memoria ante ciertos errores en funciones de runtime - Se normaliza el configure, se corrije y se le da soporte para windows - Limpieza en compilacin, se agrego carpetas "obj", donde se compilan los .o y los binarios se dejan en la carpeta "bin" - Ms informacin de debug - Se agrega clasula PUBLICS en la consola de debug - Mejoras varias en el cdigo - Otros bugs menores, que actualmente no recuerdo... :P Limitaciones: Ya que actualmente no se encuentra posibilidad de declarar previamente funciones y sus datos, las variables locales por proceso, solo son visibles a los procesos que se escriben luego del proceso a referenciar. Fenix/README0000644000000000000000000000504010607526660011514 0ustar rootrootFENIX PROJECT 1.0 ================= Instrucciones para poder compilar el proyecto. WIN32 (MinGW) (base para cualquier UNIX) ======================================== El proyecto compila como cualquier versin UNIX. Se necesita los siguientes paquetes (que pueden ser instalados en cualquier directorio del sistema MinGW, solo Win32): MinGW-5.1.0 (mingw-runtime-3.11.tar.gz w32api-3.8.tar.gz binutils-2.15.91-20040904-1.tar.gz gcc-core-3.4.2-20040916-1.tar.gz gcc-g++-3.4.2-20040916-1.tar.gz mingw32-make-3.80.0-3.tar.gz) MSYS-1.0.10.exe (Libs validas tambien para sistemas UNIX) libpng-1.2.12.tar.gz SDL-1.2.11.tar.gz SDL_mixer-1.2.7.tar.gz smpeg-0.4.3.tar.gz zlib-1.2.3.tar.gz NOTAS: Si bien estas son las versiones utilizadas en esta compilacin, cualquier versin de estos paquetes debera funcionar correctamente. Si tenemos instalado MSVC, en la consola MSYS aseguranos de eliminar el seteo de las variables de compilacin del MSVC (INCLUDE, LIB, etc.). Solo en windows: copiar la SDL.dll en el directorio raiz del fenix antes de correr configure. Pasos a seguir para compilar: ./configure --enable-fpg --enable-map make WIN32 (MSVC) (no actualizado a partir de la versin 0.85) ========================================================= El proyecto esta preparado para compilar a partir de una estructura como la siguiente: / | |- FENIX (contenido de este mdulo de CVS) |- SDL (ficheros necesarios de la SDL DEVEL) | |- INCLUDE | |- LIB |- SDL_MIXER (ficheros necesarios de la SDL_MIXER) | |- INCLUDE | |- LIB |- ZLIB (ficheros necesarios de la ZLIB) | |- INCLUDE | |- LIB |- LIBPNG (ficheros necesarios de libpng) |- LIBUNGIF (si quieres compilar MAP.EXE necesitas la LIBUNGIF) Versiones con que se compila actualmente el CVS: SDL 1.2.8 (www.libsdl.org) SDL_MIXER 1.2.6 (www.libsdl.org) ZLIB 1.2.3 (www.zlib.net) LIBPNG 1.2.8 (www.libpng.org) LIBUNGIF 4.0 (http://sourceforge.net/projects/libungif) Se incluyen los ficheros DSW y DSP necesarios para poder compilar en Visual Studio 6 que es el compilador "oficial" de la version win32. Estos ficheros pueden recuperarse desde versiones posteriores de Visual Studio sin problemas. LINUX ===== Ver WIN32 (MinGW), excepto paquetes MinGW y MSYS BEOS ==== Ver WIN32 (MinGW), excepto paquetes MinGW y MSYS MACOS ===== Ver WIN32 (MinGW), excepto paquetes MinGW y MSYS DREAMCAST ========= GP32 ==== Fenix/readme.html0000644000000000000000000001302010607526674012761 0ustar rootroot

README

What is Fenix?

Fenix is an interpreted script programming language, specially designed to develop and execute 2D games. Fenix has a full graphic library, sound engine and full featured 2D game engine, making game developement extremely easy. Fenix major features include:

  • Fast sprite blitting with rotation, scaling, animation and transparency
  • Pixel perfect collision check
  • Native PNG grahpic support
  • Parallax (2 planes) automated scroll routines
  • Multiple clipping regions with or without scroll support
  • MOD/XM/S3M/IT support through MIKMod
  • Keyboard, mouse and joystick controller support
  • 8 and 16 bits per pixel color depths
  • Win32 (all flavours), Linux, BeOS & MacOS X support, experimental support for DC and GP32
  • Basic Pathfind routines
  • Blendops in 16 bit color depth
  • OGG sound support
  • DLL interface for custom extensions
  • Easy to learn language

Fenix language is specially designed for game developement. A PROCESS (or function) can be created as a graphical object on screen. A single change in it's LOCAL variables and a call to FRAME command will almost be enought to have it stay resident in cooperative multitasking mode, moving and interoperating with other PROCESSES as it's variables are changed and the FRAME command is called inside a loop. There's also a set of functions designed to kill, stop, frezze and search for active PROCESSES, also multiple instances of a process can be run at the same time allowing multiple objects with the same behaviour on screen at the same time.

Even experienced coders will find in Fenix a practical tool. The language is powerful enough to match most other script procedural langauge (datatypes, pointers, multidimensional arrays, structs, loop and flow control statements...).

Fenix is distributed under GNU General Public License, so it's source code is available to anyone who wants to get it, extend it or change it in any way fitting his/her own purpose.

Is Fenix a DIV compiler?

DIV Games Studio is a commercial product including an IDE, debugger, profiler, graphic editor and installer. Fenix is only a compiler and an interpreter. Anyway Fenix has many similitudes to DIV and most DIV code will be easy to port thought this is not the main target for Fenix. Remember, Fenix is NOT DIV.

Many similitudes exists betwen DIV and Fenix, but also many incompatibilities exist as well. DIV borrows features to C, Pascal and other languages, as well as Fenix borrows many to DIV. Some old simple DIV games compile almost without a single change in Fenix due to Fenix supporting most of DIV syntax, but keep in mind many functions and internal management in Fenix is not working like it's DIV counterpart, specially Mode 7, string manipulation and DIV 2 MODE8 features (wich Fenix does not implement)

What is the current state for Fenix developement?

Fenix is still under heavy developement. Many bugs are waiting for fix, features come and go and many features are at a very early stage. Current official release is 0.84a.

Even thought not finished, Fenix is stable and powerful enough to allow you a big brand range of developement experience. Give it a try and help us polish and fix the bugs.

It is a good idea to have a look into the bugtrack section in the official website for a list of known bugs and keep an eye in the devel status for new releases (the webiste can be found @ http://fenix.divsite.net)

Where can I get Fenix?

The current official site for Fenix is located @ http://fenix.divsite.net. A CVS and a CVS-documentation site can be found @ http://cvs.jlceb.com and http://fenix.jlceb.com respectively. Fenix has also a sourceforge project, though current state for this project is a bit outdated http://fenix.sourceforge.net/

Who created Fenix?

Fenix is the initial effort of Jose Luis Cebrian, and is currently maintained by the so called Fenix-Team. You can contact the team in the official website.

How to use Fenix?

Fenix is a command line utility. The base package includes a test program... to execute it just type in a console (dos-box, linux console, etc) the following commands

FXC TEST.PRG
FXI TEST.DCB

The first sentence invokes the compiler, the second one invokes the interpreter. If everything goes well the compiler will create the DCB file for the interpreter from the PRG source code. Check the documentation included with the package and in the site for further reference. It is also a good idea to have a look to the FAQs in the site.

Is there any sample game developed with Fenix?

The site has several demo games for you to check and test. Also Fenix has a big user community with a big load of game projects (complete or under developement) that you might find interesting.

So, I am a coder... might I help develop Fenix in any way?

Sure... take your time and have a look into Fenix code. It is a quite not well commented ANSI C and not so ANSI C (sometimes... ) big code.

If you're still in the mood, contact us, get the last CVS and you'll be on the run!

License

This program is only distributable under GNU General Public Licens, version 2.0 or higher.

A License text should have been distributed along this program. If not contact us @ http://fenix.divsite.net.