diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2012-07-30 14:59:24 +0200 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2012-07-30 14:59:24 +0200 |
commit | 09dd4a97fccc4bcabe341c4e4490004385283e53 (patch) | |
tree | d00a22a0304969ff70ecc680f3e89b5fab1ecce6 /community-staging | |
parent | 3a3f329b736af639fdd3c9621816bad627b96903 (diff) | |
parent | 4982c269b318734d01ad30c6592fbb73565ceb12 (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts:
community-staging/gource/PKGBUILD
community-staging/performous/PKGBUILD
community-staging/wt/PKGBUILD
extra/cups/PKGBUILD
extra/libwacom/PKGBUILD
extra/python-urwid/PKGBUILD
multilib/lib32-dbus-core/PKGBUILD
multilib/lib32-glib2/PKGBUILD
multilib/lib32-gtk2/PKGBUILD
multilib/lib32-mpg123/PKGBUILD
multilib/lib32-readline/PKGBUILD
staging/hugin/PKGBUILD
testing/cups/PKGBUILD
testing/cups/cups-no-gzip-man.patch
testing/cups/cups-systemd-socket.patch
testing/cups/cups.install
testing/systemd/PKGBUILD
Diffstat (limited to 'community-staging')
25 files changed, 0 insertions, 3867 deletions
diff --git a/community-staging/cdfs/PKGBUILD b/community-staging/cdfs/PKGBUILD deleted file mode 100644 index 4ac07ebdd..000000000 --- a/community-staging/cdfs/PKGBUILD +++ /dev/null @@ -1,35 +0,0 @@ -# $Id: PKGBUILD 74197 2012-07-22 19:49:11Z spupykin $ -# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> -# Contributor: J. Santiago Hirschfeld <jsantiagoh@yahoo.com.ar> - -pkgname=cdfs -pkgver=2.6.27 -pkgrel=25 -pkgdesc="File system module that 'exports' all tracks and boot images on a CD as normal files." -arch=(i686 x86_64) -url="http://www.elis.UGent.be/~ronsse/cdfs/" -license=('GPL') -makedepends=('linux-headers') -install=cdfs.install -source=("http://www.elis.UGent.be/~ronsse/cdfs/download/$pkgname-$pkgver.tar.bz2" - "cdfs-3.0.patch" - "cdfs-3.2.patch" - "cdfs-3.4.patch") -md5sums=('ac64c014a90e3c488394832ea29605b3' - 'aba7da94a9dcbb8a93ea423cb6958fef' - 'e934407b3460257a301822ffc4ab3933' - '9215e7bdac728bd2f889fb525e543454') - -build() { - _kernver=`pacman -Q linux | cut -d . -f 2 | cut -f 1 -d -` - depends=("linux>=3.${_kernver}" "linux<3.`expr ${_kernver} + 1`") - _kernverfull=`cat /usr/lib/modules/extramodules-3.${_kernver}-ARCH/version` - - cd $srcdir/$pkgname-$pkgver - patch -p1 <$srcdir/cdfs-3.0.patch - patch -p1 <$srcdir/cdfs-3.2.patch - patch -p1 <$srcdir/cdfs-3.4.patch - make KDIR=/usr/lib/modules/${_kernverfull}/build - install -Dm0644 cdfs.ko $pkgdir/usr/lib/modules/extramodules-3.${_kernver}-ARCH/cdfs.ko - sed -i "s|extramodules-.*-ARCH|extramodules-3.${_kernver}-ARCH|" $startdir/cdfs.install -} diff --git a/community-staging/cdfs/cdfs-3.0.patch b/community-staging/cdfs/cdfs-3.0.patch deleted file mode 100644 index 20194b848..000000000 --- a/community-staging/cdfs/cdfs-3.0.patch +++ /dev/null @@ -1,274 +0,0 @@ -diff -wbBur cdfs-2.6.27/cddata.c cdfs-2.6.27.my/cddata.c ---- cdfs-2.6.27/cddata.c 2009-12-21 17:04:03.000000000 +0300 -+++ cdfs-2.6.27.my/cddata.c 2011-07-24 21:18:44.000000000 +0400 -@@ -83,7 +83,7 @@ - #else - .mmap = generic_file_readonly_mmap, - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) -- .sendfile = generic_file_sendfile -+// .sendfile = generic_file_sendfile - #else - .splice_read = generic_file_splice_read - #endif -diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c ---- cdfs-2.6.27/root.c 2009-12-21 16:38:31.000000000 +0300 -+++ cdfs-2.6.27.my/root.c 2011-07-25 13:16:59.000000000 +0400 -@@ -32,19 +30,14 @@ - * Added code to transform /proc/cdfs into a sequential synthetic file. * - *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ - -- - #include <linux/seq_file.h> -- --#ifndef OLD_KERNEL - #include <linux/statfs.h> --#endif -+#include <linux/sched.h> - - extern struct seq_operations cdfs_operations; - extern struct _track_info *dummy_track_p; - --#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) - struct inode *cdfs_iget(struct super_block *sp, unsigned long ino); --#endif - /*============================================================================* - * cdfs_open() * - * Description: * -@@ -115,15 +108,8 @@ - - /********************************************************************/ - --#ifdef OLD_KERNEL --static struct super_block * cdfs_mount(struct super_block *sb, void *data, int silent){ -- kdev_t dev = sb->s_dev; -- int i, j, t; -- struct cdrom_tochdr hdr; --#else - static int cdfs_fill_super(struct super_block *sb, void *data, int silent){ - int i, t; --#endif - struct cdrom_tocentry entry; - int no_audio=0, no_data=0; - cd * this_cd; -@@ -131,24 +117,13 @@ - - PRINT("cdfs_mount\n"); - --#ifdef OLD_KERNEL -- MOD_INC_USE_COUNT; -- -- set_blocksize(dev, CD_FRAMESIZE); // voor bread met ide-cd --#else - sb_set_blocksize(sb, CD_FRAMESIZE); // voor bread met ide-cd --#endif - - sb->s_blocksize = CD_FRAMESIZE; - sb->s_blocksize_bits = 11; - - if (!(this_cd = cdfs_info(sb) = kmalloc(sizeof(cd), GFP_KERNEL))){ --#ifdef OLD_KERNEL -- MOD_DEC_USE_COUNT; -- return NULL; --#else - return -ENOMEM; --#endif - } - - this_cd->mode = MODE; -@@ -160,13 +135,8 @@ - - // Initialize cache for maximum sector size - if (!(this_cd->cache = kmalloc(CD_FRAMESIZE_RAWER*CACHE_SIZE, GFP_KERNEL))) { --#ifdef OLD_KERNEL -- MOD_DEC_USE_COUNT; -- return NULL; --#else - kfree(cdfs_info(sb)); - return -ENOMEM; --#endif - } - - // Cache is still invalid -@@ -183,23 +153,13 @@ - if (this_cd->toc_scsi){ - if (cdfs_toc_read_full(sb)){ - printk("TOC read failed\n"); --#ifdef OLD_KERNEL -- MOD_DEC_USE_COUNT; -- return NULL; --#else - goto invalid; --#endif - } - } else { - //if (cdfs_ioctl(sb, CDROMREADTOCHDR, (unsigned long)&hdr)){ - if (cdfs_toc_read(sb)){ - printk("cdfs_toc_read failed\n"); --#ifdef OLD_KERNEL -- MOD_DEC_USE_COUNT; -- return NULL; --#else - goto invalid; --#endif - } - } - -@@ -365,11 +325,7 @@ - sb->s_flags |= MS_RDONLY; - sb->s_op = &cdfs_ops; - /* always get inode status */ --#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) - retinode=cdfs_iget(sb, 0); --#else -- retinode=iget(sb, 0); --#endif - if ( IS_ERR(retinode) ) - return PTR_ERR(retinode); - -@@ -379,16 +335,12 @@ - - cdfs_proc_cd = this_cd; - --#ifdef OLD_KERNEL -- return sb; --#else - return 0; - - invalid: - kfree(this_cd->cache); - kfree(cdfs_info(sb)); - return -EINVAL; --#endif - } - - /************************************************************************/ -@@ -410,27 +362,12 @@ - // Remove /proc entry - cdfs_proc_cd = NULL; - kfree(cdfs_info(sb)); -- --#ifdef OLD_KERNEL -- MOD_DEC_USE_COUNT; --#endif -- - } - - /************************************************************************/ - --#ifdef OLD_KERNEL --static int cdfs_statfs(struct super_block *sb, struct statfs *buf) { -- cd * this_cd = cdfs_info(sb); --#else --#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) - static int cdfs_statfs(struct dentry *d, struct kstatfs *buf) { - cd * this_cd = cdfs_info(d->d_sb); --#else --static int cdfs_statfs(struct super_block *sb, struct kstatfs *buf) { -- cd * this_cd = cdfs_info(sb); --#endif --#endif - PRINT("rmfs_statfs\n"); - - buf->f_type = CDFS_MAGIC; -@@ -460,11 +397,7 @@ - - /************************************************************************/ - --#ifdef OLD_KERNEL --static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry){ --#else - static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){ --#endif - struct inode * inode; - int i; - cd * this_cd = cdfs_info(dir->i_sb); -@@ -480,15 +413,9 @@ - /* Use goto and read inode with iget()/cdfs_iget() */ - /* Thanks to David Howells for patch and Master class in his mail */ - found: --#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) - inode = cdfs_iget(dir->i_sb, i); - if (IS_ERR(inode)) - return ERR_CAST(inode); --#else -- inode = iget(dir->i_sb, i); -- if (!inode) -- return ERR_PTR(-ENOMEM); --#endif - d_add(dentry, inode); - return NULL; - } -@@ -529,12 +456,8 @@ - i->i_fop = &cdfs_dir_operations; - } else { /* file */ - i->i_size = this_cd->track[i->i_ino].size; --#ifdef OLD_KERNEL -- i->i_mtime = i->i_atime = i->i_ctime = this_cd->track[i->i_ino].time; --#else - i->i_mtime.tv_sec = i->i_atime.tv_sec = i->i_ctime.tv_sec = this_cd->track[i->i_ino].time; - i->i_mtime.tv_nsec = i->i_atime.tv_nsec = i->i_ctime.tv_nsec = 0; --#endif - i->i_mode = this_cd->mode; - if ((this_cd->track[i->i_ino].type==DATA) && this_cd->track[i->i_ino].iso_size) { - i->i_fop = &cdfs_cddata_file_operations; -@@ -587,33 +510,21 @@ - /******************************************************************/ - - static struct super_operations cdfs_ops = { --#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) -- .read_inode = cdfs_read_inode, --#endif - .put_super = cdfs_umount, - .statfs = cdfs_statfs - }; - --#ifdef OLD_KERNEL --static DECLARE_FSTYPE_DEV(cdfs_fs_type, FSNAME, cdfs_mount); --#else --#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) --static int cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt) { -- return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super, mnt); --#else --static struct super_block *cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { -- return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super); --#endif --} -+//static int cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt) { -+// return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super, mnt); -+//} - - static struct file_system_type cdfs_fs_type = { - .owner = THIS_MODULE, - .name = "cdfs", -- .get_sb = cdfs_get_sb, -+// .get_sb = cdfs_get_sb, - .kill_sb = kill_block_super, - .fs_flags = FS_REQUIRES_DEV - }; --#endif - - /******************************************************/ - -@@ -621,10 +532,6 @@ - MODULE_DESCRIPTION("CDfs: a CD filesystem"); - MODULE_LICENSE("GPL"); - --#ifdef OLD_KERNEL --EXPORT_NO_SYMBOLS; --#endif -- - /******************************************************************/ - - static int __init cdfs_init(void) { -@@ -676,11 +583,7 @@ - - if (!options) return; - --#ifdef OLD_KERNEL -- for (this_char = strtok(options,","); this_char; this_char = strtok(NULL,",")) { --#else - while ((this_char = strsep(&options,",")) != NULL) { --#endif - - if (!strcmp(this_char,"single")) - this_cd->single=TRUE; diff --git a/community-staging/cdfs/cdfs-3.2.patch b/community-staging/cdfs/cdfs-3.2.patch deleted file mode 100644 index d3300bdbc..000000000 --- a/community-staging/cdfs/cdfs-3.2.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c ---- cdfs-2.6.27/root.c 2009-12-21 16:38:31.000000000 +0300 -+++ cdfs-2.6.27.my/root.c 2012-01-18 11:23:03.000000000 +0400 -@@ -517,7 +517,7 @@ - - i->i_uid = this_cd->uid; - i->i_gid = this_cd->gid; -- i->i_nlink = 1; -+ i->__i_nlink = 1; - i->i_op = &cdfs_inode_operations; - i->i_fop = NULL; - i->i_data.a_ops = NULL; diff --git a/community-staging/cdfs/cdfs-3.4.patch b/community-staging/cdfs/cdfs-3.4.patch deleted file mode 100644 index 5c2cb9b24..000000000 --- a/community-staging/cdfs/cdfs-3.4.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c ---- cdfs-2.6.27/root.c 2009-12-21 16:38:31.000000000 +0300 -+++ cdfs-2.6.27.my/root.c 2012-06-15 17:09:27.000000000 +0400 -@@ -375,7 +375,7 @@ - - PRINT("retinode = %ld\n", retinode->i_ino); - -- sb->s_root = d_alloc_root(retinode); -+ sb->s_root = d_make_root(retinode); - - cdfs_proc_cd = this_cd; - diff --git a/community-staging/cdfs/cdfs.install b/community-staging/cdfs/cdfs.install deleted file mode 100644 index 6be46f6d5..000000000 --- a/community-staging/cdfs/cdfs.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - EXTRAMODULES='extramodules-3.4-ARCH' - depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) -} - -post_upgrade() { - EXTRAMODULES='extramodules-3.4-ARCH' - depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) -} - -post_remove() { - EXTRAMODULES='extramodules-3.4-ARCH' - depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) -} diff --git a/community-staging/couchdb/PKGBUILD b/community-staging/couchdb/PKGBUILD deleted file mode 100644 index abd01c86d..000000000 --- a/community-staging/couchdb/PKGBUILD +++ /dev/null @@ -1,45 +0,0 @@ -# $Id: PKGBUILD 74205 2012-07-22 21:09:13Z spupykin $ -# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> -# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua -# Contributor: Michael Fellinger <m.fellinger@gmail.com> - -pkgname=couchdb -pkgver=1.2.0 -pkgrel=4 -pkgdesc="A document-oriented database that can be queried and indexed in a MapReduce fashion using JSON" -arch=('i686' 'x86_64') -url="http://couchdb.apache.org" -license=('APACHE') -depends=('icu' 'erlang' 'js' 'openssl' 'curl') -install=couchdb.install -options=('!libtool') -backup=('etc/couchdb/local.ini' - 'etc/conf.d/couchdb' - 'etc/logrotate.d/couchdb') -source=("http://www.apache.org/dist/couchdb/releases/${pkgver}/apache-${pkgname}-${pkgver}.tar.gz"{,.asc} - "rc-script.patch") -md5sums=('a5cbbcaac288831b3d8a08b725657f10' - '890a85b22219ea113a4901a289c442f8' - '8a3b1a1ff98a6411827ad991db7a355b') - -build() { - cd "$srcdir/apache-$pkgname-$pkgver" - - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var - make - - patch -R etc/init/couchdb <$srcdir/rc-script.patch -} - -package() { - cd "$srcdir/apache-$pkgname-$pkgver" - make DESTDIR="$pkgdir" install - - install -Dm644 etc/default/couchdb $pkgdir/etc/conf.d/couchdb - sed -i 's|\(CONFIGURATION_FILE=/etc/\)default\(/couchdb\)|\1conf.d\2|' $pkgdir/etc/rc.d/couchdb - sed -i 's|\(COUCHDB_OPTIONS=\)|\1"-p /var/run/couchdb/couchdb.pid"|' $pkgdir/etc/conf.d/couchdb - - rm -rf $pkgdir/etc/default/ $pkgdir/var/run -} diff --git a/community-staging/couchdb/couchdb.install b/community-staging/couchdb/couchdb.install deleted file mode 100644 index 5eff459c7..000000000 --- a/community-staging/couchdb/couchdb.install +++ /dev/null @@ -1,22 +0,0 @@ -post_install() { - id couchdb &>/dev/null || \ - useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb - mkdir -p /var/run/couchdb - chown -R couchdb.daemon /etc/couchdb - chown -R couchdb.daemon /var/{lib,log,run}/couchdb -} - -pre_upgrade() { - id couchdb &>/dev/null || \ - useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb -} - -post_upgrade() { - mkdir -p $pkgdir/var/run/couchdb - chown -R couchdb.daemon /etc/couchdb - chown -R couchdb.daemon /var/{lib,log,run}/couchdb -} - -post_remove() { - userdel couchdb &>/dev/null -} diff --git a/community-staging/couchdb/rc-script.patch b/community-staging/couchdb/rc-script.patch deleted file mode 100644 index 1dd723ffc..000000000 --- a/community-staging/couchdb/rc-script.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- couchdb 2011-12-27 01:21:59.000000000 +0400 -+++ couchdb.my 2011-12-27 01:21:18.000000000 +0400 -@@ -1,6 +1,4 @@ --#!/bin/bash --. /etc/rc.conf --. /etc/rc.d/functions -+#!/bin/sh -e - - # Licensed under the Apache License, Version 2.0 (the "License"); you may not - # use this file except in compliance with the License. You may obtain a copy of -@@ -31,7 +29,7 @@ - NAME=couchdb - SCRIPT_NAME=`basename $0` - COUCHDB=/usr/bin/couchdb --CONFIGURATION_FILE=/etc/conf.d/couchdb -+CONFIGURATION_FILE=/etc/default/couchdb - RUN_DIR=/var/run/couchdb - LSB_LIBRARY=/lib/lsb/init-functions - -@@ -44,14 +42,16 @@ - fi - - log_daemon_msg () { -- stat_busy $@ -+ # Dummy function to be replaced by LSB library. -+ -+ echo $@ - } - - log_end_msg () { -+ # Dummy function to be replaced by LSB library. -+ - if test "$1" != "0"; then -- stat_fail -- else -- stat_done -+ echo "Error with $DESCRIPTION: $NAME" - fi - return $1 - } -@@ -66,7 +66,7 @@ - command="$command $COUCHDB_OPTIONS" - fi - if test -n "$COUCHDB_USER"; then -- if su $COUCHDB_USER -s /bin/bash -c "$command"; then -+ if su $COUCHDB_USER -c "$command"; then - return $SCRIPT_OK - else - return $SCRIPT_ERROR -@@ -84,7 +84,6 @@ - # Start Apache CouchDB as a background process. - - mkdir -p "$RUN_DIR" -- chown -R $COUCHDB_USER "$RUN_DIR" - command="$COUCHDB -b" - if test -n "$COUCHDB_STDOUT_FILE"; then - command="$command -o $COUCHDB_STDOUT_FILE" diff --git a/community-staging/fatrat/PKGBUILD b/community-staging/fatrat/PKGBUILD deleted file mode 100644 index 195e8644a..000000000 --- a/community-staging/fatrat/PKGBUILD +++ /dev/null @@ -1,35 +0,0 @@ -# $Id: PKGBUILD 73722 2012-07-14 15:53:10Z stativ $ -# Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com> -pkgname=fatrat -pkgver=1.2.0_beta2 -pkgrel=1 -pkgdesc="QT4 based download manager with support for HTTP, FTP, SFTP, BitTorrent, rapidshare and more" -arch=('i686' 'x86_64') -url="http://fatrat.dolezel.info/" -license=('GPL') -depends=('gloox' 'qt' 'libtorrent-rasterbar' 'pion-net' 'qtwebkit') -optdepends=('geoip: GeoIP support') -makedepends=('boost' 'cmake' 'java-environment') -source=(http://www.dolezel.info/download/data/fatrat/fatrat-$pkgver.tar.xz) -md5sums=('ad823d2a81f0583316ece815b928c71b') - -build() { - cd "$srcdir/$pkgname-$pkgver" - - . /etc/profile.d/jre.sh - . /etc/profile.d/jdk.sh - - cmake \ - -DWITH_EVERYTHING=ON \ - -DCMAKE_INSTALL_PREFIX=/usr \ - . - - make -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir" install -} - -# vim:set ts=2 sw=2 et: diff --git a/community-staging/freemat/ChangeLog b/community-staging/freemat/ChangeLog deleted file mode 100644 index dba4cf7ec..000000000 --- a/community-staging/freemat/ChangeLog +++ /dev/null @@ -1,3 +0,0 @@ -2007-06-27 tardo <tardo@nagi-fanboi.net> -* Built for x86_64 - diff --git a/community-staging/freemat/PKGBUILD b/community-staging/freemat/PKGBUILD deleted file mode 100644 index 75d39befd..000000000 --- a/community-staging/freemat/PKGBUILD +++ /dev/null @@ -1,44 +0,0 @@ -# $Id: PKGBUILD 74207 2012-07-22 21:10:13Z spupykin $ -# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> -# Contributor: William Rea <sillywilly@gmail.com> - -pkgname=freemat -pkgver=4.1 -pkgrel=4 -pkgdesc="A free environment for rapid engineering, scientific prototyping and data processing" -arch=('i686' 'x86_64') -url="http://freemat.sourceforge.net" -license=('GPL') -depends=('qt' 'ffcall' 'fftw' 'mesa' 'portaudio' 'libffi') -makedepends=('arpack' 'lapack' 'umfpack' 'blas' 'libmatio' 'cmake' 'python2') -install=freemat.install -source=(http://downloads.sourceforge.net/project/freemat/FreeMat4/FreeMat-$pkgver-Source.tar.gz - build-fix.patch) -md5sums=('929d31e2310feaff5d380fc2f7b4d1a2' - '2d11a28aa2a7df89c4618ed1c4be5973') - -build() { - cd $srcdir/FreeMat-$pkgver-Source - - rm -f CMakeCache.txt - find . -type f -name '*.moc.cpp' -exec rm -f {} \; - find . -type f -name 'add.so' -exec rm -f {} \; - patch -p1 <$srcdir/build-fix.patch - echo >libs/libMatC/CJitFuncClang.hpp - echo >libs/libMatC/CJitFuncClang.cpp - - cmake \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DUSE_LLVM=OFF \ - -DFFI_INCLUDE_DIR=/usr/lib/libffi-`pacman -Q libffi | cut -f2 -d\ |cut -f1 -d-`/include/ \ - -DPYTHON_EXECUTABLE=/usr/bin/python2 \ - . - make -} -package() { - cd $srcdir/FreeMat-$pkgver-Source - - make DESTDIR=$pkgdir install - sed -i "s|/FreeMat-.*/|/FreeMat-$pkgver/|g" $startdir/freemat.install - rm $pkgdir/usr/bin/blas.ini -} diff --git a/community-staging/freemat/build-fix.patch b/community-staging/freemat/build-fix.patch deleted file mode 100644 index c1ea63088..000000000 --- a/community-staging/freemat/build-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -wbBur FreeMat-4.1-Source/libs/libGraphics/GLRenderEngine.cpp FreeMat-4.1-Source.my/libs/libGraphics/GLRenderEngine.cpp ---- FreeMat-4.1-Source/libs/libGraphics/GLRenderEngine.cpp 2011-11-27 04:27:43.000000000 +0400 -+++ FreeMat-4.1-Source.my/libs/libGraphics/GLRenderEngine.cpp 2012-01-20 19:07:48.000000000 +0400 -@@ -20,6 +20,7 @@ - #include <qimage.h> - #include <qpainter.h> - #include <QtOpenGL> -+#include <GL/glu.h> - #include <math.h> - #include "IEEEFP.hpp" - diff --git a/community-staging/freemat/freemat.install b/community-staging/freemat/freemat.install deleted file mode 100644 index 051cca866..000000000 --- a/community-staging/freemat/freemat.install +++ /dev/null @@ -1,7 +0,0 @@ -post_install() { - echo "-- Use FreeMat -i /usr/share/FreeMat-4.1/ to adjust docs location" -} - -post_upgrade() { - echo "-- Use FreeMat -i /usr/share/FreeMat-4.1/ to adjust docs location" -} diff --git a/community-staging/hedgewars/PKGBUILD b/community-staging/hedgewars/PKGBUILD deleted file mode 100644 index 5259b435e..000000000 --- a/community-staging/hedgewars/PKGBUILD +++ /dev/null @@ -1,48 +0,0 @@ -# $Id: PKGBUILD 74209 2012-07-22 21:11:50Z spupykin $ -# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> - -pkgname=hedgewars -pkgver=0.9.17 -pkgrel=4 -pkgdesc="Free Worms-like turn based strategy game" -arch=('i686' 'x86_64') -url="http://hedgewars.org" -license=('GPL' 'custom') -depends=('qt' 'sdl' 'sdl_mixer' 'sdl_image' 'sdl_net' 'sdl_ttf' 'lua') -makedepends=('fpc' 'cmake' - # haskell specific - 'ghc=7.4.2-1' - 'haskell-network=2.3.0.14-1' 'haskell-bytestring-show=0.3.5.1-3' - 'haskell-utf8-string=0.3.7-2' 'haskell-dataenc=0.14.0.3-2' - 'haskell-hslogger=1.1.5-7') -source=(http://download.gna.org/hedgewars/hedgewars-src-$pkgver.tar.bz2 - hedgewars.desktop - hedgewars.png) -md5sums=('77c0bc4bc664604adbba67fab606d8f1' - '48c66a3204d4fa0a69e9aa46f7c31e0c' - 'eeb14d50df39063549ac5eca9dbc65d1') - -build() { - cd $pkgname-src-$pkgver - -# sed -i 's|.*misc/liblua.*||' CMakeLists.txt - - cmake \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DDATA_INSTALL_DIR=/usr/share \ - -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake \ - -DQT_MOC_EXECUTABLE=/usr/bin/moc \ - -DWITH_SERVER=1 . - - make -} - -package() { - cd $pkgname-src-$pkgver - - make DESTDIR=$pkgdir install - - install -D -m644 Fonts_LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/Fonts_LICENSE.txt - install -D -m644 $srcdir/hedgewars.png $pkgdir/usr/share/pixmaps/hedgewars.png - install -D -m644 $srcdir/hedgewars.desktop $pkgdir/usr/share/applications/hedgewars.desktop -} diff --git a/community-staging/hedgewars/hedgewars.desktop b/community-staging/hedgewars/hedgewars.desktop deleted file mode 100644 index 9d74ed3f1..000000000 --- a/community-staging/hedgewars/hedgewars.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Hedgewars -GenericName=Platform Game -Comment=Worms style game -Exec=hedgewars -Icon=hedgewars -Categories=Game;ArcadeGame;
\ No newline at end of file diff --git a/community-staging/hedgewars/hedgewars.png b/community-staging/hedgewars/hedgewars.png Binary files differdeleted file mode 100644 index 60ae66199..000000000 --- a/community-staging/hedgewars/hedgewars.png +++ /dev/null diff --git a/community-staging/smc/PKGBUILD b/community-staging/smc/PKGBUILD deleted file mode 100644 index e91975d83..000000000 --- a/community-staging/smc/PKGBUILD +++ /dev/null @@ -1,50 +0,0 @@ -# $Id: PKGBUILD 73645 2012-07-12 13:48:41Z stativ $ -# Maintainer: -# Contributor: Juergen Hoetzel <juergen@archlinux.org> -# Contributor: Kritoke <typeolinux@yahoo.com> - -pkgname=smc -pkgver=1.9 -pkgrel=16 -pkgdesc="Secret Maryo Chronicles" -arch=('i686' 'x86_64') -url="http://www.secretmaryo.org/" -license=('GPL3') -depends=('sdl_image' 'sdl_ttf' 'sdl_mixer' 'cegui' 'boost-libs' 'smc-data') -makedepends=('autoconf' 'automake' 'boost') -source=(http://downloads.sourceforge.net/smclone/$pkgname-$pkgver.tar.bz2 - smc-for-cegui-v0-7.diff - boost_filesystem3.diff - smc.desktop - smc.png) -md5sums=('75ab7826303c49aec25b052a8b90287f' - '51dfea21b741ad19df14e738df52f1cf' - '309a5a6d4b3c0b3dc5e1b7f4de84086f' - '80fe208132ff41dd7677a53ee429ecdb' - 'efca7580e28748625eb676c9d24ee122') - -build() { - cd "$srcdir/$pkgname-$pkgver" - - # to remove when smc will be compatible with cegui-0.7.x - patch -Np1 -i "${srcdir}/smc-for-cegui-v0-7.diff" - # fix compilation - export CXXFLAGS="${CXXFLAGS} -fpermissive" - # fix for boost >= 1.50 - patch -Np1 -i "${srcdir}/boost_filesystem3.diff" - - ./autogen.sh - LIBS+="-lX11 -lboost_system" ./configure --prefix=/usr - make -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - - make install DESTDIR="$pkgdir" - # install some freedesktop.org compatibility - install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop" - install -Dm644 "$srcdir/$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png" - - rm -rf "$pkgdir/usr/share/smc/" -} diff --git a/community-staging/smc/boost_filesystem3.diff b/community-staging/smc/boost_filesystem3.diff deleted file mode 100644 index 6786b98f5..000000000 --- a/community-staging/smc/boost_filesystem3.diff +++ /dev/null @@ -1,48 +0,0 @@ -diff -rup smc-1.9/src/core/filesystem/filesystem.cpp smc-1.9.new/src/core/filesystem/filesystem.cpp ---- smc-1.9/src/core/filesystem/filesystem.cpp 2009-07-04 12:11:18.000000000 +0200 -+++ smc-1.9.new/src/core/filesystem/filesystem.cpp 2012-07-12 15:36:31.361941069 +0200 -@@ -142,27 +142,27 @@ vector<std::string> Get_Directory_Files( - if( fs::is_directory( *dir_itr ) ) - { - // ignore hidden directories -- if( dir_itr->path().leaf().find( "." ) == 0 ) -+ if( dir_itr->path().filename().string().find( "." ) == 0 ) - { - continue; - } - - if( with_directories ) - { -- valid_files.push_back( dir + "/" + dir_itr->path().leaf() ); -+ valid_files.push_back( dir + "/" + dir_itr->path().filename().string() ); - } - - // load all items from the sub-directory - if( search_in_sub_directories ) - { -- vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().leaf(), file_type, with_directories ); -+ vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().filename().string(), file_type, with_directories ); - valid_files.insert( valid_files.end(), new_valid_files.begin(), new_valid_files.end() ); - } - } - // valid file -- else if( file_type.empty() || dir_itr->path().leaf().rfind( file_type ) != std::string::npos ) -+ else if( file_type.empty() || dir_itr->path().filename().string().rfind( file_type ) != std::string::npos ) - { -- valid_files.push_back( dir + "/" + dir_itr->path().leaf() ); -+ valid_files.push_back( dir + "/" + dir_itr->path().filename().string() ); - } - } - catch( const std::exception &ex ) -diff -rup smc-1.9/src/overworld/world_manager.cpp smc-1.9.new/src/overworld/world_manager.cpp ---- smc-1.9/src/overworld/world_manager.cpp 2009-08-16 18:44:52.000000000 +0200 -+++ smc-1.9.new/src/overworld/world_manager.cpp 2012-07-12 15:37:13.564660591 +0200 -@@ -118,7 +118,7 @@ void cOverworld_Manager :: Load_Dir( con - {
- try
- {
-- std::string current_dir = dir_itr->path().leaf();
-+ std::string current_dir = dir_itr->path().filename().string();
-
- // only directories with an existing description
- if( fs::is_directory( *dir_itr ) && File_Exists( dir + "/" + current_dir + "/description.xml" ) )
diff --git a/community-staging/smc/smc-for-cegui-v0-7.diff b/community-staging/smc/smc-for-cegui-v0-7.diff deleted file mode 100644 index a99cbce6c..000000000 --- a/community-staging/smc/smc-for-cegui-v0-7.diff +++ /dev/null @@ -1,437 +0,0 @@ -diff -ur smc-1.9/configure.ac smc-1.9-b/configure.ac ---- smc-1.9/configure.ac 2009-08-17 15:59:00.000000000 +0200 -+++ smc-1.9-b/configure.ac 2011-01-19 00:43:37.809884881 +0100 -@@ -53,7 +53,7 @@ - AC_MSG_ERROR([SDL_ttf library not found])) - - # Check for the CEGUI library --PKG_CHECK_MODULES(CEGUI, CEGUI-OPENGL >= 0.5.0) -+PKG_CHECK_MODULES(CEGUI, CEGUI-OPENGL >= 0.7.0) - CPPFLAGS="$CPPFLAGS $CEGUI_CFLAGS" - LIBS="$LIBS $CEGUI_LIBS" - -diff -ur smc-1.9/src/core/editor.cpp smc-1.9-b/src/core/editor.cpp ---- smc-1.9/src/core/editor.cpp 2009-08-13 17:11:42.000000000 +0200 -+++ smc-1.9-b/src/core/editor.cpp 2011-01-19 00:44:46.734328121 +0100 -@@ -118,16 +118,10 @@ - return tmp;
- }
-
--void cEditor_Item_Object :: draw( const CEGUI::Vector3 &position, float alpha, const CEGUI::Rect &clipper ) const
-+void cEditor_Item_Object :: draw( CEGUI::GeometryBuffer &buffer, const CEGUI::Rect &targetRect, float alpha, const CEGUI::Rect *clipper ) const
- {
- // draw text
-- list_text->draw( position, alpha, clipper );
--}
--
--void cEditor_Item_Object :: draw( CEGUI::RenderCache &cache, const CEGUI::Rect &targetRect, float zBase, float alpha, const CEGUI::Rect *clipper ) const
--{
-- // draw text
-- list_text->draw( cache, targetRect, zBase, alpha, clipper );
-+ list_text->draw( buffer, targetRect, alpha, clipper );
- }
-
- void cEditor_Item_Object :: Draw_Image( void )
-@@ -533,12 +527,12 @@ - if( editor_window->getXPosition().asRelative( 1 ) >= 0 )
- {
- // Listbox dimension
-- float list_posy = listbox_items->getUnclippedPixelRect().d_top * global_downscaley;
-- float list_height = listbox_items->getUnclippedPixelRect().getHeight() * global_downscaley;
-+ float list_posy = listbox_items->getUnclippedOuterRect().d_top * global_downscaley;
-+ float list_height = listbox_items->getUnclippedOuterRect().getHeight() * global_downscaley;
- // Vertical ScrollBar Position
- float scroll_pos = listbox_items->getVertScrollbar()->getScrollPosition() * global_downscaley;
- // font height
-- float font_height = CEGUI::FontManager::getSingleton().getFont( "bluebold_medium" )->getFontHeight() * global_downscaley;
-+ float font_height = CEGUI::FontManager::getSingleton().get( "bluebold_medium" ).getFontHeight() * global_downscaley;
-
- // draw items
- for( unsigned int i = 0; i < listbox_items->getItemCount(); i++ )
-diff -ur smc-1.9/src/core/editor.h smc-1.9-b/src/core/editor.h ---- smc-1.9/src/core/editor.h 2009-02-18 05:21:30.000000000 +0100 -+++ smc-1.9-b/src/core/editor.h 2011-01-19 00:43:37.809884881 +0100 -@@ -62,8 +62,7 @@ - */
- virtual CEGUI::Size getPixelSize( void ) const;
- // draw
-- void draw( const CEGUI::Vector3 &position, float alpha, const CEGUI::Rect &clipper ) const;
-- void draw( CEGUI::RenderCache &cache, const CEGUI::Rect &targetRect, float zBase, float alpha, const CEGUI::Rect *clipper) const;
-+ void draw(CEGUI::GeometryBuffer& buffer, const CEGUI::Rect& targetRect, float alpha, const CEGUI::Rect* clipper) const;
- // draw image
- void Draw_Image( void );
-
-diff -ur smc-1.9/src/core/game_core.cpp smc-1.9-b/src/core/game_core.cpp ---- smc-1.9/src/core/game_core.cpp 2009-08-16 18:44:42.000000000 +0200 -+++ smc-1.9-b/src/core/game_core.cpp 2011-01-19 00:59:02.668958883 +0100 -@@ -265,7 +265,7 @@ -
-
- // align text
-- CEGUI::Font *font = CEGUI::FontManager::getSingleton().getFont( "bluebold_medium" );
-+ CEGUI::Font *font = &CEGUI::FontManager::getSingleton().get( "bluebold_medium" );
- // fixme : Can't handle multiple lines of text
- float text_width = font->getTextExtent( text ) * global_downscalex;
-
-@@ -1182,7 +1182,7 @@ - text_default->setText( gui_text );
-
- // align text
-- CEGUI::Font *font = CEGUI::FontManager::getSingleton().getFont( "bluebold_medium" );
-+ CEGUI::Font *font = &CEGUI::FontManager::getSingleton().get( "bluebold_medium" );
- float text_width = font->getTextExtent( gui_text ) * global_downscalex;
-
- text_default->setWidth( CEGUI::UDim( 0, ( text_width + 15 ) * global_upscalex ) );
-@@ -1190,7 +1190,7 @@ - text_default->moveToFront();
-
- // set window height
-- text_default->setHeight( CEGUI::UDim( 0, font->getFontHeight() * font->getFormattedLineCount( gui_text, text_default->getUnclippedInnerRect(), CEGUI::LeftAligned ) + ( 12 * global_upscaley ) ) );
-+ text_default->setHeight( CEGUI::UDim( 0, font->getFontHeight() + ( 12 * global_upscaley ) ) );
-
- while( draw )
- {
-diff -ur smc-1.9/src/core/main.cpp smc-1.9-b/src/core/main.cpp ---- smc-1.9/src/core/main.cpp 2009-05-12 10:36:04.000000000 +0200 -+++ smc-1.9-b/src/core/main.cpp 2011-01-19 00:43:37.809884881 +0100 -@@ -444,13 +444,15 @@ - - if( pGuiSystem ) - { -- delete pGuiSystem; -+ CEGUI::ResourceProvider* rp = pGuiSystem->getResourceProvider(); -+ pGuiSystem->destroy(); - pGuiSystem = NULL; -+ delete rp; - } - - if( pGuiRenderer ) - { -- delete pGuiRenderer; -+ pGuiRenderer->destroy( *pGuiRenderer ); - pGuiRenderer = NULL; - } - -@@ -507,7 +509,7 @@ - } - case SDL_VIDEORESIZE: - { -- pGuiRenderer->setDisplaySize( CEGUI::Size( static_cast<float>(ev->resize.w), static_cast<float>(ev->resize.h) ) ); -+ pGuiSystem->notifyDisplaySizeChanged( CEGUI::Size( static_cast<float>(ev->resize.w), static_cast<float>(ev->resize.h) ) ); - break; - } - case SDL_KEYDOWN: -diff -ur smc-1.9/src/gui/hud.cpp smc-1.9-b/src/gui/hud.cpp ---- smc-1.9/src/gui/hud.cpp 2009-05-01 15:00:16.000000000 +0200 -+++ smc-1.9-b/src/gui/hud.cpp 2011-01-19 00:43:37.816550365 +0100 -@@ -946,7 +946,7 @@ - m_text_debug_text->setVisible( 1 );
-
- // update position
-- CEGUI::Font *font = CEGUI::FontManager::getSingleton().getFont( "bluebold_medium" );
-+ CEGUI::Font *font = &CEGUI::FontManager::getSingleton().get( "bluebold_medium" );
- float text_width = font->getTextExtent( gui_text ) * global_downscalex;
-
- if( text_width > 800.0f )
-diff -ur smc-1.9/src/input/mouse.cpp smc-1.9-b/src/input/mouse.cpp ---- smc-1.9/src/input/mouse.cpp 2009-04-24 21:16:58.000000000 +0200 -+++ smc-1.9-b/src/input/mouse.cpp 2011-01-19 00:43:37.813217623 +0100 -@@ -432,17 +432,12 @@ -
- void cMouseCursor :: Render( void ) const
- {
-- if( !m_active )
-- {
-+ CEGUI::MouseCursor *mouse = CEGUI::MouseCursor::getSingletonPtr();
-+
-+ if ( m_active == mouse->isVisible() )
- return;
-- }
-
-- // Render CEGUI Mouse
-- pGuiRenderer->setQueueingEnabled( 0 );
-- CEGUI::MouseCursor *mouse = CEGUI::MouseCursor::getSingletonPtr();
-- mouse->setVisible( 1 );
-- mouse->draw();
-- mouse->setVisible( 0 );
-+ mouse->setVisible( m_active );
- }
-
- void cMouseCursor :: Update_Position( void )
-diff -ur smc-1.9/src/level/level_settings.cpp smc-1.9-b/src/level/level_settings.cpp ---- smc-1.9/src/level/level_settings.cpp 2009-08-07 03:04:28.000000000 +0200 -+++ smc-1.9-b/src/level/level_settings.cpp 2011-01-19 01:06:59.064259070 +0100 -@@ -163,8 +163,8 @@ - editbox->setText( int_to_string( bg_color_2.blue ).c_str() );
- // preview window
- CEGUI::Window *window_background_preview = CEGUI::WindowManager::getSingleton().getWindow( "window_background_preview" );
-- background_preview->Set_Pos_X( window_background_preview->getUnclippedPixelRect().d_left * global_downscalex, 1 );
-- background_preview->Set_Pos_Y( window_background_preview->getUnclippedPixelRect().d_top * global_downscaley, 1 );
-+ background_preview->Set_Pos_X( window_background_preview->getUnclippedOuterRect().d_left * global_downscalex, 1 );
-+ background_preview->Set_Pos_Y( window_background_preview->getUnclippedOuterRect().d_top * global_downscaley, 1 );
-
- Update_BG_Colors( CEGUI::EventArgs() );
-
-@@ -555,8 +555,8 @@ -
- // set default rect
- CEGUI::Window *window_background_preview = CEGUI::WindowManager::getSingleton().getWindow( "window_background_preview" );
-- background_preview->m_rect.m_w = window_background_preview->getUnclippedPixelRect().getWidth() * global_downscalex;
-- background_preview->m_rect.m_h = window_background_preview->getUnclippedPixelRect().getHeight() * global_downscaley;
-+ background_preview->m_rect.m_w = window_background_preview->getUnclippedOuterRect().getWidth() * global_downscalex;
-+ background_preview->m_rect.m_h = window_background_preview->getUnclippedOuterRect().getHeight() * global_downscaley;
-
- if( !File_Exists( filename ) )
- {
-diff -ur smc-1.9/src/objects/sprite.cpp smc-1.9-b/src/objects/sprite.cpp ---- smc-1.9/src/objects/sprite.cpp 2009-04-18 09:55:06.000000000 +0200 -+++ smc-1.9-b/src/objects/sprite.cpp 2011-01-19 00:43:37.813217623 +0100 -@@ -1663,7 +1663,7 @@ - window_name->setText( name );
- window_name->setTooltipText( tooltip );
- // get text width
-- CEGUI::Font *font = CEGUI::FontManager::getSingleton().getFont( "bluebold_medium" );
-+ CEGUI::Font *font = &CEGUI::FontManager::getSingleton().get( "bluebold_medium" );
- float text_width = 12 + font->getTextExtent( name ) * global_downscalex;
- // all names should have the same width
- if( text_width > m_editor_window_name_width )
-diff -ur smc-1.9/src/video/video.cpp smc-1.9-b/src/video/video.cpp ---- smc-1.9/src/video/video.cpp 2009-07-04 11:46:56.000000000 +0200 -+++ smc-1.9-b/src/video/video.cpp 2011-01-19 01:22:45.338524592 +0100 -@@ -103,15 +103,15 @@ -
- /* *** *** *** *** *** *** *** CEGUI renderer fake class *** *** *** *** *** *** *** *** *** *** */
-
--cFake_Renderer :: cFake_Renderer( void )
--{
-- d_identifierString = "Fake Renderer";
--}
-+//cFake_Renderer :: cFake_Renderer( void )
-+//{
-+// d_identifierString = "Fake Renderer";
-+//}
-
--cFake_Renderer :: ~cFake_Renderer( void )
--{
-+//cFake_Renderer :: ~cFake_Renderer( void )
-+//{
-
--}
-+//}
-
- /* *** *** *** *** *** *** *** Video class *** *** *** *** *** *** *** *** *** *** */
-
-@@ -158,7 +158,7 @@ - std::string log_dump_dir = "/dev/null";
- #endif
- // create fake system and renderer
-- pGuiSystem = new CEGUI::System( new cFake_Renderer(), rp, NULL, NULL, "", log_dump_dir );
-+ pGuiSystem = &CEGUI::System::create( *new cFake_Renderer(), rp, NULL, NULL, NULL, "", log_dump_dir );
- }
-
- void cVideo :: Delete_CEGUI_Fake( void ) const
-@@ -166,7 +166,7 @@ - CEGUI::ResourceProvider *rp = pGuiSystem->getResourceProvider();
- CEGUI::Renderer *renderer = pGuiSystem->getRenderer();
-
-- delete pGuiSystem;
-+ pGuiSystem->destroy();
- pGuiSystem = NULL;
- delete renderer;
- delete rp;
-@@ -177,7 +177,7 @@ - // create renderer
- try
- {
-- pGuiRenderer = new CEGUI::OpenGLRenderer( 0, screen->w, screen->h );
-+ pGuiRenderer = &CEGUI::OpenGLRenderer::create( CEGUI::Size( screen->w, screen->h ) );
- }
- // catch CEGUI Exceptions
- catch( CEGUI::Exception &ex )
-@@ -186,10 +186,10 @@ - exit( EXIT_FAILURE );
- }
-
-- /* create Resource Provider
-- * no need to destroy it later since it is handled by the CEGUI renderer
-- */
-- CEGUI::DefaultResourceProvider *rp = static_cast<CEGUI::DefaultResourceProvider *>(pGuiRenderer->createResourceProvider());
-+ pGuiRenderer->enableExtraStateSettings(true);
-+
-+ // create Resource Provider
-+ CEGUI::DefaultResourceProvider *rp = new CEGUI::DefaultResourceProvider;
-
- // set Resource Provider directories
- rp->setResourceGroupDirectory( "schemes", DATA_DIR "/" GUI_SCHEME_DIR "/" );
-@@ -215,7 +215,7 @@ - // create system
- try
- {
-- pGuiSystem = new CEGUI::System( pGuiRenderer, rp, NULL, NULL, "", pResource_Manager->user_data_dir + "cegui.log" );
-+ pGuiSystem = &CEGUI::System::create( *pGuiRenderer, rp, NULL, NULL, NULL, "", pResource_Manager->user_data_dir + "cegui.log" );
- }
- // catch CEGUI Exceptions
- catch( CEGUI::Exception &ex )
-@@ -242,7 +242,7 @@ - // load the scheme file, which auto-loads the imageset
- try
- {
-- CEGUI::SchemeManager::getSingleton().loadScheme( "TaharezLook.scheme" );
-+ CEGUI::SchemeManager::getSingleton().create( "TaharezLook.scheme" );
- }
- // catch CEGUI Exceptions
- catch( CEGUI::Exception &ex )
-@@ -254,9 +254,7 @@ - // default mouse cursor
- pGuiSystem->setDefaultMouseCursor( "TaharezLook", "MouseArrow" );
- // force new mouse image
-- CEGUI::MouseCursor::getSingleton().setImage( &CEGUI::ImagesetManager::getSingleton().getImageset( "TaharezLook" )->getImage( "MouseArrow" ) );
-- // hide CEGUI mouse always because we render it manually
-- CEGUI::MouseCursor::getSingleton().hide();
-+ CEGUI::MouseCursor::getSingleton().setImage( &CEGUI::ImagesetManager::getSingleton().get( "TaharezLook" ).getImage( "MouseArrow" ) );
- // default tooltip
- pGuiSystem->setDefaultTooltip( "TaharezLook/Tooltip" );
- // create default root window
-@@ -553,7 +551,7 @@ - pFont->Restore_Textures();
-
- // send new size to CEGUI
-- pGuiRenderer->setDisplaySize( CEGUI::Size( static_cast<float>(screen_w), static_cast<float>(screen_h) ) );
-+ pGuiSystem->notifyDisplaySizeChanged( CEGUI::Size( static_cast<float>(screen_w), static_cast<float>(screen_h) ) );
-
- // check if CEGUI is initialized
- bool cegui_initialized = pGuiSystem->getGUISheet() != NULL;
-diff -ur smc-1.9/src/video/video.h smc-1.9-b/src/video/video.h ---- smc-1.9/src/video/video.h 2009-07-04 10:49:50.000000000 +0200 -+++ smc-1.9-b/src/video/video.h 2011-01-19 01:16:42.791283379 +0100 -@@ -23,7 +23,7 @@ - #include "SDL_opengl.h"
- // CEGUI
- #include "CEGUI.h"
--#include "RendererModules/OpenGLGUIRenderer/openglrenderer.h"
-+#include <RendererModules/OpenGL/CEGUIOpenGLRenderer.h>
-
- namespace SMC
- {
-@@ -129,31 +129,100 @@ - EFFECT_IN_AMOUNT
- };
-
--/* *** *** *** *** *** *** *** CEGUI renderer fake class *** *** *** *** *** *** *** *** *** *** */
-+/* *** *** *** *** *** *** *** CEGUI renderer fake classes *** *** *** *** *** *** *** *** *** *** */
-+// CEGUI 0.7.x requires more 'fake' classes than the 0.6.x version did...
-+class cFake_GeometryBuffer : public CEGUI::GeometryBuffer
-+{
-+ void draw() const {}
-+ void setTranslation(const CEGUI::Vector3&) {}
-+ void setRotation(const CEGUI::Vector3&) {}
-+ void setPivot(const CEGUI::Vector3&) {}
-+ void setClippingRegion(const CEGUI::Rect&) {}
-+ void appendVertex(const CEGUI::Vertex&) {}
-+ void appendGeometry(const CEGUI::Vertex* const, CEGUI::uint) {}
-+ void setActiveTexture(CEGUI::Texture*) {}
-+ void reset() {}
-+ CEGUI::Texture* getActiveTexture() const { return 0; }
-+ CEGUI::uint getVertexCount() const { return 0; }
-+ CEGUI::uint getBatchCount() const { return 0; }
-+ void setRenderEffect(CEGUI::RenderEffect*) {}
-+ CEGUI::RenderEffect* getRenderEffect() { return 0; }
-+};
-
--class cFake_Renderer : public CEGUI::Renderer
-+class cFake_Texture : public CEGUI::Texture
-+{
-+public:
-+ cFake_Texture() :
-+ m_size(1, 1),
-+ m_scaling(1, 1) {}
-+
-+ const CEGUI::Size& getSize() const { return m_size; }
-+ const CEGUI::Size& getOriginalDataSize() const { return m_size; }
-+ const CEGUI::Vector2& getTexelScaling() const { return m_scaling; }
-+ void loadFromFile(const CEGUI::String&, const CEGUI::String&) {}
-+ void loadFromMemory(const void*, const CEGUI::Size&, CEGUI::Texture::PixelFormat) {}
-+ void saveToMemory(void*) {}
-+
-+private:
-+ CEGUI::Size m_size;
-+ CEGUI::Vector2 m_scaling;
-+};
-+
-+class cFake_RenderTarget : public CEGUI::RenderTarget
- {
- public:
-- cFake_Renderer( void );
-- virtual ~cFake_Renderer( void );
-+ cFake_RenderTarget() : m_area(0, 0, 0, 0) {}
-+ void draw(const CEGUI::GeometryBuffer&) {}
-+ void draw(const CEGUI::RenderQueue&) {}
-+ void setArea(const CEGUI::Rect&) {}
-+ const CEGUI::Rect& getArea() const { return m_area; }
-+ bool isImageryCache() const { return false; }
-+ void activate() {}
-+ void deactivate() {}
-+ void unprojectPoint(const CEGUI::GeometryBuffer&, const CEGUI::Vector2&, CEGUI::Vector2&) const {}
-+
-+private:
-+ CEGUI::Rect m_area;
-+};
-
-- virtual void addQuad(const CEGUI::Rect& dest_rect, float z, const CEGUI::Texture* tex, const CEGUI::Rect& texture_rect, const CEGUI::ColourRect& colours, CEGUI::QuadSplitMode quad_split_mode) {};
-- virtual void doRender(void) {};
-- virtual void clearRenderList(void) {};
-- virtual void setQueueingEnabled(bool setting) {};
-- virtual CEGUI::Texture *createTexture(void) { return NULL; };
-- virtual CEGUI::Texture *createTexture(const CEGUI::String& filename, const CEGUI::String& resourceGroup) { return NULL; };
-- virtual CEGUI::Texture *createTexture(float size) { return NULL; };
-- virtual void destroyTexture(CEGUI::Texture* texture) {};
-- virtual void destroyAllTextures(void) {};
-- virtual bool isQueueingEnabled(void) const { return 0; };
-- virtual float getWidth(void) const { return 0; };
-- virtual float getHeight(void) const { return 0; };
-- virtual CEGUI::Size getSize(void) const { return CEGUI::Size();};
-- virtual CEGUI::Rect getRect(void) const { return CEGUI::Rect();};
-- virtual unsigned int getMaxTextureSize(void) const { return 0; };
-- virtual unsigned int getHorzScreenDPI(void) const { return 0; };
-- virtual unsigned int getVertScreenDPI(void) const { return 0; };
-+class cFake_Renderer : public CEGUI::Renderer
-+{
-+public:
-+ cFake_Renderer( void ) :
-+ m_size(0, 0),
-+ m_dpi(0, 0),
-+ m_identifierString("Fake Renderer"),
-+ m_root(m_target) {}
-+ ~cFake_Renderer( void ) {}
-+
-+ CEGUI::RenderingRoot& getDefaultRenderingRoot() { return m_root; }
-+ CEGUI::GeometryBuffer& createGeometryBuffer() { return m_geometry; }
-+ void destroyGeometryBuffer(const CEGUI::GeometryBuffer&) {}
-+ void destroyAllGeometryBuffers() {}
-+ CEGUI::TextureTarget* createTextureTarget() { return 0; }
-+ void destroyTextureTarget(CEGUI::TextureTarget*) {}
-+ void destroyAllTextureTargets() {}
-+ CEGUI::Texture& createTexture() { return m_texture; }
-+ CEGUI::Texture& createTexture(const CEGUI::String&, const CEGUI::String&) { return m_texture; }
-+ CEGUI::Texture& createTexture(const CEGUI::Size&) { return m_texture; }
-+ void destroyTexture(CEGUI::Texture&) {}
-+ void destroyAllTextures() {}
-+ void beginRendering() {}
-+ void endRendering() {}
-+ void setDisplaySize(const CEGUI::Size&) {}
-+ const CEGUI::Size& getDisplaySize() const { return m_size; }
-+ const CEGUI::Vector2& getDisplayDPI() const {return m_dpi; }
-+ CEGUI::uint getMaxTextureSize() const { return 0; }
-+ const CEGUI::String& getIdentifierString() const { return m_identifierString; }
-+
-+private:
-+ CEGUI::Size m_size;
-+ CEGUI::Vector2 m_dpi;
-+ CEGUI::String m_identifierString;
-+ cFake_GeometryBuffer m_geometry;
-+ cFake_Texture m_texture;
-+ cFake_RenderTarget m_target;
-+ CEGUI::RenderingRoot m_root;
- };
-
- /* *** *** *** *** *** *** *** Video class *** *** *** *** *** *** *** *** *** *** */
diff --git a/community-staging/smc/smc.desktop b/community-staging/smc/smc.desktop deleted file mode 100644 index 6cfe5b018..000000000 --- a/community-staging/smc/smc.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry]
-Name=Secret Maryo Chronicles
-GenericName=Arcade Game
-Exec=smc
-Icon=smc.png
-Terminal=false
-Type=Application
-Categories=Game;ArcadeGame;KidsGame;
-StartupNotify=false
\ No newline at end of file diff --git a/community-staging/smc/smc.png b/community-staging/smc/smc.png Binary files differdeleted file mode 100644 index f02af1bfc..000000000 --- a/community-staging/smc/smc.png +++ /dev/null diff --git a/community-staging/spring/PKGBUILD b/community-staging/spring/PKGBUILD deleted file mode 100644 index 654885736..000000000 --- a/community-staging/spring/PKGBUILD +++ /dev/null @@ -1,47 +0,0 @@ -# $Id: PKGBUILD 73670 2012-07-13 06:44:56Z svenstaro $ -# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> -# Contributor: Arkham <arkham at archlinux dot us> -# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org> - -pkgname=spring -pkgver=0.89.0 -_pkgver=89.0 -pkgrel=1 -pkgdesc='A free 3D real-time-strategy (RTS) game engine' -arch=('i686' 'x86_64') -url="http://springrts.com/" -license=('GPL') -depends=('openal' 'glew' 'boost-libs' 'freetype2' 'devil' 'libvorbis' 'sdl' - 'libxcursor') -makedepends=('boost' 'cmake' 'zip' 'xz' 'p7zip' 'python2' 'java-environment') -optdepends=('python2: python-based bots' - 'java-runtime: java-based bots') -source=(http://downloads.sourceforge.net/sourceforge/springrts/${pkgname}_${_pkgver}_src.tar.lzma - boost-1.50.patch) -md5sums=('36fc266e925bc3790a68bf1bc7ebb315' - 'a3c3b4a53eeb499090b027fd6b3cf848') - -build() { - bsdtar -xf ${pkgname}_${_pkgver}_src.tar.lzma - - cd spring_${_pkgver} - - sed "s/TIME_UTC/TIME_UTC_/g" -i AI/Skirmish/E323AI/CScopedTimer.h - patch -Np1 < $srcdir/boost-1.50.patch - - cmake . \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DDATADIR=share/spring - make -} - -package() { - cd spring_${_pkgver} - - make DESTDIR=$pkgdir install - - install -d $pkgdir/etc/spring - echo '$HOME/.spring' > $pkgdir/etc/spring/datadir -} - -# vim sw=2:ts=2 et: diff --git a/community-staging/spring/boost-1.50.patch b/community-staging/spring/boost-1.50.patch deleted file mode 100644 index f8a8b5695..000000000 --- a/community-staging/spring/boost-1.50.patch +++ /dev/null @@ -1,2539 +0,0 @@ -diff -ru spring_89.0/rts/Game/Camera/CameraController.cpp /home/svenstaro/src/spring/rts/Game/Camera/CameraController.cpp ---- spring_89.0/rts/Game/Camera/CameraController.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/Camera/CameraController.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -59,7 +59,7 @@ - bool CCameraController::GetUseDistToGroundForIcons() { - - const float3& dir = GetDir().UnsafeNormalize(); -- const float dot = std::min(1.0f, std::max(0.0f, fabs(dir.dot(UpVector)))); -+ const float dot = std::min(1.0f, std::max(0.0f, math::fabs(dir.dot(UpVector)))); - - if (dot < switchVal) { - // flat angle (typical for first person camera) -diff -ru spring_89.0/rts/Game/Camera/FPSController.cpp /home/svenstaro/src/spring/rts/Game/Camera/FPSController.cpp ---- spring_89.0/rts/Game/Camera/FPSController.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/Camera/FPSController.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -80,9 +80,9 @@ - oldHeight = pos.y - gndHeight; - } - -- dir.x = (float)(cos(camera->rot.x) * sin(camera->rot.y)); -- dir.z = (float)(cos(camera->rot.x) * cos(camera->rot.y)); -- dir.y = (float)(sin(camera->rot.x)); -+ dir.x = (float)(math::cos(camera->rot.x) * math::sin(camera->rot.y)); -+ dir.z = (float)(math::cos(camera->rot.x) * math::cos(camera->rot.y)); -+ dir.y = (float)(math::sin(camera->rot.x)); - dir.ANormalize(); - } - -diff -ru spring_89.0/rts/Game/Camera/FreeController.cpp /home/svenstaro/src/spring/rts/Game/Camera/FreeController.cpp ---- spring_89.0/rts/Game/Camera/FreeController.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/Camera/FreeController.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -51,9 +51,9 @@ - dir = float3(0.0f, -2.0f, -1.0f); - dir.ANormalize(); - if (camera) { -- const float hDist = sqrt((dir.x * dir.x) + (dir.z * dir.z)); -- camera->rot.y = atan2(dir.x, dir.z); -- camera->rot.x = atan2(dir.y, hDist); -+ const float hDist = math::sqrt((dir.x * dir.x) + (dir.z * dir.z)); -+ camera->rot.y = math::atan2(dir.x, dir.z); -+ camera->rot.x = math::atan2(dir.y, hDist); - } - pos -= (dir * 1000.0f); - -@@ -84,14 +84,14 @@ - - // lock the view direction to the target - const float3 diff(trackPos - pos); -- const float rads = atan2(diff.x, diff.z); -+ const float rads = math::atan2(diff.x, diff.z); - camera->rot.y = rads; - - const float len2D = diff.Length2D(); -- if (fabs(len2D) <= 0.001f) { -+ if (math::fabs(len2D) <= 0.001f) { - camera->rot.x = 0.0f; - } else { -- camera->rot.x = atan2((trackPos.y - pos.y), len2D); -+ camera->rot.x = math::atan2((trackPos.y - pos.y), len2D); - } - - camera->UpdateForward(); -@@ -130,11 +130,11 @@ - if (pos.y < (gndHeight + gndOffset + 1.0f)) { - float3 hDir; - hDir.y = 0.0f; -- hDir.x = (float)sin(camera->rot.y); -- hDir.z = (float)cos(camera->rot.y); -+ hDir.x = (float)math::sin(camera->rot.y); -+ hDir.z = (float)math::cos(camera->rot.y); - const float3 gndNormal = ground->GetSmoothNormal(pos.x, pos.z, false); - const float dot = gndNormal.dot(hDir); -- const float gndRotX = (float)acos(dot) - (PI * 0.5f); -+ const float gndRotX = (float)math::acos(dot) - (PI * 0.5f); - const float rotXdiff = (gndRotX - camera->rot.x); - autoTiltVel = (autoTilt * rotXdiff); - } -@@ -214,8 +214,8 @@ - // convert the angular velocity into its positional change - const float3 diff2 = (pos - trackPos); - const float deltaRad = (avel.y * ft); -- const float cos_val = cos(deltaRad); -- const float sin_val = sin(deltaRad); -+ const float cos_val = math::cos(deltaRad); -+ const float sin_val = math::sin(deltaRad); - pos.x = trackPos.x + ((cos_val * diff2.x) + (sin_val * diff2.z)); - pos.z = trackPos.z + ((cos_val * diff2.z) - (sin_val * diff2.x)); - } -@@ -246,7 +246,7 @@ - if (pos.y < minHeight) { - pos.y = minHeight; - if (gndLock) { -- vel.y = min(fabs(scrollSpeed), ((minHeight - prevPos.y) / ft)); -+ vel.y = min(math::fabs(scrollSpeed), ((minHeight - prevPos.y) / ft)); - } else { - vel.y = 0.0f; - } -@@ -263,7 +263,7 @@ - camera->rot.x = -xRotLimit; - avel.x = 0.0f; - } -- camera->rot.y = fmod(camera->rot.y, PI * 2.0f); -+ camera->rot.y = math::fmod(camera->rot.y, PI * 2.0f); - - // setup for the next loop - prevVel = vel; -@@ -277,9 +277,9 @@ - float3 CFreeController::GetDir() const - { - float3 dir; -- dir.x = (float)(sin(camera->rot.y) * cos(camera->rot.x)); -- dir.z = (float)(cos(camera->rot.y) * cos(camera->rot.x)); -- dir.y = (float)(sin(camera->rot.x)); -+ dir.x = (float)(math::sin(camera->rot.y) * math::cos(camera->rot.x)); -+ dir.z = (float)(math::cos(camera->rot.y) * math::cos(camera->rot.x)); -+ dir.y = (float)(math::sin(camera->rot.x)); - dir.ANormalize(); - return dir; - } -@@ -373,7 +373,7 @@ - if ((yDiff * dir.y) >= 0.0f) { - pos = float3(newPos.x, h, newPos.z); - } else { -- pos = target - (dir * fabs(yDiff / dir.y)); -+ pos = target - (dir * math::fabs(yDiff / dir.y)); - } // FIXME - /* - const float oldPosY = pos.y; -diff -ru spring_89.0/rts/Game/Camera/OrbitController.cpp /home/svenstaro/src/spring/rts/Game/Camera/OrbitController.cpp ---- spring_89.0/rts/Game/Camera/OrbitController.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/Camera/OrbitController.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -51,8 +51,8 @@ - const float3 w = (v / v.Length()); // do not normalize v in-place - - const float d = v.Length(); -- const float e = RAD2DEG(acos(v.Length2D() / d)); -- const float r = RAD2DEG(acos(w.x)); -+ const float e = RAD2DEG(math::acos(v.Length2D() / d)); -+ const float r = RAD2DEG(math::acos(w.x)); - - distance = cDistance = d; - elevation = cElevation = e; -@@ -251,12 +251,12 @@ - float tx = cx; - - tx = cx; -- cx = cx * cos(beta) + cy * sin(beta); -- cy = tx * sin(beta) + cy * cos(beta); -+ cx = cx * math::cos(beta) + cy * math::sin(beta); -+ cy = tx * math::sin(beta) + cy * math::cos(beta); - - tx = cx; -- cx = cx * cos(gamma) - cz * sin(gamma); -- cz = tx * sin(gamma) + cz * cos(gamma); -+ cx = cx * math::cos(gamma) - cz * math::sin(gamma); -+ cz = tx * math::sin(gamma) + cz * math::cos(gamma); - - return float3(cx, cy, cz); - } -diff -ru spring_89.0/rts/Game/Camera/OverheadController.cpp /home/svenstaro/src/spring/rts/Game/Camera/OverheadController.cpp ---- spring_89.0/rts/Game/Camera/OverheadController.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/Camera/OverheadController.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -52,7 +52,7 @@ - move.x = -move.x; - move.y = -move.y; - } -- move *= sqrt(move.z) * 200; -+ move *= math::sqrt(move.z) * 200; - - pos.x += move.x * pixelSize * 2.0f * scrollSpeed; - pos.z -= move.y * pixelSize * 2.0f * scrollSpeed; -diff -ru spring_89.0/rts/Game/Camera/RotOverheadController.cpp /home/svenstaro/src/spring/rts/Game/Camera/RotOverheadController.cpp ---- spring_89.0/rts/Game/Camera/RotOverheadController.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/Camera/RotOverheadController.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -29,7 +29,7 @@ - - void CRotOverheadController::KeyMove(float3 move) - { -- move *= sqrt(move.z) * 400; -+ move *= math::sqrt(move.z) * 400; - - float3 flatForward = camera->forward; - if(camera->forward.y < -0.9f) -@@ -68,9 +68,9 @@ - - void CRotOverheadController::UpdateVectors() - { -- dir.x=(float)(sin(camera->rot.y) * cos(camera->rot.x)); -- dir.y=(float)(sin(camera->rot.x)); -- dir.z=(float)(cos(camera->rot.y) * cos(camera->rot.x)); -+ dir.x=(float)(math::sin(camera->rot.y) * math::cos(camera->rot.x)); -+ dir.y=(float)(math::sin(camera->rot.x)); -+ dir.z=(float)(math::cos(camera->rot.y) * math::cos(camera->rot.x)); - dir.ANormalize(); - - pos.x = Clamp(pos.x, 0.01f, gs->mapx * SQUARE_SIZE - 0.01f); -diff -ru spring_89.0/rts/Game/Camera/SmoothController.cpp /home/svenstaro/src/spring/rts/Game/Camera/SmoothController.cpp ---- spring_89.0/rts/Game/Camera/SmoothController.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/Camera/SmoothController.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -55,7 +55,7 @@ - move.y = -move.y; - } - -- move *= sqrt(move.z) * 200.0f; -+ move *= math::sqrt(move.z) * 200.0f; - - const float3 thisMove(move.x * pixelSize * 2.0f * scrollSpeed, 0.0f, -move.y * pixelSize * 2.0f * scrollSpeed); - -@@ -103,7 +103,7 @@ - move.x = -move.x; - move.y = -move.y; - } -- move *= sqrt(move.z) * 200.0f; -+ move *= math::sqrt(move.z) * 200.0f; - - const float3 thisMove(move.x * pixelSize * 2.0f * scrollSpeed, 0.0f, -move.y * pixelSize * 2.0f * scrollSpeed); - -diff -ru spring_89.0/rts/Game/Camera/TWController.cpp /home/svenstaro/src/spring/rts/Game/Camera/TWController.cpp ---- spring_89.0/rts/Game/Camera/TWController.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/Camera/TWController.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -35,7 +35,7 @@ - flatForward.y=0; - flatForward.ANormalize(); - -- move *= sqrt(move.z) * 200; -+ move *= math::sqrt(move.z) * 200; - pos += (camera->right * move.x + flatForward * move.y) * scrollSpeed; - UpdateVectors(); - } -@@ -79,9 +79,9 @@ - - camera->rot.x = Clamp(camera->rot.x, -PI * 0.4f, -0.1f); - -- dir.x = sin(camera->rot.y) * cos(camera->rot.x); -- dir.y = sin(camera->rot.x); -- dir.z = cos(camera->rot.y) * cos(camera->rot.x); -+ dir.x = math::sin(camera->rot.y) * math::cos(camera->rot.x); -+ dir.y = math::sin(camera->rot.x); -+ dir.z = math::cos(camera->rot.y) * math::cos(camera->rot.x); - dir.ANormalize(); - } - -diff -ru spring_89.0/rts/Game/Camera.cpp /home/svenstaro/src/spring/rts/Game/Camera.cpp ---- spring_89.0/rts/Game/Camera.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/Camera.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -89,7 +89,7 @@ - up.UnsafeANormalize(); - - const float aspect = globalRendering->aspectRatio; -- const float viewx = tan(aspect * halfFov); -+ const float viewx = math::tan(aspect * halfFov); - const float viewy = tanHalfFov; - - if (globalRendering->viewSizeY <= 0) { -@@ -218,9 +218,9 @@ - - void CCamera::UpdateForward() - { -- forward.z = cos(rot.y) * cos(rot.x); -- forward.x = sin(rot.y) * cos(rot.x); -- forward.y = sin(rot.x); -+ forward.z = math::cos(rot.y) * math::cos(rot.x); -+ forward.x = math::sin(rot.y) * math::cos(rot.x); -+ forward.y = math::sin(rot.x); - forward.Normalize(); - } - -@@ -229,7 +229,7 @@ - { - fov = myfov; - halfFov = (fov * 0.5f) * (PI / 180.f); -- tanHalfFov = tan(halfFov); -+ tanHalfFov = math::tan(halfFov); - } - - -@@ -330,7 +330,7 @@ - float3 pInt; - - // prevent DIV0 when calculating line.dir -- if (fabs(xdir.z) < 0.001f) -+ if (math::fabs(xdir.z) < 0.001f) - xdir.z = 0.001f; - - if (ydir.y != 0.0f) { -diff -ru spring_89.0/rts/Game/CameraHandler.cpp /home/svenstaro/src/spring/rts/Game/CameraHandler.cpp ---- spring_89.0/rts/Game/CameraHandler.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/CameraHandler.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -139,7 +139,7 @@ - cameraTimeLeft = std::max(0.0f, (cameraTimeLeft - globalRendering->lastFrameTime)); - const float nextTime = cameraTimeLeft; - const float exp = cameraTimeExponent; -- const float ratio = 1.0f - (float)pow((nextTime / currTime), exp); -+ const float ratio = 1.0f - (float)math::pow((nextTime / currTime), exp); - - const float deltaFOV = wantedCamFOV - camera->GetFov(); - const float3 deltaPos = wantedCamPos - camera->pos; -diff -ru spring_89.0/rts/Game/GameServer.cpp /home/svenstaro/src/spring/rts/Game/GameServer.cpp ---- spring_89.0/rts/Game/GameServer.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/GameServer.cpp 2012-07-13 06:34:42.936060485 +0200 -@@ -253,7 +253,7 @@ - // Something in CGameServer::CGameServer borks the FPU control word - // maybe the threading, or something in CNet::InitServer() ?? - // Set single precision floating point math. -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - #endif - } - -diff -ru spring_89.0/rts/Game/SelectedUnitsAI.cpp /home/svenstaro/src/spring/rts/Game/SelectedUnitsAI.cpp ---- spring_89.0/rts/Game/SelectedUnitsAI.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/SelectedUnitsAI.cpp 2012-07-13 06:34:43.086060494 +0200 -@@ -179,7 +179,7 @@ - const float3 sideDir = frontdir.cross(UpVector); - - // calculate so that the units form in an aproximate square -- float length = 100.0f + (sqrt((float)nbrOfSelectedUnits) * 32.0f); -+ float length = 100.0f + (math::sqrt((float)nbrOfSelectedUnits) * 32.0f); - - // push back some extra params so it confer with a front move - c.params.push_back(pos.x + (sideDir.x * length)); -diff -ru spring_89.0/rts/Game/TraceRay.cpp /home/svenstaro/src/spring/rts/Game/TraceRay.cpp ---- spring_89.0/rts/Game/TraceRay.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/TraceRay.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -75,7 +75,7 @@ - if (closeFlatLength > length) - closeFlatLength = length; - -- if (fabs(linear - quadratic * closeFlatLength) < 0.15f) { -+ if (math::fabs(linear - quadratic * closeFlatLength) < 0.15f) { - // relatively flat region -> use approximation - dif.y -= (linear + quadratic * closeFlatLength) * closeFlatLength; - -diff -ru spring_89.0/rts/Game/UI/EndGameBox.cpp /home/svenstaro/src/spring/rts/Game/UI/EndGameBox.cpp ---- spring_89.0/rts/Game/UI/EndGameBox.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/UI/EndGameBox.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -29,11 +29,11 @@ - - if (num == 0) { - sprintf(c, "0"); -- } else if (fabs(num) < 10 * mul) { -+ } else if (math::fabs(num) < 10 * mul) { - sprintf(c, "%.1f", num); -- } else if (fabs(num) < 10000 * mul) { -+ } else if (math::fabs(num) < 10000 * mul) { - sprintf(c, "%.0f", num); -- } else if (fabs(num) < 10000000 * mul) { -+ } else if (math::fabs(num) < 10000000 * mul) { - sprintf(c, "%.0fk", num / 1000); - } else { - sprintf(c, "%.0fM", num / 1000000); -@@ -165,7 +165,7 @@ - if (dispMode > 0 ) { - if ((mx > (box.x1 + 0.01f)) && (mx < (box.x1 + 0.12f)) && - (my < (box.y1 + 0.57f)) && (my > (box.y1 + 0.571f - stats.size()*0.02f))) { -- int sel = (int) floor(-(my - box.y1 - 0.57f) * 50); -+ int sel = (int) math::floor(-(my - box.y1 - 0.57f) * 50); - - if (button == 1) { - stat1 = sel; -@@ -341,7 +341,7 @@ - - if ((mx > box.x1 + 0.01f) && (mx < box.x1 + 0.12f) && - (my < box.y1 + 0.57f) && (my > box.y1 + 0.571f - (stats.size() * 0.02f))) { -- const int sel = (int) floor(50 * -(my - box.y1 - 0.57f)); -+ const int sel = (int) math::floor(50 * -(my - box.y1 - 0.57f)); - - glColor4f(0.7f, 0.2f, 0.2f, guiAlpha); - glDisable(GL_TEXTURE_2D); -diff -ru spring_89.0/rts/Game/UI/EndGameBox.h /home/svenstaro/src/spring/rts/Game/UI/EndGameBox.h ---- spring_89.0/rts/Game/UI/EndGameBox.h 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/UI/EndGameBox.h 2012-07-13 06:34:43.066060493 +0200 -@@ -60,8 +60,8 @@ - if (team >= 0 && static_cast<size_t>(team) >= values.size()) { - values.resize(team + 1); - } -- if (values[team].size() > 0 && fabs(value-values[team].back()) > maxdif) { -- maxdif = fabs(value-values[team].back()); -+ if (values[team].size() > 0 && math::fabs(value-values[team].back()) > maxdif) { -+ maxdif = math::fabs(value-values[team].back()); - } - - values[team].push_back(value); -diff -ru spring_89.0/rts/Game/UI/MouseCursor.cpp /home/svenstaro/src/spring/rts/Game/UI/MouseCursor.cpp ---- spring_89.0/rts/Game/UI/MouseCursor.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/UI/MouseCursor.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -355,7 +355,7 @@ - return; - } - -- animTime = fmod(animTime + globalRendering->lastFrameTime, animPeriod); -+ animTime = math::fmod(animTime + globalRendering->lastFrameTime, animPeriod); - - if (animTime < frames[currentFrame].startTime) { - currentFrame = 0; -diff -ru spring_89.0/rts/Game/UI/ResourceBar.cpp /home/svenstaro/src/spring/rts/Game/UI/ResourceBar.cpp ---- spring_89.0/rts/Game/UI/ResourceBar.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/UI/ResourceBar.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -48,11 +48,11 @@ - - if (num == 0) - sprintf(c, "0"); -- if ( fabs(num) < (10 * mul)) { -+ if ( math::fabs(num) < (10 * mul)) { - sprintf(c, "%.1f", num); -- } else if (fabs(num) < (10000 * mul)) { -+ } else if (math::fabs(num) < (10000 * mul)) { - sprintf(c, "%.0f", num); -- } else if (fabs(num) < (10000000 * mul)) { -+ } else if (math::fabs(num) < (10000000 * mul)) { - sprintf(c, "%.0fk", num / 1000); - } else { - sprintf(c, "%.0fM", num / 1000000); -@@ -180,11 +180,11 @@ - - smallFont->SetTextColor(1.0f, 0.3f, 0.3f, 1.0f); // Expenses - smallFont->glFormat(metalx + 0.044f, box.y1, labelsFontSize, FONT_DESCENDER | fontOptions, "-%s(-%s)", -- FloatToSmallString(fabs(myTeam->prevMetalPull)).c_str(), -- FloatToSmallString(fabs(myTeam->metalSent)).c_str()); -+ FloatToSmallString(math::fabs(myTeam->prevMetalPull)).c_str(), -+ FloatToSmallString(math::fabs(myTeam->metalSent)).c_str()); - smallFont->glFormat(energyx + 0.044f, box.y1, labelsFontSize, FONT_DESCENDER | fontOptions, "-%s(-%s)", -- FloatToSmallString(fabs(myTeam->prevEnergyPull)).c_str(), -- FloatToSmallString(fabs(myTeam->energySent)).c_str()); -+ FloatToSmallString(math::fabs(myTeam->prevEnergyPull)).c_str(), -+ FloatToSmallString(math::fabs(myTeam->energySent)).c_str()); - - smallFont->SetTextColor(0.4f, 1.0f, 0.4f, 0.95f); // Income - smallFont->glFormat(metalx + 0.044f, box.y2 - 2*globalRendering->pixelY, labelsFontSize, FONT_ASCENDER | fontOptions, "+%s", -diff -ru spring_89.0/rts/Game/UI/SelectionKeyHandler.cpp /home/svenstaro/src/spring/rts/Game/UI/SelectionKeyHandler.cpp ---- spring_89.0/rts/Game/UI/SelectionKeyHandler.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/UI/SelectionKeyHandler.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -367,9 +367,9 @@ - camera->rot.x=-1; - - float3 wantedCamDir; -- wantedCamDir.x=(float)(sin(camera->rot.y)*cos(camera->rot.x)); -- wantedCamDir.y=(float)(sin(camera->rot.x)); -- wantedCamDir.z=(float)(cos(camera->rot.y)*cos(camera->rot.x)); -+ wantedCamDir.x=(float)(math::sin(camera->rot.y)*math::cos(camera->rot.x)); -+ wantedCamDir.y=(float)(math::sin(camera->rot.x)); -+ wantedCamDir.z=(float)(math::cos(camera->rot.y)*math::cos(camera->rot.x)); - wantedCamDir.ANormalize(); - - camHandler->GetCurrentController().SetPos(sel->pos - wantedCamDir*800); -diff -ru spring_89.0/rts/Game/UI/UnitTracker.cpp /home/svenstaro/src/spring/rts/Game/UI/UnitTracker.cpp ---- spring_89.0/rts/Game/UI/UnitTracker.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Game/UI/UnitTracker.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -297,8 +297,8 @@ - modPlanePos.y = minHeight; - } - -- trackPos += (modPlanePos - trackPos) * (1 - pow(0.95f, deltaTime)); -- trackDir += (u->frontdir - trackDir) * (1 - pow(0.90f, deltaTime)); -+ trackPos += (modPlanePos - trackPos) * (1 - math::pow(0.95f, deltaTime)); -+ trackDir += (u->frontdir - trackDir) * (1 - math::pow(0.90f, deltaTime)); - trackDir.ANormalize(); - - camera->pos = trackPos; -diff -ru spring_89.0/rts/lib/gml/gmlsrv.h /home/svenstaro/src/spring/rts/lib/gml/gmlsrv.h ---- spring_89.0/rts/lib/gml/gmlsrv.h 2012-07-10 00:10:09.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/lib/gml/gmlsrv.h 2012-07-13 06:34:43.209393834 +0200 -@@ -361,7 +361,7 @@ - if (gmlShareLists) { - ogc[thr]->WorkerThreadPost(); - } -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - while(dorun) { - gmlClientSub(); - } -@@ -452,7 +452,7 @@ - Threading::SetThreadName("sim"); - Watchdog::RegisterThread(WDT_SIM, true); - set_threadnum(GML_SIM_THREAD_NUM); -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - while(dorun) { - gmlClientAuxSub(); - } -diff -ru spring_89.0/rts/lib/headlessStubs/sdlstub_cppbit.cpp /home/svenstaro/src/spring/rts/lib/headlessStubs/sdlstub_cppbit.cpp ---- spring_89.0/rts/lib/headlessStubs/sdlstub_cppbit.cpp 2012-07-10 00:10:09.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/lib/headlessStubs/sdlstub_cppbit.cpp 2012-07-13 06:35:00.626061514 +0200 -@@ -12,10 +12,16 @@ - extern "C" { - #endif - -+#if (BOOST_VERSION >= 105000) //boost 1.50 renamed TIME_UTC to TIME_UTC_ -+ #define SPRING_UTCTIME boost::TIME_UTC_ -+#else -+ #define SPRING_UTCTIME boost::TIME_UTC -+#endif -+ - int stub_sdl_getSystemMilliSeconds() { - - boost::xtime t; -- boost::xtime_get(&t, boost::TIME_UTC); -+ boost::xtime_get(&t, SPRING_UTCTIME); - const int milliSeconds = t.sec * 1000 + (t.nsec / 1000000); - return milliSeconds; - } -@@ -23,7 +29,7 @@ - void stub_sdl_sleepMilliSeconds(int milliSeconds) { - - boost::xtime t; -- boost::xtime_get(&t, boost::TIME_UTC); -+ boost::xtime_get(&t, SPRING_UTCTIME); - t.nsec += 1000000 * milliSeconds; - boost::thread::sleep(t); - } -diff -ru spring_89.0/rts/lib/streflop/streflopC.cpp /home/svenstaro/src/spring/rts/lib/streflop/streflopC.cpp ---- spring_89.0/rts/lib/streflop/streflopC.cpp 2012-07-10 00:10:10.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/lib/streflop/streflopC.cpp 2012-07-13 06:34:42.939393819 +0200 -@@ -9,16 +9,16 @@ - #endif - - void streflop_init_Simple() { -- streflop_init<Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - } - - void streflop_init_Double() { -- streflop_init<Double>(); -+ streflop::streflop_init<streflop::Double>(); - } - - #if defined(Extended) - void streflop_init_Extended() { -- streflop_init<Extended>(); -+ streflop::streflop_init<streflop::Extended>(); - } - #endif // defined(Extended) - -diff -ru spring_89.0/rts/lib/streflop/streflop_cond.h /home/svenstaro/src/spring/rts/lib/streflop/streflop_cond.h ---- spring_89.0/rts/lib/streflop/streflop_cond.h 2012-07-10 00:10:10.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/lib/streflop/streflop_cond.h 2012-07-13 06:34:42.906060483 +0200 -@@ -11,8 +11,6 @@ - - #if defined(STREFLOP_X87) || defined(STREFLOP_SSE) || defined(STREFLOP_SOFT) - #include "streflop.h" --using namespace streflop; -- - namespace math { - using namespace streflop; - } -@@ -20,6 +18,7 @@ - #include <cmath> - namespace math { - using std::fabs; -+ // We are using fastmath::sqrt_sse instead! - // using std::sqrt; - using std::sin; - using std::cos; -diff -ru spring_89.0/rts/Map/BasicMapDamage.cpp /home/svenstaro/src/spring/rts/Map/BasicMapDamage.cpp ---- spring_89.0/rts/Map/BasicMapDamage.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Map/BasicMapDamage.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -33,7 +33,7 @@ - - for (int a = 0; a <= CRATER_TABLE_SIZE; ++a) { - const float r = a / float(CRATER_TABLE_SIZE); -- const float d = cos((r - 0.1f) * (PI + 0.3f)) * (1 - r) * (0.5f + 0.5f * cos(std::max(0.0f, r * 3 - 2) * PI)); -+ const float d = math::cos((r - 0.1f) * (PI + 0.3f)) * (1 - r) * (0.5f + 0.5f * math::cos(std::max(0.0f, r * 3 - 2) * PI)); - craterTable[a] = d; - } - -@@ -83,7 +83,7 @@ - const float* curHeightMap = readmap->GetCornerHeightMapSynced(); - const float* orgHeightMap = readmap->GetOriginalHeightMapSynced(); - const unsigned char* typeMap = readmap->GetTypeMapSynced(); -- const float baseStrength = -pow(strength, 0.6f) * 3 / mapHardness; -+ const float baseStrength = -math::pow(strength, 0.6f) * 3 / mapHardness; - const float invRadius = 1.0f / radius; - - for (int y = e->y1; y <= e->y2; ++y) { -@@ -111,7 +111,7 @@ - orgHeightMap[y * gs->mapxp1 + x]; - - if (prevDif * dif > 0.0f) { -- dif /= fabs(prevDif) * 0.1f + 1; -+ dif /= math::fabs(prevDif) * 0.1f + 1; - } - - e->squares.push_back(dif); -@@ -148,7 +148,7 @@ - orgHeightMap[z * gs->mapxp1 + x]; - - if (prevDif * dif > 0.0f) { -- dif /= fabs(prevDif) * 0.1f + 1; -+ dif /= math::fabs(prevDif) * 0.1f + 1; - } - - totalDif += dif; -diff -ru spring_89.0/rts/Map/Ground.cpp /home/svenstaro/src/spring/rts/Map/Ground.cpp ---- spring_89.0/rts/Map/Ground.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Map/Ground.cpp 2012-07-13 06:34:43.086060494 +0200 -@@ -433,8 +433,8 @@ - - float3 CGround::GetSmoothNormal(float x, float y, bool synced) const - { -- int sx = (int) floor(x / SQUARE_SIZE); -- int sy = (int) floor(y / SQUARE_SIZE); -+ int sx = (int) math::floor(x / SQUARE_SIZE); -+ int sy = (int) math::floor(y / SQUARE_SIZE); - - if (sy < 1) - sy = 1; -diff -ru spring_89.0/rts/Map/SM3/Plane.cpp /home/svenstaro/src/spring/rts/Map/SM3/Plane.cpp ---- spring_89.0/rts/Map/SM3/Plane.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Map/SM3/Plane.cpp 2012-07-13 06:34:43.066060493 +0200 -@@ -15,7 +15,7 @@ - a = ry1*rz2 - ry2*rz1; - b = rz1*rx2 - rz2*rx1; - c = rx1*ry2 - rx2*ry1; -- float len = (float)sqrt(a*a + b*b + c*c); -+ float len = (float)math::sqrt(a*a + b*b + c*c); - a /= len; - b /= len; - c /= len; -@@ -37,10 +37,10 @@ - bool Plane::EpsilonCompare(const Plane& pln, float epsilon) - { - Plane t; -- t.a = fabs(a - pln.a); -- t.b = fabs(b - pln.b); -- t.c = fabs(c - pln.c); -- t.d = fabs(d - pln.d); -+ t.a = math::fabs(a - pln.a); -+ t.b = math::fabs(b - pln.b); -+ t.c = math::fabs(c - pln.c); -+ t.d = math::fabs(d - pln.d); - if (t.a > epsilon || t.b > epsilon || t.c > epsilon || t.d > epsilon) { - return false; - } -diff -ru spring_89.0/rts/Map/SM3/terrain/Lightcalc.cpp /home/svenstaro/src/spring/rts/Map/SM3/terrain/Lightcalc.cpp ---- spring_89.0/rts/Map/SM3/terrain/Lightcalc.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Map/SM3/terrain/Lightcalc.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -197,7 +197,7 @@ - continue; - } - -- float len = sqrt(dx*dx + dy*dy); -+ float len = math::sqrt(dx*dx + dy*dy); - const float step = 5.0f; - float invLength2d = step / len; - dx *= invLength2d; -diff -ru spring_89.0/rts/Map/SM3/terrain/Textures.cpp /home/svenstaro/src/spring/rts/Map/SM3/terrain/Textures.cpp ---- spring_89.0/rts/Map/SM3/terrain/Textures.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Map/SM3/terrain/Textures.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -248,7 +248,7 @@ - } - - // flatness=dotproduct of surface normal with up vector -- float slope = 1.0f - fabs(norm_y); -+ float slope = 1.0f - math::fabs(norm_y); - - if (slope < gi->minSlope - gi->minSlopeFuzzy) { - bm->at(x,y) = 0.0f; -@@ -307,7 +307,7 @@ - Vector3 n; - - if (sx*sx + sy*sy < 32*32) { -- const int sz = (int)sqrt(static_cast<float>(32 * 32 - sx*sx - sy*sy)); -+ const int sz = (int)math::sqrt(static_cast<float>(32 * 32 - sx*sx - sy*sy)); - n = Vector3(sx, sy, sz); - n.ANormalize(); - } -diff -ru spring_89.0/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp /home/svenstaro/src/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp ---- spring_89.0/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -99,7 +99,7 @@ - const int minz = bty * smfReadMap->bigTexSize; - const int maxz = minz + smfReadMap->bigTexSize; - const float miny = readmap->currMinHeight; -- const float maxy = fabs(cam->pos.y); -+ const float maxy = math::fabs(cam->pos.y); - - const float3 mins( 0, miny, minz); - const float3 maxs(smfReadMap->mapSizeX, maxy, maxz); -diff -ru spring_89.0/rts/Map/SMF/ROAM/Patch.cpp /home/svenstaro/src/spring/rts/Map/SMF/ROAM/Patch.cpp ---- spring_89.0/rts/Map/SMF/ROAM/Patch.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Map/SMF/ROAM/Patch.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -405,7 +405,7 @@ - - // Variance of this triangle is the actual height at it's hypotenuse midpoint minus the interpolated height. - // Use values passed on the stack instead of re-accessing the Height Field. -- float myVariance = fabs(centerZ - ((leftZ + rightZ) / 2)); -+ float myVariance = math::fabs(centerZ - ((leftZ + rightZ) / 2)); - - if (leftZ*rightZ<0 || leftZ*centerZ<0 || rightZ*centerZ<0) - myVariance = std::max(myVariance * 1.5f, 20.0f); //shore lines get more variance for higher accuracy -diff -ru spring_89.0/rts/Map/SMF/SMFRenderState.cpp /home/svenstaro/src/spring/rts/Map/SMF/SMFRenderState.cpp ---- spring_89.0/rts/Map/SMF/SMFRenderState.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Map/SMF/SMFRenderState.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -385,7 +385,7 @@ - smfShaderCurrARB->SetUniformTarget(GL_VERTEX_PROGRAM_ARB); - smfShaderCurrARB->SetUniform4f(10, 1.0f / (gs->pwr2mapx * SQUARE_SIZE), 1.0f / (gs->pwr2mapy * SQUARE_SIZE), 0, 1); - smfShaderCurrARB->SetUniform4f(12, 1.0f / smfMap->bigTexSize, 1.0f / smfMap->bigTexSize, 0, 1); -- smfShaderCurrARB->SetUniform4f(13, -floor(camera->pos.x * 0.02f), -floor(camera->pos.z * 0.02f), 0, 0); -+ smfShaderCurrARB->SetUniform4f(13, -math::floor(camera->pos.x * 0.02f), -math::floor(camera->pos.z * 0.02f), 0, 0); - smfShaderCurrARB->SetUniform4f(14, 0.02f, 0.02f, 0, 1); - smfShaderCurrARB->SetUniformTarget(GL_FRAGMENT_PROGRAM_ARB); - smfShaderCurrARB->SetUniform4f(10, ambientColor.x, ambientColor.y, ambientColor.z, 1); -diff -ru spring_89.0/rts/Rendering/Env/AdvSky.cpp /home/svenstaro/src/spring/rts/Rendering/Env/AdvSky.cpp ---- spring_89.0/rts/Rendering/Env/AdvSky.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/Env/AdvSky.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -65,8 +65,8 @@ - memset(thicknessTransform, 0, 1024); - memset(covers, 0, 4 * 32 * sizeof(float)); - -- domeheight = cos(PI / 16) * 1.01f; -- domeWidth = sin(2 * PI / 32) * 400 * 1.7f; -+ domeheight = math::cos(PI / 16) * 1.01f; -+ domeWidth = math::sin(2 * PI / 32) * 400 * 1.7f; - - UpdateSkyDir(); - InitSun(); -@@ -383,7 +383,7 @@ - case 0: { - for(int a=0; a<CLOUD_DETAIL; a++) { - float fade = gs->frameNum / (70.0f * (2<<(CLOUD_DETAIL-1-a))); -- fade -= floor(fade/2)*2; -+ fade -= math::floor(fade/2)*2; - if(fade>1) { - fade = 2 - fade; - if(!cloudDown[a]) { -@@ -417,11 +417,11 @@ - int qcda=(4<<CLOUD_DETAIL)>>a; - int *pkernel=kernel; - for(int y=0; y<cs4a; ++y, pkernel+=CLOUD_SIZE/4) { -- float ydist=fabs(1.0f+y-cs8a)/cs8a; -+ float ydist=math::fabs(1.0f+y-cs8a)/cs8a; - ydist=ydist*ydist*(3-2*ydist); - int *pkrn=pkernel; - for(int x=0; x<cs4a; ++x) { -- float xdist=fabs(1.0f+x-cs8a)/cs8a; -+ float xdist=math::fabs(1.0f+x-cs8a)/cs8a; - xdist=xdist*xdist*(3-2*xdist); - - float contrib=(1-xdist)*(1-ydist); -@@ -533,7 +533,7 @@ - unsigned char *tt=thicknessTransform; - for(int a=0;a<1024;++a){ - float f=(1023.0f-(a+cloudDensity*1024-512))/1023.0f; -- float alpha=pow(f*2,3); -+ float alpha=math::pow(f*2,3); - if(alpha>1) - alpha=1; - *at=(int) (alpha*255); -@@ -560,11 +560,11 @@ - - float ymod=(sunTexCoordY-0.5f)*domeWidth*0.025f*256; - float fy=ymod+modCamera.z*CLOUD_SIZE*0.000025f; -- int baseY=int(floor(fy))&CLOUD_MASK; -- fy-=floor(fy); -+ int baseY=int(math::floor(fy))&CLOUD_MASK; -+ fy-=math::floor(fy); - float fx=gs->frameNum*0.00005f*CLOUD_SIZE+modCamera.x*CLOUD_SIZE*0.000025f; -- int baseX=int(floor(fx))&CLOUD_MASK; -- fx-=floor(fx); -+ int baseX=int(math::floor(fx))&CLOUD_MASK; -+ fx-=math::floor(fx); - - float *cvs=(float *)covers[0], *cvs1=(float *)covers[1], *cvs2=(float *)covers[2], *cvs3=(float *)covers[3]; - if(baseX!=oldCoverBaseX || baseY!=oldCoverBaseY){ -@@ -622,8 +622,8 @@ - glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ONE); - glBegin(GL_TRIANGLE_STRIP); - for(int x=0;x<257;++x){ -- float dx = sin(x*2*PI/256.0f); -- float dy = cos(x*2*PI/256.0f); -+ float dx = math::sin(x*2*PI/256.0f); -+ float dy = math::cos(x*2*PI/256.0f); - - glTexCoord2f(x/256.0f,0.125f); - glVertexf3(modSunDir*5+ldir*dx*0.0014f+udir*dy*0.0014f); -@@ -646,7 +646,7 @@ - mem[(y*128+x)*4+0]=255; - mem[(y*128+x)*4+1]=255; - mem[(y*128+x)*4+2]=255; -- float dist=sqrt((float)(y-64)*(y-64)+(x-64)*(x-64)); -+ float dist=math::sqrt((float)(y-64)*(y-64)+(x-64)*(x-64)); - if(dist>60) - mem[(y*128+x)*4+3]=0; - else -@@ -749,7 +749,7 @@ - - for(int a=0;a<5;++a){ - float fade = gs->frameNum / float(30<<a); -- fade -= floor(fade/2)*2; -+ fade -= math::floor(fade/2)*2; - int size = std::min(32,256>>a); - - if(fade>1){ -@@ -770,7 +770,7 @@ - - } - float tSize = std::max(1,8>>a); -- float c = pow(2.0f,a)*6/255.0f; -+ float c = math::pow(2.0f,a)*6/255.0f; - CVertexArray* va = GetVertexArray(); - va->Initialize(); - va->CheckInitSize(4*VA_SIZE_T); -@@ -867,10 +867,10 @@ - - const float hdist = math::sqrt(dir.x * dir.x + dir.z * dir.z); - const float ang = GetRadFromXY(dir.x, dir.z) + skyAngle; -- const float fy = asin(hdist / 400); -+ const float fy = math::asin(hdist / 400); - -- dir.x = hdist * cos(ang); -- dir.z = hdist * sin(ang); -+ dir.x = hdist * math::cos(ang); -+ dir.z = hdist * math::sin(ang); - dir.y = (fastmath::cos(fy) - domeheight) * 400; - - dir.ANormalize(); -@@ -903,7 +903,7 @@ - const float3& dir = GetDirFromTexCoord(x / 256.0f, (255.0f - y) / 256.0f); - - const float sunInt = skyLight->GetLightIntensity(); -- const float sunDist = acos(dir.dot(skyLight->GetLightDir())) * 50; -+ const float sunDist = math::acos(dir.dot(skyLight->GetLightDir())) * 50; - const float sunMod = sunInt * (0.3f / math::sqrt(sunDist) + 3.0f / (1 + sunDist)); - - const float green = std::min(1.0f, (0.55f + sunMod)); -@@ -918,7 +918,7 @@ - void CAdvSky::UpdateTexPart(int x, int y, unsigned char (*texp)[4]) { - const float3& dir = GetDirFromTexCoord(x / 512.0f, (511.0f - y) / 512.0f); - -- const float sunDist = acos(dir.dot(skyLight->GetLightDir())) * 70; -+ const float sunDist = math::acos(dir.dot(skyLight->GetLightDir())) * 70; - const float sunMod = skyLight->GetLightIntensity() * 12.0f / (12 + sunDist); - - const float red = std::min(skyColor.x + sunMod * sunColor.x, 1.0f); -diff -ru spring_89.0/rts/Rendering/Env/AdvTreeDrawer.cpp /home/svenstaro/src/spring/rts/Rendering/Env/AdvTreeDrawer.cpp ---- spring_89.0/rts/Rendering/Env/AdvTreeDrawer.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/Env/AdvTreeDrawer.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -229,7 +229,7 @@ - std::list<FallingTree>::iterator prev = fti++; - fallingTrees.erase(prev); - } else { -- fti->speed += (sin(fti->fallPos) * 0.04f); -+ fti->speed += (math::sin(fti->fallPos) * 0.04f); - ++fti; - } - } -@@ -616,7 +616,7 @@ - if (camera->InView(pos + float3(0.0f, MAX_TREE_HEIGHT / 2, 0.0f), MAX_TREE_HEIGHT / 2.0f)) { - const float ang = fti->fallPos * PI; - -- const float3 yvec(fti->dir.x * sin(ang), cos(ang), fti->dir.z * sin(ang)); -+ const float3 yvec(fti->dir.x * math::sin(ang), math::cos(ang), fti->dir.z * math::sin(ang)); - const float3 zvec((yvec.cross(float3(-1.0f, 0.0f, 0.0f))).ANormalize()); - const float3 xvec(yvec.cross(zvec)); - -@@ -957,7 +957,7 @@ - if (camera->InView(pos + float3(0, MAX_TREE_HEIGHT / 2, 0), MAX_TREE_HEIGHT / 2)) { - const float ang = fti->fallPos * PI; - -- const float3 yvec(fti->dir.x * sin(ang), cos(ang), fti->dir.z * sin(ang)); -+ const float3 yvec(fti->dir.x * math::sin(ang), math::cos(ang), fti->dir.z * math::sin(ang)); - const float3 zvec((yvec.cross(float3(1.0f, 0.0f, 0.0f))).ANormalize()); - const float3 xvec(zvec.cross(yvec)); - -diff -ru spring_89.0/rts/Rendering/Env/AdvTreeGenerator.cpp /home/svenstaro/src/spring/rts/Rendering/Env/AdvTreeGenerator.cpp ---- spring_89.0/rts/Rendering/Env/AdvTreeGenerator.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/Env/AdvTreeGenerator.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -159,9 +159,9 @@ - int numIter=(int)max(3.0f,size*10); - for(int a=0;a<=numIter;a++){ - float angle=a/(float)numIter*2*PI; -- float col=0.4f+(((orto1*sin(angle)+orto2*cos(angle)).dot(flatSun)))*0.3f; -- barkva->AddVertexTN(start+orto1*sin(angle)*size+orto2*cos(angle)*size,angle/PI*0.125f*0.5f,0,float3(0,0,col)); -- barkva->AddVertexTN(end+orto1*sin(angle)*size*0.2f+orto2*cos(angle)*size*0.2f,angle/PI*0.125f*0.5f,3,float3(0,0,col)); -+ float col=0.4f+(((orto1*math::sin(angle)+orto2*math::cos(angle)).dot(flatSun)))*0.3f; -+ barkva->AddVertexTN(start+orto1*math::sin(angle)*size+orto2*math::cos(angle)*size,angle/PI*0.125f*0.5f,0,float3(0,0,col)); -+ barkva->AddVertexTN(end+orto1*math::sin(angle)*size*0.2f+orto2*math::cos(angle)*size*0.2f,angle/PI*0.125f*0.5f,3,float3(0,0,col)); - } - barkva->EndStrip(); - } -@@ -176,18 +176,18 @@ - - for (int a = 0; a < numBranch; ++a) { - const float angle = baseAngle + (a * 3.88f) + fRand(0.5f); -- float3 dir = orto1 * sin(angle) + orto2 * cos(angle); -+ float3 dir = orto1 * math::sin(angle) + orto2 * math::cos(angle); - dir.y = 0.3f + fRand(0.4f); - dir.ANormalize(); - const float3 start(0, (a + 5) * height / (numBranch + 5), 0); -- const float length = (height * (0.4f + fRand(0.1f))) * sqrt(float(numBranch - a) / numBranch); -+ const float length = (height * (0.4f + fRand(0.1f))) * math::sqrt(float(numBranch - a) / numBranch); - - TrunkIterator(start, dir, length, length * 0.05f, 1); - } - - for (int a = 0; a < 3; ++a) { - const float angle = (a * 3.88f) + fRand(0.5f); -- float3 dir = orto1*sin(angle)+orto2*cos(angle); -+ float3 dir = orto1*math::sin(angle)+orto2*math::cos(angle); - dir.y = 0.8f; - dir.ANormalize(); - const float3 start(0, height - 0.3f, 0); -@@ -225,7 +225,7 @@ - const float newLength = length * (float(numTrunks - a) / (numTrunks + 1)); - - float3 newbase = start + dir * length * (float(a + 1) / (numTrunks + 1)); -- float3 newDir = dir + orto1 * cos(angle) * dirDif + orto2 * sin(angle) * dirDif; -+ float3 newDir = dir + orto1 * math::cos(angle) * dirDif + orto2 * math::sin(angle) * dirDif; - newDir.ANormalize(); - - TrunkIterator(newbase, newDir, newLength, newLength * 0.05f, depth - 1); -@@ -245,8 +245,8 @@ - - float3 pos = start + dir * length * (0.7f + fRand(0.3f)); - pos += -- (orto1 * sin(angle) + orto2 * cos(angle)) * -- (sqrt((float) a + 1) * 0.6f + fRand(0.4f)) * -+ (orto1 * math::sin(angle) + orto2 * math::cos(angle)) * -+ (math::sqrt((float) a + 1) * 0.6f + fRand(0.4f)) * - 0.1f * MAX_TREE_HEIGHT; - - if (pos.y < 0.2f * MAX_TREE_HEIGHT) -@@ -538,12 +538,12 @@ - float baseAngle=fRand(2*PI); - for(int a=0;a<numBranch;++a){ - float sh = 0.2f + fRand(0.2f); -- float h = height * pow(sh + float(a)/numBranch * (1-sh), (float)0.7f); -+ float h = height * math::pow(sh + float(a)/numBranch * (1-sh), (float)0.7f); - float angle = baseAngle + (a * 0.618f + fRand(0.1f)) * 2 * PI; -- float3 dir(orto1 * sin(angle) + orto2 * cos(angle)); -+ float3 dir(orto1 * math::sin(angle) + orto2 * math::cos(angle)); - dir.y = (a - numBranch) * 0.01f - (0.2f + fRand(0.2f)); - dir.ANormalize(); -- float size = sqrt((float)numBranch - a + 5) * 0.08f * MAX_TREE_HEIGHT; -+ float size = math::sqrt((float)numBranch - a + 5) * 0.08f * MAX_TREE_HEIGHT; - DrawPineBranch(float3(0,h,0),dir,size); - } - //create the top -@@ -569,16 +569,16 @@ - for(int a=0;a<numIter;a++){ - float angle=a/(float)numIter*2*PI; - float angle2=(a+1)/(float)numIter*2*PI; -- float col=0.45f+(((orto1*sin(angle)+orto2*cos(angle)).dot(flatSun)))*0.3f; -- float col2=0.45f+(((orto1*sin(angle2)+orto2*cos(angle2)).dot(flatSun)))*0.3f; -+ float col=0.45f+(((orto1*math::sin(angle)+orto2*math::cos(angle)).dot(flatSun)))*0.3f; -+ float col2=0.45f+(((orto1*math::sin(angle2)+orto2*math::cos(angle2)).dot(flatSun)))*0.3f; - -- va->AddVertexTN(start+orto1*sin(angle)*size+orto2*cos(angle)*size, angle/PI*0.125f*0.5f+0.5f, 0, float3(0,0,col)); -- va->AddVertexTN(end+orto1*sin(angle)*size*0.1f+orto2*cos(angle)*size*0.1f, angle/PI*0.125f*0.5f+0.5f, 3, float3(0,0,col)); -- va->AddVertexTN(start+orto1*sin(angle2)*size+orto2*cos(angle2)*size, angle2/PI*0.125f*0.5f+0.5f, 0, float3(0,0,col2)); -- -- va->AddVertexTN(start+orto1*sin(angle2)*size+orto2*cos(angle2)*size, angle2/PI*0.125f*0.5f+0.5f, 0, float3(0,0,col2)); -- va->AddVertexTN(end+orto1*sin(angle)*size*0.1f+orto2*cos(angle)*size*0.1f, angle/PI*0.125f*0.5f+0.5f, 3, float3(0,0,col)); -- va->AddVertexTN(end+orto1*sin(angle2)*size*0.1f+orto2*cos(angle2)*size*0.1f, angle2/PI*0.125f*0.5f+0.5f, 3, float3(0,0,col2)); -+ va->AddVertexTN(start+orto1*math::sin(angle)*size+orto2*math::cos(angle)*size, angle/PI*0.125f*0.5f+0.5f, 0, float3(0,0,col)); -+ va->AddVertexTN(end+orto1*math::sin(angle)*size*0.1f+orto2*math::cos(angle)*size*0.1f, angle/PI*0.125f*0.5f+0.5f, 3, float3(0,0,col)); -+ va->AddVertexTN(start+orto1*math::sin(angle2)*size+orto2*math::cos(angle2)*size, angle2/PI*0.125f*0.5f+0.5f, 0, float3(0,0,col2)); -+ -+ va->AddVertexTN(start+orto1*math::sin(angle2)*size+orto2*math::cos(angle2)*size, angle2/PI*0.125f*0.5f+0.5f, 0, float3(0,0,col2)); -+ va->AddVertexTN(end+orto1*math::sin(angle)*size*0.1f+orto2*math::cos(angle)*size*0.1f, angle/PI*0.125f*0.5f+0.5f, 3, float3(0,0,col)); -+ va->AddVertexTN(end+orto1*math::sin(angle2)*size*0.1f+orto2*math::cos(angle2)*size*0.1f, angle2/PI*0.125f*0.5f+0.5f, 3, float3(0,0,col2)); - } - } - -diff -ru spring_89.0/rts/Rendering/Env/AdvWater.cpp /home/svenstaro/src/spring/rts/Rendering/Env/AdvWater.cpp ---- spring_89.0/rts/Rendering/Env/AdvWater.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/Env/AdvWater.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -48,7 +48,7 @@ - for (int y = 0; y < 64; ++y) { - for (int x = 0; x < 64; ++x) { - scrap[(y*64 + x)*4 + 0] = 128; -- scrap[(y*64 + x)*4 + 1] = (unsigned char)(sin(y*PI*2.0f/64.0f)*128 + 128); -+ scrap[(y*64 + x)*4 + 1] = (unsigned char)(math::sin(y*PI*2.0f/64.0f)*128 + 128); - scrap[(y*64 + x)*4 + 2] = 0; - scrap[(y*64 + x)*4 + 3] = 255; - } -@@ -62,8 +62,8 @@ - for (int x = 0; x < 64; ++x) { - const float ang = 26.5f*PI/180.0f; - const float pos = y*2+x; -- scrap[(y*64 + x)*4 + 0] = (unsigned char)((sin(pos*PI*2.0f/64.0f))*128*sin(ang)) + 128; -- scrap[(y*64 + x)*4 + 1] = (unsigned char)((sin(pos*PI*2.0f/64.0f))*128*cos(ang)) + 128; -+ scrap[(y*64 + x)*4 + 0] = (unsigned char)((math::sin(pos*PI*2.0f/64.0f))*128*math::sin(ang)) + 128; -+ scrap[(y*64 + x)*4 + 1] = (unsigned char)((math::sin(pos*PI*2.0f/64.0f))*128*math::cos(ang)) + 128; - } - } - glBindTexture(GL_TEXTURE_2D, rawBumpTexture[1]); -@@ -75,8 +75,8 @@ - for (int x = 0; x < 64; ++x) { - const float ang = -19*PI/180.0f; - const float pos = 3*y - x; -- scrap[(y*64 + x)*4 + 0] = (unsigned char)((sin(pos*PI*2.0f/64.0f))*128*sin(ang)) + 128; -- scrap[(y*64 + x)*4 + 1] = (unsigned char)((sin(pos*PI*2.0f/64.0f))*128*cos(ang)) + 128; -+ scrap[(y*64 + x)*4 + 0] = (unsigned char)((math::sin(pos*PI*2.0f/64.0f))*128*math::sin(ang)) + 128; -+ scrap[(y*64 + x)*4 + 1] = (unsigned char)((math::sin(pos*PI*2.0f/64.0f))*128*math::cos(ang)) + 128; - } - } - glBindTexture(GL_TEXTURE_2D, rawBumpTexture[2]); -@@ -192,14 +192,14 @@ - dir = xbase + dv; - dir.ANormalize(); - zpos = camera->pos + dir*(camera->pos.y / -dir.y); -- zpos.y = sin(zpos.z*0.1f + gs->frameNum*0.06f)*0.06f + 0.05f; -+ zpos.y = math::sin(zpos.z*0.1f + gs->frameNum*0.06f)*0.06f + 0.05f; - col[3] = (unsigned char)((0.8f + 0.7f*dir.y)*255); - va->AddVertexQTC(zpos, x*(1.0f/numDivs), screenY - yInc, col); - - dir = xbase; - dir.ANormalize(); - zpos = camera->pos + dir*(camera->pos.y / -dir.y); -- zpos.y = sin(zpos.z*0.1f + gs->frameNum*0.06f)*0.06f + 0.05f; -+ zpos.y = math::sin(zpos.z*0.1f + gs->frameNum*0.06f)*0.06f + 0.05f; - col[3] = (unsigned char)((0.8f + 0.7f*dir.y)*255); - va->AddVertexQTC(zpos, x*(1.0f/numDivs), screenY, col); - -diff -ru spring_89.0/rts/Rendering/Env/BasicSky.cpp /home/svenstaro/src/spring/rts/Rendering/Env/BasicSky.cpp ---- spring_89.0/rts/Rendering/Env/BasicSky.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/Env/BasicSky.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -67,8 +67,8 @@ - rawClouds=newmat2<int>(CLOUD_SIZE,CLOUD_SIZE); - blendMatrix=newmat3<int>(CLOUD_DETAIL,32,32); - -- domeheight=cos(PI/16)*1.01f; -- domeWidth=sin(PI/16)*400*1.7f; -+ domeheight=math::cos(PI/16)*1.01f; -+ domeWidth=math::sin(PI/16)*400*1.7f; - - UpdateSkyDir(); - InitSun(); -@@ -369,7 +369,7 @@ - case 0: { - for(int a=0; a<CLOUD_DETAIL; a++) { - float fade = gs->frameNum / (70.0f * (2<<(CLOUD_DETAIL-1-a))); -- fade -= floor(fade/2)*2; -+ fade -= math::floor(fade/2)*2; - if(fade>1) { - fade = 2 - fade; - if(!cloudDown[a]) { -@@ -403,11 +403,11 @@ - int qcda=(4<<CLOUD_DETAIL)>>a; - int *pkernel=kernel; - for(int y=0; y<cs4a; ++y, pkernel+=CLOUD_SIZE/4) { -- float ydist=fabs(1.0f+y-cs8a)/cs8a; -+ float ydist=math::fabs(1.0f+y-cs8a)/cs8a; - ydist=ydist*ydist*(3-2*ydist); - int *pkrn=pkernel; - for(int x=0; x<cs4a; ++x) { -- float xdist=fabs(1.0f+x-cs8a)/cs8a; -+ float xdist=math::fabs(1.0f+x-cs8a)/cs8a; - xdist=xdist*xdist*(3-2*xdist); - - float contrib=(1-xdist)*(1-ydist); -@@ -506,7 +506,7 @@ - unsigned char *tt=thicknessTransform; - for(int a=0;a<1024;++a){ - float f=(1023.0f-(a+cloudDensity*1024-512))/1023.0f; -- float alpha=pow(f*2,3); -+ float alpha=math::pow(f*2,3); - if(alpha>1) - alpha=1; - *at=(unsigned char)(alpha*255); -@@ -533,11 +533,11 @@ - - float ymod=(sunTexCoordY-0.5f)*domeWidth*0.025f*256; - float fy=ymod+modCamera.z*CLOUD_SIZE*0.000025f; -- int baseY=int(floor(fy))&CLOUD_MASK; -- fy-=floor(fy); -+ int baseY=int(math::floor(fy))&CLOUD_MASK; -+ fy-=math::floor(fy); - float fx=gs->frameNum*0.00005f*CLOUD_SIZE+modCamera.x*CLOUD_SIZE*0.000025f; -- int baseX=int(floor(fx))&CLOUD_MASK; -- fx-=floor(fx); -+ int baseX=int(math::floor(fx))&CLOUD_MASK; -+ fx-=math::floor(fx); - - float *cvs=(float *)covers[0], *cvs1=(float *)covers[1], *cvs2=(float *)covers[2], *cvs3=(float *)covers[3]; - if(baseX!=oldCoverBaseX || baseY!=oldCoverBaseY){ -@@ -589,8 +589,8 @@ - glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ONE); - glBegin(GL_TRIANGLE_STRIP); - for(int x=0;x<257;++x){ -- float dx=sin(x*2*PI/256.0f); -- float dy=cos(x*2*PI/256.0f); -+ float dx=math::sin(x*2*PI/256.0f); -+ float dy=math::cos(x*2*PI/256.0f); - - glTexCoord2f(x/256.0f,0.25f); - glVertexf3(modSunDir*5+ldir*dx*0.0014f+udir*dy*0.0014f); -@@ -613,7 +613,7 @@ - mem[(y*128+x)*4+0]=255; - mem[(y*128+x)*4+1]=255; - mem[(y*128+x)*4+2]=255; -- float dist=sqrt((float)(y-64)*(y-64)+(x-64)*(x-64)); -+ float dist=math::sqrt((float)(y-64)*(y-64)+(x-64)*(x-64)); - if(dist>60) - mem[(y*128+x)*4+3]=0; - else -@@ -764,10 +764,10 @@ - - const float hdist = math::sqrt(dir.x * dir.x + dir.z * dir.z); - const float ang = GetRadFromXY(dir.x, dir.z) + skyAngle; -- const float fy = asin(hdist / 400); -+ const float fy = math::asin(hdist / 400); - -- dir.x = hdist * cos(ang); -- dir.z = hdist * sin(ang); -+ dir.x = hdist * math::cos(ang); -+ dir.z = hdist * math::sin(ang); - dir.y = (fastmath::cos(fy) - domeheight) * 400; - - dir.ANormalize(); -@@ -800,7 +800,7 @@ - const float3& dir = GetDirFromTexCoord(x / 256.0f, (255.0f - y) / 256.0f); - - const float sunInt = skyLight->GetLightIntensity(); -- const float sunDist = acos(dir.dot(skyLight->GetLightDir())) * 50; -+ const float sunDist = math::acos(dir.dot(skyLight->GetLightDir())) * 50; - const float sunMod = sunInt * (0.3f / math::sqrt(sunDist) + 2.0f / sunDist); - - const float green = std::min(1.0f, (0.55f + sunMod)); -@@ -814,7 +814,7 @@ - void CBasicSky::UpdateTexPart(int x, int y, unsigned char (*texp)[4]) { - const float3& dir = GetDirFromTexCoord(x / 512.0f, (511.0f - y) / 512.0f); - -- const float sunDist = acos(dir.dot(skyLight->GetLightDir())) * 70; -+ const float sunDist = math::acos(dir.dot(skyLight->GetLightDir())) * 70; - const float sunMod = skyLight->GetLightIntensity() * 12.0f / (12 + sunDist); - - const float red = std::min(skyColor.x + sunMod * sunColor.x, 1.0f); -diff -ru spring_89.0/rts/Rendering/Env/CubeMapHandler.cpp /home/svenstaro/src/spring/rts/Rendering/Env/CubeMapHandler.cpp ---- spring_89.0/rts/Rendering/Env/CubeMapHandler.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/Env/CubeMapHandler.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -269,7 +269,7 @@ - for (int x = 0; x < size; ++x) { - const float3 dir = (cdir + (xdif * (x + 0.5f)) / size + (ydif * (y + 0.5f)) / size).Normalize(); - const float dot = std::max(0.0f, dir.dot(sky->GetLight()->GetLightDir())); -- const float spec = std::min(1.0f, pow(dot, mapInfo->light.specularExponent) + pow(dot, 3.0f) * 0.25f); -+ const float spec = std::min(1.0f, math::pow(dot, mapInfo->light.specularExponent) + math::pow(dot, 3.0f) * 0.25f); - - buf[x * 4 + 0] = (mapInfo->light.unitSpecularColor.x * spec * 255); - buf[x * 4 + 1] = (mapInfo->light.unitSpecularColor.y * spec * 255); -diff -ru spring_89.0/rts/Rendering/Env/DynWater.cpp /home/svenstaro/src/spring/rts/Rendering/Env/DynWater.cpp ---- spring_89.0/rts/Rendering/Env/DynWater.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/Env/DynWater.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -88,9 +88,9 @@ - - for (int y = 0; y < 64; ++y) { - for (int x = 0; x < 64; ++x) { -- temp[(y*64 + x)*4 + 0] = sin(x*PI*2.0f/64.0f) + ((x < 32) ? -1 : 1)*0.3f; -+ temp[(y*64 + x)*4 + 0] = math::sin(x*PI*2.0f/64.0f) + ((x < 32) ? -1 : 1)*0.3f; - temp[(y*64 + x)*4 + 1] = temp[(y*64 + x)*4 + 0]; -- temp[(y*64 + x)*4 + 2] = cos(x*PI*2.0f/64.0f) + ((x < 32) ? (16 - x) : (x - 48))/16.0f*0.3f; -+ temp[(y*64 + x)*4 + 2] = math::cos(x*PI*2.0f/64.0f) + ((x < 32) ? (16 - x) : (x - 48))/16.0f*0.3f; - temp[(y*64 + x)*4 + 3] = 0; - } - } -@@ -197,7 +197,7 @@ - const float dy = y - 31.5f; - for (int x = 0; x < 64; ++x) { - const float dx = x-31.5f; -- const float dist = sqrt(dx*dx + dy*dy); -+ const float dist = math::sqrt(dx*dx + dy*dy); - temp[(y*64 + x)*4 + 0] = std::max(0.0f, 1 - dist/30.f) * std::max(0.0f, 1 - dist/30.f); - temp[(y*64 + x)*4 + 1] = std::max(0.0f, 1 - dist/30.f); - temp[(y*64 + x)*4 + 2] = std::max(0.0f, 1 - dist/30.f) * std::max(0.0f, 1 - dist/30.f); -@@ -425,8 +425,8 @@ - - oldCamPosBig = camPosBig; - -- camPosBig.x = floor(std::max((float)WH_SIZE, std::min((float)gs->mapx*SQUARE_SIZE-WH_SIZE, (float)camera->pos.x))/(W_SIZE*16))*(W_SIZE*16); -- camPosBig.z = floor(std::max((float)WH_SIZE, std::min((float)gs->mapy*SQUARE_SIZE-WH_SIZE, (float)camera->pos.z))/(W_SIZE*16))*(W_SIZE*16); -+ camPosBig.x = math::floor(std::max((float)WH_SIZE, std::min((float)gs->mapx*SQUARE_SIZE-WH_SIZE, (float)camera->pos.x))/(W_SIZE*16))*(W_SIZE*16); -+ camPosBig.z = math::floor(std::max((float)WH_SIZE, std::min((float)gs->mapy*SQUARE_SIZE-WH_SIZE, (float)camera->pos.z))/(W_SIZE*16))*(W_SIZE*16); - - glDisable(GL_DEPTH_TEST); - glDepthMask(0); -@@ -835,8 +835,8 @@ - va = GetVertexArray(); - va->Initialize(); - -- camPosBig2.x = floor(std::max((float)WH_SIZE, std::min((float)gs->mapx*SQUARE_SIZE - WH_SIZE, (float)camera->pos.x))/(W_SIZE*16))*(W_SIZE*16); -- camPosBig2.z = floor(std::max((float)WH_SIZE, std::min((float)gs->mapy*SQUARE_SIZE - WH_SIZE, (float)camera->pos.z))/(W_SIZE*16))*(W_SIZE*16); -+ camPosBig2.x = math::floor(std::max((float)WH_SIZE, std::min((float)gs->mapx*SQUARE_SIZE - WH_SIZE, (float)camera->pos.x))/(W_SIZE*16))*(W_SIZE*16); -+ camPosBig2.z = math::floor(std::max((float)WH_SIZE, std::min((float)gs->mapy*SQUARE_SIZE - WH_SIZE, (float)camera->pos.z))/(W_SIZE*16))*(W_SIZE*16); - - // FIXME: - // 1. DynWater::UpdateCamRestraints was never called ==> <this->left> and <this->right> were always empty -@@ -1132,8 +1132,8 @@ - // hovercraft - const float3& pos = unit->pos; - -- if ((fabs(pos.x - camPosBig.x) > (WH_SIZE - 50)) || -- (fabs(pos.z - camPosBig.z) > (WH_SIZE - 50))) -+ if ((math::fabs(pos.x - camPosBig.x) > (WH_SIZE - 50)) || -+ (math::fabs(pos.z - camPosBig.z) > (WH_SIZE - 50))) - { - continue; - } -@@ -1144,7 +1144,7 @@ - if ((pos.y > -4.0f) && (pos.y < 4.0f)) { - const float3 frontAdd = unit->frontdir * unit->radius * 0.75f; - const float3 sideAdd = unit->rightdir * unit->radius * 0.75f; -- const float depth = sqrt(sqrt(unit->mass)) * 0.4f; -+ const float depth = math::sqrt(math::sqrt(unit->mass)) * 0.4f; - const float3 n(depth, 0.05f * depth, depth); - - va2->AddVertexQTN(pos + frontAdd + sideAdd, 0, 0, n); -@@ -1156,8 +1156,8 @@ - // surface ship - const float3& pos = unit->pos; - -- if ((fabs(pos.x - camPosBig.x) > (WH_SIZE - 50)) || -- (fabs(pos.z - camPosBig.z) > (WH_SIZE - 50))) -+ if ((math::fabs(pos.x - camPosBig.x) > (WH_SIZE - 50)) || -+ (math::fabs(pos.z - camPosBig.z) > (WH_SIZE - 50))) - { - continue; - } -@@ -1171,7 +1171,7 @@ - - const float3 frontAdd = unit->frontdir * unit->radius * 0.75f; - const float3 sideAdd = unit->rightdir * unit->radius * 0.18f; -- const float depth = sqrt(sqrt(unit->mass)); -+ const float depth = math::sqrt(math::sqrt(unit->mass)); - const float3 n(depth, 0.04f * unit->speed.Length2D() * depth, depth); - - va->AddVertexQTN(pos + frontAdd + sideAdd, 0, 0, n); -@@ -1249,8 +1249,8 @@ - for (std::vector<Explosion>::iterator ei = explosions.begin(); ei != explosions.end(); ++ei) { - Explosion& explo = *ei; - float3 pos = explo.pos; -- if ((fabs(pos.x - camPosBig.x) > (WH_SIZE - 50)) -- || (fabs(pos.z - camPosBig.z) > (WH_SIZE - 50))) -+ if ((math::fabs(pos.x - camPosBig.x) > (WH_SIZE - 50)) -+ || (math::fabs(pos.z - camPosBig.z) > (WH_SIZE - 50))) - { - continue; - } -diff -ru spring_89.0/rts/Rendering/Env/GrassDrawer.cpp /home/svenstaro/src/spring/rts/Rendering/Env/GrassDrawer.cpp ---- spring_89.0/rts/Rendering/Env/GrassDrawer.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/Env/GrassDrawer.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -75,11 +75,11 @@ - } - - // TODO: get rid of the magic constants -- maxGrassDist = 800 + sqrt((float) detail) * 240; -+ maxGrassDist = 800 + math::sqrt((float) detail) * 240; - maxDetailedDist = 146 + detail * 24; - detailedBlocks = int((maxDetailedDist - 24) / bMSsq) + 1; - numTurfs = 3 + int(detail * 0.5f); -- strawPerTurf = 50 + int(sqrt((float) detail) * 10); -+ strawPerTurf = 50 + int(math::sqrt((float) detail) * 10); - - blocksX = gs->mapx / grassSquareSize /grassBlockSize; - blocksY = gs->mapy / grassSquareSize / grassBlockSize; -@@ -641,7 +641,7 @@ - const float3 billboardDirX = (billboardDirZ.cross(UpVector)).ANormalize(); - const float3 billboardDirY = billboardDirX.cross(billboardDirZ); - -- const float ang = acos(billboardDirZ.y); -+ const float ang = math::acos(billboardDirZ.y); - const int texPart = std::min(15, int(std::max(0, int((ang + PI / 16 - PI / 2) / PI * 30)))); - - if (globalRendering->haveGLSL) { -@@ -673,7 +673,7 @@ - const float3 billboardDirX = (billboardDirZ.cross(UpVector)).ANormalize(); - const float3 billboardDirY = billboardDirX.cross(billboardDirZ); - -- const float ang = acos(billboardDirZ.y); -+ const float ang = math::acos(billboardDirZ.y); - const int texPart = std::min(15, int(std::max(0, int((ang + PI / 16 - PI / 2) / PI * 30)))); - - if (globalRendering->haveGLSL) { -@@ -820,7 +820,7 @@ - float3 forwardVect = sideVect.cross(UpVector); - sideVect *= mapInfo->grass.bladeWidth; - -- const float3 cornerPos = (UpVector * cos(maxAng) + forwardVect * sin(maxAng)) * length; -+ const float3 cornerPos = (UpVector * math::cos(maxAng) + forwardVect * math::sin(maxAng)) * length; - float3 basePos(30.0f, 0.0f, 30.0f); - - while (basePos.SqLength2D() > (turfSize * turfSize / 4)) { -@@ -837,10 +837,10 @@ - - const float3 edgePosL = - -sideVect * (1 - h) + -- (UpVector * cos(ang) + forwardVect * sin(ang)) * length * h; -+ (UpVector * math::cos(ang) + forwardVect * math::sin(ang)) * length * h; - const float3 edgePosR = - sideVect * (1.0f - h) + -- (UpVector * cos(ang) + forwardVect * sin(ang)) * length * h; -+ (UpVector * math::cos(ang) + forwardVect * math::sin(ang)) * length * h; - - if (b == 0) { - va->AddVertexT(basePos + (edgePosR - float3(0.0f, 0.1f, 0.0f)), xtexBase + xtexOffset, h); -diff -ru spring_89.0/rts/Rendering/Env/SkyLight.cpp /home/svenstaro/src/spring/rts/Rendering/Env/SkyLight.cpp ---- spring_89.0/rts/Rendering/Env/SkyLight.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/Env/SkyLight.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -72,7 +72,7 @@ - bool DynamicSkyLight::SetLightDir(const float4& newLightDir) { - if (newLightDir != lightDir) { - static float4 lastUpdate = ZeroVector; -- static const float minCosAngle = cos(1.5f * (PI/180.f)); -+ static const float minCosAngle = math::cos(1.5f * (PI/180.f)); - - if (lastUpdate.dot(newLightDir) < minCosAngle) { - lastUpdate = newLightDir; -@@ -92,7 +92,7 @@ - const float angularVelocity = 2.0f * PI / sunOrbitTime; - - const float sunAng = startAngle - initialSunAngle - angularVelocity * gameSeconds; -- const float4 sunPos = sunRotation.Mul(float3(sunOrbitRad * cos(sunAng), sunOrbitHeight, sunOrbitRad * sin(sunAng))); -+ const float4 sunPos = sunRotation.Mul(float3(sunOrbitRad * math::cos(sunAng), sunOrbitHeight, sunOrbitRad * math::sin(sunAng))); - - return sunPos; - } -@@ -108,18 +108,18 @@ - if (newLightDir.w == FLT_MAX) { - // old: newLightDir is position where sun reaches highest altitude - const float sunLen = newLightDir.Length2D(); -- const float sunAzimuth = (sunLen <= 0.001f) ? PI / 2.0f : atan(newLightDir.y / sunLen); -- const float sunHeight = tan(sunAzimuth - 0.001f); -+ const float sunAzimuth = (sunLen <= 0.001f) ? PI / 2.0f : math::atan(newLightDir.y / sunLen); -+ const float sunHeight = math::tan(sunAzimuth - 0.001f); - -- float3 v1(cos(initialSunAngle), sunHeight, sin(initialSunAngle)); -+ float3 v1(math::cos(initialSunAngle), sunHeight, math::sin(initialSunAngle)); - v1.ANormalize(); - - if (v1.y <= orbitMinSunHeight) { - newLightDir = UpVector; - sunOrbitHeight = v1.y; -- sunOrbitRad = sqrt(1.0f - sunOrbitHeight * sunOrbitHeight); -+ sunOrbitRad = math::sqrt(1.0f - sunOrbitHeight * sunOrbitHeight); - } else { -- float3 v2(cos(initialSunAngle + PI), orbitMinSunHeight, sin(initialSunAngle + PI)); -+ float3 v2(math::cos(initialSunAngle + PI), orbitMinSunHeight, math::sin(initialSunAngle + PI)); - v2.ANormalize(); - float3 v3 = v2 - v1; - sunOrbitRad = v3.Length() / 2.0f; -@@ -137,7 +137,7 @@ - } else { - // new: newLightDir is center position of orbit, and newLightDir.w is orbit height - sunOrbitHeight = std::max(-1.0f, std::min(newLightDir.w, 1.0f)); -- sunOrbitRad = sqrt(1.0f - sunOrbitHeight * sunOrbitHeight); -+ sunOrbitRad = math::sqrt(1.0f - sunOrbitHeight * sunOrbitHeight); - } - - sunRotation.LoadIdentity(); -diff -ru spring_89.0/rts/Rendering/GL/glExtra.cpp /home/svenstaro/src/spring/rts/Rendering/GL/glExtra.cpp ---- spring_89.0/rts/Rendering/GL/glExtra.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/GL/glExtra.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -83,7 +83,7 @@ - float adjustment = rad/2; - float ydiff = 0; - int j; -- for(j = 0; j < 50 && fabs(adjRadius - rad) + ydiff > .01*rad; j++){ -+ for(j = 0; j < 50 && math::fabs(adjRadius - rad) + ydiff > .01*rad; j++){ - if(adjRadius > rad) { - rad += adjustment; - } else { -@@ -93,7 +93,7 @@ - pos.x = center.x + (sinR * rad); - pos.z = center.z + (cosR * rad); - float newY = ground->GetHeightAboveWater(pos.x, pos.z, false); -- ydiff = fabs(pos.y - newY); -+ ydiff = math::fabs(pos.y - newY); - pos.y = newY; - heightDiff = (pos.y - center.y); - adjRadius = weapon ? weapon->GetRange2D(heightDiff*weapon->heightMod) : rad; -diff -ru spring_89.0/rts/Rendering/GroundDecalHandler.cpp /home/svenstaro/src/spring/rts/Rendering/GroundDecalHandler.cpp ---- spring_89.0/rts/Rendering/GroundDecalHandler.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/GroundDecalHandler.cpp 2012-07-13 06:34:43.082727161 +0200 -@@ -963,7 +963,7 @@ - radius = damage * 0.25f; - - if (damage > 400) -- damage = 400 + sqrt(damage - 399); -+ damage = 400 + math::sqrt(damage - 399); - - pos.ClampInBounds(); - -diff -ru spring_89.0/rts/Rendering/InMapDrawView.cpp /home/svenstaro/src/spring/rts/Rendering/InMapDrawView.cpp ---- spring_89.0/rts/Rendering/InMapDrawView.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/InMapDrawView.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -38,7 +38,7 @@ - for (int y = 0; y < 64; y++) { - // circular thingy - for (int x = 0; x < 64; x++) { -- float dist = sqrt((float)(x - 32) * (x - 32) + (y - 32) * (y - 32)); -+ float dist = math::sqrt((float)(x - 32) * (x - 32) + (y - 32) * (y - 32)); - if (dist > 31.0f) { - // do nothing - leave transparent - } else if (dist > 30.0f) { -diff -ru spring_89.0/rts/Rendering/LineDrawer.cpp /home/svenstaro/src/spring/rts/Rendering/LineDrawer.cpp ---- spring_89.0/rts/Rendering/LineDrawer.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/LineDrawer.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -29,7 +29,7 @@ - void CLineDrawer::UpdateLineStipple() - { - stippleTimer += (globalRendering->lastFrameTime * cmdColors.StippleSpeed()); -- stippleTimer = fmod(stippleTimer, (16.0f / 20.0f)); -+ stippleTimer = math::fmod(stippleTimer, (16.0f / 20.0f)); - } - - -diff -ru spring_89.0/rts/Rendering/Models/S3OParser.cpp /home/svenstaro/src/spring/rts/Rendering/Models/S3OParser.cpp ---- spring_89.0/rts/Rendering/Models/S3OParser.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Rendering/Models/S3OParser.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -319,7 +319,7 @@ - float3& t = tTangents[vrtIdx]; - int h = 1; - -- if (isnan(n.x) || isnan(n.y) || isnan(n.z)) { -+ if (math::isnan(n.x) || math::isnan(n.y) || math::isnan(n.z)) { - n = float3(0.0f, 0.0f, 1.0f); - } - if (s == ZeroVector) { s = float3(1.0f, 0.0f, 0.0f); } -diff -ru spring_89.0/rts/Sim/Misc/LosMap.cpp /home/svenstaro/src/spring/rts/Sim/Misc/LosMap.cpp ---- spring_89.0/rts/Sim/Misc/LosMap.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Misc/LosMap.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -182,7 +182,7 @@ - - y = (int)i; - x = 1; -- y = (int) (sqrt((float)r2 - 1) + 0.5f); -+ y = (int) (math::sqrt((float)r2 - 1) + 0.5f); - while (x < y) { - if(!PaintTable[x+y*Radius]) { - DrawLine(PaintTable, x, y, Radius); -@@ -198,7 +198,7 @@ - } - - x += 1; -- y = (int) (sqrt((float)r2 - x*x) + 0.5f); -+ y = (int) (math::sqrt((float)r2 - x*x) + 0.5f); - } - if (x == y) { - if(!PaintTable[x+y*Radius]) { -diff -ru spring_89.0/rts/Sim/Misc/QuadField.cpp /home/svenstaro/src/spring/rts/Sim/Misc/QuadField.cpp ---- spring_89.0/rts/Sim/Misc/QuadField.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Misc/QuadField.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -329,12 +329,12 @@ - float zp = start.z; - const float invQuadSize = 1.0f / QUAD_SIZE; - -- if ((floor(start.x * invQuadSize) == floor(to.x * invQuadSize)) && -- (floor(start.z * invQuadSize) == floor(to.z * invQuadSize))) -+ if ((math::floor(start.x * invQuadSize) == math::floor(to.x * invQuadSize)) && -+ (math::floor(start.z * invQuadSize) == math::floor(to.z * invQuadSize))) - { - *endQuad = ((int(start.x * invQuadSize)) + (int(start.z * invQuadSize)) * numQuadsX); - ++endQuad; -- } else if (floor(start.x * invQuadSize) == floor(to.x * invQuadSize)) { -+ } else if (math::floor(start.x * invQuadSize) == math::floor(to.x * invQuadSize)) { - const int first = (int)(start.x * invQuadSize) + ((int)(start.z * invQuadSize) * numQuadsX); - const int last = (int)(to.x * invQuadSize) + ((int)(to.z * invQuadSize) * numQuadsX); - -@@ -347,7 +347,7 @@ - *endQuad = a; ++endQuad; - } - } -- } else if (floor(start.z * invQuadSize) == floor(to.z * invQuadSize)) { -+ } else if (math::floor(start.z * invQuadSize) == math::floor(to.z * invQuadSize)) { - const int first = (int)(start.x * invQuadSize) + ((int)(start.z * invQuadSize) * numQuadsX); - const int last = (int)(to.x * invQuadSize) + ((int)(to.z * invQuadSize) * numQuadsX); - -@@ -369,14 +369,14 @@ - ++endQuad; - - if (dx > 0) { -- xn = (floor(xp * invQuadSize) * QUAD_SIZE + QUAD_SIZE - xp) / dx; -+ xn = (math::floor(xp * invQuadSize) * QUAD_SIZE + QUAD_SIZE - xp) / dx; - } else { -- xn = (floor(xp * invQuadSize) * QUAD_SIZE - xp) / dx; -+ xn = (math::floor(xp * invQuadSize) * QUAD_SIZE - xp) / dx; - } - if (dz > 0) { -- zn = (floor(zp * invQuadSize) * QUAD_SIZE + QUAD_SIZE - zp) / dz; -+ zn = (math::floor(zp * invQuadSize) * QUAD_SIZE + QUAD_SIZE - zp) / dz; - } else { -- zn = (floor(zp * invQuadSize) * QUAD_SIZE - zp) / dz; -+ zn = (math::floor(zp * invQuadSize) * QUAD_SIZE - zp) / dz; - } - - if (xn < zn) { -@@ -388,8 +388,8 @@ - } - - keepgoing = -- (fabs(xp - start.x) < fabs(to.x - start.x)) && -- (fabs(zp - start.z) < fabs(to.z - start.z)); -+ (math::fabs(xp - start.x) < math::fabs(to.x - start.x)) && -+ (math::fabs(zp - start.z) < math::fabs(to.z - start.z)); - } - } - -diff -ru spring_89.0/rts/Sim/MoveTypes/ClassicGroundMoveType.cpp /home/svenstaro/src/spring/rts/Sim/MoveTypes/ClassicGroundMoveType.cpp ---- spring_89.0/rts/Sim/MoveTypes/ClassicGroundMoveType.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/MoveTypes/ClassicGroundMoveType.cpp 2012-07-13 06:34:43.256060504 +0200 -@@ -386,7 +386,7 @@ - - const float dif = wSpeed - currentSpeed; - -- if (fabs(dif) < 0.05f) { -+ if (math::fabs(dif) < 0.05f) { - deltaSpeed = dif * 0.125f; - nextDeltaSpeedUpdate = gs->frameNum + 8; - } else if (dif > 0.0f) { -@@ -529,7 +529,7 @@ - skidRotSpeed = 0.0f; - owner->physicalState = oldPhysState; - owner->moveType->useHeading = true; -- float rp = floor(skidRotPos2 + skidRotSpeed2 + 0.5f); -+ float rp = math::floor(skidRotPos2 + skidRotSpeed2 + 0.5f); - skidRotSpeed2 = (rp - skidRotPos2) * 0.5f; - ChangeHeading(owner->heading); - } else { -@@ -545,10 +545,10 @@ - } - - float remTime=speedf/speedReduction-1; -- float rp=floor(skidRotPos2+skidRotSpeed2*remTime+0.5f); -+ float rp=math::floor(skidRotPos2+skidRotSpeed2*remTime+0.5f); - skidRotSpeed2=(remTime+1 == 0 ) ? 0 : (rp-skidRotPos2)/(remTime+1); - -- if(floor(skidRotPos2)!=floor(skidRotPos2+skidRotSpeed2)){ -+ if(math::floor(skidRotPos2)!=math::floor(skidRotPos2+skidRotSpeed2)){ - skidRotPos2=0; - skidRotSpeed2=0; - } -@@ -571,7 +571,7 @@ - speed*=0.95f; - } - else { -- speed += (normal*(fabs(speed.dot(normal)) + .1))*1.9f; -+ speed += (normal*(math::fabs(speed.dot(normal)) + .1))*1.9f; - speed*=.8; - } - } -@@ -625,7 +625,7 @@ - float totRad = owner->radius + u->radius; - - if (sqDist < totRad * totRad && sqDist != 0) { -- float dist = sqrt(sqDist); -+ float dist = math::sqrt(sqDist); - float3 dif = midPos - u->midPos; - dif /= std::max(dist, 1.f); - -@@ -682,7 +682,7 @@ - float sqDist=(midPos-u->midPos).SqLength(); - float totRad=owner->radius+u->radius; - if(sqDist<totRad*totRad && sqDist!=0){ -- float dist=sqrt(sqDist); -+ float dist=math::sqrt(sqDist); - float3 dif=midPos-u->midPos; - dif/=std::max(dist, 1.f); - float impactSpeed = -owner->speed.dot(dif); -@@ -721,8 +721,8 @@ - - skidRotPos2 += skidRotSpeed2; - -- float cosp = cos(skidRotPos2 * PI * 2.0f); -- float sinp = sin(skidRotPos2 * PI * 2.0f); -+ float cosp = math::cos(skidRotPos2 * PI * 2.0f); -+ float sinp = math::sin(skidRotPos2 * PI * 2.0f); - - float3 f1 = skidRotVector * skidRotVector.dot(owner->frontdir); - float3 f2 = owner->frontdir - f1; -@@ -812,7 +812,7 @@ - float objectDistToAvoidDirCenter = objectToUnit.dot(rightOfAvoid); - - if (objectToUnit.dot(avoidanceDir) < radiusSum && -- fabs(objectDistToAvoidDirCenter) < radiusSum && -+ math::fabs(objectDistToAvoidDirCenter) < radiusSum && - (o->moveDef || Distance2D(owner, o) >= 0)) { - - if (objectDistToAvoidDirCenter > 0.0f) { -@@ -824,7 +824,7 @@ - rightOfAvoid = avoidanceDir.cross(float3(0.0f, 1.0f, 0.0f)); - } else { - avoidLeft += -- (radiusSum - fabs(objectDistToAvoidDirCenter)) * -+ (radiusSum - math::fabs(objectDistToAvoidDirCenter)) * - AVOIDANCE_STRENGTH * fastmath::isqrt2(distanceToObjectSq); - avoidanceDir -= (rightOfAvoid * avoidLeft); - avoidanceDir.Normalize(); -@@ -952,7 +952,7 @@ - if (!decRate) { - return 0.0f; - } -- return fabs(speed*speed / decRate); -+ return math::fabs(speed*speed / decRate); - } - - float3 CClassicGroundMoveType::Here() -@@ -1043,7 +1043,7 @@ - const float zmove = (owner->mapPos.y + owner->zsize / 2) * SQUARE_SIZE; - const float xmove = (owner->mapPos.x + owner->xsize / 2) * SQUARE_SIZE; - -- if (fabs(owner->frontdir.x) > fabs(owner->frontdir.z)) { -+ if (math::fabs(owner->frontdir.x) > math::fabs(owner->frontdir.z)) { - if (newmp.y < owner->mapPos.y) { - haveCollided |= CheckColV(newmp.y, newmp.x, newmp.x + owner->xsize - 1, zmove - 3.99f, owner->mapPos.y); - newmp = owner->GetMapPos(); -@@ -1261,20 +1261,20 @@ - float xp = start.x; - float zp = start.z; - -- if (floor(start.x) == floor(to.x)) { -+ if (math::floor(start.x) == math::floor(to.x)) { - if (dz > 0.0f) { -- for (int a = 1; a < floor(to.z); ++a) -+ for (int a = 1; a < math::floor(to.z); ++a) - lineTable[yt][xt].push_back(int2(0, a)); - } else { -- for (int a = -1; a > floor(to.z); --a) -+ for (int a = -1; a > math::floor(to.z); --a) - lineTable[yt][xt].push_back(int2(0, a)); - } -- } else if (floor(start.z) == floor(to.z)) { -+ } else if (math::floor(start.z) == math::floor(to.z)) { - if (dx > 0.0f) { -- for (int a = 1; a < floor(to.x); ++a) -+ for (int a = 1; a < math::floor(to.x); ++a) - lineTable[yt][xt].push_back(int2(a, 0)); - } else { -- for (int a = -1; a > floor(to.x); --a) -+ for (int a = -1; a > math::floor(to.x); --a) - lineTable[yt][xt].push_back(int2(a, 0)); - } - } else { -@@ -1283,14 +1283,14 @@ - - while (keepgoing) { - if (dx > 0.0f) { -- xn = (floor(xp) + 1.0f - xp) / dx; -+ xn = (math::floor(xp) + 1.0f - xp) / dx; - } else { -- xn = (floor(xp) - xp) / dx; -+ xn = (math::floor(xp) - xp) / dx; - } - if (dz > 0.0f) { -- zn = (floor(zp) + 1.0f - zp) / dz; -+ zn = (math::floor(zp) + 1.0f - zp) / dz; - } else { -- zn = (floor(zp) - zp) / dz; -+ zn = (math::floor(zp) - zp) / dz; - } - - if (xn < zn) { -@@ -1302,10 +1302,10 @@ - } - - keepgoing = -- fabs(xp - start.x) < fabs(to.x - start.x) && -- fabs(zp - start.z) < fabs(to.z - start.z); -+ math::fabs(xp - start.x) < math::fabs(to.x - start.x) && -+ math::fabs(zp - start.z) < math::fabs(to.z - start.z); - -- lineTable[yt][xt].push_back( int2(int(floor(xp)), int(floor(zp))) ); -+ lineTable[yt][xt].push_back( int2(int(math::floor(xp)), int(math::floor(zp))) ); - } - - lineTable[yt][xt].pop_back(); -@@ -1335,7 +1335,7 @@ - const MoveDef& md = *(owner->unitDef->moveDef); - const float cmod = movemath->GetPosSpeedMod(md, moveSquareX * 2, moveSquareY * 2); - -- if (fabs(owner->frontdir.x) < fabs(owner->frontdir.z)) { -+ if (math::fabs(owner->frontdir.x) < math::fabs(owner->frontdir.z)) { - if (newMoveSquareX > moveSquareX) { - const float nmod = movemath->GetPosSpeedMod(md, newMoveSquareX * 2, newMoveSquareY * 2); - if (cmod > 0.01f && nmod <= 0.01f) { -diff -ru spring_89.0/rts/Sim/MoveTypes/GroundMoveType.cpp /home/svenstaro/src/spring/rts/Sim/MoveTypes/GroundMoveType.cpp ---- spring_89.0/rts/Sim/MoveTypes/GroundMoveType.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/MoveTypes/GroundMoveType.cpp 2012-07-13 06:34:43.249393836 +0200 -@@ -1808,20 +1808,20 @@ - float xp = start.x; - float zp = start.z; - -- if (floor(start.x) == floor(to.x)) { -+ if (math::floor(start.x) == math::floor(to.x)) { - if (dz > 0.0f) { -- for (int a = 1; a <= floor(to.z); ++a) -+ for (int a = 1; a <= math::floor(to.z); ++a) - lineTable[yt][xt].push_back(int2(0, a)); - } else { -- for (int a = -1; a >= floor(to.z); --a) -+ for (int a = -1; a >= math::floor(to.z); --a) - lineTable[yt][xt].push_back(int2(0, a)); - } -- } else if (floor(start.z) == floor(to.z)) { -+ } else if (math::floor(start.z) == math::floor(to.z)) { - if (dx > 0.0f) { -- for (int a = 1; a <= floor(to.x); ++a) -+ for (int a = 1; a <= math::floor(to.x); ++a) - lineTable[yt][xt].push_back(int2(a, 0)); - } else { -- for (int a = -1; a >= floor(to.x); --a) -+ for (int a = -1; a >= math::floor(to.x); --a) - lineTable[yt][xt].push_back(int2(a, 0)); - } - } else { -@@ -1830,14 +1830,14 @@ - - while (keepgoing) { - if (dx > 0.0f) { -- xn = (floor(xp) + 1.0f - xp) / dx; -+ xn = (math::floor(xp) + 1.0f - xp) / dx; - } else { -- xn = (floor(xp) - xp) / dx; -+ xn = (math::floor(xp) - xp) / dx; - } - if (dz > 0.0f) { -- zn = (floor(zp) + 1.0f - zp) / dz; -+ zn = (math::floor(zp) + 1.0f - zp) / dz; - } else { -- zn = (floor(zp) - zp) / dz; -+ zn = (math::floor(zp) - zp) / dz; - } - - if (xn < zn) { -@@ -1851,7 +1851,7 @@ - keepgoing = - math::fabs(xp - start.x) <= math::fabs(to.x - start.x) && - math::fabs(zp - start.z) <= math::fabs(to.z - start.z); -- int2 pt(int(floor(xp)), int(floor(zp))); -+ int2 pt(int(math::floor(xp)), int(math::floor(zp))); - - static const int MIN_IDX = -int(LINETABLE_SIZE / 2); - static const int MAX_IDX = -MIN_IDX; -diff -ru spring_89.0/rts/Sim/MoveTypes/HoverAirMoveType.cpp /home/svenstaro/src/spring/rts/Sim/MoveTypes/HoverAirMoveType.cpp ---- spring_89.0/rts/Sim/MoveTypes/HoverAirMoveType.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/MoveTypes/HoverAirMoveType.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -325,7 +325,7 @@ - { - #define NOZERO(x) std::max(x, 0.0001f) - -- const float driftSpeed = fabs(owner->unitDef->dlHoverFactor); -+ const float driftSpeed = math::fabs(owner->unitDef->dlHoverFactor); - float3 deltaVec = goalPos - owner->pos; - float3 deltaDir = float3(deltaVec.x, 0.0f, deltaVec.z); - float l = NOZERO(deltaDir.Length2D()); -@@ -342,7 +342,7 @@ - deltaDir -= owner->speed; - l = deltaDir.SqLength2D(); - if (l > (maxSpeed * maxSpeed)) { -- deltaDir *= maxSpeed / NOZERO(sqrt(l)); -+ deltaDir *= maxSpeed / NOZERO(math::sqrt(l)); - } - wantedSpeed = owner->speed + deltaDir; - -diff -ru spring_89.0/rts/Sim/MoveTypes/StrafeAirMoveType.cpp /home/svenstaro/src/spring/rts/Sim/MoveTypes/StrafeAirMoveType.cpp ---- spring_89.0/rts/Sim/MoveTypes/StrafeAirMoveType.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/MoveTypes/StrafeAirMoveType.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -412,7 +412,7 @@ - } - } - -- if (fabs(owner->rightdir.y) < maxAileron * 3.0f * speedf || owner->updir.y < 0.0f) { -+ if (math::fabs(owner->rightdir.y) < maxAileron * 3.0f * speedf || owner->updir.y < 0.0f) { - elevator = 1; - } - UpdateAirPhysics(0, aileron, elevator, 1, owner->frontdir); -@@ -528,13 +528,13 @@ - if (goalDir.dot(frontdir) < -0.2f + inefficientAttackTime * 0.002f && frontdir.y > -0.2f && speedf > 2.0f && gs->randFloat() > 0.996f) - maneuver = 1; - -- if (goalDir.dot(frontdir) < -0.2f + inefficientAttackTime * 0.002f && fabs(frontdir.y) < 0.2f && gs->randFloat() > 0.996f && gHeightAW + 400 < pos.y) { -+ if (goalDir.dot(frontdir) < -0.2f + inefficientAttackTime * 0.002f && math::fabs(frontdir.y) < 0.2f && gs->randFloat() > 0.996f && gHeightAW + 400 < pos.y) { - maneuver = 2; - maneuverSubState = 0; - } - - // roll -- if (speedf > 0.45f && pos.y + owner->speed.y * 60 * fabs(frontdir.y) + std::min(0.0f, float(updir.y)) * 150 > gHeightAW + 60 + fabs(rightdir.y) * 150) { -+ if (speedf > 0.45f && pos.y + owner->speed.y * 60 * math::fabs(frontdir.y) + std::min(0.0f, float(updir.y)) * 150 > gHeightAW + 60 + math::fabs(rightdir.y) * 150) { - const float goalBankDif = goalDotRight + rightdir.y * 0.2f; - if (goalBankDif > maxAileron * speedf * 4.0f) { - aileron = 1; -@@ -706,7 +706,7 @@ - } else if (goalBankDif < -maxAileron * speedf * 4 && rightdir.y < maxBank) { - aileron = -1; - } else { -- if (fabs(rightdir.y) < maxBank) { -+ if (math::fabs(rightdir.y) < maxBank) { - aileron = goalBankDif / (maxAileron * speedf * 4); - } else { - if (rightdir.y < 0.0f && goalBankDif < 0.0f) { -@@ -762,7 +762,7 @@ - } else if (hdif > (maxElevator * speedf * speedf * 20) && frontdir.y < maxPitch) { - elevator = 1; - } else { -- if (fabs(frontdir.y) < maxPitch) -+ if (math::fabs(frontdir.y) < maxPitch) - elevator = hdif / (maxElevator * speedf * speedf * 20); - } - } -diff -ru spring_89.0/rts/Sim/Path/Default/PathEstimator.cpp /home/svenstaro/src/spring/rts/Sim/Path/Default/PathEstimator.cpp ---- spring_89.0/rts/Sim/Path/Default/PathEstimator.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Path/Default/PathEstimator.cpp 2012-07-13 06:34:42.939393819 +0200 -@@ -201,7 +201,7 @@ - - void CPathEstimator::CalcOffsetsAndPathCosts(int thread) { - //! reset FPU state for synced computations -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - - // NOTE: EstimatePathCosts() [B] is temporally dependent on CalculateBlockOffsets() [A], - // A must be completely finished before B_i can be safely called. This means we cannot -diff -ru spring_89.0/rts/Sim/Path/QTPFS/PathManager.cpp /home/svenstaro/src/spring/rts/Sim/Path/QTPFS/PathManager.cpp ---- spring_89.0/rts/Sim/Path/QTPFS/PathManager.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Path/QTPFS/PathManager.cpp 2012-07-13 06:34:43.016060490 +0200 -@@ -251,7 +251,7 @@ - - - void QTPFS::PathManager::InitNodeLayersThreaded(const SRectangle& rect) { -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - - char loadMsg[512] = {'\0'}; - const char* fmtString = "[PathManager::%s] using %u threads for %u node-layers (cached? %s)"; -@@ -310,7 +310,7 @@ - } - #endif - -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - } - - void QTPFS::PathManager::InitNodeLayersThread( -@@ -360,7 +360,7 @@ - - - void QTPFS::PathManager::UpdateNodeLayersThreaded(const SRectangle& rect) { -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - - #ifdef QTPFS_OPENMP_ENABLED - { -@@ -375,7 +375,7 @@ - } - #endif - -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - } - - void QTPFS::PathManager::UpdateNodeLayersThread( -@@ -569,7 +569,7 @@ - SCOPED_TIMER("PathManager::Update"); - - #ifdef QTPFS_ENABLE_THREADED_UPDATE -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - - // allow ThreadUpdate to run one iteration - condThreadUpdate->notify_one(); -@@ -579,7 +579,7 @@ - // wait for the ThreadUpdate iteration to finish - condThreadUpdated->wait(lock); - -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - #else - ThreadUpdate(); - #endif -diff -ru spring_89.0/rts/Sim/Projectiles/ExplosionGenerator.cpp /home/svenstaro/src/spring/rts/Sim/Projectiles/ExplosionGenerator.cpp ---- spring_89.0/rts/Sim/Projectiles/ExplosionGenerator.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Projectiles/ExplosionGenerator.cpp 2012-07-13 06:34:43.082727161 +0200 -@@ -262,7 +262,7 @@ - damage *= gfxMod; - damage = std::max(damage, 0.0f); - -- const float sqrtDmg = sqrt(damage); -+ const float sqrtDmg = math::sqrt(damage); - const float camLength = camVect.Length(); - float moveLength = radius * 0.03f; - -@@ -283,7 +283,7 @@ - if (airExplosion || waterExplosion) { smokeDamage *= 0.6f; } - - if (smokeDamage > 0.01f) { -- smokeDamageSQRT = sqrt(smokeDamage); -+ smokeDamageSQRT = math::sqrt(smokeDamage); - smokeDamageISQRT = 1.0f / (smokeDamageSQRT * 0.35f); - } - -@@ -507,17 +507,17 @@ - } - case OP_SAWTOOTH: { - // this translates to modulo except it works with floats -- val -= (*(float*) code) * floor(val / (*(float*) code)); -+ val -= (*(float*) code) * math::floor(val / (*(float*) code)); - code += 4; - break; - } - case OP_DISCRETE: { -- val = (*(float*) code) * floor(val / (*(float*) code)); -+ val = (*(float*) code) * math::floor(val / (*(float*) code)); - code += 4; - break; - } - case OP_SINE: { -- val = (*(float*) code) * sin(val); -+ val = (*(float*) code) * math::sin(val); - code += 4; - break; - } -@@ -538,12 +538,12 @@ - break; - } - case OP_POW: { -- val = pow(val, (*(float*) code)); -+ val = math::pow(val, (*(float*) code)); - code += 4; - break; - } - case OP_POWBUFF: { -- val = pow(val, buffer[(*(int*) code)]); -+ val = math::pow(val, buffer[(*(int*) code)]); - code += 4; - break; - } -diff -ru spring_89.0/rts/Sim/Projectiles/PieceProjectile.cpp /home/svenstaro/src/spring/rts/Sim/Projectiles/PieceProjectile.cpp ---- spring_89.0/rts/Sim/Projectiles/PieceProjectile.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Projectiles/PieceProjectile.cpp 2012-07-13 06:34:43.069393827 +0200 -@@ -111,7 +111,7 @@ - oldSmokeDir.Normalize(); - const float3 camDir = (pos - camera->pos).Normalize(); - -- if (camera->pos.distance(pos) + (1 - fabs(camDir.dot(oldSmokeDir))) * 3000 < 200) { -+ if (camera->pos.distance(pos) + (1 - math::fabs(camDir.dot(oldSmokeDir))) * 3000 < 200) { - drawTrail = false; - } - -@@ -334,7 +334,7 @@ - - if (!drawTrail) { - float3 camDir = (pos - camera->pos).Normalize(); -- if (camera->pos.distance(pos) + (1 - fabs(camDir.dot(dir))) * 3000 > 300) { -+ if (camera->pos.distance(pos) + (1 - math::fabs(camDir.dot(dir))) * 3000 > 300) { - drawTrail = true; - } - } -@@ -373,7 +373,7 @@ - const float3 dif2 = (oldSmokePos - camera->pos).Normalize(); - const float3 dir2 = (dif2.cross(oldSmokeDir)).Normalize(); - -- float a1 = ((1 - 0.0f / (Smoke_Time)) * 255) * (0.7f + fabs(dif.dot(dir))); -+ float a1 = ((1 - 0.0f / (Smoke_Time)) * 255) * (0.7f + math::fabs(dif.dot(dir))); - float alpha = std::min(255.0f, std::max(0.f, a1)); - col[0] = (unsigned char) (color * alpha); - col[1] = (unsigned char) (color * alpha); -@@ -381,7 +381,7 @@ - col[3] = (unsigned char) (alpha); - - unsigned char col2[4]; -- float a2 = ((1 - float(age2) / (Smoke_Time)) * 255) * (0.7f + fabs(dif2.dot(oldSmokeDir))); -+ float a2 = ((1 - float(age2) / (Smoke_Time)) * 255) * (0.7f + math::fabs(dif2.dot(oldSmokeDir))); - - if (age < 8) - a2 = 0; -diff -ru spring_89.0/rts/Sim/Projectiles/Unsynced/SimpleParticleSystem.cpp /home/svenstaro/src/spring/rts/Sim/Projectiles/Unsynced/SimpleParticleSystem.cpp ---- spring_89.0/rts/Sim/Projectiles/Unsynced/SimpleParticleSystem.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Projectiles/Unsynced/SimpleParticleSystem.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -188,7 +188,7 @@ - particles[i].size = particleSize + gu->usRandFloat()*particleSizeSpread; - particles[i].pos = pos; - -- particles[i].speed = ((up * emitMul.y) * cos(ay) - ((right * emitMul.x) * cos(az) - (forward * emitMul.z) * sin(az)) * sin(ay)) * (particleSpeed + (gu->usRandFloat() * particleSpeedSpread)); -+ particles[i].speed = ((up * emitMul.y) * math::cos(ay) - ((right * emitMul.x) * math::cos(az) - (forward * emitMul.z) * math::sin(az)) * math::sin(ay)) * (particleSpeed + (gu->usRandFloat() * particleSpeedSpread)); - } - - drawRadius = (particleSpeed + particleSpeedSpread) * (particleLife * particleLifeSpread); -@@ -232,7 +232,7 @@ - const float az = gu->usRandFloat() * 2 * PI; - const float ay = (emitRot + emitRotSpread*gu->usRandFloat()) * (PI / 180.0); - -- float3 pspeed = ((up * emitMul.y) * cos(ay) - ((right * emitMul.x) * cos(az) - (forward * emitMul.z) * sin(az)) * sin(ay)) * (particleSpeed + (gu->usRandFloat() * particleSpeedSpread)); -+ float3 pspeed = ((up * emitMul.y) * math::cos(ay) - ((right * emitMul.x) * math::cos(az) - (forward * emitMul.z) * math::sin(az)) * math::sin(ay)) * (particleSpeed + (gu->usRandFloat() * particleSpeedSpread)); - - CGenericParticleProjectile* particle = new CGenericParticleProjectile(pos + explosionPos, pspeed, owner); - -diff -ru spring_89.0/rts/Sim/Projectiles/Unsynced/SmokeTrailProjectile.cpp /home/svenstaro/src/spring/rts/Sim/Projectiles/Unsynced/SmokeTrailProjectile.cpp ---- spring_89.0/rts/Sim/Projectiles/Unsynced/SmokeTrailProjectile.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Projectiles/Unsynced/SmokeTrailProjectile.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -124,7 +124,7 @@ - if (lastSegment) { - a1 = 0; - } -- a1 *= 0.7f + fabs(dif1.dot(dir1)); -+ a1 *= 0.7f + math::fabs(dif1.dot(dir1)); - float alpha = std::min(255.f, std::max(0.f, a1)); - col[0] = (unsigned char) (color * alpha); - col[1] = (unsigned char) (color * alpha); -@@ -136,7 +136,7 @@ - if (firstSegment) { - a2 = 0; - } -- a2 *= 0.7f + fabs(dif2.dot(dir2)); -+ a2 *= 0.7f + math::fabs(dif2.dot(dir2)); - alpha = std::min(255.f, std::max(0.0f, a2)); - col2[0] = (unsigned char) (color * alpha); - col2[1] = (unsigned char) (color * alpha); -@@ -153,7 +153,7 @@ - - unsigned char col3[4]; - float a2 = (1 - (float)(age + 4) / lifeTime) * 255; -- a2 *= 0.7f + fabs(dif3.dot(middir)); -+ a2 *= 0.7f + math::fabs(dif3.dot(middir)); - alpha = std::min(255.0f, std::max(0.0f, a2)); - col3[0] = (unsigned char) (color * alpha); - col3[1] = (unsigned char) (color * alpha); -diff -ru spring_89.0/rts/Sim/Projectiles/Unsynced/SpherePartProjectile.cpp /home/svenstaro/src/spring/rts/Sim/Projectiles/Unsynced/SpherePartProjectile.cpp ---- spring_89.0/rts/Sim/Projectiles/Unsynced/SpherePartProjectile.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Projectiles/Unsynced/SpherePartProjectile.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -49,7 +49,7 @@ - const float yp = (y + ypart) / 16.0f*PI - PI/2; - for (int x = 0; x < 5; ++x) { - float xp = (x + xpart) / 32.0f*2*PI; -- vectors[y*5 + x] = float3(sin(xp)*cos(yp), sin(yp), cos(xp)*cos(yp)); -+ vectors[y*5 + x] = float3(math::sin(xp)*math::cos(yp), math::sin(yp), math::cos(xp)*math::cos(yp)); - } - } - pos = centerPos+vectors[12] * sphereSize; -@@ -86,7 +86,7 @@ - float alpha = - baseAlpha * - (1.0f - min(1.0f, float(age + globalRendering->timeOffset) / (float) ttl)) * -- (1.0f - fabs(y + ybase - 8.0f) / 8.0f * 1.0f); -+ (1.0f - math::fabs(y + ybase - 8.0f) / 8.0f * 1.0f); - - col[0] = (unsigned char) (color.x * 255.0f * alpha); - col[1] = (unsigned char) (color.y * 255.0f * alpha); -@@ -94,7 +94,7 @@ - col[3] = ((unsigned char) (40 * alpha)) + 1; - va->AddVertexQTC(centerPos + vectors[y*5 + x] * interSize, texx, texy, col); - va->AddVertexQTC(centerPos + vectors[y*5 + x + 1] * interSize, texx, texy, col); -- alpha = baseAlpha * (1.0f - min(1.0f, (float)(age + globalRendering->timeOffset) / (float) ttl)) * (1 - fabs(y + 1 + ybase - 8.0f) / 8.0f*1.0f); -+ alpha = baseAlpha * (1.0f - min(1.0f, (float)(age + globalRendering->timeOffset) / (float) ttl)) * (1 - math::fabs(y + 1 + ybase - 8.0f) / 8.0f*1.0f); - - col[0] = (unsigned char) (color.x * 255.0f * alpha); - col[1] = (unsigned char) (color.y * 255.0f * alpha); -diff -ru spring_89.0/rts/Sim/Projectiles/Unsynced/WakeProjectile.cpp /home/svenstaro/src/spring/rts/Sim/Projectiles/Unsynced/WakeProjectile.cpp ---- spring_89.0/rts/Sim/Projectiles/Unsynced/WakeProjectile.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Projectiles/Unsynced/WakeProjectile.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -79,7 +79,7 @@ - float interSize = size + sizeExpansion * globalRendering->timeOffset; - float interRot = rotation + rotSpeed * globalRendering->timeOffset; - -- const float3 dir1 = float3(cos(interRot), 0, sin(interRot)) * interSize; -+ const float3 dir1 = float3(math::cos(interRot), 0, math::sin(interRot)) * interSize; - const float3 dir2 = dir1.cross(UpVector); - - #define wt projectileDrawer->waketex -diff -ru spring_89.0/rts/Sim/Projectiles/WeaponProjectiles/MissileProjectile.cpp /home/svenstaro/src/spring/rts/Sim/Projectiles/WeaponProjectiles/MissileProjectile.cpp ---- spring_89.0/rts/Sim/Projectiles/WeaponProjectiles/MissileProjectile.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Projectiles/WeaponProjectiles/MissileProjectile.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -96,7 +96,7 @@ - drawRadius = radius + maxSpeed * 8; - - float3 camDir = (pos - camera->pos).ANormalize(); -- if ((camera->pos.distance(pos) * 0.2f + (1 - fabs(camDir.dot(dir))) * 3000) < 200) { -+ if ((camera->pos.distance(pos) * 0.2f + (1 - math::fabs(camDir.dot(dir))) * 3000) < 200) { - drawTrail = false; - } - -@@ -229,8 +229,8 @@ - // is too close or height difference too large) - const float horDiff = (targPos - pos).Length2D() + 0.01f; - const float verDiff = (targPos.y - pos.y) + 0.01f; -- const float dirDiff = fabs(targetDir.y - dir.y); -- const float ratio = fabs(verDiff / horDiff); -+ const float dirDiff = math::fabs(targetDir.y - dir.y); -+ const float ratio = math::fabs(verDiff / horDiff); - - dir.y -= (dirDiff * ratio); - } else { -@@ -295,7 +295,7 @@ - if (!drawTrail) { - const float3 camDir = (pos - camera->pos).ANormalize(); - -- if ((camera->pos.distance(pos) * 0.2f + (1 - fabs(camDir.dot(dir))) * 3000) > 300) { -+ if ((camera->pos.distance(pos) * 0.2f + (1 - math::fabs(camDir.dot(dir))) * 3000) > 300) { - drawTrail = true; - } - } -@@ -343,7 +343,7 @@ - dir2.ANormalize(); - - float a1 = (1.0f / (SMOKE_TIME)) * 255; -- a1 *= 0.7f + fabs(dif.dot(dir)); -+ a1 *= 0.7f + math::fabs(dif.dot(dir)); - const float alpha1 = std::min(255.0f, std::max(0.0f, a1)); - col[0] = (unsigned char) (color * alpha1); - col[1] = (unsigned char) (color * alpha1); -@@ -357,7 +357,7 @@ - a2 = 0; - } - -- a2 *= 0.7f + fabs(dif2.dot(oldDir)); -+ a2 *= 0.7f + math::fabs(dif2.dot(oldDir)); - const float alpha2 = std::min(255.0f, std::max(0.0f, a2)); - col2[0] = (unsigned char) (color * alpha2); - col2[1] = (unsigned char) (color * alpha2); -diff -ru spring_89.0/rts/Sim/Projectiles/WeaponProjectiles/StarburstProjectile.cpp /home/svenstaro/src/spring/rts/Sim/Projectiles/WeaponProjectiles/StarburstProjectile.cpp ---- spring_89.0/rts/Sim/Projectiles/WeaponProjectiles/StarburstProjectile.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Projectiles/WeaponProjectiles/StarburstProjectile.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -90,13 +90,13 @@ - } - } - -- maxGoodDif = cos(tracking * 0.6f); -+ maxGoodDif = math::cos(tracking * 0.6f); - curSpeed = speed.Length(); - dir = speed / curSpeed; - oldSmokeDir = dir; - - const float3 camDir = (pos - camera->pos).ANormalize(); -- const float camDist = (camera->pos.distance(pos) * 0.2f) + ((1.0f - fabs(camDir.dot(dir))) * 3000); -+ const float camDist = (camera->pos.distance(pos) * 0.2f) + ((1.0f - math::fabs(camDir.dot(dir))) * 3000); - - drawTrail = (camDist >= 200.0f); - drawRadius = maxSpeed * 8.0f; -@@ -304,7 +304,7 @@ - - if (!drawTrail) { - const float3 camDir = (pos - camera->pos).ANormalize(); -- const float camDist = (camera->pos.distance(pos) * 0.2f + (1 - fabs(camDir.dot(dir))) * 3000); -+ const float camDist = (camera->pos.distance(pos) * 0.2f + (1 - math::fabs(camDir.dot(dir))) * 3000); - - drawTrail = (camDist > 300.0f); - } -@@ -335,11 +335,11 @@ - - const float a1 = - ((1.0f - (0.0f / SMOKE_TIME)) * 255) * -- (0.7f + fabs(dif1.dot(dir))); -+ (0.7f + math::fabs(dif1.dot(dir))); - const float a2 = - (age < 8)? 0.0f: - ((1.0f - (age2 / SMOKE_TIME)) * 255) * -- (0.7f + fabs(dif2.dot(oldSmokeDir))); -+ (0.7f + math::fabs(dif2.dot(oldSmokeDir))); - const int alpha1 = std::min(255, (int) std::max(0.0f, a1)); - const int alpha2 = std::min(255, (int) std::max(0.0f, a2)); - -diff -ru spring_89.0/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp /home/svenstaro/src/spring/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp ---- spring_89.0/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp 2012-07-10 00:10:07.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp 2012-07-13 06:34:43.249393836 +0200 -@@ -252,8 +252,8 @@ - const float dot = speed.dot(normal); - - pos -= speed; -- speed -= (speed + normal * fabs(dot)) * (1 - weaponDef->bounceSlip); -- speed += (normal * (fabs(dot))) * (1 + weaponDef->bounceRebound); -+ speed -= (speed + normal * math::fabs(dot)) * (1 - weaponDef->bounceSlip); -+ speed += (normal * (math::fabs(dot))) * (1 + weaponDef->bounceRebound); - pos += speed; - - if (weaponDef->bounceExplosionGenerator) { -diff -ru spring_89.0/rts/Sim/Units/CommandAI/MobileCAI.cpp /home/svenstaro/src/spring/rts/Sim/Units/CommandAI/MobileCAI.cpp ---- spring_89.0/rts/Sim/Units/CommandAI/MobileCAI.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Units/CommandAI/MobileCAI.cpp 2012-07-13 06:34:43.079393827 +0200 -@@ -770,7 +770,7 @@ - b2 = w->TryTargetRotate(orderTarget, c.GetID() == CMD_MANUALFIRE); - b3 = Square(w->range - (w->relWeaponPos).Length()) > (orderTarget->pos.SqDistance(owner->pos)); - b4 = w->TryTargetHeading(GetHeadingFromVector(-diff.x, -diff.z), orderTarget->pos, orderTarget != NULL, orderTarget); -- edgeFactor = fabs(w->targetBorder); -+ edgeFactor = math::fabs(w->targetBorder); - } - - const float diffLength2D = diff.Length2D(); -diff -ru spring_89.0/rts/Sim/Units/CommandAI/TransportCAI.cpp /home/svenstaro/src/spring/rts/Sim/Units/CommandAI/TransportCAI.cpp ---- spring_89.0/rts/Sim/Units/CommandAI/TransportCAI.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Units/CommandAI/TransportCAI.cpp 2012-07-13 06:34:43.079393827 +0200 -@@ -349,7 +349,7 @@ - if (rx <= spread) - continue; - -- rx = sqrt(rx); -+ rx = math::sqrt(rx); - - const float minx = std::max( spread, center.x - rx); - const float maxx = std::min(float(gs->mapx * SQUARE_SIZE - spread), center.x + rx); -@@ -676,7 +676,7 @@ - am->ForceHeading(unloadHeading); - am->maxDrift = 1; - if ((owner->pos.SqDistance(pos) < 64) && -- (owner->updir.dot(UpVector) > 0.99f) && fabs(owner->heading - unloadHeading) < AIRTRANSPORT_DOCKING_ANGLE) { -+ (owner->updir.dot(UpVector) > 0.99f) && math::fabs(owner->heading - unloadHeading) < AIRTRANSPORT_DOCKING_ANGLE) { - if (!SpotIsClearIgnoreSelf(pos, unit)) { - // chosen spot is no longer clear to land, choose a new one - // if a new spot cannot be found, don't unload at all -diff -ru spring_89.0/rts/Sim/Units/UnitDef.cpp /home/svenstaro/src/spring/rts/Sim/Units/UnitDef.cpp ---- spring_89.0/rts/Sim/Units/UnitDef.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Units/UnitDef.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -399,9 +399,9 @@ - selfDCountdown = udTable.GetInt("selfDestructCountdown", 5); - - speed = udTable.GetFloat("maxVelocity", 0.0f) * GAME_SPEED; -- speed = fabs(speed); -+ speed = math::fabs(speed); - rSpeed = udTable.GetFloat("maxReverseVelocity", 0.0f) * GAME_SPEED; -- rSpeed = fabs(rSpeed); -+ rSpeed = math::fabs(rSpeed); - - fireState = udTable.GetInt("fireState", canFireControl? FIRESTATE_NONE: FIRESTATE_FIREATWILL); - fireState = std::min(fireState, int(FIRESTATE_FIREATWILL)); -@@ -462,8 +462,8 @@ - useSmoothMesh = udTable.GetBool("useSmoothMesh", true); - - -- maxAcc = fabs(udTable.GetFloat("acceleration", 0.5f)); // no negative values -- maxDec = fabs(udTable.GetFloat("brakeRate", 3.0f * maxAcc)) * (canfly? 0.1f: 1.0f); // no negative values -+ maxAcc = math::fabs(udTable.GetFloat("acceleration", 0.5f)); // no negative values -+ maxDec = math::fabs(udTable.GetFloat("brakeRate", 3.0f * maxAcc)) * (canfly? 0.1f: 1.0f); // no negative values - - turnRate = udTable.GetFloat("turnRate", 0.0f); - turnInPlace = udTable.GetBool("turnInPlace", true); -@@ -709,7 +709,7 @@ - seismicSignature = udTable.GetFloat("seismicSignature", -1.0f); - if (seismicSignature == -1.0f) { - if (!canFloat && !canHover && !canfly) { -- seismicSignature = sqrt(mass / 100.0f); -+ seismicSignature = math::sqrt(mass / 100.0f); - } else { - seismicSignature = 0.0f; - } -diff -ru spring_89.0/rts/Sim/Units/UnitHandler.cpp /home/svenstaro/src/spring/rts/Sim/Units/UnitHandler.cpp ---- spring_89.0/rts/Sim/Units/UnitHandler.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Units/UnitHandler.cpp 2012-07-13 06:34:43.076060493 +0200 -@@ -419,8 +419,8 @@ - // look for a nearby geothermal feature if we need one - for (std::vector<CFeature*>::const_iterator fi = features.begin(); fi != features.end(); ++fi) { - if ((*fi)->def->geoThermal -- && fabs((*fi)->pos.x - pos.x) < (xsize * 4 - 4) -- && fabs((*fi)->pos.z - pos.z) < (zsize * 4 - 4)) { -+ && math::fabs((*fi)->pos.x - pos.x) < (xsize * 4 - 4) -+ && math::fabs((*fi)->pos.z - pos.z) < (zsize * 4 - 4)) { - canBuild = BUILDSQUARE_OPEN; - break; - } -@@ -589,7 +589,7 @@ - BuildInfo bi(cmd); - tempF1 = pos + dir * ((bi.pos.y - pos.y) / dir.y) - bi.pos; - -- if (bi.def && (bi.GetXSize() / 2) * SQUARE_SIZE > fabs(tempF1.x) && (bi.GetZSize() / 2) * SQUARE_SIZE > fabs(tempF1.z)) { -+ if (bi.def && (bi.GetXSize() / 2) * SQUARE_SIZE > math::fabs(tempF1.x) && (bi.GetZSize() / 2) * SQUARE_SIZE > math::fabs(tempF1.z)) { - return cmd; - } - } -diff -ru spring_89.0/rts/Sim/Weapons/BombDropper.cpp /home/svenstaro/src/spring/rts/Sim/Weapons/BombDropper.cpp ---- spring_89.0/rts/Sim/Weapons/BombDropper.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Weapons/BombDropper.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -62,7 +62,7 @@ - const float s = -owner->speed.y; - const float sq = (s - 2*d) / -((weaponDef->myGravity == 0) ? mapInfo->map.gravity : -(weaponDef->myGravity)); - if (sq > 0) { -- predict = s / ((weaponDef->myGravity == 0) ? mapInfo->map.gravity : -(weaponDef->myGravity)) + sqrt(sq); -+ predict = s / ((weaponDef->myGravity == 0) ? mapInfo->map.gravity : -(weaponDef->myGravity)) + math::sqrt(sq); - } else { - predict = 0; - } -diff -ru spring_89.0/rts/Sim/Weapons/Cannon.cpp /home/svenstaro/src/spring/rts/Sim/Weapons/Cannon.cpp ---- spring_89.0/rts/Sim/Weapons/Cannon.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Weapons/Cannon.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -169,7 +169,7 @@ - - int ttl = 0; - float sqSpeed2D = dir.SqLength2D() * projectileSpeed * projectileSpeed; -- int predict = (int)ceil((sqSpeed2D == 0) ? (-2 * projectileSpeed * dir.y / gravity) -+ int predict = (int)math::ceil((sqSpeed2D == 0) ? (-2 * projectileSpeed * dir.y / gravity) - : math::sqrt(diff.SqLength2D() / sqSpeed2D)); - if(weaponDef->flighttime > 0) { - ttl = weaponDef->flighttime; -@@ -216,9 +216,9 @@ - // try to cache results, sacrifice some (not much too much even for a pewee) accuracy - // it saves a dozen or two expensive calculations per second when 5 guardians - // are shooting at several slow- and fast-moving targets -- if (fabs(diff.x - lastDiff.x) < (SQUARE_SIZE / 4.0f) && -- fabs(diff.y - lastDiff.y) < (SQUARE_SIZE / 4.0f) && -- fabs(diff.z - lastDiff.z) < (SQUARE_SIZE / 4.0f)) { -+ if (math::fabs(diff.x - lastDiff.x) < (SQUARE_SIZE / 4.0f) && -+ math::fabs(diff.y - lastDiff.y) < (SQUARE_SIZE / 4.0f) && -+ math::fabs(diff.z - lastDiff.z) < (SQUARE_SIZE / 4.0f)) { - return lastDir; - } - -@@ -237,7 +237,7 @@ - // FIXME: temporary safeguards against FP overflow - // (introduced by extreme off-map unit positions; the term - // DFsq * Dsq * ... * dy should never even approach 1e38) -- if (Dsq < 1e12f && fabs(dy) < 1e6f) { -+ if (Dsq < 1e12f && math::fabs(dy) < 1e6f) { - const float root1 = v*v*v*v + 2.0f*v*v*g*dy - g*g*DFsq; - - if (root1 >= 0.0f) { -diff -ru spring_89.0/rts/Sim/Weapons/WeaponDefHandler.cpp /home/svenstaro/src/spring/rts/Sim/Weapons/WeaponDefHandler.cpp ---- spring_89.0/rts/Sim/Weapons/WeaponDefHandler.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/Sim/Weapons/WeaponDefHandler.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -126,9 +126,9 @@ - - // should really be tan but TA seem to cap it somehow - // should also be 7fff or ffff theoretically but neither seems good -- wd.accuracy = sin((accuracy) * PI / 0xafff); -- wd.sprayAngle = sin((sprayAngle) * PI / 0xafff); -- wd.movingAccuracy = sin((movingAccuracy) * PI / 0xafff); -+ wd.accuracy = math::sin((accuracy) * PI / 0xafff); -+ wd.sprayAngle = math::sin((sprayAngle) * PI / 0xafff); -+ wd.movingAccuracy = math::sin((movingAccuracy) * PI / 0xafff); - - wd.targetMoveError = wdTable.GetFloat("targetMoveError", 0.0f); - wd.leadLimit = wdTable.GetFloat("leadLimit", -1.0f); -@@ -375,7 +375,7 @@ - - - const float gd = max(30.0f, wd.damages[0] / 20.0f); -- const float defExpSpeed = (8.0f + (gd * 2.5f)) / (9.0f + (sqrt(gd) * 0.7f)) * 0.5f; -+ const float defExpSpeed = (8.0f + (gd * 2.5f)) / (9.0f + (math::sqrt(gd) * 0.7f)) * 0.5f; - wd.explosionSpeed = wdTable.GetFloat("explosionSpeed", defExpSpeed); - - // Dynamic Damage -@@ -461,7 +461,7 @@ - wd.hitSound.setVolume(0, 5.0f); - wd.hitSound.setVolume(1, 5.0f); - } else { -- float fireSoundVolume = sqrt(wd.damages[0] * 0.5f); -+ float fireSoundVolume = math::sqrt(wd.damages[0] * 0.5f); - - if (wd.type == "LaserCannon") { - fireSoundVolume *= 0.5f; -@@ -472,7 +472,7 @@ - if ((fireSoundVolume > 100.0f) && - ((wd.type == "MissileLauncher") || - (wd.type == "StarburstLauncher"))) { -- fireSoundVolume = 10.0f * sqrt(hitSoundVolume); -+ fireSoundVolume = 10.0f * math::sqrt(hitSoundVolume); - } - - if (wd.damageAreaOfEffect > 8.0f) { -@@ -564,7 +564,7 @@ - - if (inverted == true) { - for(int i = 0; i < damageArrayHandler->GetNumTypes(); ++i) { -- dynDamages[i] = damages[i] - (1 - pow(1 / range * travDist, exp)) * damages[i]; -+ dynDamages[i] = damages[i] - (1 - math::pow(1 / range * travDist, exp)) * damages[i]; - - if (damageMin > 0) - dynDamages[i] = max(damages[i] * ddmod, dynDamages[i]); -@@ -577,7 +577,7 @@ - } - else { - for(int i = 0; i < damageArrayHandler->GetNumTypes(); ++i) { -- dynDamages[i] = (1 - pow(1 / range * travDist, exp)) * damages[i]; -+ dynDamages[i] = (1 - math::pow(1 / range * travDist, exp)) * damages[i]; - - if (damageMin > 0) - dynDamages[i] = max(damages[i] * ddmod, dynDamages[i]); -diff -ru spring_89.0/rts/System/Matrix44f.cpp /home/svenstaro/src/spring/rts/System/Matrix44f.cpp ---- spring_89.0/rts/System/Matrix44f.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/System/Matrix44f.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -72,8 +72,8 @@ - - *this=Mul(rm); - */ -- const float sr = sin(rad); -- const float cr = cos(rad); -+ const float sr = math::sin(rad); -+ const float cr = math::cos(rad); - - float a=m[4]; - m[4] = cr*a - sr*m[8]; -@@ -107,8 +107,8 @@ - - *this = Mul(rm); - */ -- const float sr = sin(rad); -- const float cr = cos(rad); -+ const float sr = math::sin(rad); -+ const float cr = math::cos(rad); - - float a=m[0]; - m[0] = cr*a + sr*m[8]; -@@ -142,8 +142,8 @@ - - *this = Mul(rm); - */ -- const float sr = sin(rad); -- const float cr = cos(rad); -+ const float sr = math::sin(rad); -+ const float cr = math::cos(rad); - - float a=m[0]; - m[0] = cr*a - sr*m[4]; -@@ -165,8 +165,8 @@ - - void CMatrix44f::Rotate(float rad, const float3& axis) - { -- const float sr = sin(rad); -- const float cr = cos(rad); -+ const float sr = math::sin(rad); -+ const float cr = math::cos(rad); - - for(int a=0;a<3;++a){ - float3 v(m[a*4],m[a*4+1],m[a*4+2]); -diff -ru spring_89.0/rts/System/myMath.cpp /home/svenstaro/src/spring/rts/System/myMath.cpp ---- spring_89.0/rts/System/myMath.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/System/myMath.cpp 2012-07-13 06:34:43.072727160 +0200 -@@ -44,7 +44,7 @@ - } - - // Set single precision floating point math. -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - #if defined(__SUPPORT_SNAN__) && !defined(USE_GML) - streflop::feraiseexcept(streflop::FPU_Exceptions(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW)); - #endif -@@ -58,7 +58,7 @@ - #pragma omp parallel - { - //good_fpu_control_registers("OMP-Init"); -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - #if defined(__SUPPORT_SNAN__) && !defined(USE_GML) - streflop::feraiseexcept(streflop::FPU_Exceptions(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW)); - #endif -@@ -77,8 +77,8 @@ - for (int a = 0; a < NUM_HEADINGS; ++a) { - float ang = (a - (NUM_HEADINGS / 2)) * 2 * PI / NUM_HEADINGS; - float2 v; -- v.x = sin(ang); -- v.y = cos(ang); -+ v.x = math::sin(ang); -+ v.y = math::cos(ang); - headingToVectorTable[a] = v; - } - -@@ -107,9 +107,9 @@ - float3 ret; - float h = heading * TAANG2RAD; - float p = pitch * TAANG2RAD; -- ret.x = sin(h) * cos(p); -- ret.y = sin(p); -- ret.z = cos(h) * cos(p); -+ ret.x = math::sin(h) * math::cos(p); -+ ret.y = math::sin(p); -+ ret.z = math::cos(h) * math::cos(p); - return ret; - } - -@@ -138,7 +138,7 @@ - float3 dir(l2-l1); - float3 pdir(p-l1); - float length = dir.Length(); -- if (fabs(length) < 1e-4f) -+ if (math::fabs(length) < 1e-4f) - return l1; - float c = dir.dot(pdir) / length; - if (c < 0) c = 0; -diff -ru spring_89.0/rts/System/Net/Socket.cpp /home/svenstaro/src/spring/rts/System/Net/Socket.cpp ---- spring_89.0/rts/System/Net/Socket.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/System/Net/Socket.cpp 2012-07-13 06:34:42.939393819 +0200 -@@ -73,7 +73,7 @@ - //! (date of note: 08/05/10) - //! something in from_string() is invalidating the FPU flags - //! tested on win2k and linux (not happening there) -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - #endif - - return addr; -@@ -94,7 +94,7 @@ - #ifdef STREFLOP_H - //! (date of note: 08/22/10) - //! something in resolve() is invalidating the FPU flags -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - #endif - - return resolveIt; -diff -ru spring_89.0/rts/System/OffscreenGLContext.cpp /home/svenstaro/src/spring/rts/System/OffscreenGLContext.cpp ---- spring_89.0/rts/System/OffscreenGLContext.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/System/OffscreenGLContext.cpp 2012-07-13 06:34:42.939393819 +0200 -@@ -259,7 +259,7 @@ - #ifdef STREFLOP_H - // init streflop to make it available for synced computations, too - // redundant? threads copy the FPU state of their parent. -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - #endif - - try { -diff -ru spring_89.0/rts/System/Sound/SoundSource.h /home/svenstaro/src/spring/rts/System/Sound/SoundSource.h ---- spring_89.0/rts/System/Sound/SoundSource.h 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/System/Sound/SoundSource.h 2012-07-13 06:34:42.836060480 +0200 -@@ -7,7 +7,6 @@ - - #include <al.h> - #include <boost/noncopyable.hpp> --#include <boost/thread/recursive_mutex.hpp> - - class IAudioChannel; - class float3; -diff -ru spring_89.0/rts/System/SpringApp.cpp /home/svenstaro/src/spring/rts/System/SpringApp.cpp ---- spring_89.0/rts/System/SpringApp.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/System/SpringApp.cpp 2012-07-13 06:34:42.982727155 +0200 -@@ -385,7 +385,7 @@ - #ifdef STREFLOP_H - //! Something in SDL_SetVideoMode (OpenGL drivers?) messes with the FPU control word. - //! Set single precision floating point math. -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - #endif - - //! setup GL smoothing -@@ -1009,7 +1009,7 @@ - SDL_Event event; - - while (SDL_PollEvent(&event)) { -- streflop_init<streflop::Simple>(); // SDL_PollEvent may modify FPU flags -+ streflop::streflop_init<streflop::Simple>(); // SDL_PollEvent may modify FPU flags - input.PushEvent(event); - } - } -diff -ru spring_89.0/rts/System/Sync/FPUCheck.cpp /home/svenstaro/src/spring/rts/System/Sync/FPUCheck.cpp ---- spring_89.0/rts/System/Sync/FPUCheck.cpp 2012-07-10 00:10:08.000000000 +0200 -+++ /home/svenstaro/src/spring/rts/System/Sync/FPUCheck.cpp 2012-07-13 06:34:42.939393819 +0200 -@@ -85,7 +85,7 @@ - LOG_L(L_WARNING, "[%s] Sync warning: (env.x87_mode) FPUCW 0x%04X instead of 0x%04X or 0x%04X (\"%s\")", __FUNCTION__, fenv.x87_mode, x87_a, x87_b, text); - - // Set single precision floating point math. -- streflop_init<streflop::Simple>(); -+ streflop::streflop_init<streflop::Simple>(); - #if defined(__SUPPORT_SNAN__) && !defined(USE_GML) - streflop::feraiseexcept(streflop::FPU_Exceptions(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW)); - #endif diff --git a/community-staging/wxgtk2.9/PKGBUILD b/community-staging/wxgtk2.9/PKGBUILD deleted file mode 100644 index 96150f277..000000000 --- a/community-staging/wxgtk2.9/PKGBUILD +++ /dev/null @@ -1,33 +0,0 @@ -# $Id: PKGBUILD 74020 2012-07-18 03:42:17Z ebelanger $ -# Maintainer: Eric Bélanger <eric@archlinux.org> - -pkgname=wxgtk2.9 -pkgver=2.9.4 -pkgrel=1 -pkgdesc="GTK+ implementation of wxWidgets API for GUI" -arch=('i686' 'x86_64') -url="http://wxwidgets.org" -license=('custom:wxWindows') -depends=('gtk2' 'gstreamer0.10-base' 'libgl' 'libxxf86vm' 'libsm') -makedepends=('gstreamer0.10-base-plugins' 'gconf' 'mesa') -source=(http://downloads.sourceforge.net/wxwindows/wxWidgets-${pkgver}.tar.bz2 wxGTK-2.9.4-collision.patch) -sha1sums=('5a34ddf19d37c741f74652ee847df9568a8b81e1' - 'a76ccca4c2fad246c9aafbcc5a9697ebf35f33a3') - -build() { - cd "${srcdir}/wxWidgets-${pkgver}" - patch -p1 -i ../wxGTK-2.9.4-collision.patch - ./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode \ - --enable-graphics_ctx --enable-mediactrl --with-regex=builtin \ - --with-libpng=sys --with-libxpm=sys --with-libjpeg=sys --with-libtiff=sys \ - --disable-precomp-headers - make - make -C locale allmo -} - -package() { - cd "${srcdir}/wxWidgets-${pkgver}" - make DESTDIR="${pkgdir}" install - rm "${pkgdir}/usr/share/locale/it/LC_MESSAGES/wxmsw.mo" - install -D -m644 docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" -} diff --git a/community-staging/wxgtk2.9/wxGTK-2.9.4-collision.patch b/community-staging/wxgtk2.9/wxGTK-2.9.4-collision.patch deleted file mode 100644 index 4b1fb395e..000000000 --- a/community-staging/wxgtk2.9/wxGTK-2.9.4-collision.patch +++ /dev/null @@ -1,77 +0,0 @@ -Prevent file collisions between multiple installed SLOTs. - - - Don't install wxwin.m4. It is installed with app-admin/eselect-wxwidgets. - - Version the bakefile preset filenames. Unversioned symlinks to these files - are handled by eselect. - - Version wx-config and wxrc. The unversioned forms are wrapper scripts - installed with eselect-wxwidgets. - - Version wxstd.mo and modify AddStdCatalog to use it. - ---- a/Makefile.in -+++ b/Makefile.in -@@ -14076,10 +14076,10 @@ COND_wxUSE_REGEX_builtin___LIB_REGEX_p = \ - all: $(__wxregex___depname) $(__wxzlib___depname) $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(__wxexpat___depname) $(__wxscintilla___depname) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) $(__sound_sdl___depname) $(__wxrc___depname) $(__cocoa_res___depname) - - install: $(__install_wxregex___depname) $(__install_wxzlib___depname) $(__install_wxpng___depname) $(__install_wxjpeg___depname) $(__install_wxtiff___depname) $(__install_wxexpat___depname) $(__install_wxscintilla___depname) $(__install_monodll___depname) $(__install_monolib___depname) $(__install_basedll___depname) $(__install_baselib___depname) $(__install_netdll___depname) $(__install_netlib___depname) $(__install_coredll___depname) $(__install_corelib___depname) $(__install_advdll___depname) $(__install_advlib___depname) $(__install_mediadll___depname) $(__install_medialib___depname) $(__install_htmldll___depname) $(__install_htmllib___depname) $(__install_webviewdll___depname) $(__install_webviewlib___depname) $(__install_qadll___depname) $(__install_qalib___depname) $(__install_xmldll___depname) $(__install_xmllib___depname) $(__install_xrcdll___depname) $(__install_xrclib___depname) $(__install_auidll___depname) $(__install_auilib___depname) $(__install_ribbondll___depname) $(__install_ribbonlib___depname) $(__install_propgriddll___depname) $(__install_propgridlib___depname) $(__install_richtextdll___depname) $(__install_richtextlib___depname) $(__install_stcdll___depname) $(__install_stclib___depname) $(__install_gldll___depname) $(__install_gllib___depname) $(__install_sound_sdl___depname) $(__install_wxrc___depname) install-wxconfig locale_install locale_msw_install $(__cocoa_res_install___depname) -- $(INSTALL_DIR) $(DESTDIR)$(datadir)/aclocal -- (cd $(srcdir) ; $(INSTALL_DATA) wxwin.m4 $(DESTDIR)$(datadir)/aclocal) - $(INSTALL_DIR) $(DESTDIR)$(datadir)/bakefile/presets -- (cd $(srcdir)/build/bakefiles/wxpresets/presets ; $(INSTALL_DATA) wx.bkl wx_unix.bkl wx_win32.bkl wx_xrc.bkl wx_presets.py $(DESTDIR)$(datadir)/bakefile/presets) -+ (cd $(srcdir)/build/bakefiles/wxpresets/presets ; \ -+ for i in wx.bkl wx_unix.bkl wx_win32.bkl wx_xrc.bkl wx_presets.py ; do \ -+ $(INSTALL_DATA) $$i $(DESTDIR)$(datadir)/bakefile/presets/wx$(WX_RELEASE_NODOT)$${i##wx} ; done) - $(DYLIB_RPATH_INSTALL) - $(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/include/$(TOOLCHAIN_FULLNAME)/wx - for f in setup.h $(RCDEFS_H); do \ -@@ -14964,15 +14964,16 @@ install-wxconfig: - $(INSTALL_DIR) $(DESTDIR)$(bindir) - $(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/config - $(INSTALL_PROGRAM) lib/wx/config/$(TOOLCHAIN_FULLNAME) $(DESTDIR)$(libdir)/wx/config -- (cd $(DESTDIR)$(bindir) && rm -f wx-config && $(LN_S) $(DESTDIR)$(libdir)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config) -- -+ (cd $(DESTDIR)$(bindir) && rm -f wx-config-$(WX_RELEASE) \ -+ && $(LN_S) ../lib/wx/config/$(TOOLCHAIN_FULLNAME) wx-config-$(WX_RELEASE)) - locale_install: - $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale - for l in $(LOCALE_LINGUAS) ; do \ - $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l ; \ - $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES ; \ - if test -f $(srcdir)/locale/$$l.mo ; then \ -- $(INSTALL_DATA) $(srcdir)/locale/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd.mo ; \ -+ $(INSTALL_DATA) $(srcdir)/locale/$$l.mo \ -+ $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd$(WX_RELEASE_NODOT).mo ; \ - fi ; \ - done - ---- a/build/bakefiles/wx.bkl -+++ b/build/bakefiles/wx.bkl -@@ -138,7 +138,7 @@ - <using module="gettext"/> - <gettext-catalogs id="locale"> - <srcdir>$(SRCDIR)/locale</srcdir> -- <catalog-name>wxstd</catalog-name> -+ <catalog-name>wxstd$(WX_RELEASE_NODOT)</catalog-name> - <linguas> - ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk - zh zh_CN zh_TW ---- a/src/common/translation.cpp -+++ b/src/common/translation.cpp -@@ -1302,7 +1302,7 @@ wxArrayString wxTranslations::GetAvailableTranslations(const wxString& domain) c - - bool wxTranslations::AddStdCatalog() - { -- if ( !AddCatalog(wxS("wxstd")) ) -+ if ( !AddCatalog(wxS("wxstd" wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION))) ) - return false; - - // there may be a catalog with toolkit specific overrides, it is not ---- a/utils/wxrc/Makefile.in -+++ b/utils/wxrc/Makefile.in -@@ -124,7 +124,6 @@ distclean: clean - @COND_USE_XRC_1@ rm -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) $(DESTDIR)$(bindir)/wxrc-$(WX_RELEASE) - @COND_USE_XRC_1@ $(INSTALL_PROGRAM) wxrc$(EXEEXT) $(DESTDIR)$(bindir) - @COND_USE_XRC_1@ mv -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) $(DESTDIR)$(bindir)/wxrc-$(WX_RELEASE) --@COND_USE_XRC_1@ (cd $(DESTDIR)$(bindir) && $(LN_S) wxrc-$(WX_RELEASE) wxrc$(EXEEXT)) - - @COND_USE_XRC_1@uninstall_wxrc: - @COND_USE_XRC_1@ rm -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) |