...
 
Commits (6)
......@@ -612,3 +612,18 @@ Engine:
Development Kit:
* Allow sprite banks larger than 255 images.
----------------------
2.2.2 - Bugfix release
----------------------
Engine:
* Fix MOD playback (fixes intro song of "Out of Order").
* Replace GLEE by GLEW as OpenGL loading library.
* Improved support for Pandora, Raspberry Pi and ODroid (by ptitSeb).
* Fix freeze function when the game window is scaled down.
* Handle https URLs in launch().
* Fix configure.ac to work with Automake 1.15
Development Kit:
* Fix a possible segfault in project manager due to uninitialized variable (Debian bug #880853).
......@@ -25,7 +25,7 @@
#include <glib-object.h>
#include <glib.h>
#include <GLee.h>
#include <GL/glew.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glu.h>
......
......@@ -43,7 +43,6 @@ sludge_spritebankeditor_SOURCES = \
sludge_translationeditor_SOURCES = \
TranslationEditorMain.cpp TranslationEditorMain.h \
SludgeTranslationEditor.cpp SludgeTranslationEditor.h \
SludgeGLApplication.cpp SludgeGLApplication.h \
SludgeApplication.cpp SludgeApplication.h \
Common.cpp Common.h ../source/DevKit/Common/interface.h \
../source/DevKit/TranslationEditor/translator.cpp ../source/DevKit/TranslationEditor/translator.h \
......@@ -144,7 +143,7 @@ EXTRA_DIST = \
../images/floorIcon/floorIcon.ico ../images/zIcon/zIcon.ico \
../images/spriteIcon/spriteIcon.ico ../images/ProjIcon/ProjIcon.ico
AM_CPPFLAGS = -I$(top_srcdir)/source/CommonCode -I$(top_srcdir)/source/DevKit/Common -I$(top_srcdir)/source/DevKit/Compiler -I$(top_srcdir)/source/DevKit/ProjectManager -I$(top_srcdir)/source/DevKit/GraphicalTools -I$(top_srcdir)/source/DevKit/TranslationEditor @GTK_CFLAGS@ @LIBPNG_CFLAGS@
AM_CPPFLAGS = -I$(top_srcdir)/source/CommonCode -I$(top_srcdir)/source/DevKit/Common -I$(top_srcdir)/source/DevKit/Compiler -I$(top_srcdir)/source/DevKit/ProjectManager -I$(top_srcdir)/source/DevKit/GraphicalTools -I$(top_srcdir)/source/DevKit/TranslationEditor @GTK_CFLAGS@ @LIBPNG_CFLAGS@ @GLEW_CFLAGS@
if COND_WIN32
AM_CPPFLAGS += \
......@@ -154,9 +153,9 @@ AM_CPPFLAGS += \
AM_LDFLAGS = \
-Wl,-subsystem,windows
sludge_floormaker_LDADD = FloorMakerResources.o @GTK_LIBS@ @LIBPNG_LIBS@ @GLEE_LIBS@
sludge_zbuffermaker_LDADD = ZBufferMakerResources.o @GTK_LIBS@ @LIBPNG_LIBS@ @GLEE_LIBS@
sludge_spritebankeditor_LDADD = SpriteBankEditorResources.o @GTK_LIBS@ @LIBPNG_LIBS@ @GLEE_LIBS@
sludge_floormaker_LDADD = FloorMakerResources.o @GTK_LIBS@ @LIBPNG_LIBS@ @GLEW_LIBS@
sludge_zbuffermaker_LDADD = ZBufferMakerResources.o @GTK_LIBS@ @LIBPNG_LIBS@ @GLEW_LIBS@
sludge_spritebankeditor_LDADD = SpriteBankEditorResources.o @GTK_LIBS@ @LIBPNG_LIBS@ @GLEW_LIBS@
sludge_translationeditor_LDADD = TranslationEditorResources.o @GTK_LIBS@ @LIBPNG_LIBS@
sludge_projectmanager_LDADD = ProjectManagerResources.o @GTK_LIBS@ @LIBPNG_LIBS@
else
......@@ -164,9 +163,9 @@ AM_CPPFLAGS += \
-std=c++0x \
-DDATADIR='"$(pkgdatadir)/"'
sludge_floormaker_LDADD = @GTK_LIBS@ @LIBPNG_LIBS@ @GLEE_LIBS@
sludge_zbuffermaker_LDADD = @GTK_LIBS@ @LIBPNG_LIBS@ @GLEE_LIBS@
sludge_spritebankeditor_LDADD = @GTK_LIBS@ @LIBPNG_LIBS@ @GLEE_LIBS@
sludge_floormaker_LDADD = @GTK_LIBS@ @LIBPNG_LIBS@ @GLEW_LIBS@
sludge_zbuffermaker_LDADD = @GTK_LIBS@ @LIBPNG_LIBS@ @GLEW_LIBS@
sludge_spritebankeditor_LDADD = @GTK_LIBS@ @LIBPNG_LIBS@ @GLEW_LIBS@
sludge_translationeditor_LDADD = @GTK_LIBS@ @LIBPNG_LIBS@
sludge_projectmanager_LDADD = @GTK_LIBS@ @LIBPNG_LIBS@
endif
......
This diff is collapsed.
......@@ -25,7 +25,7 @@
#include <glib-object.h>
#include <glib.h>
#include <GLee.h>
#include <GL/glew.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glu.h>
......
......@@ -25,7 +25,7 @@
#include <glib-object.h>
#include <glib.h>
#include <GLee.h>
#include <GL/glew.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glu.h>
......@@ -226,6 +226,15 @@ void SludgeGLApplication::on_drawingarea1_realize(GtkWidget *theWidget)
glViewport (0, 0, theWidget->allocation.width, theWidget->allocation.height);
/* Your one-time OpenGL initialization code goes here */
// Initialise GLEW
GLenum glewErr = glewInit();
if (GLEW_OK != glewErr)
{
g_critical ("Couldn't initialize GLEW.\n");
return;
}
x = y = 0;
w = theWidget->allocation.width;
h = theWidget->allocation.height;
......
......@@ -57,6 +57,7 @@ SludgeProjectManager::SludgeProjectManager()
{
if (!initSuccess) return;
numResources = 0;
resourceList[0] = NULL;
fileList[0] = NULL;
......
......@@ -25,7 +25,7 @@
#include <glib-object.h>
#include <glib.h>
#include <GLee.h>
#include <GL/glew.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glu.h>
......
......@@ -25,7 +25,7 @@
#include <glib-object.h>
#include <glib.h>
#include <GLee.h>
#include <GL/glew.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glu.h>
......
......@@ -25,7 +25,7 @@
#include <glib-object.h>
#include <glib.h>
#include <GLee.h>
#include <GL/glew.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glu.h>
......
......@@ -25,7 +25,7 @@
#include <glib-object.h>
#include <glib.h>
#include <GLee.h>
#include <GL/glew.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glu.h>
......
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -15,7 +15,17 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
......@@ -77,11 +87,11 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = GTK_Dev_Kit/support
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
......@@ -138,6 +148,7 @@ am__installdirs = "$(DESTDIR)$(applicationsdir)" \
DATA = $(applications_DATA) $(gtksourceview3specs_DATA) \
$(gtksourceviewspecs_DATA) $(nobase_icons_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
......@@ -164,7 +175,8 @@ EGREP = @EGREP@
ENGINE_CFLAGS = @ENGINE_CFLAGS@
ENGINE_LIBS = @ENGINE_LIBS@
EXEEXT = @EXEEXT@
GLEE_LIBS = @GLEE_LIBS@
GLEW_CFLAGS = @GLEW_CFLAGS@
GLEW_LIBS = @GLEW_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GL_CFLAGS = @GL_CFLAGS@
......@@ -236,6 +248,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
......@@ -378,7 +391,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu GTK_Dev_Kit/support/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu GTK_Dev_Kit/support/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......@@ -644,6 +656,8 @@ uninstall-am: uninstall-applicationsDATA \
uninstall-applicationsDATA uninstall-gtksourceview3specsDATA \
uninstall-gtksourceviewspecsDATA uninstall-nobase_iconsDATA
.PRECIOUS: Makefile
# 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.
......
......@@ -24,33 +24,27 @@ Linux
Dependencies (Engine)
=====================
Dependencies of the OpenSLUDGE engine are SDL, OpenGL, GLee, libGLU,
libpng, libvpx and xdg-utils. OpenAL sound support requires OpenAL and
Alure (>= 1.1) with Vorbis, FLAC and DUMB support enabled.
Dependencies of the OpenSLUDGE engine are SDL, OpenGL, GLEW, libGLU,
libpng, libvpx and xdg-utils. OpenAL sound support requires OpenAL, DUMB and
Alure (>= 1.1) with Vorbis and FLAC support enabled.
On Debian and Ubuntu the correspoding packages are libsdl1.2-dev,
mesa-common-dev, glee-dev (only available in Debian Squeeze / Ubuntu 10.10
or above, but these packages can also be used for older releases of the
distributions), libglu1-mesa-dev, libpng12-dev, libvpx-dev, xdg-utils,
libopenal-dev, libalure-dev (version 1.1 required, only available in Debian
Wheezy / Ubuntu 11.10 or above, the packages can be used for older releases),
libvorbis-dev, libflac-dev and libdumb1-dev.
To use OpenGL ES 2 as graphics library, the dependencies OpenGL, GLee
mesa-common-dev, libglew-dev, libglu1-mesa-dev, libpng12-dev, libvpx-dev, xdg-utils,
libopenal-dev, libalure-dev, libvorbis-dev, libflac-dev and libdumb1-dev.
To use OpenGL ES 2 as graphics library, the dependencies OpenGL, GLEW
and libGLU are replaced by OpenGL ES 2 and EGL. That means in the above list
for Debian and Ubuntu mesa-common-dev, glee-dev and libglu1-mesa-dev are
for Debian and Ubuntu mesa-common-dev, libglew-dev and libglu1-mesa-dev are
replaced by libgles2-mesa-dev.
Dependencies (Dev Kit)
======================
Dependencies of the OpenSLUDGE Dev Kit are GTK+ (>= 2.16), GtkGLExt,
GLee and libpng.
GLEW and libpng.
On Debian and Ubuntu the correspoding packages are libgtk2.0-dev
libgtkglext1-dev, glee-dev (only available in Debian Squeeze / Ubuntu 10.10
or above, but these packages can also be used for older releases of the
distributions) and libpng12-dev.
libgtkglext1-dev, libglew-dev and libpng12-dev.
Installing OpenSLUDGE
=====================
......
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -15,7 +15,17 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
......@@ -77,15 +87,12 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = .
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(dist_doc_DATA) COPYING compile depcomp \
install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(dist_doc_DATA) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
......@@ -178,6 +185,9 @@ ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = source GTK_Dev_Kit doc
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
COPYING ChangeLog INSTALL NEWS README compile depcomp \
install-sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
......@@ -245,7 +255,8 @@ EGREP = @EGREP@
ENGINE_CFLAGS = @ENGINE_CFLAGS@
ENGINE_LIBS = @ENGINE_LIBS@
EXEEXT = @EXEEXT@
GLEE_LIBS = @GLEE_LIBS@
GLEW_CFLAGS = @GLEW_CFLAGS@
GLEW_LIBS = @GLEW_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GL_CFLAGS = @GL_CFLAGS@
......@@ -317,6 +328,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
......@@ -350,7 +362,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......@@ -593,15 +604,15 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
......@@ -637,17 +648,17 @@ distcheck: dist
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_inst
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure \
&& $(am__cd) $(distdir)/_build/sub \
&& ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
......@@ -825,6 +836,8 @@ uninstall-am: uninstall-dist_docDATA
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
tags-am uninstall uninstall-am uninstall-dist_docDATA
.PRECIOUS: Makefile
# 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.
......
......@@ -3,9 +3,6 @@ For installation instructions, see INSTALL.
SLUDGE (except the GTK Dev Kit) is licenced under GNU LGPL version 2.1.
The GTK Dev Kit is licensed under GNU GPL version 3 or later.
You can natter to other people about OpenSLUDGE at
http://www.adventuredevelopers.com/forum/ if you like.
Enjoy!
- Tim (and Rikard (and Tobias))
- Tim, Rikard and Tobias
This diff is collapsed.
......@@ -3,7 +3,7 @@
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
......
......@@ -6,6 +6,9 @@
/* Define to 1 if you have the `atexit' function. */
#undef HAVE_ATEXIT
/* Define to 1 if you have the <dumb.h> header file. */
#undef HAVE_DUMB_H
/* Define to 1 if you have the <EGL/egl.h> header file. */
#undef HAVE_EGL_EGL_H
......@@ -15,9 +18,6 @@
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
/* Define to 1 if you have the <GLee.h> header file. */
#undef HAVE_GLEE_H
/* Define to 1 if you have the <GLES2/gl2.h> header file. */
#undef HAVE_GLES2_GL2_H
......
This diff is collapsed.
......@@ -2,9 +2,9 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.55])
AC_INIT([SLUDGE], [2.2.1], [tobias.han@gmx.de], [sludge], [http://opensludge.github.io/])
AC_INIT([SLUDGE], [2.2.2], [tobias.han@gmx.de], [sludge], [http://opensludge.github.io/])
AC_CONFIG_SRCDIR([source/CommonCode/tga.cpp])
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_HEADERS([config.h])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
......@@ -19,6 +19,9 @@ AC_ARG_ENABLE([engine], [AC_HELP_STRING([--disable-engine], [don't build the SLU
AC_ARG_ENABLE([devkit], [AC_HELP_STRING([--enable-devkit], [build the SLUDGE DevKit])])
AC_ARG_ENABLE([doc], [AC_HELP_STRING([--enable-doc], [install the SLUDGE documentation])])
AC_ARG_ENABLE([gles2], [AC_HELP_STRING([--enable-gles2], [build engine using OpenGL ES 2.0])])
AC_ARG_ENABLE([pandora], [AC_HELP_STRING([--enable-pandora], [enable hacks for OpenPandora])])
AC_ARG_ENABLE([rpi], [AC_HELP_STRING([--enable-rpi], [enable Raspberry-PI support])])
AC_ARG_ENABLE([odroid], [AC_HELP_STRING([--enable-odroid], [enable ODroid support])])
# Set default targets:
if test "x$enable_engine" = x; then
......@@ -33,6 +36,24 @@ fi
if test "x$enable_gles2" = x; then
enable_gles2="no"
fi
if test "x$enable_pandora" = x; then
enable_pandora="no"
fi
if test "x$enable_rpi" = x; then
enable_rpi="no"
fi
if test "x$enable_odroid" = x; then
enable_odroid="no"
fi
if test "x$enable_pandora" = xyes; then
enable_gles2="yes"
fi
if test "x$enable_rpi" = xyes; then
enable_gles2="yes"
fi
if test "x$enable_odroid" = xyes; then
enable_gles2="yes"
fi
# Are we cross compiling for windows?
case "${host}" in
......@@ -50,22 +71,20 @@ fi
# Checks for libraries.
if test "x$enable_gles2" = xno; then
AC_CHECK_LIB([glee], [GLeeInit], [GLEE_LIBS="-lglee"], [AC_CHECK_LIB([GLee], [GLeeInit], [GLEE_LIBS="-lGLee"], [AC_MSG_ERROR([cannot find glee library])])])
AC_SUBST([GLEE_LIBS])
PKG_CHECK_MODULES([GLEW], [glew])
else
if test "x$enable_devkit" = xyes; then
AC_CHECK_LIB([glee], [GLeeInit], [GLEE_LIBS="-lglee"], [AC_CHECK_LIB([GLee], [GLeeInit], [GLEE_LIBS="-lGLee"], [AC_MSG_ERROR([cannot find glee library (needed for devkit)])])])
AC_SUBST([GLEE_LIBS])
PKG_CHECK_MODULES([GLEW], [glew])
fi
fi
if test "x$enable_engine" = xyes; then
PKG_CHECK_MODULES([ENGINE], [sdl alure >= 1.1 openal vorbis ogg])
AC_CHECK_LIB([vpx], [vpx_codec_decode], [ENGINE_LIBS+=" -lvpx"], [AC_MSG_ERROR([cannot find vpx library])])
PKG_CHECK_MODULES([ENGINE], [sdl alure >= 1.1 openal vorbis ogg vpx])
AC_CHECK_LIB([dumb], [duh_render], [ENGINE_LIBS="$ENGINE_LIBS -ldumb"], [AC_MSG_ERROR([cannot find DUMB library])])
if test "x$enable_gles2" = xyes; then
AC_CHECK_LIB([GLESv2], [glEnable], [ENGINE_LIBS+=" -lGLESv2"], [AC_MSG_ERROR([cannot find GLESv2 library])])
AC_CHECK_LIB([EGL], [eglInitialize], [ENGINE_LIBS+=" -lEGL"], [AC_MSG_ERROR([cannot find EGL library])])
AC_CHECK_LIB([X11], [XOpenDisplay], [ENGINE_LIBS+=" -lX11"], [AC_MSG_ERROR([cannot find X11 library])])
AC_CHECK_LIB([GLESv2], [glEnable], [ENGINE_LIBS="$ENGINE_LIBS -lGLESv2"], [AC_MSG_ERROR([cannot find GLESv2 library])])
AC_CHECK_LIB([EGL], [eglInitialize], [ENGINE_LIBS="$ENGINE_LIBS -lEGL"], [AC_MSG_ERROR([cannot find EGL library])])
AC_CHECK_LIB([X11], [XOpenDisplay], [ENGINE_LIBS="$ENGINE_LIBS -lX11"], [AC_MSG_ERROR([cannot find X11 library])])
else
PKG_CHECK_MODULES([GL], [gl glu])
fi
......@@ -82,20 +101,13 @@ PKG_CHECK_MODULES([LIBPNG], [libpng])
AC_CHECK_HEADERS([limits.h malloc.h stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h], [], [AC_MSG_ERROR([cannot find one or more of these header files: limits.h malloc.h stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h])])
AC_CHECK_HEADERS([getopt.h], [], [AC_MSG_ERROR([cannot find getopt header files])])
if test "x$enable_gles2" = xno; then
AC_CHECK_HEADERS([GLee.h], [], [AC_MSG_ERROR([cannot find glee header files])])
else
if test "x$enable_devkit" = xyes; then
AC_CHECK_HEADERS([GLee.h], [], [AC_MSG_ERROR([cannot find glee header files (needed for devkit)])])
fi
fi
if test "x$enable_engine" = xyes; then
AC_CHECK_HEADERS([SDL/SDL.h SDL/SDL_syswm.h], [], [AC_MSG_ERROR([cannot find SDL header files])])
AC_CHECK_HEADERS([AL/alure.h], [], [AC_MSG_ERROR([cannot find alure header files])])
AC_CHECK_HEADERS([vpx/vpx_decoder.h], [], [AC_MSG_ERROR([cannot find vpx header files])])
AC_CHECK_HEADERS([vorbis/codec.h], [], [AC_MSG_ERROR([cannot find vorbis header files])])
AC_CHECK_HEADERS([ogg/ogg.h], [], [AC_MSG_ERROR([cannot find ogg header files])])
AC_CHECK_HEADERS([dumb.h], [], [AC_MSG_ERROR([cannot find DUMB header files])])
if test "x$enable_gles2" = xyes; then
AC_CHECK_HEADERS([GLES2/gl2.h], [], [AC_MSG_ERROR([cannot find gles2 header files])])
AC_CHECK_HEADERS([EGL/egl.h], [], [AC_MSG_ERROR([cannot find egl header files])])
......@@ -123,6 +135,9 @@ AM_CONDITIONAL([COND_ENGINE], [test "x$enable_engine" = xyes])
AM_CONDITIONAL([COND_DEVKIT], [test "x$enable_devkit" = xyes])
AM_CONDITIONAL([COND_DOC], [test "x$enable_doc" = xyes])
AM_CONDITIONAL([COND_GLES2], [test "x$enable_gles2" = xyes])
AM_CONDITIONAL([COND_PANDORA], [test "x$enable_pandora" = xyes])
AM_CONDITIONAL([COND_RPI], [test "x$enable_rpi" = xyes])
AM_CONDITIONAL([COND_ODROID], [test "x$enable_odroid" = xyes])
AC_CONFIG_FILES([Makefile
source/Makefile
......@@ -134,7 +149,7 @@ AC_OUTPUT
echo "
SLUDGE configuration complete.
Note that Alure needs VorbisFile, FLAC and DUMB to provide full sound support for the SLUDGE engine.
Note that Alure needs VorbisFile and FLAC to provide full sound support for the SLUDGE engine.
Will build..."
if test x"$WIN32" = xyes; then
......
sludge (2.2.2-1) unstable; urgency=medium
* New upstream release (Closes: #880853, #908352).
* Build-Depend on libdumb1-dev, libglew-dev.
-- Tobias Hansen <thansen@debian.org> Tue, 18 Sep 2018 19:57:35 +0200
sludge (2.2.1-2) unstable; urgency=medium
* Update homepage links.
......
Source: sludge
Section: games
Priority: extra
Priority: optional
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Uploaders: Tobias Hansen <thansen@debian.org>
Build-Depends: debhelper (>= 9),
autotools-dev,
Build-Depends: debhelper (>= 10),
libsdl1.2-dev,
mesa-common-dev,
glee-dev,
libdumb1-dev,
libglew-dev,
libglu1-mesa-dev,
libpng-dev,
libopenal-dev,
......@@ -20,7 +20,7 @@ Build-Depends: debhelper (>= 9),
docbook-xsl,
docbook-xml,
xsltproc
Standards-Version: 3.9.8
Standards-Version: 4.2.1
Vcs-Browser: https://salsa.debian.org/games-team/sludge
Vcs-Git: https://salsa.debian.org/games-team/sludge.git
Homepage: http://opensludge.github.io
......@@ -36,7 +36,7 @@ Description: Runtime engine for playing SLUDGE adventure games
language with IDE tools.
.
This package contains the runtime engine needed to run the games.
Freeware SLUDGE games include "Out Of Order", "Cubert Badbone, P.I." and
Freeware SLUDGE games include "Out Of Order", "Cubert Badbone, P.I." and
"The Game That Takes Place on a Cruise Ship".
Package: sludge-devkit
......
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: SLUDGE
Upstream-Contact: Tobias Hansen <tobias.han@gmx.de>
Source: http://opensludge.github.io
......
......@@ -3,7 +3,7 @@
scriptversion=2013-05-30.07; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Copyright (C) 1999-2014 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
......
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -15,7 +15,17 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
......@@ -77,12 +87,12 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = doc
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(nobase_dist_doc_DATA)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(nobase_dist_doc_DATA) \
$(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
......@@ -136,6 +146,7 @@ am__uninstall_files_from_dir = { \
am__installdirs = "$(DESTDIR)$(docdir)"
DATA = $(nobase_dist_doc_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
......@@ -162,7 +173,8 @@ EGREP = @EGREP@
ENGINE_CFLAGS = @ENGINE_CFLAGS@
ENGINE_LIBS = @ENGINE_LIBS@
EXEEXT = @EXEEXT@
GLEE_LIBS = @GLEE_LIBS@
GLEW_CFLAGS = @GLEW_CFLAGS@
GLEW_LIBS = @GLEW_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GL_CFLAGS = @GL_CFLAGS@
......@@ -234,6 +246,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
......@@ -523,7 +536,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......@@ -719,6 +731,8 @@ uninstall-am: uninstall-nobase_dist_docDATA
mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am uninstall-nobase_dist_docDATA
.PRECIOUS: Makefile
# 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.
......
......@@ -22,22 +22,18 @@ You are hereby given permission to use, redistribute and/or modify SLUDGE under
</P>
<P>
For more information, visit the SLUDGE website or speak your mind on the Adventure Developers SLUDGE forum.
</P>
<P>
<A TARGET=_blank HREF="http://opensludge.github.io">http://opensludge.github.io</A>
For more information, visit the SLUDGE website.
</P>
<P>
<A TARGET=_blank HREF="http://www.adventuredevelopers.com/forum/">http://www.adventuredevelopers.com/forum/</A>
<A TARGET=_blank HREF="http://opensludge.github.io">http://opensludge.github.io</A>
</P>
<P>
For all other Hungry Software related goings-on, this is the site to be explored:
</P>
<P>
<P>
<A TARGET=_blank HREF="http://www.hungrysoftware.com/">http://www.hungrysoftware.com/</A>
</P>
......
......@@ -41,6 +41,10 @@
text-align:center;
padding-top:20px;
}
#searchBar{
text-align:center;
padding-top:20px;
}
/****************************************************************************************
* LAYOUT CSS FOR THE MENU
......@@ -217,6 +221,15 @@
<div id="topBar">
<img src="images/Sludge_128x128x32.png" alt="SLUDGE Logo" />
</div>
<div id="searchBar">
<form class="ddg" name="x" action="https://duckduckgo.com/" target="Frame">
<input type="hidden" value="opensludge.github.io/opensludge/doc" name="sites"></input>
<input type="hidden" value="1" name="kh"></input>
<input type="hidden" value="-1" name="kn"></input>
<input type="hidden" value="1" name="kac"></input>
<input type="search" placeholder="Search" name="q"></input>
</form>
</div>
<div id="leftColumn">
<ul id="SLUDGE_listMenu">
<li class="hasChildren"><a href="index.html" target="Frame">Welcome to SLUDGE!</a>
......
......@@ -12,80 +12,84 @@
<P>
SLUDGE's <a href="setScale.html">setScale</a> command is a useful little blighter. However, if you're still thinking in terms of "I want the character to be 100% here and 25% here" it might seem a little confusing. Here's a quick rundown of how to use it successfully.
</P>
SLUDGE's <a href="setScale.html">setScale</a> command is a useful little blighter. However, if you're still thinking in terms of "I want the character to be 100% here and 25% here" it might seem a little confusing. Here's a quick rundown of how to use it successfully.
</P>
<H3>Finding The Horizon</H3>
<H3>Finding The Horizon</H3>
<P>
<P>
Load your scene into a paint program. Now, draw a line along the horizon - you may need to imagine one, which is fine. Basically, the horizon is the line at which the size of a character will become zero... the edge of the world, if you like. Take the following room...
</P>
</P>
<P>
<IMG SRC="images/theroom.gif" alt="Welcome to the Tutorial City Art Gallery"><BR>
<IMG SRC="images/theroom.gif" alt="Welcome to the Tutorial City Art Gallery"><BR>
Fig. 1: Welcome to the Tutorial City Art Gallery
</P>
<P>
The surfaces which are parallel here are the wall on the left and the wall on the right (including the doorway). Most of the lines out of which these walls are made converge at one point - the infamous "vanishing point" of which myth and lore have spoken. The vanishing point is on the horizon - so, we now have our horizon. OK, so not all the lines converge at the same point... but after all, the look of the room is cartoony, and the walls are both slightly tilted. Finding a horizon isn't an exact science.
</P>
<P>
<IMG SRC="images/vanish.gif" alt="Vanishing point and horizon"><BR>
Fig. 2: Vanishing point and horizon
</P>
<P>
With the horizon defined, you can now see how a character can be drawn at the right height compared against its surroundings no matter where it is drawn on the screen... for example, should a character be half as tall as the left-hand wall at point A, it'll also be half as tall as the left-hand wall at point B. Or three quarters of the height, or a 20th of the height, or whatever.
</P>
<H3>Defining The Character's Size In The Room</H3>
<P>
Now that the horizon's been found, it's all a matter of how tall the character should be in the room. This is defined by the second parameter of the setScale function. Setting this parameter to the exact height of a character* means that the top of the character's head will stay at the same level no matter where they are on the screen. Set the parameter to a value greater than the height of a character makes the character smaller, and the top of their head will move down the screen as they get closer to the camera. Set the parameter to a value smaller than the height of a character and the top of the character's head will get higher as the character moves towards the camera.
</P>
<P>
* Assuming the character's hotspot is on the bottom row of pixels
</P>
<P>
<IMG SRC="images/scale1.gif" alt="Second parameter = height of character"><BR>
Fig. 3: Second parameter = height of character
</P>
<P>
<IMG SRC="images/scale2.gif" alt="Second parameter > height of character"><BR>
Fig. 4: Second parameter > height of character
</P>
<P>
<IMG SRC="images/scale3.gif" alt="Second parameter < height of character"><BR>
Fig. 5: Second parameter < height of character
</P>
<P>
More specifically, the second parameter of setScale <b>defines which part of the character stays at the same level when moving around a scene</b>. Hence, for the top of a character's head to stay at the same level, the second parameter passed to setScale should be the distance in pixels between the top of the character's head and the character's hotspot... in other words, the height of the character.
</P>
<P>
For the character's elbows to stay at the same level (figure 5) the parameter should be the distance in pixels between the character's elbows and the character's hotspot... and so on for other body parts. In the case of values greater than a character's height (figure 4) imagine a tall hat on the top of the characters head and you can see that the same rule still applies.
</P>
<H3>See also:</H3>
<P>
<a href="setScale.html">setScale</a>
</P>
<P>
<a href="getCharacterScale.html">getCharacterScale</a>
</P>
</P>
<P>
The surfaces which are parallel here are the wall on the left and the wall on the right (including the doorway). Most of the lines out of which these walls are made converge at one point - the infamous "vanishing point" of which myth and lore have spoken. The vanishing point is on the horizon - so, we now have our horizon. OK, so not all the lines converge at the same point... but after all, the look of the room is cartoony, and the walls are both slightly tilted. Finding a horizon isn't an exact science.
</P>
<P>
<IMG SRC="images/vanish.gif" alt="Vanishing point and horizon"><BR>
Fig. 2: Vanishing point and horizon
</P>
<P>
With the horizon defined, you can now see how a character can be drawn at the right height compared against its surroundings no matter where it is drawn on the screen... for example, should a character be half as tall as the left-hand wall at point A, it'll also be half as tall as the left-hand wall at point B. Or three quarters of the height, or a 20th of the height, or whatever.
</P>
<H3>Defining The Character's Size In The Room</H3>
<P>
Now that the horizon's been found, it's all a matter of how tall the character should be in the room. This is defined by the second parameter of the setScale function. Setting this parameter to the exact height of a character* means that the top of the character's head will stay at the same level no matter where they are on the screen. Set the parameter to a value greater than the height of a character makes the character smaller, and the top of their head will move down the screen as they get closer to the camera. Set the parameter to a value smaller than the height of a character and the top of the character's head will get higher as the character moves towards the camera.
</P>
<P>
* Assuming the character's hotspot is on the bottom row of pixels
</P>
<P>
<IMG SRC="images/scale1.gif" alt="Second parameter = height of character"><BR>
Fig. 3: Second parameter = height of character
</P>
<P>
<IMG SRC="images/scale2.gif" alt="Second parameter > height of character"><BR>
Fig. 4: Second parameter > height of character
</P>
<P>
<IMG SRC="images/scale3.gif" alt="Second parameter < height of character"><BR>
Fig. 5: Second parameter < height of character
</P>
<P>
More specifically, the second parameter of setScale <b>defines which part of the character stays at the same level when moving around a scene</b>. Hence, for the top of a character's head to stay at the same level, the second parameter passed to setScale should be the distance in pixels between the top of the character's head and the character's hotspot... in other words, the height of the character.
</P>
<P>
For the character's elbows to stay at the same level (figure 5) the parameter should be the distance in pixels between the character's elbows and the character's hotspot... and so on for other body parts. In the case of values greater than a character's height (figure 4) imagine a tall hat on the top of the characters head and you can see that the same rule still applies.
</P>
<H3>See also:</H3>
<P>
<a href="setScale.html">setScale</a>
</P>
<P>
<a href="getCharacterScale.html">getCharacterScale</a>
</P>
<P>
<a href="setCharacterExtra.html">setCharacterExtra</a>
</P>
<P>
<a href="Object_Types_as_Characters.html">Object Types as Characters</a>
</P>
</P>
<P class="copyright-notice">SLUDGE and this SLUDGE documentation are <A HREF="Copyright.html">copyright</A> Hungry Software and contributors 2000-2012
</P>
......
......@@ -17,7 +17,7 @@
<h2>Welcome to SLUDGE!</h2>
<hr />
<p>Welcome to SLUDGE - Scripting Language for Unhindered Development of a Gaming Environment. This is the help file for the SLUDGE Development Kit. It also serves as a reference manual for the SLUDGE language. Contained in this documentation should be all you need to know about creating a game using SLUDGE. If, after hunting for a few days, you give up and didn't find the answer you were after, please visit the <a href="http://www.adventuredevelopers.com/">Adventure Developers</a> forum and get involved!</p>
<p>Welcome to SLUDGE - Scripting Language for Unhindered Development of a Gaming Environment. This is the help file for the SLUDGE Development Kit. It also serves as a reference manual for the SLUDGE language. Contained in this documentation should be all you need to know about creating a game using SLUDGE. If, after hunting for a few days, you give up and didn't find the answer you were after, please visit the <a href="https://github.com/opensludge/opensludge">GitHub page</a> and get involved by creating an issue!</p>
<h3>What this file contains:</h3>
......
......@@ -23,7 +23,7 @@ Pauses a playing movie, started with <a href="playMovie.html">playMovie</a>,
or resumes a paused movie. If no movie is playing, this function does nothing.
</P>
<p>
See the <a href="http://sourceforge.net/projects/opensludge/files/Demos/movie%20demo.zip/download">
See the <a href="https://github.com/opensludge/opensludge.github.io/releases/download/resources/movie.demo.zip">
Movie Demo (download link)</a> for an example of how to use the movie functions.
</p>
......
......@@ -31,7 +31,7 @@ has ended or is stopped by <a href="stopMovie.html">stopMovie</a>.
Only one movie can be played at a time.
</p>
<p>
See the <a href="http://sourceforge.net/projects/opensludge/files/Demos/movie%20demo.zip/download">
See the <a href="https://github.com/opensludge/opensludge.github.io/releases/download/resources/movie.demo.zip">
Movie Demo (download link)</a> for an example of how to use the movie functions.
</p>
......
......@@ -25,9 +25,6 @@ together with your game.
for creating installers, and you can find <a href="http://opensludge.github.io/Sample%20Installer.nsi">
a sample NSIS script for SLUDGE games</a> on the SLUDGE site.</p>
<p>If you don't have access to a Windows computer, try asking for help on
<a href="http://www.adventuredevelopers.com/forum/">the Adventure Developers forum</a>.</p>
<h3>On Mac OS X</h3>
<p>On Mac OS X, programs are typically contained in .app bundles. To make a bundle
......@@ -40,9 +37,6 @@ and send it to your players!</p>
<p>If you want to replace the icon shown in Finder, you can replace the file
"Sludge.icns" with your own icon.</p>
<p>If you don't have access to a Mac computer, try asking for help on
<a href="http://www.adventuredevelopers.com/forum/">the Adventure Developers forum</a>.</p>
<h3>On Linux</h3>
<p>For Linux users, distributing the .slg file by itself and pointing to where
......
......@@ -38,7 +38,7 @@ No return value.
<H3>See also:</H3>
<P>
<a href="Scaling_Characters.html">Scaling Characters</a>
</P>
......@@ -63,6 +63,10 @@ No return value.
<a href="moveCharacter.html">moveCharacter</a>
</P>
<P>
<a href="setCharacterExtra.html">setCharacterExtra</a>
</P>
<P class="copyright-notice">SLUDGE and this SLUDGE documentation are <A HREF="Copyright.html">copyright</A> Hungry Software and contributors 2000-2012
</P>
......
......@@ -23,7 +23,7 @@ Stops a playing movie, started with <a href="playMovie.html">playMovie</a>.
If no movie is playing, this function does nothing.
</P>
<p>
See the <a href="http://sourceforge.net/projects/opensludge/files/Demos/movie%20demo.zip/download">
See the <a href="https://github.com/opensludge/opensludge.github.io/releases/download/resources/movie.demo.zip">
Movie Demo (download link)</a> for an example of how to use the movie functions.
</p>
......
......@@ -21,9 +21,9 @@ There are generic instructions how to compile SLUDGE in the <strong>INSTALL</str
<p><ul>
<li><strong>build-essential</strong> (compilers and build tools)</li>
<li><strong>glee-dev</strong></li>
<li><strong>libalure-dev</strong> (>= 1.1)</li>
<li><strong>libsdl1.2-dev</strong></li>
<li><strong>libglew-dev</strong></li>
<li><strong>libglu1-mesa-dev</strong></li>
<li><strong>libpng12-dev</strong></li>
<li><strong>libopenal-dev</strong></li>
......@@ -39,7 +39,7 @@ There are generic instructions how to compile SLUDGE in the <strong>INSTALL</str
<p>Package list for copying:</p>
<p><div class="bash">sudo apt-get install build-essential glee-dev libalure-dev libsdl1.2-dev libglu1-mesa-dev libpng12-dev libopenal-dev libvorbis-dev libflac-dev libdumb1-dev libvpx-dev xdg-utils</div></p>
<p><div class="bash">sudo apt-get install build-essential libalure-dev libsdl1.2-dev libglew-dev libglu1-mesa-dev libpng12-dev libopenal-dev libvorbis-dev libflac-dev libdumb1-dev libvpx-dev xdg-utils</div></p>
<p>The additional dependencies for the Dev Kit:</p>
......@@ -71,7 +71,7 @@ There are generic instructions how to compile SLUDGE in the <strong>INSTALL</str
<h3>OpenGL ES 2</h3>
SLUDGE 2.2 has experimental support for OpenGL ES 2. This means it should work on mobile devices such as smartphones without much effort. To use OpenGL ES 2 on Debian or Ubuntu, the dependencies <strong>glee-dev</strong> and <strong>libglu1-mesa-dev</strong> are replaced by <strong>libgles2-mesa-dev</strong> and configuring is done by
SLUDGE 2.2 has experimental support for OpenGL ES 2. This means it should work on mobile devices such as smartphones without much effort. To use OpenGL ES 2 on Debian or Ubuntu, the dependencies <strong>libglew-dev</strong> and <strong>libglu1-mesa-dev</strong> are replaced by <strong>libgles2-mesa-dev</strong> and configuring is done by
<p><pre><div class="bash">./configure --enable-gles2</div></pre></p>
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
......
#define MAJOR_VERSION 2
#define MINOR_VERSION 2
#define RELEASE_VERSION 1
#define BUILD_VERSION 208
#define TEXT_VERSION "2.2.1"
#define RELEASE_VERSION 2
#define BUILD_VERSION 209
#define TEXT_VERSION "2.2.2"
#define WHOLE_VERSION (MAJOR_VERSION * 256 + MINOR_VERSION) // This version
#define MINIM_VERSION (1 * 256 + 2) // Earliest version of games the engine can run
......
......@@ -10,7 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
//#include <OpenGL/gl.h>
#include "GLee.h"
#include <GL/glew.h>
#include "floormaker.h"
#include "interface.h"
......
......@@ -424,30 +424,30 @@ bool NPOT_textures = false;
void NPOT_check() {
/* Check for graphics capabilities... */
if (GLEE_VERSION_2_0) {
if (GLEW_VERSION_2_0) {
// Yes! Textures can be any size!
NPOT_textures = true;
fprintf (stderr, "OpenGL 2.0! All is good.\n");
} else {
if (GLEE_VERSION_1_5) {
if (GLEW_VERSION_1_5) {
fprintf (stderr, "OpenGL 1.5!\n");
}
else if (GLEE_VERSION_1_4) {
else if (GLEW_VERSION_1_4) {
fprintf (stderr, "OpenGL 1.4!\n");
}
else if (GLEE_VERSION_1_3) {
else if (GLEW_VERSION_1_3) {
fprintf (stderr, "OpenGL 1.3!\n");
}
else if (GLEE_VERSION_1_2) {
else if (GLEW_VERSION_1_2) {
fprintf (stderr, "OpenGL 1.2!\n");
}
if (GLEE_ARB_texture_non_power_of_two) {
if (GLEW_ARB_texture_non_power_of_two) {
// Yes! Textures can be any size!
NPOT_textures = true;
} else {
// Workaround needed for lesser graphics cards. Let's hope this works...
NPOT_textures = false;
fprintf (stderr, "Warning: Old graphics card! GLEE_ARB_texture_non_power_of_two not supported.\n");
fprintf (stderr, "Warning: Old graphics card! GLEW_ARB_texture_non_power_of_two not supported.\n");
}
}
}
......
......@@ -2,7 +2,7 @@
#define __SPRITES_H__
//#include <OpenGL/gl.h>
#include "GLee.h"
#include <GL/glew.h>
#ifdef __cplusplus
extern "C" {
......
......@@ -42,10 +42,22 @@ LDADD = @ENGINE_LIBS@ @LIBPNG_LIBS@
if COND_GLES2
AM_CPPFLAGS += -DHAVE_GLES2 -DUSE_EGL_SDL -DUSE_GLES2
else
AM_CPPFLAGS += @GL_CFLAGS@
LDADD += @GL_LIBS@ @GLEE_LIBS@
AM_CPPFLAGS += @GL_CFLAGS@ @GLEW_CFLAGS@
LDADD += @GL_LIBS@ @GLEW_LIBS@
endif
if COND_PANDORA
AM_CPPFLAGS += -DPANDORA
LDADD += -liconv
endif
if COND_RPI
AM_CPPFLAGS += -DRPI
endif
if COND_ODROID
AM_CPPFLAGS += -DODROID
endif
EXTRA_DIST = \
libvorbis/COPYING \
libwebm/AUTHORS.TXT \
......
This diff is collapsed.
......@@ -8,7 +8,7 @@
#include <stdint.h>
#if !defined(HAVE_GLES2)
#include "GLee.h"
#include <GL/glew.h>
#else
#include <GLES2/gl2.h>
#endif
......@@ -1424,7 +1424,6 @@ bool mixHSI (FILE * fp, int x, int y) {
}
deleteTextures(1, &tmpTex);
setPixelCoords (false);
return true;
}
......@@ -1440,6 +1439,20 @@ void saveCorePNG (FILE * writer, GLuint texture, int w, int h) {
glPixelStorei (GL_PACK_ALIGNMENT, 1);
// glGetTexImage(GL_TEXTURE_2D, 0, GL_RGB, GL_UNSIGNED_BYTE, image);
#ifdef HAVE_GLES2
GLuint old_fbo, new_fbo;
GLint old_vp[4];
glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint*)&old_fbo);
glGetIntegerv(GL_VIEWPORT, old_vp);
glGenFramebuffers(1, &new_fbo);
glBindFramebuffer(GL_FRAMEBUFFER, new_fbo);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0);
glViewport(0, 0, tw, th);
glReadPixels(0, 0, tw, th, GL_RGBA, GL_UNSIGNED_BYTE, image);
glBindFramebuffer(GL_FRAMEBUFFER, old_fbo);
glViewport(old_vp[0], old_vp[1], old_vp[2], old_vp[3]);
glDeleteFramebuffers(1, &new_fbo);
#else
setPixelCoords (true);
......@@ -1485,8 +1498,8 @@ void saveCorePNG (FILE * writer, GLuint texture, int w, int h) {
xoffset += viewportWidth;
}
setPixelCoords (false);
#endif
......
......@@ -2,7 +2,7 @@
#include "graphics.h"
#if !defined(HAVE_GLES2)
#include "GLee.h"
#include <GL/glew.h>
#else
#include <GLES2/gl2.h>
#endif
......
......@@ -285,11 +285,11 @@ builtIn(saveGame)
trimStack (fun -> stack);
char * aaaaa = encodeFilename (loadNow);
delete loadNow;
delete[] loadNow;
if (failSecurityCheck (aaaaa)) return BR_ERROR; // Won't fail if encoded, how cool is that? OK, not very.
loadNow = joinStrings (":", aaaaa);
delete aaaaa;
delete[] aaaaa;
setVariable (fun -> reg, SVT_INT, 0);
saverFunc = fun;
......@@ -322,7 +322,7 @@ builtIn(fileExists)
// Return value
setVariable (fun -> reg, SVT_INT, (fp != NULL));
if (fp) fclose (fp);
delete aaaaa;
delete[] aaaaa;
loadNow = NULL;
return BR_CONTINUE;
}
......@@ -557,7 +557,7 @@ builtIn(stringLength)
char * newText = getTextFromAnyVar (fun -> stack -> thisVar);
trimStack (fun -> stack);
setVariable (fun -> reg, SVT_INT, stringLength(newText));
delete newText;
delete[] newText;
return BR_CONTINUE;
}
......@@ -903,7 +903,7 @@ builtIn(pasteString)
if (x == IN_THE_CENTRE) x = (winWidth - stringWidth (newText)) >> 1;
fixFont (pastePalette);
pasteStringToBackdrop (newText, x, y, pastePalette);
delete newText;
delete[] newText;
return BR_CONTINUE;
}
......@@ -970,7 +970,7 @@ builtIn(launch)
newTextA[1] == 't' &&
newTextA[2] == 't' &&
newTextA[3] == 'p' &&
newTextA[4] == ':') {
(newTextA[4] == ':' || (newTextA[4] == 's' && newTextA[5] == ':'))) {
// IT'S A WEBSITE!
launchMe = copyString(newTextA);
......@@ -2245,7 +2245,7 @@ builtIn(burnString)
if (x == IN_THE_CENTRE) x = (winWidth - stringWidth (newText)) >> 1;
fixFont (pastePalette);
burnStringToBackdrop (newText, x, y, pastePalette);
delete newText;
delete[] newText;
return BR_CONTINUE;
}
......@@ -2530,10 +2530,10 @@ builtIn(showThumbnail)
char * file = encodeFilename (aaaaa);
// deb ("Made new name", file);
// deb ("aaaaa is still ", aaaaa);
delete aaaaa;
delete[] aaaaa;
// deb ("Deleted", "aaaaa");
showThumbnail (file, x, y);
delete file;
delete[] file;
return BR_CONTINUE;
}
......
#if !defined(HAVE_GLES2)
#include "GLee.h"
#include <GL/glew.h>
#else
#include <GLES2/gl2.h>
#endif
......
This diff is collapsed.
/**
*
* EGLPORT.H
* Copyright (C) 2011 Scott R. Smith
* Copyright (C) 2011-2013 Scott R. Smith
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
......@@ -26,58 +26,66 @@
#ifndef EGLPORT_H
#define EGLPORT_H
#include <string>
#include <stdlib.h>
#include <stdint.h>
#include "EGL/egl.h"
using namespace std;
#ifdef __cplusplus
extern "C" {
#endif
// Defines (in every case choose only one)
// EGL window system
#if defined(USE_EGL_RAW) && !defined(USE_EGL_SDL)
//#warning Using RAW EGL mode USE_EGL_RAW
#elif !defined(USE_EGL_RAW) && defined(USE_EGL_SDL)
//#warning Using SDL EGL mode USE_EGL_SDL
#else // default configuration
#define USE_EGL_SDL 1
#define USE_GLES1 1
#endif
// GLES Version
// USE_GLES1
// USE_GLES2
// Platform
// PANDORA
// WIZ
// CAANOO
/** Defines (in every case choose only one) */
/** Common: */
/** DEBUG : enable additional error monitoring per EGL function call */
/** Native display and window system for use with EGL */
/** USE_EGL_SDL : used for access to a SDL X11 window */
/** Platform: settings that are specific to that device */
/** PANDORA (USE_GLES1 or USE_GLES2) */
/** WIZ (USE_GLES1) */
/** CAANOO (USE_GLES1) */
/** RPI (USE_GLES1 or USE_GLES2) */
/** GLES Version */
/** USE_GLES1 : EGL for use with OpenGL-ES 1.X contexts */
/** USE_GLES2 : EGL for use with OpenGL-ES 2.0 contexts */
// External API
/** Public API */
void EGL_Init ( void );
void EGL_Close ( void );
int8_t EGL_Open ( void );
int8_t EGL_Init ( void );
int8_t EGL_Open ( /*uint16_t width, uint16_t height*/ );
void EGL_SwapBuffers ( void );
// Internal API
int8_t ConfigureEGL ( EGLConfig config );
int8_t FindAppropriateEGLConfigs ( void );
int8_t CheckEGLErrors ( const string& file, uint16_t line );
extern int8_t eglColorbits;
extern int8_t eglDepthbits;
extern int8_t eglStencilbits;
void Platform_Open ( void );
void Platform_Close ( void );
void Platform_VSync ( void );
/** Simple Examples */
/** Raw mode:
EGL_Open( window_width, window_height );
do while(!quit) {
... run app
EGL_SwapBuffers();
}
EGL_Close();
*/
/** X11/SDL mode:
SDL_Init( SDL_INIT_VIDEO );
SDL_Surface* screen = SDL_SetVideoMode(640, 480, 16, SDL_SWSURFACE|SDL_FULLSCREEN);
EGL_Open( window_width, window_height );
do while(!quit) {
... run app
EGL_SwapBuffers();
}
EGL_Close();
SDL_Quit();
*/
#if defined(DEBUG)
#define GET_EGLERROR(X) \
X; \
{ \
#define GET_EGLERROR(FUNCTION) \
FUNCTION; \
{ \
CheckEGLErrors(__FILE__, __LINE__); \
}
#else
#define GET_EGLERROR(X) X;
#define GET_EGLERROR(FUNCTION) FUNCTION;
#endif
#define peglQueryString(A,B) GET_EGLERROR(eglQueryString(A,B))
......@@ -92,9 +100,10 @@ void Platform_VSync ( void );
#define peglInitialize(A,B,C) GET_EGLERROR(eglInitialize(A,B,C))
#define peglMakeCurrent(A,B,C,D) GET_EGLERROR(eglMakeCurrent(A,B,C,D))
#define peglChooseConfig(A,B,C,D,E) GET_EGLERROR(eglChooseConfig(A,B,C,D,E))
#define peglSwapInterval(A,B) GET_EGLERROR(eglSwapInterval(A,B))
#ifdef __cplusplus
}
#endif
#endif // EGLPORT_H
#endif /* EGLPORT_H */
......@@ -89,7 +89,7 @@ void freezeGraphics() {
2.0f/realWinWidth*cameraZoom, .0, .0, .0,
.0, 2.0f/realWinHeight*cameraZoom, .0, .0,
.0, .0, 1.0f, .0,
-1.0, -1.0f, .0, 1.0f
-2.0f*(x/realWinWidth)-1.0f, -2.0f*(y/realWinHeight)-1.0f, .0, 1.0f
};
for (int i = 0; i < 16; i++)
......@@ -284,7 +284,7 @@ void unfreeze (bool killImage) {
if (killImage) killBackDrop ();
backdropTextureName = frozenStuff -> backdropTextureName;
if (backdropTexture) delete backdropTexture;
if (backdropTexture) delete[] backdropTexture;
backdropTexture = frozenStuff -> backdropTexture;
backdropExists = true;
if (backdropTextureName) {
......
......@@ -147,18 +147,43 @@ void storeTextureDimensions(GLuint name, GLsizei width, GLsizei height, const c
list->width = width;
list->height = height;
}
#ifdef HAVE_GLES2
void glesCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
{
// Work around for broken glCopy(Sub)TexImage2D...
void* tmp = malloc(width*height*4);
glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, tmp);
glTexSubImage2D(target, level, xoffset, yoffset, width, height, GL_RGBA, GL_UNSIGNED_BYTE, tmp);
free(tmp);
}
void glesCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
{
// Work around for broken glCopy(Sub)TexImage2D...
void* tmp = malloc(width*height*4);
glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, tmp);
glTexImage2D(target, level, GL_RGBA, width, height, border, GL_RGBA, GL_UNSIGNED_BYTE, tmp);
free(tmp);
}
#endif
void dcopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border, GLuint name, const char *file, int line)
{
glBindTexture(GL_TEXTURE_2D, name);
#ifdef HAVE_GLES2_
glesCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
#else
glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
#endif
}
void dcopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height, GLuint name, const char *file, int line)
{
glBindTexture(GL_TEXTURE_2D, name);
#ifdef HAVE_GLES2_
glesCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
#else
glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
#endif
}
void dtexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
......@@ -303,7 +328,28 @@ int desktopW = 0, desktopH = 0;
bool runningFullscreen = false;
#if defined _WIN32 || defined(HAVE_GLES2)
#if defined(HAVE_GLES2)
void saveTexture (GLuint tex, GLubyte * data) {
// use an FBO to easily grab the texture...
static GLuint fbo = 0;
GLuint old_fbo;
GLint tw, th;
GLint old_vp[4];
if (fbo