Merging cdb-refactoring into gui-refactoring.
--HG-- branch : gui-refactoringhg/feature/sse2
commit
d127d59807
@ -0,0 +1,108 @@
|
||||
# - Extract information from a subversion working copy
|
||||
# The module defines the following variables:
|
||||
# Mercurial_HG_EXECUTABLE - path to hg command line client
|
||||
# Mercurial_VERSION_HG - version of hg command line client
|
||||
# Mercurial_FOUND - true if the command line client was found
|
||||
# MERCURIAL_FOUND - same as Mercurial_FOUND, set for compatiblity reasons
|
||||
#
|
||||
# The minimum required version of Mercurial can be specified using the
|
||||
# standard syntax, e.g. FIND_PACKAGE(Mercurial 1.4)
|
||||
#
|
||||
# If the command line client executable is found two macros are defined:
|
||||
# Mercurial_WC_INFO(<dir> <var-prefix>)
|
||||
# Mercurial_WC_LOG(<dir> <var-prefix>)
|
||||
# Mercurial_WC_INFO extracts information of a subversion working copy at
|
||||
# a given location. This macro defines the following variables:
|
||||
# <var-prefix>_WC_URL - url of the repository (at <dir>)
|
||||
# <var-prefix>_WC_ROOT - root url of the repository
|
||||
# <var-prefix>_WC_REVISION - current revision
|
||||
# <var-prefix>_WC_LAST_CHANGED_AUTHOR - author of last commit
|
||||
# <var-prefix>_WC_LAST_CHANGED_DATE - date of last commit
|
||||
# <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit
|
||||
# <var-prefix>_WC_INFO - output of command `hg info <dir>'
|
||||
# Mercurial_WC_LOG retrieves the log message of the base revision of a
|
||||
# subversion working copy at a given location. This macro defines the
|
||||
# variable:
|
||||
# <var-prefix>_LAST_CHANGED_LOG - last log of base revision
|
||||
# Example usage:
|
||||
# FIND_PACKAGE(Mercurial)
|
||||
# IF(MERCURIAL_FOUND)
|
||||
# Mercurial_WC_INFO(${PROJECT_SOURCE_DIR} Project)
|
||||
# MESSAGE("Current revision is ${Project_WC_REVISION}")
|
||||
# Mercurial_WC_LOG(${PROJECT_SOURCE_DIR} Project)
|
||||
# MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
|
||||
# ENDIF(MERCURIAL_FOUND)
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2006-2009 Kitware, Inc.
|
||||
# Copyright 2006 Tristan Carel
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
FIND_PROGRAM(Mercurial_HG_EXECUTABLE hg
|
||||
DOC "mercurial command line client")
|
||||
MARK_AS_ADVANCED(Mercurial_HG_EXECUTABLE)
|
||||
|
||||
IF(Mercurial_HG_EXECUTABLE)
|
||||
EXECUTE_PROCESS(COMMAND ${Mercurial_HG_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE Mercurial_VERSION_HG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
STRING(REGEX REPLACE ".*version ([\\.0-9]+).*"
|
||||
"\\1" Mercurial_VERSION_HG "${Mercurial_VERSION_HG}")
|
||||
|
||||
MACRO(Mercurial_WC_INFO dir prefix)
|
||||
EXECUTE_PROCESS(COMMAND ${Mercurial_HG_EXECUTABLE} tip
|
||||
WORKING_DIRECTORY ${dir}
|
||||
OUTPUT_VARIABLE ${prefix}_WC_INFO
|
||||
ERROR_VARIABLE Mercurial_hg_info_error
|
||||
RESULT_VARIABLE Mercurial_hg_info_result
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
IF(NOT ${Mercurial_hg_info_result} EQUAL 0)
|
||||
MESSAGE(SEND_ERROR "Command \"${Mercurial_HG_EXECUTABLE} tip\" failed with output:\n${Mercurial_hg_info_error}")
|
||||
ELSE(NOT ${Mercurial_hg_info_result} EQUAL 0)
|
||||
|
||||
STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
|
||||
"\\2" ${prefix}_WC_ROOT "${${prefix}_WC_INFO}")
|
||||
STRING(REGEX REPLACE "^(.*\n)?changeset: *([0-9]+).*"
|
||||
"\\2" ${prefix}_WC_REVISION "${${prefix}_WC_INFO}")
|
||||
STRING(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*"
|
||||
"\\2" ${prefix}_WC_LAST_CHANGED_AUTHOR "${${prefix}_WC_INFO}")
|
||||
STRING(REGEX REPLACE "^(.*\n)?Last Changed Rev: ([^\n]+).*"
|
||||
"\\2" ${prefix}_WC_LAST_CHANGED_REV "${${prefix}_WC_INFO}")
|
||||
STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
|
||||
"\\2" ${prefix}_WC_LAST_CHANGED_DATE "${${prefix}_WC_INFO}")
|
||||
|
||||
ENDIF(NOT ${Mercurial_hg_info_result} EQUAL 0)
|
||||
|
||||
ENDMACRO(Mercurial_WC_INFO)
|
||||
|
||||
MACRO(Mercurial_WC_LOG dir prefix)
|
||||
# This macro can block if the certificate is not signed:
|
||||
# hg ask you to accept the certificate and wait for your answer
|
||||
# This macro requires a hg server network access (Internet most of the time)
|
||||
# and can also be slow since it access the hg server
|
||||
EXECUTE_PROCESS(COMMAND
|
||||
${Mercurial_HG_EXECUTABLE} --non-interactive log -r BASE ${dir}
|
||||
OUTPUT_VARIABLE ${prefix}_LAST_CHANGED_LOG
|
||||
ERROR_VARIABLE Mercurial_hg_log_error
|
||||
RESULT_VARIABLE Mercurial_hg_log_result
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
IF(NOT ${Mercurial_hg_log_result} EQUAL 0)
|
||||
MESSAGE(SEND_ERROR "Command \"${Mercurial_HG_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Mercurial_hg_log_error}")
|
||||
ENDIF(NOT ${Mercurial_hg_log_result} EQUAL 0)
|
||||
ENDMACRO(Mercurial_WC_LOG)
|
||||
ENDIF(Mercurial_HG_EXECUTABLE)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Mercurial DEFAULT_MSG Mercurial_HG_EXECUTABLE)
|
@ -0,0 +1,60 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3)
|
||||
|
||||
# ROOT_DIR should be set to root of the repository (where to find the .svn or .hg directory)
|
||||
# SOURCE_DIR should be set to root of your code (where to find CMakeLists.txt)
|
||||
|
||||
# Replace spaces by semi-columns
|
||||
IF(CMAKE_MODULE_PATH)
|
||||
STRING(REPLACE " " ";" CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
|
||||
ENDIF(CMAKE_MODULE_PATH)
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${SOURCE_DIR}/CMakeModules ${CMAKE_MODULE_PATH})
|
||||
|
||||
IF(NOT ROOT_DIR AND SOURCE_DIR)
|
||||
SET(ROOT_DIR ${SOURCE_DIR})
|
||||
ENDIF(NOT ROOT_DIR AND SOURCE_DIR)
|
||||
|
||||
IF(NOT SOURCE_DIR AND ROOT_DIR)
|
||||
SET(SOURCE_DIR ${ROOT_DIR})
|
||||
ENDIF(NOT SOURCE_DIR AND ROOT_DIR)
|
||||
|
||||
MACRO(NOW RESULT)
|
||||
IF (WIN32)
|
||||
EXECUTE_PROCESS(COMMAND "wmic" "os" "get" "localdatetime" OUTPUT_VARIABLE DATETIME)
|
||||
IF(NOT DATETIME MATCHES "ERROR")
|
||||
STRING(REGEX REPLACE ".*\n([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9]).*" "\\1-\\2-\\3 \\4:\\5:\\6" ${RESULT} "${DATETIME}")
|
||||
ENDIF(NOT DATETIME MATCHES "ERROR")
|
||||
ELSEIF(UNIX)
|
||||
EXECUTE_PROCESS(COMMAND "date" "+%Y-%m-%d %H:%M:%S" OUTPUT_VARIABLE DATETIME)
|
||||
STRING(REGEX REPLACE "([0-9: -]+).*" "\\1" ${RESULT} "${DATETIME}")
|
||||
ELSE (WIN32)
|
||||
MESSAGE(SEND_ERROR "date not implemented")
|
||||
SET(${RESULT} "0000-00-00 00:00:00")
|
||||
ENDIF (WIN32)
|
||||
ENDMACRO(NOW)
|
||||
|
||||
IF(EXISTS "${ROOT_DIR}/.svn/")
|
||||
FIND_PACKAGE(Subversion)
|
||||
|
||||
IF(SUBVERSION_FOUND)
|
||||
Subversion_WC_INFO(${ROOT_DIR} ER)
|
||||
SET(REVISION ${ER_WC_REVISION})
|
||||
ENDIF(SUBVERSION_FOUND)
|
||||
ENDIF(EXISTS "${ROOT_DIR}/.svn/")
|
||||
|
||||
IF(EXISTS "${ROOT_DIR}/.hg/")
|
||||
FIND_PACKAGE(Mercurial)
|
||||
|
||||
IF(MERCURIAL_FOUND)
|
||||
Mercurial_WC_INFO(${ROOT_DIR} ER)
|
||||
SET(REVISION ${ER_WC_REVISION})
|
||||
ENDIF(MERCURIAL_FOUND)
|
||||
ENDIF(EXISTS "${ROOT_DIR}/.hg/")
|
||||
|
||||
IF(REVISION)
|
||||
IF(EXISTS ${SOURCE_DIR}/revision.h.in)
|
||||
NOW(BUILD_DATE)
|
||||
CONFIGURE_FILE(${SOURCE_DIR}/revision.h.in revision.h.txt)
|
||||
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy revision.h.txt revision.h) # copy_if_different
|
||||
ENDIF(EXISTS ${SOURCE_DIR}/revision.h.in)
|
||||
ENDIF(REVISION)
|
File diff suppressed because it is too large
Load Diff
@ -1,46 +0,0 @@
|
||||
#
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in \
|
||||
configure \
|
||||
libtool \
|
||||
config.guess \
|
||||
config.sub \
|
||||
ltconfig \
|
||||
aclocal.m4 \
|
||||
config.h.in \
|
||||
install-sh \
|
||||
missing \
|
||||
mkinstalldirs \
|
||||
ltmain.sh \
|
||||
include/nelconfig.h \
|
||||
include/nelconfig.h.in \
|
||||
include/nel/nelconfig.h
|
||||
|
||||
DISTCLEANFILES = include/stamp-h \
|
||||
include/stamp-h.in
|
||||
|
||||
SUBDIRS = include src @TOOLS_SUBDIR@ @SAMPLE_SUBDIR@
|
||||
|
||||
bin_SCRIPTS = nel-config
|
||||
|
||||
EXTRA_DIST = nel.dsw \
|
||||
nel.sln \
|
||||
nel_8.sln \
|
||||
autogen.sh \
|
||||
nel.m4 \
|
||||
automacros \
|
||||
doc \
|
||||
kdevelop \
|
||||
tools \
|
||||
samples
|
||||
|
||||
dist-hook:
|
||||
find $(distdir) -name CVS -print | xargs rm -fr
|
||||
find $(distdir) -name .svn -print | xargs rm -fr
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = nel.m4
|
||||
|
||||
# End of Makefile.am
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,32 +0,0 @@
|
||||
#!/bin/sh -
|
||||
|
||||
WANT_AUTOMAKE="1.6"
|
||||
|
||||
case `uname -s` in
|
||||
Darwin)
|
||||
LIBTOOLIZE=glibtoolize
|
||||
;;
|
||||
*)
|
||||
LIBTOOLIZE=libtoolize
|
||||
;;
|
||||
esac
|
||||
|
||||
# be able to customize the aclocal (for example to add extra param)
|
||||
if test "x$ACLOCAL" = "x"
|
||||
then
|
||||
ACLOCAL=aclocal
|
||||
fi
|
||||
|
||||
echo "Creating macros..." && \
|
||||
$ACLOCAL -I automacros/ && \
|
||||
echo "Creating library tools..." && \
|
||||
$LIBTOOLIZE --force && \
|
||||
echo "Creating header templates..." && \
|
||||
autoheader && \
|
||||
echo "Creating Makefile templates..." && \
|
||||
automake --gnu --add-missing && \
|
||||
echo "Creating 'configure'..." && \
|
||||
autoconf && \
|
||||
echo "" && \
|
||||
echo "Run: ./configure; make; make install" && \
|
||||
echo ""
|
@ -1,196 +0,0 @@
|
||||
# Configure paths for GTK+
|
||||
# Owen Taylor 1997-2001
|
||||
|
||||
dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||
dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
|
||||
dnl pass to pkg-config
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_GTK_2_0],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from pkg-config
|
||||
dnl
|
||||
AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
|
||||
, enable_gtktest=yes)
|
||||
|
||||
pkg_config_args=gtk+-2.0
|
||||
for module in . $4
|
||||
do
|
||||
case "$module" in
|
||||
gthread)
|
||||
pkg_config_args="$pkg_config_args gthread-2.0"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
no_gtk=""
|
||||
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
|
||||
if test x$PKG_CONFIG != xno ; then
|
||||
if pkg-config --atleast-pkgconfig-version 0.7 ; then
|
||||
:
|
||||
else
|
||||
echo "*** pkg-config too old; version 0.7 or better required."
|
||||
no_gtk=yes
|
||||
PKG_CONFIG=no
|
||||
fi
|
||||
else
|
||||
no_gtk=yes
|
||||
fi
|
||||
|
||||
min_gtk_version=ifelse([$1], ,2.0.0,$1)
|
||||
AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
|
||||
|
||||
if test x$PKG_CONFIG != xno ; then
|
||||
## don't try to run the test against uninstalled libtool libs
|
||||
if $PKG_CONFIG --uninstalled $pkg_config_args; then
|
||||
echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
|
||||
enable_gtktest=no
|
||||
fi
|
||||
|
||||
if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
|
||||
:
|
||||
else
|
||||
no_gtk=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$no_gtk" = x ; then
|
||||
GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
|
||||
GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
|
||||
gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_gtktest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$GTK_LIBS $LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
|
||||
dnl checks the results of pkg-config to some extent)
|
||||
dnl
|
||||
rm -f conf.gtktest
|
||||
AC_TRY_RUN([
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.gtktest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_gtk_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_gtk_version");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((gtk_major_version != $gtk_config_major_version) ||
|
||||
(gtk_minor_version != $gtk_config_minor_version) ||
|
||||
(gtk_micro_version != $gtk_config_micro_version))
|
||||
{
|
||||
printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
||||
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf ("*** was found! If pkg-config was correct, then it is best\n");
|
||||
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
||||
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||
printf("*** required on your system.\n");
|
||||
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
|
||||
printf("*** to point to the correct configuration files\n");
|
||||
}
|
||||
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
||||
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
||||
(gtk_micro_version != GTK_MICRO_VERSION))
|
||||
{
|
||||
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
||||
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||
printf("*** library (version %d.%d.%d)\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gtk_major_version > major) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
||||
major, minor, micro);
|
||||
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
||||
printf("***\n");
|
||||
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
|
||||
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||
printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
|
||||
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
|
||||
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||
printf("*** so that the correct libraries are found at run-time))\n");
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$no_gtk" = x ; then
|
||||
AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$PKG_CONFIG" = "no" ; then
|
||||
echo "*** A new enough version of pkg-config was not found."
|
||||
echo "*** See http://pkgconfig.sourceforge.net"
|
||||
else
|
||||
if test -f conf.gtktest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run GTK+ test program, checking why..."
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
|
||||
echo "*** version of GTK+. If it is not finding GTK+, 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 GTK+ is incorrectly installed."])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
GTK_CFLAGS=""
|
||||
GTK_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
rm -f conf.gtktest
|
||||
])
|
@ -1,102 +0,0 @@
|
||||
# Configure paths for libogg
|
||||
# Jack Moffitt <jack@icecast.org> 10-21-2000
|
||||
# Shamelessly stolen from Owen Taylor and Manish Singh
|
||||
|
||||
dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
|
||||
dnl
|
||||
AC_DEFUN([XIPH_PATH_OGG],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries
|
||||
dnl
|
||||
AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
|
||||
AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
|
||||
AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
|
||||
AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
|
||||
|
||||
if test "x$ogg_libraries" != "x" ; then
|
||||
OGG_LIBS="-L$ogg_libraries"
|
||||
elif test "x$ogg_prefix" != "x" ; then
|
||||
OGG_LIBS="-L$ogg_prefix/lib"
|
||||
elif test "x$prefix" != "xNONE" ; then
|
||||
OGG_LIBS="-L$prefix/lib"
|
||||
fi
|
||||
|
||||
OGG_LIBS="$OGG_LIBS -logg"
|
||||
|
||||
if test "x$ogg_includes" != "x" ; then
|
||||
OGG_CFLAGS="-I$ogg_includes"
|
||||
elif test "x$ogg_prefix" != "x" ; then
|
||||
OGG_CFLAGS="-I$ogg_prefix/include"
|
||||
elif test "x$prefix" != "xNONE"; then
|
||||
OGG_CFLAGS="-I$prefix/include"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for Ogg)
|
||||
no_ogg=""
|
||||
|
||||
|
||||
if test "x$enable_oggtest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $OGG_CFLAGS"
|
||||
LIBS="$LIBS $OGG_LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed Ogg is sufficiently new.
|
||||
dnl
|
||||
rm -f conf.oggtest
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ogg/ogg.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
system("touch conf.oggtest");
|
||||
return 0;
|
||||
}
|
||||
|
||||
],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
|
||||
if test "x$no_ogg" = "x" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$1], , :, [$1])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test -f conf.oggtest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run Ogg test program, checking why..."
|
||||
CFLAGS="$CFLAGS $OGG_CFLAGS"
|
||||
LIBS="$LIBS $OGG_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include <ogg/ogg.h>
|
||||
], [ return 0; ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding Ogg or finding the wrong"
|
||||
echo "*** version of Ogg. If it is not finding Ogg, 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 Ogg was incorrectly installed"
|
||||
echo "*** or that you have moved Ogg since it was installed." ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
OGG_CFLAGS=""
|
||||
OGG_LIBS=""
|
||||
ifelse([$2], , :, [$2])
|
||||
fi
|
||||
AC_SUBST(OGG_CFLAGS)
|
||||
AC_SUBST(OGG_LIBS)
|
||||
rm -f conf.oggtest
|
||||
])
|
@ -1,157 +0,0 @@
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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.
|
||||
|
||||
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
# ----------------------------------
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
|
||||
fi[]dnl
|
||||
])# PKG_PROG_PKG_CONFIG
|
||||
|
||||
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# Check to see whether a particular set of modules exists. Similar
|
||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
#
|
||||
#
|
||||
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
|
||||
# this or PKG_CHECK_MODULES is called, or make sure to call
|
||||
# PKG_CHECK_EXISTS manually
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_ifval([$2], [$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
|
||||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
# ---------------------------------------------
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$PKG_CONFIG"; then
|
||||
if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
else
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
|
||||
[pkg_failed=yes])
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])# _PKG_CONFIG
|
||||
|
||||
# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
# -----------------------------
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
# [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
#
|
||||
# Note that if there is a possibility the first call to
|
||||
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
#
|
||||
#
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $1])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
ifelse([$4], , [AC_MSG_ERROR(dnl
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT
|
||||
])],
|
||||
[AC_MSG_RESULT([no])
|
||||
$4])
|
||||
elif test $pkg_failed = untried; then
|
||||
ifelse([$4], , [AC_MSG_FAILURE(dnl
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
|
||||
[$4])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
ifelse([$3], , :, [$3])
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
@ -1,122 +0,0 @@
|
||||
# Configure paths for libvorbis
|
||||
# Jack Moffitt <jack@icecast.org> 10-21-2000
|
||||
# Shamelessly stolen from Owen Taylor and Manish Singh
|
||||
# thomasvs added check for vorbis_bitrate_addblock which is new in rc3
|
||||
|
||||
dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
|
||||
dnl
|
||||
AC_DEFUN([XIPH_PATH_VORBIS],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries
|
||||
dnl
|
||||
AC_ARG_WITH(vorbis,[ --with-vorbis=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
|
||||
AC_ARG_WITH(vorbis-libraries,[ --with-vorbis-libraries=DIR Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="")
|
||||
AC_ARG_WITH(vorbis-includes,[ --with-vorbis-includes=DIR Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="")
|
||||
AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
|
||||
|
||||
if test "x$vorbis_libraries" != "x" ; then
|
||||
VORBIS_LIBS="-L$vorbis_libraries"
|
||||
elif test "x$vorbis_prefix" != "x" ; then
|
||||
VORBIS_LIBS="-L$vorbis_prefix/lib"
|
||||
elif test "x$prefix" != "xNONE"; then
|
||||
VORBIS_LIBS="-L$prefix/lib"
|
||||
fi
|
||||
|
||||
VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
|
||||
VORBISFILE_LIBS="-lvorbisfile"
|
||||
VORBISENC_LIBS="-lvorbisenc"
|
||||
|
||||
if test "x$vorbis_includes" != "x" ; then
|
||||
VORBIS_CFLAGS="-I$vorbis_includes"
|
||||
elif test "x$vorbis_prefix" != "x" ; then
|
||||
VORBIS_CFLAGS="-I$vorbis_prefix/include"
|
||||
elif test "x$prefix" != "xNONE"; then
|
||||
VORBIS_CFLAGS="-I$prefix/include"
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for Vorbis)
|
||||
no_vorbis=""
|
||||
|
||||
|
||||
if test "x$enable_vorbistest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
|
||||
LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed Vorbis is sufficiently new.
|
||||
dnl
|
||||
rm -f conf.vorbistest
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <vorbis/codec.h>
|
||||
#include <vorbis/vorbisenc.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
vorbis_block vb;
|
||||
vorbis_dsp_state vd;
|
||||
vorbis_info vi;
|
||||
|
||||
vorbis_info_init (&vi);
|
||||
vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1);
|
||||
vorbis_analysis_init (&vd, &vi);
|
||||
vorbis_block_init (&vd, &vb);
|
||||
/* this function was added in 1.0rc3, so this is what we're testing for */
|
||||
vorbis_bitrate_addblock (&vb);
|
||||
|
||||
system("touch conf.vorbistest");
|
||||
return 0;
|
||||
}
|
||||
|
||||
],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
|
||||
if test "x$no_vorbis" = "x" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$1], , :, [$1])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test -f conf.vorbistest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run Vorbis test program, checking why..."
|
||||
CFLAGS="$CFLAGS $VORBIS_CFLAGS"
|
||||
LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include <vorbis/codec.h>
|
||||
], [ return 0; ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
|
||||
echo "*** version of Vorbis. If it is not finding Vorbis, 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 Vorbis was incorrectly installed"
|
||||
echo "*** or that you have moved Vorbis since it was installed." ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
VORBIS_CFLAGS=""
|
||||
VORBIS_LIBS=""
|
||||
VORBISFILE_LIBS=""
|
||||
VORBISENC_LIBS=""
|
||||
ifelse([$2], , :, [$2])
|
||||
fi
|
||||
AC_SUBST(VORBIS_CFLAGS)
|
||||
AC_SUBST(VORBIS_LIBS)
|
||||
AC_SUBST(VORBISFILE_LIBS)
|
||||
AC_SUBST(VORBISENC_LIBS)
|
||||
rm -f conf.vorbistest
|
||||
])
|
@ -1,599 +0,0 @@
|
||||
# ====================================================================
|
||||
# Configuration script for NeL
|
||||
# ====================================================================
|
||||
#
|
||||
# $Id: configure.ac,v 1.8 2005/04/14 15:54:32 cado Exp $
|
||||
#
|
||||
|
||||
# ====================================================================
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
# ====================================================================
|
||||
|
||||
# If you want to change the version, must must change AC_INIT
|
||||
# *and* AC_SUBST(LIBTOOL_VERSION)
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([nel],[0.8.0],[nel-all@nevrax.org])
|
||||
AM_INIT_AUTOMAKE([tar-ustar])
|
||||
|
||||
AC_CONFIG_SRCDIR(include/nel/misc/types_nl.h)
|
||||
AM_CONFIG_HEADER(include/nelconfig.h)
|
||||
|
||||
AC_SUBST(LIBTOOL_VERSION, [0:7:0])
|
||||
|
||||
# Checks for programs.
|
||||
AC_CANONICAL_HOST
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CPP
|
||||
AC_PROG_YACC
|
||||
AC_PROG_LEX
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_LIBTOOL
|
||||
AM_PROG_LIBTOOL
|
||||
AM_SANITY_CHECK
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
|
||||
# Template needed to generate the nelconfig.h.in
|
||||
AH_TEMPLATE([NEL_DEFAULT_DISPLAYER],[Define to 1 if you want log on standard output])
|
||||
AH_TEMPLATE([NEL_LOG_IN_FILE],[Define to 1 if you want a debug log.log file in the current directory])
|
||||
AH_TEMPLATE([HAVE_X86],[Define to 1 if you are on a INTEL compatible processor])
|
||||
AH_TEMPLATE([HAVE_X86_64],[Define to 1 if you are on AMD opteron 64bits processor])
|
||||
AH_TEMPLATE([NL_USE_GTK], [Define to 1 if you want GTK support])
|
||||
|
||||
# Get host type info
|
||||
if test "$host_cpu" = "i386" -o "$host_cpu" = "i486" -o "$host_cpu" = "i586" \
|
||||
-o "$host_cpu" = "i686" -o "$host_cpu" = "i786" -o "$host_cpu" = "x86_64"
|
||||
then
|
||||
AC_DEFINE([HAVE_X86])
|
||||
fi
|
||||
|
||||
if test "$host_cpu" = "x86_64"
|
||||
then
|
||||
AC_DEFINE([HAVE_X86_64])
|
||||
fi
|
||||
|
||||
# The following hack should ensure that configure doesnt add optimizing
|
||||
# or debugging flags to CFLAGS or CXXFLAGS
|
||||
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing -ftemplate-depth-24 -fno-stack-protector"
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# Checks NeL modules (net, 3d) to install / Disable
|
||||
# ====================================================================
|
||||
|
||||
# The misc is mandatory, it is use by the other modules.
|
||||
|
||||
NEL_SUBDIRS="misc"
|
||||
|
||||
# NeL libraries that are enabled by default
|
||||
|
||||
# Network library
|
||||
AC_ARG_ENABLE([net],
|
||||
AC_HELP_STRING([--disable-net],
|
||||
[disable compilation and install of NeL Network]),
|
||||
[],
|
||||
[enable_net=yes])
|
||||
|
||||
if test "$enable_net" = "no"
|
||||
then
|
||||
AC_MSG_RESULT([disable NeL Network])
|
||||
else
|
||||
NEL_SUBDIRS="$NEL_SUBDIRS net"
|
||||
fi
|
||||
|
||||
# 3D library
|
||||
AC_ARG_ENABLE([3d],
|
||||
AC_HELP_STRING([--disable-3d],
|
||||
[disable compilation and install of NeL 3D]),
|
||||
[],
|
||||
[enable_3d=yes])
|
||||
|
||||
if test "$enable_3d" = "no"
|
||||
then
|
||||
AC_MSG_RESULT([disable NeL 3D])
|
||||
else
|
||||
NEL_SUBDIRS="$NEL_SUBDIRS 3d"
|
||||
fi
|
||||
|
||||
# PACS library
|
||||
AC_ARG_ENABLE([pacs],
|
||||
AC_HELP_STRING([--disable-pacs],
|
||||
[disable compilation and install of NeL PACS]),
|
||||
[],
|
||||
[enable_pacs=yes])
|
||||
|
||||
if test "$enable_pacs" = "no"
|
||||
then
|
||||
AC_MSG_RESULT([disable NeL PACS])
|
||||
else
|
||||
NEL_SUBDIRS="$NEL_SUBDIRS pacs"
|
||||
fi
|
||||
|
||||
# Georges library
|
||||
AC_ARG_ENABLE([georges],
|
||||
AC_HELP_STRING([--disable-georges],
|
||||
[disable compilation and install of NeL Georges]),
|
||||
[],
|
||||
[enable_georges=yes])
|
||||
|
||||
if test "$enable_georges" = "no"
|
||||
then
|
||||
AC_MSG_RESULT([disable NeL Georges])
|
||||
else
|
||||
NEL_SUBDIRS="$NEL_SUBDIRS georges"
|
||||
fi
|
||||
|
||||
# Ligo library
|
||||
AC_ARG_ENABLE([ligo],
|
||||
AC_HELP_STRING([--disable-ligo],
|
||||
[disable compilation and install of NeL Ligo]),
|
||||
[],
|
||||
[enable_ligo=yes])
|
||||
|
||||
if test "$enable_ligo" = "no"
|
||||
then
|
||||
AC_MSG_RESULT([disable NeL Ligo])
|
||||
else
|
||||
NEL_SUBDIRS="$NEL_SUBDIRS ligo"
|
||||
fi
|
||||
|
||||
|
||||
# NeL libraries that are disabled by default
|
||||
|
||||
# Sound library
|
||||
AC_ARG_ENABLE([sound],
|
||||
AC_HELP_STRING([--enable-sound],
|
||||
[enable compilation and install of NeL Sound]),
|
||||
[],
|
||||
[enable_sound=no])
|
||||
|
||||
if test "$enable_sound" = "yes"
|
||||
then
|
||||
AC_MSG_RESULT([enable NeL Sound])
|
||||
NEL_SUBDIRS="$NEL_SUBDIRS sound"
|
||||
fi
|
||||
|
||||
# CEGUI Renderer library
|
||||
AC_ARG_ENABLE([cegui],
|
||||
AC_HELP_STRING([--enable-cegui],
|
||||
[enable compilation and install of NeL CEGUI Renderer]),
|
||||
[],
|
||||
[enable_cegui=no])
|
||||
|
||||
CEGUI_SUBDIR=""
|
||||
if test "$enable_cegui" = "yes"
|
||||
then
|
||||
AC_MSG_RESULT([enable NeL CEGUI Renderer])
|
||||
NEL_SUBDIRS="$NEL_SUBDIRS cegui"
|
||||
CEGUI_SUBDIR="cegui"
|
||||
fi
|
||||
|
||||
# Unit Tests
|
||||
AC_ARG_ENABLE([tests],
|
||||
AC_HELP_STRING([--enable-tests],
|
||||
[enable unit tests of NeL]),
|
||||
[],
|
||||
[enable_tests=no])
|
||||
|
||||
if test "$enable_tests" = "yes"
|
||||
then
|
||||
AC_MSG_RESULT([enable NeL Unit Tests])
|
||||
fi
|
||||
|
||||
# Code Coverage
|
||||
AC_ARG_ENABLE([coverage],
|
||||
AC_HELP_STRING([--enable-coverage],
|
||||
[enable code coverage generation]),
|
||||
[]
|
||||
[enable_coverage=no])
|
||||
|
||||
if test "$enable_coverage" = "yes"
|
||||
then
|
||||
AC_MSG_RESULT([enable Code Coverage generation])
|
||||
|
||||
CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
|
||||
fi
|
||||
|
||||
# Enable/disable samples compilation.
|
||||
AC_ARG_ENABLE([samples],
|
||||
AC_HELP_STRING([--disable-samples],
|
||||
[disable sample code]),
|
||||
[],
|
||||
[enable_samples="yes"])
|
||||
|
||||
if test "$enable_samples" = "no"
|
||||
then
|
||||
AC_MSG_RESULT([disable sample code.])
|
||||
SAMPLE_SUBDIR=""
|
||||
else
|
||||
SAMPLE_SUBDIR="samples"
|
||||
fi
|
||||
|
||||
# Enable/disable tools compilation.
|
||||
AC_ARG_ENABLE([tools],
|
||||
AC_HELP_STRING([--disable-tools],
|
||||
[disable tools code]),
|
||||
[],
|
||||
[enable_tools="yes"])
|
||||
|
||||
if test "$enable_tools" = "no"
|
||||
then
|
||||
AC_MSG_RESULT([disable tools code.])
|
||||
TOOLS_SUBDIR=""
|
||||
else
|
||||
TOOLS_SUBDIR="tools"
|
||||
fi
|
||||
|
||||
AC_SUBST([enable_net])
|
||||
AC_SUBST([enable_3d])
|
||||
AC_SUBST([enable_pacs])
|
||||
AC_SUBST([enable_sound])
|
||||
AC_SUBST([enable_georges])
|
||||
AC_SUBST([enable_ligo])
|
||||
AC_SUBST([enable_cegui])
|
||||
|
||||
AC_SUBST([NEL_SUBDIRS])
|
||||
AC_SUBST([SAMPLE_SUBDIR])
|
||||
AC_SUBST([TOOLS_SUBDIR])
|
||||
AC_SUBST([CEGUI_SUBDIR])
|
||||
|
||||
# ====================================================================
|
||||
# Checks for programs.
|
||||
# ====================================================================
|
||||
|
||||
# ====================================================================
|
||||
# Configure Settings
|
||||
# ====================================================================
|
||||
|
||||
# Disable the static linking by default
|
||||
# AC_DISABLE_STATIC
|
||||
|
||||
# Use C++ compiler as a default for the compilation tests.
|
||||
AC_LANG([C++])
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# Debug/optimized compilation mode
|
||||
# ====================================================================
|
||||
|
||||
AM_NEL_DEBUG
|
||||
|
||||
AC_ARG_WITH([logging],
|
||||
AC_HELP_STRING([--without-logging],
|
||||
[be silent on stdout and in no log.log]),
|
||||
[],
|
||||
[with_logging=yes])
|
||||
|
||||
if test "$with_logging" = "yes"
|
||||
then
|
||||
AC_DEFINE([NEL_DEFAULT_DISPLAYER], 1)
|
||||
AC_DEFINE([NEL_LOG_IN_FILE], 1)
|
||||
fi
|
||||
|
||||
# ====================================================================
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
# ====================================================================
|
||||
|
||||
# Test endianness
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
# Supress GCC "multi-character character constant" warnings.
|
||||
if test "$ac_cv_cxx_compiler_gnu" = "yes";
|
||||
then
|
||||
if test "$with_debug" = "yes"
|
||||
then
|
||||
#
|
||||
# When debugging variables are declared for the sole purpose of
|
||||
# inspecting their content with a debugger. They are not used
|
||||
# in the code itself and this is legitimate, hence the -Wno-unused
|
||||
#
|
||||
CXXFLAGS="$CXXFLAGS -Wno-unused"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Add some common define
|
||||
if test "$ac_cv_cxx_compiler_gnu" = "yes";
|
||||
then
|
||||
CXXFLAGS="$CXXFLAGS -D_REENTRANT -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-long-long -Wno-unused"
|
||||
fi
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# Checks for header and lib files.
|
||||
# ====================================================================
|
||||
|
||||
AC_FUNC_ALLOCA
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h malloc.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h sys/time.h])
|
||||
AC_CHECK_LIB([pthread], [pthread_create])
|
||||
AC_CHECK_LIB([dl], [dlopen])
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
# ====================================================================
|
||||
|
||||
AC_HEADER_STDBOOL
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
AC_C_VOLATILE
|
||||
AC_CHECK_TYPES([ptrdiff_t])
|
||||
AC_CHECK_TYPES([size_t])
|
||||
AC_CHECK_TYPES([uintptr_t])
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# Checks for library functions.
|
||||
# ====================================================================
|
||||
|
||||
AC_FUNC_CLOSEDIR_VOID
|
||||
AC_FUNC_ERROR_AT_LINE
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_REALLOC
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_STAT
|
||||
AC_FUNC_STRFTIME
|
||||
AC_FUNC_FORK
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS([floor getcwd gethostbyaddr gethostbyname gethostname gettimeofday inet_ntoa memmove memset mkdir pow select socket sqrt strcasecmp strchr strdup strerror strrchr strstr strtoul sys/time.h])
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# X11
|
||||
|
||||
AC_PATH_X
|
||||
|
||||
if test ! "$no_x" = "yes"
|
||||
then
|
||||
if test ! X"$x_libraries" = X
|
||||
then
|
||||
LIBS="$LIBS -L$x_libraries"
|
||||
fi
|
||||
|
||||
if test ! X"$x_includes" = X
|
||||
then
|
||||
CXXFLAGS="$CXXFLAGS -I$x_includes"
|
||||
fi
|
||||
else
|
||||
if test "$enable_3d" = "yes"
|
||||
then
|
||||
AC_MSG_ERROR([X11 must be installed for NeL 3d library, use --disable-3d if you don't need NeL 3d library])
|
||||
fi
|
||||
fi
|
||||
|
||||
# ====================================================================
|
||||
# LibXML
|
||||
|
||||
# Use C compiler as a default for the libxml tests.
|
||||
AC_LANG([C])
|
||||
|
||||
AM_PATH_XML2([2.0.0], [], [AC_MSG_ERROR([libxml2 must be installed])])
|
||||
|
||||
CXXFLAGS="$CXXFLAGS $XML_CFLAGS $XML_CPPFLAGS"
|
||||
|
||||
LIBS="$LIBS $XML_LIBS"
|
||||
|
||||
# Use C++ compiler as a default for the compilation tests.
|
||||
AC_LANG([C++])
|
||||
|
||||
# ====================================================================
|
||||
# libpng
|
||||
|
||||
AC_CHECK_HEADER(png.h, [], AC_MSG_ERROR([libpng must be installed]))
|
||||
|
||||
# ====================================================================
|
||||
# libjpeg
|
||||
|
||||
AC_CHECK_HEADER(jpeglib.h, [], AC_MSG_ERROR([libjpeg must be installed]))
|
||||
|
||||
# ====================================================================
|
||||
# Checks for libraries.
|
||||
# ====================================================================
|
||||
|
||||
# ====================================================================
|
||||
# GTK 2.0+
|
||||
|
||||
AC_ARG_WITH([gtk],
|
||||
AC_HELP_STRING([--with-gtk],
|
||||
[add GTK dependent code like GTK displayer]),
|
||||
[],
|
||||
[with_gtk=no])
|
||||
|
||||
if test "$with_gtk" = "yes"
|
||||
then
|
||||
AC_LANG([C])
|
||||
|
||||
AM_PATH_GTK_2_0([2.0.0],
|
||||
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
AC_DEFINE(NL_USE_GTK, [], [Undef if you don't want to use anything GTK based like the GTK Displayer]
|
||||
)
|
||||
)
|
||||
|
||||
AC_LANG([C++])
|
||||
|
||||
AC_SUBST([with_gtk])
|
||||
fi
|
||||
|
||||
# ====================================================================
|
||||
# CEGUI
|
||||
|
||||
if test "$enable_cegui" = "yes"
|
||||
then
|
||||
PKG_CHECK_MODULES(CEGUI, CEGUI >= 0.4,
|
||||
[],
|
||||
[
|
||||
AC_MSG_ERROR([Couldn't find CEGUI or tests failed:
|
||||
$CEGUI_PKG_ERRORS
|
||||
Please go to http://crayzedsgui.sourceforge.net to get the latest, or check
|
||||
config.log to see why the tests failed, and fix it.])
|
||||
])
|
||||
fi
|
||||
|
||||
# ====================================================================
|
||||
# FreeType 2
|
||||
|
||||
AM_PATH_FREETYPE($enable_3d)
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# OpenGL
|
||||
|
||||
AM_PATH_OPENGL($enable_3d)
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# Check for XF86VidMode extension (-lXxf86vm)
|
||||
|
||||
AM_PATH_XF86VIDMODE
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# FMOD, OpenAL
|
||||
|
||||
if test "$enable_sound" = "yes"
|
||||
then
|
||||
AM_PATH_FMOD("no")
|
||||
AM_PATH_OPENAL("no")
|
||||
if test "$have_fmod" = "no" -a "$have_openal" = "no"
|
||||
then
|
||||
AC_MSG_ERROR([Either FMod or OpenAL must be installed to use sound.])
|
||||
fi
|
||||
if test "$have_fmod" = "yes"
|
||||
then
|
||||
SOUND_SUBDIRS="fmod"
|
||||
else
|
||||
SOUND_SUBDIRS=""
|
||||
fi
|
||||
if test "$have_openal" = "yes"
|
||||
then
|
||||
SOUND_SUBDIRS="$SOUND_SUBDIRS openal"
|
||||
|
||||
XIPH_PATH_OGG([], AC_MSG_ERROR([Driver OpenAL Requires libogg!]))
|
||||
XIPH_PATH_VORBIS([], AC_MSG_ERROR([Driver OpenAL Requires libvorbis!]))
|
||||
fi
|
||||
AC_SUBST([SOUND_SUBDIRS])
|
||||
fi
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# CppTest
|
||||
|
||||
#AM_PATH_CPPTEST($enable_tests)
|
||||
|
||||
# ====================================================================
|
||||
# Arrange for the include directory to be in the search path even when
|
||||
# build is done outside the source tree
|
||||
# Put the nelconfig.h define
|
||||
CXXFLAGS="$CXXFLAGS -I\${top_srcdir}/include -DHAVE_NELCONFIG_H"
|
||||
|
||||
# ====================================================================
|
||||
# Checks for library functions.
|
||||
# ====================================================================
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# Output files to generate.
|
||||
# ====================================================================
|
||||
|
||||
AC_CONFIG_FILES([Makefile \
|
||||
include/Makefile \
|
||||
include/nel/Makefile \
|
||||
include/nel/ligo/Makefile \
|
||||
include/nel/misc/Makefile \
|
||||
include/nel/net/Makefile \
|
||||
include/nel/3d/Makefile \
|
||||
include/nel/pacs/Makefile \
|
||||
include/nel/sound/Makefile \
|
||||
include/nel/georges/Makefile \
|
||||
include/nel/cegui/Makefile \
|
||||
src/Makefile \
|
||||
src/misc/Makefile \
|
||||
src/misc/nel-misc.pc \
|
||||
src/misc/config_file/Makefile \
|
||||
src/net/Makefile \
|
||||
src/3d/Makefile \
|
||||
src/3d/nel-3d.pc \
|
||||
src/3d/driver/Makefile \
|
||||
src/3d/driver/opengl/Makefile \
|
||||
src/3d/driver/opengl/nel-driverogl.pc \
|
||||
src/pacs/Makefile \
|
||||
src/sound/Makefile \
|
||||
src/sound/driver/Makefile \
|
||||
src/sound/driver/fmod/Makefile \
|
||||
src/sound/driver/openal/Makefile \
|
||||
src/georges/Makefile \
|
||||
src/ligo/Makefile \
|
||||
src/cegui/Makefile \
|
||||
tools/Makefile \
|
||||
tools/3d/Makefile \
|
||||
tools/3d/build_coarse_mesh/Makefile \
|
||||
tools/3d/build_far_bank/Makefile \
|
||||
tools/3d/build_smallbank/Makefile \
|
||||
tools/3d/ig_lighter/Makefile \
|
||||
tools/3d/ig_lighter_lib/Makefile \
|
||||
tools/3d/panoply_maker/Makefile \
|
||||
tools/3d/zone_dependencies/Makefile \
|
||||
tools/3d/zone_ig_lighter/Makefile \
|
||||
tools/3d/zone_lib/Makefile \
|
||||
tools/3d/zone_lighter/Makefile \
|
||||
tools/3d/zone_welder/Makefile \
|
||||
tools/misc/Makefile \
|
||||
tools/misc/bnp_make/Makefile \
|
||||
tools/misc/disp_sheet_id/Makefile \
|
||||
tools/misc/make_sheet_id/Makefile \
|
||||
tools/misc/xml_packer/Makefile \
|
||||
tools/pacs/Makefile \
|
||||
tools/pacs/build_ig_boxes/Makefile \
|
||||
tools/pacs/build_indoor_rbank/Makefile \
|
||||
tools/pacs/build_rbank/Makefile \
|
||||
samples/Makefile \
|
||||
samples/sound_sources/Makefile \
|
||||
samples/pacs/Makefile \
|
||||
samples/georges/Makefile \
|
||||
samples/3d/Makefile \
|
||||
samples/3d/font/Makefile \
|
||||
samples/3d/cluster_viewer/Makefile \
|
||||
samples/3d/cluster_viewer/shapes/Makefile \
|
||||
samples/3d/cluster_viewer/groups/Makefile \
|
||||
samples/3d/cluster_viewer/fonts/Makefile \
|
||||
samples/3d/cegui/Makefile \
|
||||
samples/misc/Makefile \
|
||||
samples/misc/command/Makefile \
|
||||
samples/misc/configfile/Makefile \
|
||||
samples/misc/debug/Makefile \
|
||||
samples/misc/i18n/Makefile \
|
||||
samples/misc/log/Makefile \
|
||||
samples/misc/strings/Makefile \
|
||||
samples/misc/types_check/Makefile \
|
||||
samples/net/Makefile \
|
||||
samples/net/chat/Makefile \
|
||||
samples/net/udp/Makefile \
|
||||
samples/net/login_system/Makefile \
|
||||
nel-config
|
||||
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
# samples/net/class_transport/Makefile \
|
||||
# tools/nel_unit_test/Makefile \
|
||||
# tools/nel_unit_test/misc_ut/Makefile \
|
||||
# tools/nel_unit_test/ligo_ut/Makefile \
|
||||
# tools/nel_unit_test/net_ut/Makefile \
|
||||
# tools/nel_unit_test/net_ut/net_service_lib_test/Makefile \
|
||||
# tools/nel_unit_test/net_ut/net_module_lib_test/Makefile \
|
||||
# End of configure.in
|
@ -1,10 +0,0 @@
|
||||
#
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
SUBDIRS = nel
|
||||
|
||||
pkginclude_HEADERS = nelconfig.h
|
||||
|
||||
# End of Makefile.am
|
@ -1,343 +0,0 @@
|
||||
#
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
includedir = ${prefix}/include/nel/3d
|
||||
|
||||
include_HEADERS = \
|
||||
animatable.h \
|
||||
animated_lightmap.h \
|
||||
animated_material.h \
|
||||
animated_morph.h \
|
||||
animated_value.h \
|
||||
animation.h \
|
||||
animation_optimizer.h \
|
||||
animation_playlist.h \
|
||||
animation_set.h \
|
||||
animation_set_user.h \
|
||||
animation_time.h \
|
||||
anim_ctrl.h \
|
||||
anim_detail_trav.h \
|
||||
async_file_manager_3d.h \
|
||||
async_texture_block.h \
|
||||
async_texture_manager.h \
|
||||
bezier_patch.h \
|
||||
bloom_effect.h \
|
||||
bone.h \
|
||||
bsp_tree.h \
|
||||
camera_col.h \
|
||||
camera.h \
|
||||
channel_mixer.h \
|
||||
clip_trav.h \
|
||||
cloud.h \
|
||||
cloud_scape.h \
|
||||
cloud_scape_user.h \
|
||||
cluster.h \
|
||||
coarse_mesh_build.h \
|
||||
coarse_mesh_manager.h \
|
||||
computed_string.h \
|
||||
cube_grid.h \
|
||||
cube_map_builder.h \
|
||||
debug_vb.h \
|
||||
deform_2d.h \
|
||||
driver.h \
|
||||
driver_material_inline.h \
|
||||
driver_user.h \
|
||||
dru.h \
|
||||
event_mouse_listener.h \
|
||||
fasthls_modifier.h \
|
||||
fast_ptr_list.h \
|
||||
flare_model.h \
|
||||
flare_shape.h \
|
||||
font_generator.h \
|
||||
font_manager.h \
|
||||
frustum.h \
|
||||
heat_haze.h \
|
||||
height_map.h \
|
||||
hls_color_texture.h \
|
||||
hls_texture_bank.h \
|
||||
hls_texture_manager.h \
|
||||
hrc_trav.h \
|
||||
ig_surface_light_build.h \
|
||||
ig_surface_light.h \
|
||||
index_buffer.h \
|
||||
init_3d.h \
|
||||
instance_group_user.h \
|
||||
instance_lighter.h \
|
||||
key.h \
|
||||
landscape_collision_grid.h \
|
||||
landscape_def.h \
|
||||
landscape_face_vector_manager.h \
|
||||
landscape.h \
|
||||
landscapeig_manager.h \
|
||||
landscape_model.h \
|
||||
landscape_profile.h \
|
||||
landscape_user.h \
|
||||
landscapevb_allocator.h \
|
||||
landscapevb_info.h \
|
||||
landscape_vegetable_block.h \
|
||||
layered_ordering_table.h \
|
||||
light_contribution.h \
|
||||
light.h \
|
||||
light_influence_interpolator.h \
|
||||
lighting_manager.h \
|
||||
light_trav.h \
|
||||
light_user.h \
|
||||
load_balancing_trav.h \
|
||||
lod_character_builder.h \
|
||||
lod_character_instance.h \
|
||||
lod_character_manager.h \
|
||||
lod_character_shape_bank.h \
|
||||
lod_character_shape.h \
|
||||
lod_character_texture.h \
|
||||
logic_info.h \
|
||||
material.h \
|
||||
matrix_3x4.h \
|
||||
mesh_base.h \
|
||||
mesh_base_instance.h \
|
||||
mesh_blender.h \
|
||||
mesh_block_manager.h \
|
||||
mesh_geom.h \
|
||||
mesh.h \
|
||||
mesh_instance.h \
|
||||
mesh_morpher.h \
|
||||
mesh_mrm.h \
|
||||
mesh_mrm_instance.h \
|
||||
mesh_mrm_skinned.h \
|
||||
mesh_mrm_skinned_instance.h \
|
||||
mesh_multi_lod.h \
|
||||
mesh_multi_lod_instance.h \
|
||||
mesh_vertex_program.h \
|
||||
meshvp_per_pixel_light.h \
|
||||
meshvp_wind_tree.h \
|
||||
mini_col.h \
|
||||
motion_blur.h \
|
||||
mrm_builder.h \
|
||||
mrm_internal.h \
|
||||
mrm_level_detail.h \
|
||||
mrm_mesh.h \
|
||||
mrm_parameters.h \
|
||||
nelu.h \
|
||||
noise_3d.h \
|
||||
occlusion_query.h \
|
||||
ordering_table.h \
|
||||
packed_world.h \
|
||||
packed_zone.h \
|
||||
particle_system.h \
|
||||
particle_system_manager.h \
|
||||
particle_system_model.h \
|
||||
particle_system_process.h \
|
||||
particle_system_shape.h \
|
||||
patchdlm_context.h \
|
||||
patch.h \
|
||||
patch_rdr_pass.h \
|
||||
patchuv_locator.h \
|
||||
play_list_manager.h \
|
||||
play_list_manager_user.h \
|
||||
play_list_user.h \
|
||||
point_light.h \
|
||||
point_light_influence.h \
|
||||
point_light_model.h \
|
||||
point_light_named_array.h \
|
||||
point_light_named.h \
|
||||
portal.h \
|
||||
primitive_profile.h \
|
||||
ps_allocator.h \
|
||||
ps_attrib.h \
|
||||
ps_attrib_maker_bin_op.h \
|
||||
ps_attrib_maker_bin_op_inline.h \
|
||||
ps_attrib_maker.h \
|
||||
ps_attrib_maker_helper.h \
|
||||
ps_attrib_maker_iterators.h \
|
||||
ps_attrib_maker_template.h \
|
||||
ps_color.h \
|
||||
ps_direction.h \
|
||||
ps_dot.h \
|
||||
ps_edit.h \
|
||||
ps_emitter.h \
|
||||
ps_face.h \
|
||||
ps_face_look_at.h \
|
||||
ps_fan_light.h \
|
||||
ps_float.h \
|
||||
ps_force.h \
|
||||
ps_int.h \
|
||||
ps_iterator.h \
|
||||
ps_light.h \
|
||||
ps_located.h \
|
||||
ps_lod.h \
|
||||
ps_macro.h \
|
||||
ps_mesh.h \
|
||||
ps_misc.h \
|
||||
ps_particle2.h \
|
||||
ps_particle_basic.h \
|
||||
ps_particle.h \
|
||||
ps_plane_basis.h \
|
||||
ps_plane_basis_maker.h \
|
||||
ps_quad.h \
|
||||
ps_register_color_attribs.h \
|
||||
ps_register_float_attribs.h \
|
||||
ps_register_int_attribs.h \
|
||||
ps_register_plane_basis_attribs.h \
|
||||
ps_ribbon_base.h \
|
||||
ps_ribbon.h \
|
||||
ps_ribbon_look_at.h \
|
||||
ps_shockwave.h \
|
||||
ps_sound.h \
|
||||
ps_spawn_info.h \
|
||||
ps_tail_dot.h \
|
||||
ps_util.h \
|
||||
ps_zone.h \
|
||||
ptr_set.h \
|
||||
quad_effect.h \
|
||||
quad_grid_clip_cluster.h \
|
||||
quad_grid_clip_manager.h \
|
||||
quad_grid.h \
|
||||
quad_tree.h \
|
||||
radix_sort.h \
|
||||
raw_skin.h \
|
||||
raw_skinned.h \
|
||||
ray_mesh.h \
|
||||
register_3d.h \
|
||||
render_trav.h \
|
||||
root_model.h \
|
||||
scene_group.h \
|
||||
scene.h \
|
||||
scene_user.h \
|
||||
scissor.h \
|
||||
seg_remanence.h \
|
||||
seg_remanence_shape.h \
|
||||
shader.h \
|
||||
shadow_map.h \
|
||||
shadow_map_manager.h \
|
||||
shadow_poly_receiver.h \
|
||||
shadow_skin.h \
|
||||
shape_bank.h \
|
||||
shape_bank_user.h \
|
||||
shape.h \
|
||||
shape_info.h \
|
||||
shifted_triangle_cache.h \
|
||||
skeleton_model.h \
|
||||
skeleton_shape.h \
|
||||
skeleton_spawn_script.h \
|
||||
skeleton_weight.h \
|
||||
static_quad_grid.h \
|
||||
stripifier.h \
|
||||
surface_light_grid.h \
|
||||
tangent_space_build.h \
|
||||
target_anim_ctrl.h \
|
||||
tess_block.h \
|
||||
tessellation.h \
|
||||
tess_face_priority_list.h \
|
||||
tess_list.h \
|
||||
text_context.h \
|
||||
text_context_user.h \
|
||||
texture_blank.h \
|
||||
texture_blend.h \
|
||||
texture_bloom.h \
|
||||
texture_bump.h \
|
||||
texture_cube.h \
|
||||
texture_dlm.h \
|
||||
texture_emboss.h \
|
||||
texture_far.h \
|
||||
texture_file.h \
|
||||
texture_font.h \
|
||||
texture_grouped.h \
|
||||
texture.h \
|
||||
texture_mem.h \
|
||||
texture_multi_file.h \
|
||||
texture_near.h \
|
||||
texture_user.h \
|
||||
tile_bank.h \
|
||||
tile_color.h \
|
||||
tile_element.h \
|
||||
tile_far_bank.h \
|
||||
tile_light_influence.h \
|
||||
tile_lumel.h \
|
||||
tile_noise_map.h \
|
||||
tile_vegetable_desc.h \
|
||||
track_bezier.h \
|
||||
track.h \
|
||||
track_keyframer.h \
|
||||
track_sampled_common.h \
|
||||
track_sampled_quat.h \
|
||||
track_sampled_quat_small_header.h \
|
||||
track_sampled_vector.h \
|
||||
track_tcb.h \
|
||||
transformable.h \
|
||||
transform.h \
|
||||
transform_shape.h \
|
||||
trav_scene.h \
|
||||
u_3d_mouse_listener.h \
|
||||
u_animation.h \
|
||||
u_animation_set.h \
|
||||
u_bone.h \
|
||||
u_camera.h \
|
||||
u_cloud_scape.h \
|
||||
u_driver.h \
|
||||
u_instance_group.h \
|
||||
u_instance.h \
|
||||
u_instance_material.h \
|
||||
u_landscape.h \
|
||||
u_light.h \
|
||||
u_material.h \
|
||||
u_particle_system_instance.h \
|
||||
u_particle_system_sound.h \
|
||||
u_play_list.h \
|
||||
u_play_list_manager.h \
|
||||
u_point_light.h \
|
||||
u_ps_sound_impl.h \
|
||||
u_ps_sound_interface.h \
|
||||
u_scene.h \
|
||||
u_shape_bank.h \
|
||||
u_shape.h \
|
||||
u_skeleton.h \
|
||||
u_text_context.h \
|
||||
u_texture.h \
|
||||
u_track.h \
|
||||
u_transformable.h \
|
||||
u_transform.h \
|
||||
u_visual_collision_entity.h \
|
||||
u_visual_collision_manager.h \
|
||||
u_visual_collision_mesh.h \
|
||||
u_water_env_map.h \
|
||||
u_water.h \
|
||||
vegetable_blend_layer_model.h \
|
||||
vegetable_clip_block.h \
|
||||
vegetable_def.h \
|
||||
vegetable.h \
|
||||
vegetable_instance_group.h \
|
||||
vegetable_light_ex.h \
|
||||
vegetable_manager.h \
|
||||
vegetable_quadrant.h \
|
||||
vegetable_shape.h \
|
||||
vegetable_sort_block.h \
|
||||
vegetable_uv8.h \
|
||||
vegetablevb_allocator.h \
|
||||
vertex_buffer.h \
|
||||
vertex_buffer_heap.h \
|
||||
vertex_program.h \
|
||||
vertex_program_parse.h \
|
||||
vertex_stream_manager.h \
|
||||
viewport.h \
|
||||
visual_collision_entity.h \
|
||||
visual_collision_entity_user.h \
|
||||
visual_collision_manager.h \
|
||||
visual_collision_manager_user.h \
|
||||
visual_collision_mesh.h \
|
||||
water_env_map.h \
|
||||
water_env_map_user.h \
|
||||
water_height_map.h \
|
||||
water_model.h \
|
||||
water_pool_manager.h \
|
||||
water_shape.h \
|
||||
zone_corner_smoother.h \
|
||||
zone.h \
|
||||
zone_lighter.h \
|
||||
zone_manager.h \
|
||||
zone_search.h \
|
||||
zone_smoother.h \
|
||||
zone_symmetrisation.h \
|
||||
zone_tgt_smoother.h
|
||||
|
||||
# End of Makefile.am
|
@ -1,13 +0,0 @@
|
||||
#
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
DIST_SUBDIRS = net 3d pacs sound misc georges ligo
|
||||
|
||||
SUBDIRS = @NEL_SUBDIRS@
|
||||
|
||||
includedir = ${prefix}/include/nel
|
||||
|
||||
# End of Makefile.am
|
||||
|
@ -1,11 +0,0 @@
|
||||
#
|
||||
# $Id: Makefile.am,v 1.1 2001-08-01 08:45:06 valignat Exp $
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
includedir = ${prefix}/include/nel/cegui
|
||||
|
||||
include_HEADERS = nelrenderer.h nelresourceprovider.h neltexture.h
|
||||
|
||||
# End of Makefile.am
|
@ -1,15 +0,0 @@
|
||||
#
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
includedir = ${prefix}/include/nel/georges
|
||||
|
||||
include_HEADERS = load_form.h \
|
||||
u_form_dfn.h \
|
||||
u_form_elm.h \
|
||||
u_form.h \
|
||||
u_form_loader.h \
|
||||
u_type.h
|
||||
|
||||
# End of Makefile.am
|
@ -1,14 +0,0 @@
|
||||
#
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
includedir = ${prefix}/include/nel/ligo
|
||||
|
||||
include_HEADERS = ligo_config.h \
|
||||
primitive_class.h \
|
||||
primitive_configuration.h \
|
||||
primitive.h \
|
||||
primitive_utils.h
|
||||
|
||||
# End of Makefile.am
|
@ -1,143 +0,0 @@
|
||||
#
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
includedir = ${prefix}/include/nel/misc
|
||||
|
||||
include_HEADERS = aabbox.h \
|
||||
algo.h \
|
||||
app_context.h \
|
||||
array_2d.h \
|
||||
async_file_manager.h \
|
||||
big_file.h \
|
||||
bitmap.h \
|
||||
bit_mem_stream.h \
|
||||
bit_set.h \
|
||||
block_memory.h \
|
||||
bsphere.h \
|
||||
buf_fifo.h \
|
||||
check_fpu.h \
|
||||
class_id.h \
|
||||
class_registry.h \
|
||||
command.h \
|
||||
common.h \
|
||||
config_file.h \
|
||||
contiguous_block_allocator.h \
|
||||
co_task.h \
|
||||
cpu_time_stat.h \
|
||||
debug.h \
|
||||
di_event_emitter.h \
|
||||
diff_tool.h \
|
||||
displayer.h \
|
||||
dummy_window.h \
|
||||
dynloadlib.h \
|
||||
eid_translator.h \
|
||||
entity_id.h \
|
||||
enum_bitset.h \
|
||||
eval_num_expr.h \
|
||||
event_emitter.h \
|
||||
event_emitter_multi.h \
|
||||
event_listener.h \
|
||||
event_server.h \
|
||||
events.h \
|
||||
factory.h \
|
||||
fast_floor.h \
|
||||
fast_mem.h \
|
||||
file.h \
|
||||
fixed_size_allocator.h \
|
||||
game_device_events.h \
|
||||
game_device.h \
|
||||
geom_ext.h \
|
||||
grid_traversal.h \
|
||||
gtk_displayer.h \
|
||||
heap_memory.h \
|
||||
hierarchical_timer.h \
|
||||
historic.h \
|
||||
i18n.h \
|
||||
input_device.h \
|
||||
input_device_manager.h \
|
||||
input_device_server.h \
|
||||
inter_window_msg_queue.h \
|
||||
i_xml.h \
|
||||
keyboard_device.h \
|
||||
line.h \
|
||||
log.h \
|
||||
matrix.h \
|
||||
md5.h \
|
||||
mem_displayer.h \
|
||||
mem_stream.h \
|
||||
mouse_device.h \
|
||||
mouse_smoother.h \
|
||||
mutable_container.h \
|
||||
mutex.h \
|
||||
noise_value.h \
|
||||
object_arena_allocator.h \
|
||||
object_vector.h \
|
||||
o_xml.h \
|
||||
path.h \
|
||||
plane.h \
|
||||
plane_inline.h \
|
||||
polygon.h \
|
||||
pool_memory.h \
|
||||
progress_callback.h \
|
||||
p_thread.h \
|
||||
quad.h \
|
||||
quat.h \
|
||||
random.h \
|
||||
reader_writer.h \
|
||||
rect.h \
|
||||
report.h \
|
||||
resource_ptr.h \
|
||||
resource_ptr_inline.h \
|
||||
rgba.h \
|
||||
sha1.h \
|
||||
shared_memory.h \
|
||||
sheet_id.h \
|
||||
singleton.h \
|
||||
smart_ptr.h \
|
||||
smart_ptr_inline.h \
|
||||
speaker_listener.h \
|
||||
sstring.h \
|
||||
static_map.h \
|
||||
stl_block_allocator.h \
|
||||
stl_block_list.h \
|
||||
stop_watch.h \
|
||||
stream.h \
|
||||
stream_inline.h \
|
||||
string_common.h \
|
||||
string_conversion.h \
|
||||
string_id_array.h \
|
||||
string_mapper.h \
|
||||
string_stream.h \
|
||||
system_info.h \
|
||||
task_manager.h \
|
||||
tds.h \
|
||||
thread.h \
|
||||
time_nl.h \
|
||||
timeout_assertion_thread.h \
|
||||
traits_nl.h \
|
||||
triangle.h \
|
||||
twin_map.h \
|
||||
types_nl.h \
|
||||
ucstring.h \
|
||||
uv.h \
|
||||
value_smoother.h \
|
||||
variable.h \
|
||||
vector_2d.h \
|
||||
vector_2f.h \
|
||||
vectord.h \
|
||||
vectord_inline.h \
|
||||
vector.h \
|
||||
vector_h.h \
|
||||
vector_inline.h \
|
||||
win32_util.h \
|
||||
win_displayer.h \
|
||||
window_displayer.h \
|
||||
win_event_emitter.h \
|
||||
win_thread.h \
|
||||
win_tray.h \
|
||||
words_dictionary.h \
|
||||
xml_pack.h
|
||||
|
||||
# End of Makefile.am
|
@ -0,0 +1,139 @@
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef CDB_BANK_HANDLER
|
||||
#define CDB_BANK_HANDLER
|
||||
|
||||
#include <vector>
|
||||
#include "nel/misc/types_nl.h"
|
||||
|
||||
namespace NLMISC{
|
||||
|
||||
/**
|
||||
@brief Manages the bank names and mappings of the CDB it's associated with
|
||||
|
||||
Banks are numeric identifiers for the top-level branches of the CDB.
|
||||
They are used for saving bandwidth, because the local CDBs are updated with deltas,
|
||||
that identify the updatable top-level branch with this id.
|
||||
The CCDBBankHandler manages the mapping of banks to their names, unified (node) index,
|
||||
and the other way around.
|
||||
|
||||
*/
|
||||
class CCDBBankHandler{
|
||||
public:
|
||||
/**
|
||||
@brief The class' constructor
|
||||
@param maxbanks the maximum number of banks we need to handle
|
||||
*/
|
||||
CCDBBankHandler( uint maxbanks );
|
||||
|
||||
/// Very surprisingly this is the destructor
|
||||
~CCDBBankHandler(){}
|
||||
|
||||
/**
|
||||
@brief Returns the unified (node) index for the specified bank Id.
|
||||
@param bank The bank whose uid we need.
|
||||
@return Returns an uid or static_cast< uint >( -1 ) on failure.
|
||||
*/
|
||||
uint getUIDForBank( uint bank ) const;
|
||||
|
||||
/**
|
||||
@brief Returns the bank Id for the specified unified (node) index.
|
||||
@param uid The unified (node) index we need to translate to bank Id.
|
||||
@return Returns a bank Id.
|
||||
*/
|
||||
uint getBankForUID( uint uid ) const{ return _UnifiedIndexToBank[ uid ]; }
|
||||
|
||||
/// Returns the last unified (node) index we mapped.
|
||||
uint getLastUnifiedIndex() const{ return _CDBLastUnifiedIndex; }
|
||||
|
||||
/**
|
||||
@brief Returns the number of bits used to store the number of nodes that belong to this bank.
|
||||
@param bank The banks whose id bits we need.
|
||||
@return Returns the number of bits used to store the number of nodes that belong to this bank.
|
||||
*/
|
||||
uint getFirstLevelIdBits( uint bank ) const{ return _FirstLevelIdBitsByBank[ bank ]; }
|
||||
|
||||
/**
|
||||
@brief Returns the name of the specified bank.
|
||||
@param bank The id of the bank we need the name of.
|
||||
@return Returns the name of the specified bank.
|
||||
*/
|
||||
std::string getBankName( uint bank ) const{ return _CDBBankNames[ bank ]; }
|
||||
|
||||
/**
|
||||
@brief Looks up the bank Id of the bank name specified.
|
||||
@param name The name of the bank whose Id we need.
|
||||
@return Returns the id of the bank, or static_cast< uint >( -1 ) on fail.
|
||||
*/
|
||||
uint getBankByName( const std::string &name ) const;
|
||||
|
||||
/**
|
||||
@brief Maps the specified bank name to a unified (node) index and vica versa.
|
||||
@param bankName Name of the bank to map.
|
||||
*/
|
||||
void mapNodeByBank( const std::string &bankName );
|
||||
|
||||
/**
|
||||
@brief Loads the known bank names from an array ( the order decides the bank Id ).
|
||||
@param strings The array of the banks names.
|
||||
@param size The size of the array.
|
||||
*/
|
||||
void fillBankNames( const char **strings, uint size );
|
||||
|
||||
/// Resets the node to bank mapping vector
|
||||
void resetNodeBankMapping(){ _UnifiedIndexToBank.clear(); }
|
||||
|
||||
/// Resets all maps, and sets _CDBLastUnifiedIndex to 0.
|
||||
void reset();
|
||||
|
||||
uint getUnifiedIndexToBankSize() const{ return _UnifiedIndexToBank.size(); }
|
||||
|
||||
/// Calculates the number of bits used to store the number of nodes that belong to the banks.
|
||||
void calcIdBitsByBank();
|
||||
|
||||
/**
|
||||
@brief Looks up the unified (node) index of a bank node.
|
||||
@param bank The bank id of the node we are looking up.
|
||||
@param index The index of the node within the bank.
|
||||
@return Returns the unified (node) index of the specified bank node.
|
||||
*/
|
||||
uint getServerToClientUIDMapping( uint bank, uint index ) const{ return _CDBBankToUnifiedIndexMapping[ bank ][ index ]; }
|
||||
|
||||
private:
|
||||
/// Mapping from server database index to client database index (first-level nodes)
|
||||
std::vector< std::vector< uint > > _CDBBankToUnifiedIndexMapping;
|
||||
|
||||
/// Mapping from client database index to bank IDs (first-level nodes)
|
||||
std::vector< uint > _UnifiedIndexToBank;
|
||||
|
||||
/// Last index mapped
|
||||
uint _CDBLastUnifiedIndex;
|
||||
|
||||
/// Number of bits for first-level branches, by bank
|
||||
std::vector< uint > _FirstLevelIdBitsByBank;
|
||||
|
||||
/// Names of the CDB banks
|
||||
std::vector< std::string > _CDBBankNames;
|
||||
|
||||
/// The number of banks used
|
||||
uint maxBanks;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,128 @@
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef CDB_BRANCH_OBS_HNDLR
|
||||
#define CDB_BRANCH_OBS_HNDLR
|
||||
|
||||
#include "nel/misc/cdb_branch.h"
|
||||
|
||||
namespace NLMISC{
|
||||
|
||||
/**
|
||||
@brief Manages the CDB branch observers.
|
||||
|
||||
When a leaf's data changes, it notifies the branch, which then marks the observers as notifiable.
|
||||
The marked observers can then be notified and flushed on request.
|
||||
|
||||
*/
|
||||
class CCDBBranchObservingHandler{
|
||||
|
||||
enum{
|
||||
MAX_OBS_LST = 2
|
||||
};
|
||||
|
||||
public:
|
||||
CCDBBranchObservingHandler();
|
||||
|
||||
~CCDBBranchObservingHandler();
|
||||
|
||||
/// Notifies the observers, and flushes the list
|
||||
void flushObserverCalls();
|
||||
|
||||
void reset();
|
||||
|
||||
void addBranchObserver( CCDBNodeBranch *branch, ICDBNode::IPropertyObserver *observer, const std::vector< std::string >& positiveLeafNameFilter );
|
||||
|
||||
void addBranchObserver( CCDBNodeBranch *branch, const char *dbPathFromThisNode, ICDBNode::IPropertyObserver &observer, const char **positiveLeafNameFilter, uint positiveLeafNameFilterSize );
|
||||
|
||||
void removeBranchObserver( CCDBNodeBranch *branch, ICDBNode::IPropertyObserver* observer );
|
||||
|
||||
void removeBranchObserver( CCDBNodeBranch *branch, const char *dbPathFromThisNode, ICDBNode::IPropertyObserver &observer );
|
||||
|
||||
|
||||
///Observer for branch observer flush events.
|
||||
class IBranchObserverCallFlushObserver : public CRefCount{
|
||||
public:
|
||||
virtual ~IBranchObserverCallFlushObserver(){}
|
||||
virtual void onObserverCallFlush() = 0;
|
||||
};
|
||||
|
||||
private:
|
||||
void triggerFlushObservers();
|
||||
|
||||
public:
|
||||
void addFlushObserver( IBranchObserverCallFlushObserver *observer );
|
||||
void removeFlushObserver( IBranchObserverCallFlushObserver *observer );
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
@brief Handle to a branch observer.
|
||||
|
||||
The handle stores the owner branch, the observer and remembers if it's marked for notifying the observer.
|
||||
Also it manages adding/removing itself to/from the marked observer handles list, which is handled by CCDBBranchObservingHandler.
|
||||
|
||||
*/
|
||||
class CCDBDBBranchObserverHandle : public CCDBNodeBranch::ICDBDBBranchObserverHandle{
|
||||
|
||||
public:
|
||||
|
||||
CCDBDBBranchObserverHandle( ICDBNode::IPropertyObserver *observer, CCDBNodeBranch *owner, CCDBBranchObservingHandler *handler );
|
||||
|
||||
~CCDBDBBranchObserverHandle();
|
||||
|
||||
ICDBNode* owner(){ return _owner; }
|
||||
|
||||
ICDBNode::IPropertyObserver* observer(){ return _observer; }
|
||||
|
||||
bool observesLeaf( const std::string &leafName );
|
||||
|
||||
bool inList( uint list );
|
||||
|
||||
void addToFlushableList();
|
||||
|
||||
void removeFromFlushableList( uint list );
|
||||
|
||||
void removeFromFlushableList();
|
||||
|
||||
private:
|
||||
|
||||
bool _inList[ MAX_OBS_LST ];
|
||||
|
||||
std::vector< std::string > _observedLeaves;
|
||||
|
||||
CCDBNodeBranch *_owner;
|
||||
|
||||
NLMISC::CRefPtr< ICDBNode::IPropertyObserver > _observer;
|
||||
|
||||
CCDBBranchObservingHandler *_handler;
|
||||
|
||||
};
|
||||
|
||||
std::list< CCDBNodeBranch::ICDBDBBranchObserverHandle* > flushableObservers[ MAX_OBS_LST ];
|
||||
|
||||
CCDBNodeBranch::ICDBDBBranchObserverHandle *currentHandle;
|
||||
|
||||
uint currentList;
|
||||
|
||||
std::vector< IBranchObserverCallFlushObserver* > flushObservers;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -0,0 +1,184 @@
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#ifndef CDB_MANAGER_H
|
||||
#define CDB_MANAGER_H
|
||||
|
||||
#include "nel/misc/cdb_branch.h"
|
||||
#include "nel/misc/cdb_leaf.h"
|
||||
#include "nel/misc/cdb_bank_handler.h"
|
||||
#include "nel/misc/cdb_branch_observing_handler.h"
|
||||
|
||||
namespace NLMISC{
|
||||
|
||||
/// Class that encapsulates the separate CDB components
|
||||
class CCDBManager{
|
||||
|
||||
public:
|
||||
/**
|
||||
The constructor
|
||||
@param maxBanks - The maximum number of banks to be used
|
||||
|
||||
*/
|
||||
CCDBManager( const char *rootNodeName, uint maxBanks );
|
||||
|
||||
~CCDBManager();
|
||||
|
||||
|
||||
/**
|
||||
Returns the specified leaf node from the database.
|
||||
@param name The name of the leaf node.
|
||||
@param create Specifies if the node should be created if it doesn't exist yet.
|
||||
|
||||
*/
|
||||
CCDBNodeLeaf* getDbLeaf( const std::string &name, bool create = true );
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Returns the specified branch node from the database.
|
||||
@param name The name of the branch.
|
||||
|
||||
*/
|
||||
CCDBNodeBranch* getDbBranch( const std::string &name );
|
||||
|
||||
|
||||
/**
|
||||
Deletes the specified database node.
|
||||
@param name The name of the database node.
|
||||
|
||||
*/
|
||||
void delDbNode( const std::string &name );
|
||||
|
||||
/**
|
||||
Adds an observer to a branch of the database.
|
||||
@param branchName The name of the branch we want to observe
|
||||
@param observer The observer we want to add
|
||||
@param positiveLeafNameFilter A vector of strings containing the names of the leaves we want to observe
|
||||
|
||||
*/
|
||||
void addBranchObserver( const char *branchName, ICDBNode::IPropertyObserver *observer, const std::vector< std::string >& positiveLeafNameFilter = std::vector< std::string >() );
|
||||
|
||||
/**
|
||||
Adds an observer to a branch of the database.
|
||||
@param branch The branch we want to observe
|
||||
@param observer The observer we want to add
|
||||
@param positiveLeafNameFilter A vector of strings containing the names of the leaves we want to observe
|
||||
|
||||
*/
|
||||
void addBranchObserver( CCDBNodeBranch *branch, ICDBNode::IPropertyObserver *observer, const std::vector< std::string >& positiveLeafNameFilter = std::vector< std::string >() );
|
||||
|
||||
|
||||
/**
|
||||
Adds an observer to a branch of the database.
|
||||
@param branchName The name of the branch we start from
|
||||
@param dbPathFromThisNode The path to the branch we want to observe
|
||||
@param observer The observer we want to add
|
||||
@param positiveLeafNameFilter An array of strings containing the names of the leaves we want to observe
|
||||
@param positiveLeafNameFilterSize The size of the array
|
||||
|
||||
*/
|
||||
void addBranchObserver( const char *branchName, const char *dbPathFromThisNode, ICDBNode::IPropertyObserver &observer, const char **positiveLeafNameFilter = NULL, uint positiveLeafNameFilterSize = 0 );
|
||||
|
||||
|
||||
/**
|
||||
Adds an observer to a branch of the database.
|
||||
@param branch The branch we start from
|
||||
@param dbPathFromThisNode The path to the branch we want to observe
|
||||
@param observer The observer we want to add
|
||||
@param positiveLeafNameFilter An array of strings containing the names of the leaves we want to observe
|
||||
@param positiveLeafNameFilterSize The size of the array
|
||||
|
||||
*/
|
||||
void addBranchObserver( CCDBNodeBranch *branch, const char *dbPathFromThisNode, ICDBNode::IPropertyObserver &observer, const char **positiveLeafNameFilter, uint positiveLeafNameFilterSize );
|
||||
|
||||
|
||||
/**
|
||||
Removes an observer from a branch in the database.
|
||||
@param branchName The name of the branch
|
||||
@param observer The observer we want to remove
|
||||
|
||||
*/
|
||||
void removeBranchObserver( const char *branchName, ICDBNode::IPropertyObserver* observer );
|
||||
|
||||
|
||||
/**
|
||||
Removes an observer from a branch in the database.
|
||||
@param branch The branch
|
||||
@param observer The observer we want to remove
|
||||
|
||||
*/
|
||||
void removeBranchObserver( CCDBNodeBranch *branch, ICDBNode::IPropertyObserver* observer );
|
||||
|
||||
|
||||
/**
|
||||
Removes an observer from a branch in the database.
|
||||
@param branchName The name of the branch we start from
|
||||
@param dbPathFromThisNode The path to the branch we want to observe from the starting branch
|
||||
@param observer The observer we want to remove
|
||||
|
||||
*/
|
||||
void removeBranchObserver( const char *branchName, const char *dbPathFromThisNode, ICDBNode::IPropertyObserver &observer );
|
||||
|
||||
|
||||
/**
|
||||
Removes an observer from a branch in the database.
|
||||
@param branchName The name of the branch we start from
|
||||
@param dbPathFromThisNode The path to the branch we want to observe from the starting branch
|
||||
@param observer The observer we want to remove
|
||||
|
||||
*/
|
||||
void removeBranchObserver( CCDBNodeBranch *branch, const char *dbPathFromThisNode, ICDBNode::IPropertyObserver &observer );
|
||||
|
||||
|
||||
/**
|
||||
Adds a branch observer call flush observer. ( These are notified after the branch observers are notified )
|
||||
@param observer The observer
|
||||
|
||||
*/
|
||||
void addFlushObserver( CCDBBranchObservingHandler::IBranchObserverCallFlushObserver *observer );
|
||||
|
||||
|
||||
/**
|
||||
Removes a branch observer call flush observer.
|
||||
@param observer The observer
|
||||
*/
|
||||
void removeFlushObserver( CCDBBranchObservingHandler::IBranchObserverCallFlushObserver *observer );
|
||||
|
||||
/**
|
||||
Notifies the observers whose observed branches were updated.
|
||||
*/
|
||||
void flushObserverCalls();
|
||||
|
||||
/**
|
||||
Resets the specified bank.
|
||||
@param gc GameCycle ( no idea what it is exactly, probably some time value )
|
||||
@param bank The banks we want to reset
|
||||
|
||||
*/
|
||||
void resetBank( uint gc, uint bank );
|
||||
|
||||
protected:
|
||||
CCDBBankHandler bankHandler;
|
||||
CCDBBranchObservingHandler branchObservingHandler;
|
||||
CRefPtr< CCDBNodeBranch > _Database;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,151 @@
|
||||
/**
|
||||
* \file fast_id_map.h
|
||||
* \brief CFastIdMap
|
||||
* \date 2012-04-10 19:28GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CFastIdMap
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012 by authors
|
||||
*
|
||||
* This file is part of RYZOM CORE.
|
||||
* RYZOM CORE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* RYZOM CORE 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
|
||||
* Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with RYZOM CORE. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NLMISC_FAST_ID_MAP_H
|
||||
#define NLMISC_FAST_ID_MAP_H
|
||||
#include <nel/misc/types_nl.h>
|
||||
|
||||
// STL includes
|
||||
|
||||
// NeL includes
|
||||
#include <nel/misc/debug.h>
|
||||
|
||||
// Project includes
|
||||
|
||||
namespace NLMISC {
|
||||
|
||||
/**
|
||||
* \brief CFastIdMap
|
||||
* \date 2012-04-10 19:28GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* This template allows for assigning unique uint32 identifiers to pointers.
|
||||
* Useful when externally only exposing an identifier, when pointers may have been deleted.
|
||||
* The identifier is made from two uint16's, one being the direct index in the identifier vector,
|
||||
* and the other being a verification value that is increased when the identifier index is re-used.
|
||||
* TId must be a typedef of uint32.
|
||||
* TValue should be a pointer.
|
||||
*/
|
||||
template<typename TId, class TValue>
|
||||
class CFastIdMap
|
||||
{
|
||||
protected:
|
||||
struct CIdInfo
|
||||
{
|
||||
CIdInfo() { }
|
||||
CIdInfo(uint16 verification, uint16 next, TValue value) :
|
||||
Verification(verification), Next(next), Value(value) { }
|
||||
uint16 Verification;
|
||||
uint16 Next;
|
||||
TValue Value;
|
||||
};
|
||||
/// ID memory
|
||||
std::vector<CIdInfo> m_Ids;
|
||||
/// Nb of assigned IDs
|
||||
uint m_Size;
|
||||
/// Assigned IDs
|
||||
uint16 m_Next;
|
||||
|
||||
public:
|
||||
CFastIdMap(TValue defaultValue) : m_Size(0), m_Next(0)
|
||||
{
|
||||
// Id 0 will contain the last available unused id, and be 0 if no more unused id's are available
|
||||
// defaultValue will be returned when the ID is not found
|
||||
m_Ids.push_back(CIdInfo(0, 0, defaultValue));
|
||||
}
|
||||
|
||||
virtual ~CFastIdMap() { }
|
||||
|
||||
void clear()
|
||||
{
|
||||
m_Ids.resize(1);
|
||||
m_Ids[0].Next = 0;
|
||||
}
|
||||
|
||||
TId insert(TValue value)
|
||||
{
|
||||
// get next unused index
|
||||
uint16 idx = m_Ids[0].Next;
|
||||
if (idx == 0)
|
||||
{
|
||||
// size of used elements must be equal to the vector size minus one, when everything is allocated
|
||||
nlassert((m_Ids.size() - 1) == m_Size);
|
||||
|
||||
idx = m_Ids.size();
|
||||
uint16 verification = rand();
|
||||
m_Ids.push_back(CIdInfo(verification, m_Next, value));
|
||||
m_Next = idx;
|
||||
return (TId)(((uint32)verification) << 16) & idx;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Ids[0].Next = m_Ids[idx].Next; // restore the last unused id
|
||||
m_Ids[idx].Value = value;
|
||||
return (TId)(((uint32)m_Ids[idx].Verification) << 16) & idx;
|
||||
}
|
||||
}
|
||||
|
||||
void erase(TId id)
|
||||
{
|
||||
uint32 idx = ((uint32)id) & 0xFFFF;
|
||||
uint16 verification = (uint16)(((uint32)id) >> 16);
|
||||
if (m_Ids[idx].Verification == verification)
|
||||
{
|
||||
m_Ids[idx].Value = m_Ids[0].Value; // clean value for safety
|
||||
m_Ids[idx].Verification = (uint16)(((uint32)m_Ids[idx].Verification + 1) & 0xFFFF); // change verification value, allow overflow :)
|
||||
m_Ids[idx].Next = m_Ids[0].Next; // store the last unused id
|
||||
m_Ids[0].Next = (uint16)idx; // set this as last unused id
|
||||
}
|
||||
else
|
||||
{
|
||||
nlwarning("Invalid ID");
|
||||
}
|
||||
}
|
||||
|
||||
TValue get(TId id)
|
||||
{
|
||||
uint32 idx = ((uint32)id) & 0xFFFF;
|
||||
uint16 verification = (uint16)(((uint32)id) >> 16);
|
||||
if (m_Ids[idx].Verification == verification)
|
||||
{
|
||||
return m_Ids[idx].Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
nldebug("Invalid ID");
|
||||
return m_Ids[0].Value;
|
||||
}
|
||||
}
|
||||
|
||||
inline uint size() { return m_Size; }
|
||||
|
||||
}; /* class CFastIdMap */
|
||||
|
||||
} /* namespace NLMISC */
|
||||
|
||||
#endif /* #ifndef NLMISC_FAST_ID_MAP_H */
|
||||
|
||||
/* end of file */
|
@ -1,48 +0,0 @@
|
||||
#
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
includedir = ${prefix}/include/nel/net
|
||||
|
||||
include_HEADERS = admin.h \
|
||||
buf_client.h \
|
||||
buf_net_base.h \
|
||||
buf_server.h \
|
||||
buf_sock.h \
|
||||
callback_client.h \
|
||||
callback_net_base.h \
|
||||
callback_server.h \
|
||||
cvar_log_filter.h \
|
||||
dummy_tcp_sock.h \
|
||||
email.h \
|
||||
inet_address.h \
|
||||
listen_sock.h \
|
||||
login_client.h \
|
||||
login_cookie.h \
|
||||
login_server.h \
|
||||
message.h \
|
||||
message_recorder.h \
|
||||
module_builder_parts.h \
|
||||
module_common.h \
|
||||
module_gateway.h \
|
||||
module.h \
|
||||
module_manager.h \
|
||||
module_message.h \
|
||||
module_socket.h \
|
||||
naming_client.h \
|
||||
net_displayer.h \
|
||||
net_log.h \
|
||||
net_manager.h \
|
||||
pacs_client.h \
|
||||
service.h \
|
||||
sock.h \
|
||||
tcp_sock.h \
|
||||
transport_class.h \
|
||||
udp_sim_sock.h \
|
||||
udp_sock.h \
|
||||
unified_network.h \
|
||||
unitime.h \
|
||||
varpath.h
|
||||
|
||||
# End of Makefile.am
|
@ -1,17 +0,0 @@
|
||||
#
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
includedir = ${prefix}/include/nel/pacs
|
||||
|
||||
include_HEADERS = u_collision_desc.h \
|
||||
u_global_position.h \
|
||||
u_global_retriever.h \
|
||||
u_move_container.h \
|
||||
u_move_primitive.h \
|
||||
u_primitive_block.h \
|
||||
u_retriever_bank.h
|
||||
|
||||
# End of Makefile.am
|
||||
|
@ -1,15 +0,0 @@
|
||||
#
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
includedir = ${prefix}/include/nel/sound
|
||||
|
||||
include_HEADERS = sound_animation.h \
|
||||
sound_anim_manager.h \
|
||||
sound_anim_marker.h \
|
||||
u_audio_mixer.h \
|
||||
u_listener.h \
|
||||
u_source.h
|
||||
|
||||
# End of Makefile.am
|
@ -0,0 +1,107 @@
|
||||
/**
|
||||
* \file audio_decoder.h
|
||||
* \brief IAudioDecoder
|
||||
* \date 2012-04-11 09:34GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* IAudioDecoder
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008-2012 by authors
|
||||
*
|
||||
* This file is part of RYZOM CORE.
|
||||
* RYZOM CORE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* RYZOM CORE 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
|
||||
* Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with RYZOM CORE. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NLSOUND_AUDIO_DECODER_H
|
||||
#define NLSOUND_AUDIO_DECODER_H
|
||||
#include <nel/misc/types_nl.h>
|
||||
|
||||
// STL includes
|
||||
|
||||
// NeL includes
|
||||
|
||||
// Project includes
|
||||
|
||||
namespace NLSOUND {
|
||||
|
||||
/**
|
||||
* \brief IAudioDecoder
|
||||
* \date 2008-08-30 11:38GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* IAudioDecoder is only used by the driver implementation to stream
|
||||
* music files into a readable format (it's a simple decoder interface).
|
||||
* You should not call these functions (getSongTitle) on nlsound or user level,
|
||||
* as a driver might have additional music types implemented.
|
||||
* TODO: Split IAudioDecoder into IAudioDecoder (actual decoding) and IMediaDemuxer (stream splitter), and change the interface to make more sense.
|
||||
* TODO: Allow user application to register more decoders.
|
||||
* TODO: Look into libavcodec for decoding audio?
|
||||
*/
|
||||
class IAudioDecoder
|
||||
{
|
||||
private:
|
||||
// pointers
|
||||
/// Stream from file created by IAudioDecoder
|
||||
NLMISC::IStream *_InternalStream;
|
||||
|
||||
public:
|
||||
IAudioDecoder();
|
||||
virtual ~IAudioDecoder();
|
||||
|
||||
/// Create a new music buffer, may return NULL if unknown type, destroy with delete. Filepath lookup done here. If async is true, it will stream from hd, else it will load in memory first.
|
||||
static IAudioDecoder *createAudioDecoder(const std::string &filepath, bool async, bool loop);
|
||||
|
||||
/// Create a new music buffer from a stream, type is file extension like "ogg" etc.
|
||||
static IAudioDecoder *createAudioDecoder(const std::string &type, NLMISC::IStream *stream, bool loop);
|
||||
|
||||
/// Get information on a music file (only artist and title at the moment).
|
||||
static bool getInfo(const std::string &filepath, std::string &artist, std::string &title);
|
||||
|
||||
/// Get audio/container extensions that are currently supported by the nel sound library.
|
||||
static void getMusicExtensions(std::vector<std::string> &extensions);
|
||||
|
||||
/// Return if a music extension is supported by the nel sound library.
|
||||
static bool isMusicExtensionSupported(const std::string &extension);
|
||||
|
||||
/// Get how many bytes the music buffer requires for output minimum.
|
||||
virtual uint32 getRequiredBytes() = 0;
|
||||
|
||||
/// Get an amount of bytes between minimum and maximum (can be lower than minimum if at end).
|
||||
virtual uint32 getNextBytes(uint8 *buffer, uint32 minimum, uint32 maximum) = 0;
|
||||
|
||||
/// Get the amount of channels (2 is stereo) in output.
|
||||
virtual uint8 getChannels() = 0;
|
||||
|
||||
/// Get the samples per second (often 44100) in output.
|
||||
virtual uint getSamplesPerSec() = 0;
|
||||
|
||||
/// Get the bits per sample (often 16) in output.
|
||||
virtual uint8 getBitsPerSample() = 0;
|
||||
|
||||
/// Get if the music has ended playing (never true if loop).
|
||||
virtual bool isMusicEnded() = 0;
|
||||
|
||||
/// Get the total time in seconds.
|
||||
virtual float getLength() = 0;
|
||||
|
||||
/// Set looping
|
||||
virtual void setLooping(bool loop) = 0;
|
||||
}; /* class IAudioDecoder */
|
||||
|
||||
} /* namespace NLSOUND */
|
||||
|
||||
#endif /* #ifndef NLSOUND_AUDIO_DECODER_H */
|
||||
|
||||
/* end of file */
|
@ -0,0 +1,67 @@
|
||||
/**
|
||||
* \file containers.h
|
||||
* \brief CContainers
|
||||
* \date 2012-04-10 13:57GMT
|
||||
* \author Unknown (Unknown)
|
||||
* CContainers
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012 by authors
|
||||
*
|
||||
* This file is part of RYZOM CORE.
|
||||
* RYZOM CORE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* RYZOM CORE 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
|
||||
* Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with RYZOM CORE. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NLSOUND_CONTAINERS_H
|
||||
#define NLSOUND_CONTAINERS_H
|
||||
#include <nel/misc/types_nl.h>
|
||||
|
||||
// STL includes
|
||||
|
||||
// NeL includes
|
||||
|
||||
// Project includes
|
||||
|
||||
namespace NLSOUND {
|
||||
class CSourceCommon;
|
||||
|
||||
/// Hasher functor for hashed container with pointer key.
|
||||
template <class Pointer>
|
||||
struct THashPtr : public std::unary_function<const Pointer &, size_t>
|
||||
{
|
||||
static const size_t bucket_size = 4;
|
||||
static const size_t min_buckets = 8;
|
||||
size_t operator () (const Pointer &ptr) const
|
||||
{
|
||||
//CHashSet<uint>::hasher h;
|
||||
// transtype the pointer into int then hash it
|
||||
//return h.operator()(uint(uintptr_t(ptr)));
|
||||
return (size_t)(uintptr_t)ptr;
|
||||
}
|
||||
inline bool operator() (const Pointer &ptr1, const Pointer &ptr2) const
|
||||
{
|
||||
// delegate the work to someone else as well?
|
||||
return (uintptr_t)ptr1 < (uintptr_t)ptr2;
|
||||
}
|
||||
};
|
||||
|
||||
typedef CHashSet<CSourceCommon*, THashPtr<CSourceCommon*> > TSourceContainer;
|
||||
|
||||
} /* namespace NLSOUND */
|
||||
|
||||
#endif /* #ifndef NLSOUND_CONTAINERS_H */
|
||||
|
||||
/* end of file */
|
@ -1,119 +0,0 @@
|
||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef NLSOUND_MUSIC_BUFFER_H
|
||||
#define NLSOUND_MUSIC_BUFFER_H
|
||||
|
||||
namespace NLMISC
|
||||
{
|
||||
class IStream;
|
||||
class CIFile;
|
||||
}
|
||||
|
||||
namespace NLSOUND
|
||||
{
|
||||
|
||||
/*
|
||||
* TODO: Streaming
|
||||
* Some kind of decent streaming functionality, to get rid of the current music implementation. Audio decoding should be done on nlsound level. IBuffer needs a writable implementation, it allocates and owns the data memory, which can be written to by nlsound. When buffer is written, a function needs to be called to 'finalize' the buffer (so it can be submitted to OpenAL for example).
|
||||
* Required interface functions, IBuffer:
|
||||
* /// Allocate a new writable buffer. If this buffer was already allocated, the previous data is released.
|
||||
* /// May return NULL if the format or frequency is not supported by the driver.
|
||||
* uint8 *IBuffer::openWritable(uint size, TBufferFormat bufferFormat, uint8 channels, uint8 bitsPerSample, uint32 frequency);
|
||||
* /// Tell that you are done writing to this buffer, so it can be copied over to hardware if needed.
|
||||
* /// If keepLocal is true, a local copy of the buffer will be kept (so allocation can be re-used later).
|
||||
* /// keepLocal overrides the OptionLocalBufferCopy flag. The buffer can use this function internally.
|
||||
* void IBuffer::lockWritable(bool keepLocal);
|
||||
* Required interface functions, ISource:
|
||||
* /// Enable or disable the streaming facilities.
|
||||
* void ISource::setStreaming(bool streaming);
|
||||
* /// Submits a new buffer to the stream. A buffer of 100ms length is optimal for streaming.
|
||||
* /// Should be called by a thread which checks countStreamingBuffers every 100ms
|
||||
* void ISource::submitStreamingBuffer(IBuffer *buffer);
|
||||
* /// Returns the number of buffers that are queued (includes playing buffer). 3 buffers is optimal.
|
||||
* uint ISource::countStreamingBuffers();
|
||||
* Other required interface functions, ISource:
|
||||
* /// Enable or disable 3d calculations (to send directly to speakers).
|
||||
* void ISource::set3DMode(bool enable);
|
||||
* For compatibility with music trough fmod, ISoundDriver:
|
||||
* /// Returns true if the sound driver has a native implementation of IMusicChannel (bad!).
|
||||
* /// If this returns false, use the nlsound music channel, which goes trough Ctrack/ISource,
|
||||
* /// The nlsound music channel requires support for IBuffer/ISource streaming.
|
||||
* bool ISoundDriver::hasMusicChannel();
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief IMusicBuffer
|
||||
* \date 2008-08-30 11:38GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* IMusicBuffer is only used by the driver implementation to stream
|
||||
* music files into a readable format (it's a simple decoder interface).
|
||||
* You should not call these functions (getSongTitle) on nlsound or user level,
|
||||
* as a driver might have additional music types implemented.
|
||||
* TODO: Change IMusicBuffer to IAudioDecoder, and change the interface to make more sense.
|
||||
* TODO: Allow user application to register more decoders.
|
||||
* TODO: Look into libavcodec for decoding audio.
|
||||
*/
|
||||
class IMusicBuffer
|
||||
{
|
||||
private:
|
||||
// pointers
|
||||
/// Stream from file created by IMusicBuffer
|
||||
NLMISC::IStream *_InternalStream;
|
||||
|
||||
public:
|
||||
IMusicBuffer();
|
||||
virtual ~IMusicBuffer();
|
||||
|
||||
/// Create a new music buffer, may return NULL if unknown type, destroy with delete. Filepath lookup done here. If async is true, it will stream from hd, else it will load in memory first.
|
||||
static IMusicBuffer *createMusicBuffer(const std::string &filepath, bool async, bool loop);
|
||||
|
||||
/// Create a new music buffer from a stream, type is file extension like "ogg" etc.
|
||||
static IMusicBuffer *createMusicBuffer(const std::string &type, NLMISC::IStream *stream, bool loop);
|
||||
|
||||
/// Get information on a music file (only artist and title at the moment).
|
||||
static bool getInfo(const std::string &filepath, std::string &artist, std::string &title);
|
||||
|
||||
/// Get how many bytes the music buffer requires for output minimum.
|
||||
virtual uint32 getRequiredBytes() =0;
|
||||
|
||||
/// Get an amount of bytes between minimum and maximum (can be lower than minimum if at end).
|
||||
virtual uint32 getNextBytes(uint8 *buffer, uint32 minimum, uint32 maximum) =0;
|
||||
|
||||
/// Get the amount of channels (2 is stereo) in output.
|
||||
virtual uint8 getChannels() =0;
|
||||
|
||||
/// Get the samples per second (often 44100) in output.
|
||||
virtual uint32 getSamplesPerSec() =0;
|
||||
|
||||
/// Get the bits per sample (often 16) in output.
|
||||
virtual uint8 getBitsPerSample() =0;
|
||||
|
||||
/// Get if the music has ended playing (never true if loop).
|
||||
virtual bool isMusicEnded() =0;
|
||||
|
||||
/// Get the total time in seconds.
|
||||
virtual float getLength() =0;
|
||||
|
||||
/// Get the size of uncompressed data in bytes.
|
||||
virtual uint getUncompressedSize() =0;
|
||||
}; /* class IMusicBuffer */
|
||||
|
||||
} /* namespace NLSOUND */
|
||||
|
||||
#endif /* #ifndef NLSOUND_MUSIC_BUFFER_H */
|
||||
|
||||
/* end of file */
|
@ -0,0 +1,102 @@
|
||||
/**
|
||||
* \file group_controller.h
|
||||
* \brief CGroupController
|
||||
* \date 2012-04-10 09:29GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CGroupController
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012 by authors
|
||||
*
|
||||
* This file is part of RYZOM CORE.
|
||||
* RYZOM CORE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* RYZOM CORE 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
|
||||
* Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with RYZOM CORE. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NLSOUND_GROUP_CONTROLLER_H
|
||||
#define NLSOUND_GROUP_CONTROLLER_H
|
||||
#include <nel/misc/types_nl.h>
|
||||
|
||||
// STL includes
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
// NeL includes
|
||||
#include <nel/misc/common.h>
|
||||
#include <nel/sound/u_group_controller.h>
|
||||
#include <nel/sound/containers.h>
|
||||
|
||||
// Project includes
|
||||
|
||||
namespace NLSOUND {
|
||||
class CGroupControllerRoot;
|
||||
|
||||
/**
|
||||
* \brief CGroupController
|
||||
* \date 2012-04-10 09:29GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CGroupController
|
||||
*/
|
||||
class CGroupController : public UGroupController
|
||||
{
|
||||
public:
|
||||
friend class CGroupControllerRoot;
|
||||
|
||||
private:
|
||||
CGroupController *m_Parent;
|
||||
std::map<std::string, CGroupController *> m_Children;
|
||||
|
||||
/// Gain as set by the interface
|
||||
float m_Gain;
|
||||
|
||||
/// Gain including parent gain
|
||||
float m_FinalGain;
|
||||
|
||||
int m_NbSourcesInclChild;
|
||||
TSourceContainer m_Sources;
|
||||
|
||||
public:
|
||||
CGroupController(CGroupController *parent);
|
||||
|
||||
/// \name UGroupController
|
||||
//@{
|
||||
virtual void setGain(float gain) { NLMISC::clamp(gain, 0.0f, 1.0f); if (m_Gain != gain) { m_Gain = gain; updateSourceGain(); } }
|
||||
virtual float getGain() { return m_Gain; }
|
||||
//@}
|
||||
|
||||
inline float getFinalGain() const { return m_FinalGain; }
|
||||
|
||||
void addSource(CSourceCommon *source);
|
||||
void removeSource(CSourceCommon *source);
|
||||
|
||||
virtual std::string getPath();
|
||||
|
||||
protected:
|
||||
virtual ~CGroupController(); // subnodes can only be deleted by the root
|
||||
|
||||
private:
|
||||
inline float calculateTotalGain() { return m_Gain; }
|
||||
virtual void calculateFinalGain();
|
||||
virtual void increaseSources();
|
||||
virtual void decreaseSources();
|
||||
void updateSourceGain();
|
||||
|
||||
}; /* class CGroupController */
|
||||
|
||||
} /* namespace NLSOUND */
|
||||
|
||||
#endif /* #ifndef NLSOUND_GROUP_CONTROLLER_H */
|
||||
|
||||
/* end of file */
|
@ -0,0 +1,70 @@
|
||||
/**
|
||||
* \file group_controller_root.h
|
||||
* \brief CGroupControllerRoot
|
||||
* \date 2012-04-10 09:44GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CGroupControllerRoot
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012 by authors
|
||||
*
|
||||
* This file is part of RYZOM CORE.
|
||||
* RYZOM CORE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* RYZOM CORE 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
|
||||
* Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with RYZOM CORE. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NLSOUND_GROUP_CONTROLLER_ROOT_H
|
||||
#define NLSOUND_GROUP_CONTROLLER_ROOT_H
|
||||
#include <nel/misc/types_nl.h>
|
||||
|
||||
// STL includes
|
||||
|
||||
// NeL includes
|
||||
#include <nel/misc/singleton.h>
|
||||
|
||||
// Project includes
|
||||
#include <nel/sound/group_controller.h>
|
||||
|
||||
namespace NLSOUND {
|
||||
|
||||
/**
|
||||
* \brief CGroupControllerRoot
|
||||
* \date 2012-04-10 09:44GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CGroupControllerRoot
|
||||
*/
|
||||
class CGroupControllerRoot : public CGroupController, public NLMISC::CManualSingleton<CGroupControllerRoot>
|
||||
{
|
||||
public:
|
||||
CGroupControllerRoot();
|
||||
virtual ~CGroupControllerRoot();
|
||||
|
||||
/// Gets the group controller in a certain path with separator '/', if it doesn't exist yet it will be created.
|
||||
CGroupController *getGroupController(const std::string &path);
|
||||
|
||||
protected:
|
||||
virtual std::string getPath();
|
||||
virtual void calculateFinalGain();
|
||||
virtual void increaseSources();
|
||||
virtual void decreaseSources();
|
||||
static bool isReservedName(const std::string &nodeName);
|
||||
|
||||
}; /* class CGroupControllerRoot */
|
||||
|
||||
} /* namespace NLSOUND */
|
||||
|
||||
#endif /* #ifndef NLSOUND_GROUP_CONTROLLER_ROOT_H */
|
||||
|
||||
/* end of file */
|
@ -0,0 +1,100 @@
|
||||
/**
|
||||
* \file source_music_channel.h
|
||||
* \brief CSourceMusicChannel
|
||||
* \date 2012-04-11 16:08GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CSourceMusicChannel
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012 by authors
|
||||
*
|
||||
* This file is part of RYZOM CORE.
|
||||
* RYZOM CORE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* RYZOM CORE 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
|
||||
* Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with RYZOM CORE. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NLSOUND_SOURCE_MUSIC_CHANNEL_H
|
||||
#define NLSOUND_SOURCE_MUSIC_CHANNEL_H
|
||||
#include <nel/misc/types_nl.h>
|
||||
|
||||
// STL includes
|
||||
|
||||
// NeL includes
|
||||
#include <nel/sound/driver/music_channel.h>
|
||||
#include <nel/sound/stream_file_sound.h>
|
||||
|
||||
// Project includes
|
||||
|
||||
namespace NLSOUND {
|
||||
class CStreamFileSource;
|
||||
|
||||
/**
|
||||
* \brief CSourceMusicChannel
|
||||
* \date 2012-04-11 16:08GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CSourceMusicChannel
|
||||
*/
|
||||
class CSourceMusicChannel : public IMusicChannel
|
||||
{
|
||||
public:
|
||||
CSourceMusicChannel();
|
||||
virtual ~CSourceMusicChannel();
|
||||
|
||||
/** Play some music (.ogg etc...)
|
||||
* NB: if an old music was played, it is first stop with stopMusic()
|
||||
* \param filepath file path, CPath::lookup is done here
|
||||
* \param async stream music from hard disk, preload in memory if false
|
||||
* \param loop must be true to play the music in loop.
|
||||
*/
|
||||
virtual bool play(const std::string &filepath, bool async, bool loop);
|
||||
|
||||
/// Stop the music previously loaded and played (the Memory is also freed)
|
||||
virtual void stop();
|
||||
|
||||
/// Makes sure any resources are freed, but keeps available for next play call
|
||||
virtual void reset();
|
||||
|
||||
/// Pause the music previously loaded and played (the Memory is not freed)
|
||||
virtual void pause();
|
||||
|
||||
/// Resume the music previously paused
|
||||
virtual void resume();
|
||||
|
||||
/// Return true if a song is finished.
|
||||
virtual bool isEnded();
|
||||
|
||||
/// Return true if the song is still loading asynchronously and hasn't started playing yet (false if not async), used to delay fading
|
||||
virtual bool isLoadingAsync();
|
||||
|
||||
/// Return the total length (in second) of the music currently played
|
||||
virtual float getLength();
|
||||
|
||||
/** Set the music volume (if any music played). (volume value inside [0 , 1]) (default: 1)
|
||||
* NB: the volume of music is NOT affected by IListener::setGain()
|
||||
*/
|
||||
virtual void setVolume(float gain);
|
||||
|
||||
private:
|
||||
CStreamFileSound m_Sound;
|
||||
CStreamFileSource *m_Source;
|
||||
float m_Gain;
|
||||
|
||||
}; /* class CSourceMusicChannel */
|
||||
|
||||
} /* namespace NLSOUND */
|
||||
|
||||
#endif /* #ifndef NLSOUND_SOURCE_MUSIC_CHANNEL_H */
|
||||
|
||||
/* end of file */
|
@ -0,0 +1,94 @@
|
||||
/**
|
||||
* \file stream_file_sound.h
|
||||
* \brief CStreamFileSound
|
||||
* \date 2012-04-11 09:57GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CStreamFileSound
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012 by authors
|
||||
*
|
||||
* This file is part of RYZOM CORE.
|
||||
* RYZOM CORE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* RYZOM CORE 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
|
||||
* Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with RYZOM CORE. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NLSOUND_STREAM_FILE_SOUND_H
|
||||
#define NLSOUND_STREAM_FILE_SOUND_H
|
||||
#include <nel/misc/types_nl.h>
|
||||
|
||||
// STL includes
|
||||
|
||||
// NeL includes
|
||||
|
||||
// Project includes
|
||||
#include <nel/sound/stream_sound.h>
|
||||
|
||||
namespace NLSOUND {
|
||||
class CSourceMusicChannel;
|
||||
|
||||
/**
|
||||
* \brief CStreamFileSound
|
||||
* \date 2012-04-11 09:57GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CStreamFileSound
|
||||
*/
|
||||
class CStreamFileSound : public CStreamSound
|
||||
{
|
||||
public:
|
||||
friend class CSourceMusicChannel;
|
||||
|
||||
public:
|
||||
CStreamFileSound();
|
||||
virtual ~CStreamFileSound();
|
||||
|
||||
/// Get the type of the sound.
|
||||
virtual TSOUND_TYPE getSoundType() { return SOUND_STREAM_FILE; }
|
||||
|
||||
/// Load the sound parameters from georges' form
|
||||
virtual void importForm(const std::string& filename, NLGEORGES::UFormElm& formRoot);
|
||||
|
||||
/// Used by the george sound plugin to check sound recursion (ie sound 'toto' use sound 'titi' witch also use sound 'toto' ...).
|
||||
virtual void getSubSoundList(std::vector<std::pair<std::string, CSound*> > &/* subsounds */) const { }
|
||||
|
||||
/// Serialize the sound data.
|
||||
virtual void serial(NLMISC::IStream &s);
|
||||
|
||||
/// Return the length of the sound in ms
|
||||
virtual uint32 getDuration() { return 0; }
|
||||
|
||||
inline bool getAsync() { return m_Async; }
|
||||
|
||||
inline const std::string &getFilePath() { return m_FilePath; }
|
||||
|
||||
private:
|
||||
/// Used by CSourceMusicChannel to set the filePath and default settings on other parameters.
|
||||
void setMusicFilePath(const std::string &filePath, bool async = true, bool loop = false);
|
||||
|
||||
private:
|
||||
CStreamFileSound(const CStreamFileSound &);
|
||||
CStreamFileSound &operator=(const CStreamFileSound &);
|
||||
|
||||
private:
|
||||
bool m_Async;
|
||||
std::string m_FilePath;
|
||||
|
||||
}; /* class CStreamFileSound */
|
||||
|
||||
} /* namespace NLSOUND */
|
||||
|
||||
#endif /* #ifndef NLSOUND_STREAM_FILE_SOUND_H */
|
||||
|
||||
/* end of file */
|
@ -0,0 +1,110 @@
|
||||
/**
|
||||
* \file stream_file_source.h
|
||||
* \brief CStreamFileSource
|
||||
* \date 2012-04-11 09:57GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CStreamFileSource
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012 by authors
|
||||
*
|
||||
* This file is part of RYZOM CORE.
|
||||
* RYZOM CORE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* RYZOM CORE 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
|
||||
* Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with RYZOM CORE. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NLSOUND_STREAM_FILE_SOURCE_H
|
||||
#define NLSOUND_STREAM_FILE_SOURCE_H
|
||||
#include <nel/misc/types_nl.h>
|
||||
|
||||
// STL includes
|
||||
|
||||
// NeL includes
|
||||
#include <nel/misc/thread.h>
|
||||
|
||||
// Project includes
|
||||
#include <nel/sound/stream_source.h>
|
||||
#include <nel/sound/stream_file_sound.h>
|
||||
|
||||
namespace NLSOUND {
|
||||
class IAudioDecoder;
|
||||
|
||||
/**
|
||||
* \brief CStreamFileSource
|
||||
* \date 2012-04-11 09:57GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* CStreamFileSource
|
||||
*/
|
||||
class CStreamFileSource : public CStreamSource, private NLMISC::IRunnable
|
||||
{
|
||||
public:
|
||||
CStreamFileSource(CStreamFileSound *streamFileSound = NULL, bool spawn = false, TSpawnEndCallback cb = 0, void *cbUserParam = 0, NL3D::CCluster *cluster = 0, CGroupController *groupController = NULL);
|
||||
virtual ~CStreamFileSource();
|
||||
|
||||
/// Return the source type
|
||||
TSOURCE_TYPE getType() const { return SOURCE_STREAM_FILE; }
|
||||
|
||||
/// \name Playback control
|
||||
//@{
|
||||
/// Play
|
||||
virtual void play();
|
||||
/// Stop playing
|
||||
virtual void stop();
|
||||
/// Get playing state. Return false even if the source has stopped on its own.
|
||||
virtual bool isPlaying();
|
||||
/// Pause (following legacy music channel implementation)
|
||||
void pause();
|
||||
/// Resume (following legacy music channel implementation)
|
||||
void resume();
|
||||
/// check if song ended (following legacy music channel implementation)
|
||||
bool isEnded();
|
||||
/// (following legacy music channel implementation)
|
||||
float getLength();
|
||||
/// check if still loading (following legacy music channel implementation)
|
||||
bool isLoadingAsync();
|
||||
//@}
|
||||
|
||||
/// \name Decoding thread
|
||||
//@{
|
||||
virtual void getName (std::string &result) const { result = "CStreamFileSource"; }
|
||||
virtual void run();
|
||||
//@}
|
||||
|
||||
// TODO: getTime
|
||||
|
||||
private:
|
||||
bool prepareDecoder();
|
||||
inline bool bufferMore(uint bytes);
|
||||
|
||||
private:
|
||||
CStreamFileSource(const CStreamFileSource &);
|
||||
CStreamFileSource &operator=(const CStreamFileSource &);
|
||||
|
||||
private:
|
||||
inline CStreamFileSound *getStreamFileSound() { return static_cast<CStreamFileSound *>(m_StreamSound); }
|
||||
|
||||
NLMISC::IThread *m_Thread;
|
||||
|
||||
IAudioDecoder *m_AudioDecoder;
|
||||
|
||||
bool m_Paused;
|
||||
|
||||
}; /* class CStreamFileSource */
|
||||
|
||||
} /* namespace NLSOUND */
|
||||
|
||||
#endif /* #ifndef NLSOUND_STREAM_FILE_SOURCE_H */
|
||||
|
||||
/* end of file */
|
@ -0,0 +1,65 @@
|
||||
/**
|
||||
* \file u_group_controller.h
|
||||
* \brief UGroupController
|
||||
* \date 2012-04-10 12:49GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* UGroupController
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012 by authors
|
||||
*
|
||||
* This file is part of RYZOM CORE.
|
||||
* RYZOM CORE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* RYZOM CORE 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
|
||||
* Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with RYZOM CORE. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NLSOUND_U_GROUP_CONTROLLER_H
|
||||
#define NLSOUND_U_GROUP_CONTROLLER_H
|
||||
#include <nel/misc/types_nl.h>
|
||||
|
||||
// STL includes
|
||||
|
||||
// NeL includes
|
||||
|
||||
// Project includes
|
||||
|
||||
#define NLSOUND_SHEET_V1_DEFAULT_SOUND_GROUP_CONTROLLER "sound:effects:game"
|
||||
#define NLSOUND_SHEET_V1_DEFAULT_SOUND_MUSIC_GROUP_CONTROLLER "sound:music:game"
|
||||
#define NLSOUND_SHEET_V1_DEFAULT_SOUND_STREAM_GROUP_CONTROLLER "sound:dialog:game"
|
||||
|
||||
namespace NLSOUND {
|
||||
|
||||
/**
|
||||
* \brief UGroupController
|
||||
* \date 2012-04-10 12:49GMT
|
||||
* \author Jan Boon (Kaetemi)
|
||||
* UGroupController
|
||||
*/
|
||||
class UGroupController
|
||||
{
|
||||
public:
|
||||
virtual void setGain(float gain) = 0;
|
||||
virtual float getGain() = 0;
|
||||
|
||||
protected:
|
||||
virtual ~UGroupController() { }
|
||||
|
||||
}; /* class UGroupController */
|
||||
|
||||
} /* namespace NLSOUND */
|
||||
|
||||
#endif /* #ifndef NLSOUND_U_GROUP_CONTROLLER_H */
|
||||
|
||||
/* end of file */
|
@ -1,11 +0,0 @@
|
||||
#
|
||||
# $Id: Makefile.am,v 1.1 2005/04/04 09:45:05 cado Exp $
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
SUBDIRS = font cluster_viewer @CEGUI_SUBDIR@
|
||||
|
||||
|
||||
# End of Makefile.am
|
||||
|
@ -1,22 +0,0 @@
|
||||
#
|
||||
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
EXTRA_DIST = demonel_8.sln demonel_8.vcproj demonel.rc demonel.sln demonel.vcproj icon1.ico datafiles
|
||||
|
||||
bin_PROGRAMS = nel_sample_cegui
|
||||
|
||||
nel_sample_cegui_SOURCES = main.cpp NeLDriver.cpp
|
||||
|
||||
AM_CXXFLAGS = -I$(top_srcdir)/src @CEGUI_CFLAGS@
|
||||
|
||||
nel_sample_cegui_LDADD = ../../../src/misc/libnelmisc.la \
|
||||
../../../src/3d/libnel3d.la \
|
||||
../../../src/cegui/libnelceguirenderer.la \
|
||||
@CEGUI_LIBS@
|
||||
|
||||
|
||||
# End of Makefile.am
|
||||
|
@ -1,24 +0,0 @@
|
||||
#
|
||||
# $Id: Makefile.am,v 1.1 2005/04/04 09:45:06 cado Exp $
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
SUBDIRS = shapes groups fonts
|
||||
|
||||
bin_PROGRAMS = cluster_viewer
|
||||
|
||||
cluster_viewer_SOURCES = main.cpp
|
||||
|
||||
cluster_viewerdir = $(datadir)/nel/samples/cluster_viewer
|
||||
|
||||
cluster_viewer_DATA = readme.txt main.cvs
|
||||
|
||||
AM_CXXFLAGS = -DCV_DIR="\"$(cluster_viewerdir)\"" -I$(top_srcdir)/src
|
||||
|
||||
cluster_viewer_LDADD = ../../../src/misc/libnelmisc.la \
|
||||
../../../src/3d/libnel3d.la
|
||||
|
||||
|
||||
# End of Makefile.am
|
||||
|
@ -1,12 +0,0 @@
|
||||
#
|
||||
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
cluster_viewerdir = $(datadir)/nel/samples/cluster_viewer/fonts/
|
||||
|
||||
cluster_viewer_DATA = n019003l.pfb
|
||||
|
||||
# End of Makefile.am
|
||||
|
@ -1,12 +0,0 @@
|
||||
#
|
||||
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
cluster_viewerdir = $(datadir)/nel/samples/cluster_viewer/groups/
|
||||
|
||||
cluster_viewer_DATA = street.ig
|
||||
|
||||
# End of Makefile.am
|
||||
|
@ -1,20 +0,0 @@
|
||||
#
|
||||
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
cluster_viewerdir = $(datadir)/nel/samples/cluster_viewer/shapes/
|
||||
|
||||
cluster_viewer_DATA = box02.shape \
|
||||
sphere01.shape \
|
||||
sphere02.shape \
|
||||
sphere03.shape \
|
||||
sphere04.shape \
|
||||
sphere05.shape \
|
||||
sphere06.shape \
|
||||
sphere07.shape \
|
||||
sphere08.shape
|
||||
|
||||
# End of Makefile.am
|
||||
|
@ -1,21 +0,0 @@
|
||||
#
|
||||
# $Id: Makefile.am,v 1.1 2005/04/04 09:45:06 cado Exp $
|
||||
#
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
bin_PROGRAMS = font
|
||||
|
||||
font_SOURCES = main.cpp
|
||||
|
||||
fontdir = $(datadir)/nel/samples/font
|
||||
font_DATA = beteckna.ttf
|
||||
|
||||
AM_CXXFLAGS = -DFONT_DIR="\"$(fontdir)\"" -I$(top_srcdir)/src
|
||||
|
||||
font_LDADD = ../../../src/misc/libnelmisc.la \
|
||||
../../../src/3d/libnel3d.la
|
||||
|
||||
|
||||
# End of Makefile.am
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue