summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.cvsignore6
-rwxr-xr-xconfig.h.in64
-rwxr-xr-xconfigure.in13
-rw-r--r--src/gui/playerbox.cpp10
-rw-r--r--src/map.cpp4
5 files changed, 18 insertions, 79 deletions
diff --git a/.cvsignore b/.cvsignore
index 0f53aa5e..dda97de5 100755
--- a/.cvsignore
+++ b/.cvsignore
@@ -4,3 +4,9 @@ Makefile.win
tmw
*.dll
*.exe
+config.h.in
+config.h
+config.log
+aclocal.m4
+Makefile
+configure
diff --git a/config.h.in b/config.h.in
deleted file mode 100755
index 92325e5d..00000000
--- a/config.h.in
+++ /dev/null
@@ -1,64 +0,0 @@
-/* config.h.in. Generated from configure.in by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Defines if your system has the LIBSDL library */
-#undef HAVE_LIBSDL
-
-/* Define to 1 if you have the `SDL_image' library (-lSDL_image). */
-#undef HAVE_LIBSDL_IMAGE
-
-/* Define to 1 if you have the `SDL_mixer' library (-lSDL_mixer). */
-#undef HAVE_LIBSDL_MIXER
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
diff --git a/configure.in b/configure.in
index c28be9bb..ff50361a 100755
--- a/configure.in
+++ b/configure.in
@@ -10,11 +10,10 @@ AC_PATH_PROGS(INSTALL, install ginstall, install)
AC_PATH_PROG(CHMOD, chmod, chmod)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(tmw, 0.8.0)
+AM_INIT_AUTOMAKE(tmw, 0.0.9)
AC_LANG_CPLUSPLUS
AC_PROG_CXX
-AM_PROG_LIBTOOL
dnl FIND_PATH(programm-name, variable-name, list of directories,
dnl if-not-found, test-parameter)
@@ -85,15 +84,6 @@ FIND_PATH(sdl-config, LIBSDL_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/loca
if test -n "$LIBSDL_CONFIG"; then
LIBSDL_LIBS="`$LIBSDL_CONFIG --libs` -lSDL_image -lSDL_mixer"
- LIBSDL_RPATH=
- for args in $LIBSDL_LIBS; do
- case $args in
- -L*)
- LIBSDL_RPATH="$LIBSDL_RPATH $args"
- ;;
- esac
- done
- LIBSDL_RPATH=`echo $LIBSDL_RPATH | sed -e "s/-L/-R/g"`
LIBSDL_CFLAGS="`$LIBSDL_CONFIG --cflags`"
AC_DEFINE_UNQUOTED(HAVE_LIBSDL, 1, [Defines if your system has the LIBSDL library])
@@ -103,6 +93,5 @@ fi
AC_SUBST(LIBSDL_LIBS)
AC_SUBST(LIBSDL_CFLAGS)
-AC_SUBST(LIBSDL_RPATH)
AC_OUTPUT(Makefile src/Makefile)
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index 926b8b08..1abeaaa2 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -61,9 +61,13 @@ void PlayerBox::draw(gcn::Graphics *graphics)
playerset->spriteset[0]->draw(screen, x - 25, y - 25);
// Draw his hair
- int hf = hairColor + 40 * (hairStyle);
- if (hf >= 0 && hf < (int)hairset->spriteset.size()) {
- hairset->spriteset[hf]->draw(screen, x + 37, y + 5);
+ if (hairColor >= 0 && hairStyle >= 0 &&
+ hairColor < 10 && hairStyle < 4)
+ {
+ int hf = hairColor + 40 * (hairStyle);
+ if (hf >= 0 && hf < (int)hairset->spriteset.size()) {
+ hairset->spriteset[hf]->draw(screen, x + 37, y + 5);
+ }
}
}
}
diff --git a/src/map.cpp b/src/map.cpp
index d7ccb4d1..c4d9493b 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -79,6 +79,7 @@ Tile::Tile():
{
}
+
Location::Location(int x, int y, Tile *tile):
x(x), y(y), tile(tile)
{
@@ -89,6 +90,7 @@ bool Location::operator< (const Location &loc) const
return tile->Fcost < loc.tile->Fcost;
}
+
Map::Map():
width(0), height(0),
onClosedList(1), onOpenList(2)
@@ -224,6 +226,8 @@ PATH_NODE *Map::findPath(int startX, int startY, int destX, int destY)
Location curr = openList.top();
openList.pop();
curr.tile->whichList = onClosedList;
+
+
}
// Two new values to indicate wether a tile is on the open or closed list,