games/glest: Removed (replaced by glestae)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
parent
47851229ec
commit
1df77dab71
|
@ -1,28 +0,0 @@
|
||||||
Glest is a free 3D real-time strategy game, where you control the armies of
|
|
||||||
two different factions: Tech, which is mainly composed of warriors and
|
|
||||||
mechanical devices, and Magic, that prefers mages and summoned creatures
|
|
||||||
in the battlefield.
|
|
||||||
|
|
||||||
This requires glest-data, xerces-c, lua, jam, and OpenAL.
|
|
||||||
Optional build requirements: wxPython.
|
|
||||||
Optional addons: glest-megapack.
|
|
||||||
|
|
||||||
According to the manpage, you should go into the Options menu and run
|
|
||||||
"Auto config" before the first time you play the game.
|
|
||||||
|
|
||||||
If you'd like to compile wxPython to have the additional map editor
|
|
||||||
(ie. glest_editor) then pass HAVE_WX=yes to the script:
|
|
||||||
HAVE_WX=yes ./glest.SlackBuild
|
|
||||||
|
|
||||||
The map editor will only build with wxPython. If you pass HAVE_WX=yes
|
|
||||||
and have wxGTK installed then the slackbuild will fail.
|
|
||||||
|
|
||||||
Additional translations can be added to glest from:
|
|
||||||
http://www.glest.org/files/contrib/translations/
|
|
||||||
Just unzip the file(s) and put the appropriate *.lng file into
|
|
||||||
/usr/share/glest/data/lang/ directory. It will be automatically picked
|
|
||||||
up at next game play.
|
|
||||||
|
|
||||||
Note: According to the readme_linux.txt file, glest doesn't seem to work
|
|
||||||
with the mesa drivers. Using the ATI or NVIDIA drivers will work. For any
|
|
||||||
additional game-specific issues, see readme_linux.txt in the docs directory.
|
|
|
@ -1,4 +0,0 @@
|
||||||
if [ -x /usr/bin/update-desktop-database ]; then
|
|
||||||
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Version=1.0
|
|
||||||
Name=Glest Map Editor
|
|
||||||
Comment=Glest map editor
|
|
||||||
Exec=glest_editor
|
|
||||||
Icon=glest
|
|
||||||
Terminal=0
|
|
||||||
Type=Application
|
|
||||||
Categories=Application;Game;StrategyGame;
|
|
||||||
StartupNotify=false
|
|
|
@ -1,10 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Version=1.0
|
|
||||||
Name=Glest g3d Viewer
|
|
||||||
Comment=Glest g3d viewer
|
|
||||||
Exec=glest_g3dviewer
|
|
||||||
Icon=glest
|
|
||||||
Terminal=false
|
|
||||||
Type=Application
|
|
||||||
Categories=Application;Game;StrategyGame;
|
|
||||||
StartupNotify=false
|
|
|
@ -1,127 +0,0 @@
|
||||||
.\" Hey, EMACS: -*- nroff -*-
|
|
||||||
.TH GLEST 6 "May 4, 2008"
|
|
||||||
.SH NAME
|
|
||||||
glest \- A free 3d real-time customizable strategy game.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B glest
|
|
||||||
.br
|
|
||||||
.PP
|
|
||||||
.B It is recommented to perform Config -> Auto Config before starting to play.
|
|
||||||
.SH DESCRIPTION
|
|
||||||
This manual page documents briefly the
|
|
||||||
.B glest
|
|
||||||
game commands and configuration.
|
|
||||||
.PP
|
|
||||||
|
|
||||||
.SH CONTROLS
|
|
||||||
.TP
|
|
||||||
.B Camera
|
|
||||||
.br
|
|
||||||
m => toggle camera mode (game mode and free mode)
|
|
||||||
.br
|
|
||||||
w => move camera up (only on free camera more)
|
|
||||||
.br
|
|
||||||
s => move camera down (only on free camera more)
|
|
||||||
.br
|
|
||||||
a => rotate camera left (only on free camera more)
|
|
||||||
.br
|
|
||||||
d => rotate camera right (only on free camera more)
|
|
||||||
.br
|
|
||||||
up arrow or mouse on top => move camera forward
|
|
||||||
.br
|
|
||||||
down arrow or mouse on bottom => move camera backward
|
|
||||||
.br
|
|
||||||
left arrow or mouse on left => move camera left
|
|
||||||
.br
|
|
||||||
right arrow or mouse on right => move camera right
|
|
||||||
.TP
|
|
||||||
.B Orders and Unit selection
|
|
||||||
.br
|
|
||||||
left mouse button => select or deselect units
|
|
||||||
.br
|
|
||||||
shift + left mouse button => add unit to selection
|
|
||||||
.br
|
|
||||||
control + left mouse button => remove unit from selection
|
|
||||||
.br
|
|
||||||
left mouse double click => select nearby units of this type
|
|
||||||
.br
|
|
||||||
right mouse button => auto order
|
|
||||||
.br
|
|
||||||
menu click => activate order
|
|
||||||
.br
|
|
||||||
left mouse when order is activated => give order
|
|
||||||
.br
|
|
||||||
right mouse when order is activated => cancel state
|
|
||||||
.br
|
|
||||||
number => recall group
|
|
||||||
.br
|
|
||||||
control + number => assign group
|
|
||||||
.TP
|
|
||||||
.B Other Keys
|
|
||||||
.br
|
|
||||||
c => switch display color
|
|
||||||
.br
|
|
||||||
- + => adjust game speed
|
|
||||||
.br
|
|
||||||
p => pause game
|
|
||||||
.br
|
|
||||||
t => save screen to TGA file
|
|
||||||
|
|
||||||
|
|
||||||
.SH CONFIGURATION
|
|
||||||
.TP
|
|
||||||
.B Glest can be configured in three ways:
|
|
||||||
.br
|
|
||||||
- in-game config menu: basic parameters
|
|
||||||
.br
|
|
||||||
- configuration tool: advanced parameters
|
|
||||||
.br
|
|
||||||
- glest.ini: all parameters
|
|
||||||
|
|
||||||
.SH VIDEO CARD HINTS
|
|
||||||
.TP
|
|
||||||
.B Auto config.
|
|
||||||
.br
|
|
||||||
The first time you run the game it will try to detect the graphic settings most
|
|
||||||
suitable for your video card. It's highly recommended that you don't change them
|
|
||||||
unless you really know what you are doing. If you change the settings and you
|
|
||||||
want to reset to the recommended ones, you can do it by using the auto config
|
|
||||||
button in the in-game config menu.
|
|
||||||
.TP
|
|
||||||
.B Required card features.
|
|
||||||
.br
|
|
||||||
The game requires either OpenGL 1.4 or OpenGL 1.3 plus the GL_ARB_env_crossbar
|
|
||||||
extesion. Most video cards with recent drivers support this features. You can
|
|
||||||
bypass the feature check by replacing the "CheckGlCaps=1" line in glest.ini by
|
|
||||||
"CheckGlCaps=0", but the game may crash or have graphics errors.
|
|
||||||
.TP
|
|
||||||
.B ATI card problems.
|
|
||||||
.br
|
|
||||||
It seems to be bug in some ATI OpenGL drivers that makes the game crash with
|
|
||||||
certain card/driver configurations when using more than 1 light. Auto config will
|
|
||||||
detect this issue and turn off all secondary lights when it detects an ATI card.
|
|
||||||
If you still want to try running the game using more than 1 light you can change
|
|
||||||
this setting in the in-game config menu.
|
|
||||||
.TP
|
|
||||||
.B Shadows.
|
|
||||||
.br
|
|
||||||
The game features real-time shadows using different algorithms. 1) Projected: Fast
|
|
||||||
shadows but they provide unit over terrain shadows only, and can produce incorrect
|
|
||||||
shadows in some circumstances. 2) Shadow mapping: Slow shadows but they are
|
|
||||||
always correct and provide everything over everything shadows. In ATI cards they
|
|
||||||
look aliased. Both types of shadows require a video card with 3 texture unit
|
|
||||||
support. Auto config will set the most suitable shadow mode for your video card.
|
|
||||||
.TP
|
|
||||||
.B 3D textures
|
|
||||||
.br
|
|
||||||
The game uses 3D textures for some effects like animated water. Some old video cards
|
|
||||||
(ie: GeForceMX) don't support this feature by hardware and the game runs really
|
|
||||||
slow when the camera is near a river. Auto config will detect this and disable
|
|
||||||
3D textures when needed.
|
|
||||||
|
|
||||||
|
|
||||||
.SH AUTHOR
|
|
||||||
glest was written by Martino Figueroa et al (see readme.txt).
|
|
||||||
.PP
|
|
||||||
This manual page was written by Giuseppe Borzi <gborzi@ieee.org>,
|
|
||||||
for the Debian project (but may be used by others).
|
|
|
@ -1,178 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Slackware build script for glest
|
|
||||||
|
|
||||||
# Copyright 2009 Larry Hajali <larryhaja[at]gmail[dot]com>
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use of this script, with or without modification, is
|
|
||||||
# permitted provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of this script must retain the above copyright
|
|
||||||
# notice, this list of conditions and the following disclaimer.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
||||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
||||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
||||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
||||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
PRGNAM=glest
|
|
||||||
VERSION=${VERSION:-3.2.2}
|
|
||||||
BUILD=${BUILD:-2}
|
|
||||||
TAG=${TAG:-_SBo}
|
|
||||||
|
|
||||||
# Automatically determine the architecture we're building on:
|
|
||||||
if [ -z "$ARCH" ]; then
|
|
||||||
case "$( uname -m )" in
|
|
||||||
i?86) ARCH=i486 ;;
|
|
||||||
arm*) ARCH=arm ;;
|
|
||||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
|
||||||
*) ARCH=$( uname -m ) ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
CWD=$(pwd)
|
|
||||||
TMP=${TMP:-/tmp/SBo}
|
|
||||||
PKG=$TMP/package-$PRGNAM
|
|
||||||
OUTPUT=${OUTPUT:-/tmp}
|
|
||||||
|
|
||||||
# Decide if we install the editor as well. Default is no.
|
|
||||||
HAVE_WX=${HAVE_WX:-no}
|
|
||||||
|
|
||||||
if [ "$ARCH" = "i486" ]; then
|
|
||||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
|
||||||
LIBDIRSUFFIX=""
|
|
||||||
elif [ "$ARCH" = "i686" ]; then
|
|
||||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
|
||||||
LIBDIRSUFFIX=""
|
|
||||||
elif [ "$ARCH" = "x86_64" ]; then
|
|
||||||
SLKCFLAGS="-O2 -fPIC"
|
|
||||||
LIBDIRSUFFIX="64"
|
|
||||||
else
|
|
||||||
SLKCFLAGS="-O2"
|
|
||||||
LIBDIRSUFFIX=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
rm -rf $PKG
|
|
||||||
mkdir -p $TMP $PKG $OUTPUT
|
|
||||||
cd $TMP
|
|
||||||
rm -rf $PRGNAM-$VERSION
|
|
||||||
mkdir $PRGNAM-$VERSION
|
|
||||||
cd $PRGNAM-$VERSION
|
|
||||||
unzip $CWD/${PRGNAM}_source_${VERSION}.zip
|
|
||||||
|
|
||||||
# Fix up files so they aren't in MS format.
|
|
||||||
# Taken from the glest slackbuild available
|
|
||||||
# at http://ftp.darkstarlinux.ro/.
|
|
||||||
find source mk docs -type f | while read FILE; do
|
|
||||||
echo $FILE
|
|
||||||
sed \
|
|
||||||
-e 's|\x0D$||g' \
|
|
||||||
< $FILE > $FILE.new
|
|
||||||
mv -f $FILE.new $FILE
|
|
||||||
done
|
|
||||||
|
|
||||||
chown -R root:root .
|
|
||||||
find . \
|
|
||||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
|
||||||
-exec chmod 755 {} \; -o \
|
|
||||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
|
||||||
-exec chmod 644 {} \;
|
|
||||||
|
|
||||||
# Allow glest to be built against xerces-c vs. 2.x or 3.x.
|
|
||||||
# From the gentoo guys. http://bugs.gentoo.org/show_bug.cgi?id=263217
|
|
||||||
patch -p0 < $CWD/patches/glest-xerces-c.patch
|
|
||||||
# Fix for the home directory. This gets rid of the wrapper script.
|
|
||||||
patch -p0 < $CWD/patches/glest-home-directory.patch
|
|
||||||
# Add support for the glest_g3dviewer for linux.
|
|
||||||
patch -p0 < $CWD/patches/g3d_viewer.patch
|
|
||||||
# Fix glest to build against newer glibc versions.
|
|
||||||
patch -p0 < $CWD/patches/glest-3.2.2-glibc210.patch
|
|
||||||
# Fix an innocuous version mismatch in configure.ac.
|
|
||||||
sed -i "s|3.1.2|${VERSION}|" mk/linux/configure.ac
|
|
||||||
# Fix the config file for languages.
|
|
||||||
sed -i 's|\.lng||' mk/linux/$PRGNAM.ini 2>/dev/null || true
|
|
||||||
|
|
||||||
# Determine if we compile against wxPython for the optional map editor.
|
|
||||||
if [ "$HAVE_WX" == "yes" ]; then
|
|
||||||
unset USE_WX
|
|
||||||
else
|
|
||||||
USE_WX="--with-wx-config=disabled_wx"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd mk/linux
|
|
||||||
|
|
||||||
if [ ! -f configure ]; then
|
|
||||||
chmod a+x autogen.sh
|
|
||||||
./autogen.sh
|
|
||||||
else
|
|
||||||
chmod +x configure
|
|
||||||
fi
|
|
||||||
|
|
||||||
CFLAGS="$SLKCFLAGS" \
|
|
||||||
CXXFLAGS="$SLKCFLAGS" \
|
|
||||||
./configure \
|
|
||||||
--prefix=/usr \
|
|
||||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
|
||||||
--enable-debug=no \
|
|
||||||
--with-vorbis=/usr \
|
|
||||||
--with-ogg=/usr \
|
|
||||||
--with-x \
|
|
||||||
--program-prefix="" \
|
|
||||||
--program-suffix="" \
|
|
||||||
$USE_WX \
|
|
||||||
--build=$ARCH-slackware-linux
|
|
||||||
|
|
||||||
jam -q
|
|
||||||
|
|
||||||
cd -
|
|
||||||
|
|
||||||
# Glest doesn't come with a nice installer. So we'll do it ourselves.
|
|
||||||
install -d -m 0755 $PKG/usr/{bin,share/$PRGNAM}
|
|
||||||
install -m 0755 mk/linux/$PRGNAM $PKG/usr/bin
|
|
||||||
install -m 0644 mk/linux/$PRGNAM.ini $PKG/usr/share/$PRGNAM
|
|
||||||
cp -ar source/glest_game/* $PKG/usr/share/$PRGNAM
|
|
||||||
|
|
||||||
# Install the editor if the user requests it.
|
|
||||||
if [ "${HAVE_WX}" == "yes" ]; then
|
|
||||||
install -m 0755 mk/linux/${PRGNAM}_editor $PKG/usr/bin
|
|
||||||
install -m 0755 mk/linux/${PRGNAM}_g3dviewer $PKG/usr/bin
|
|
||||||
fi
|
|
||||||
|
|
||||||
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
|
||||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
|
||||||
|
|
||||||
mkdir -p $PKG/usr/man/man6
|
|
||||||
install -m 0644 $CWD/$PRGNAM.6 $PKG/usr/man/man6
|
|
||||||
gzip -9 $PKG/usr/man/man?/*.?
|
|
||||||
|
|
||||||
# Make a desktop item.
|
|
||||||
mkdir -p $PKG/usr/share/{applications,pixmaps}
|
|
||||||
install -m 0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/
|
|
||||||
install -m 0644 $CWD/$PRGNAM.xpm $PKG/usr/share/pixmaps/
|
|
||||||
if [ "${HAVE_WX}" == "yes" ]; then
|
|
||||||
install -m 0644 $CWD/$PRGNAM-editor.desktop \
|
|
||||||
$PKG/usr/share/applications/
|
|
||||||
install -m 0644 $CWD/$PRGNAM-g3d-viewer.desktop \
|
|
||||||
$PKG/usr/share/applications/
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
||||||
cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
|
|
||||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
||||||
chmod 0644 $PKG/usr/doc/$PRGNAM-$VERSION/*
|
|
||||||
|
|
||||||
mkdir -p $PKG/install
|
|
||||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
||||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
||||||
|
|
||||||
cd $PKG
|
|
||||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
|
|
@ -1,10 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Version=1.0
|
|
||||||
Name=Glest
|
|
||||||
Comment=Cross-platform 3D realtime strategy game
|
|
||||||
Exec=glest
|
|
||||||
Icon=glest
|
|
||||||
Terminal=0
|
|
||||||
Type=Application
|
|
||||||
Categories=Application;Game;StrategyGame;
|
|
||||||
StartupNotify=false
|
|
|
@ -1,10 +0,0 @@
|
||||||
PRGNAM="glest"
|
|
||||||
VERSION="3.2.2"
|
|
||||||
HOMEPAGE="http://glest.org/en/index.php"
|
|
||||||
DOWNLOAD="http://downloads.sourceforge.net/glest/glest_source_3.2.2.zip"
|
|
||||||
MD5SUM="1e961f49c1fb0e59e1e1483d66099a55"
|
|
||||||
DOWNLOAD_x86_64=""
|
|
||||||
MD5SUM_x86_64=""
|
|
||||||
MAINTAINER="Larry Hajali"
|
|
||||||
EMAIL="larryhaja[at]gmail[dot]com"
|
|
||||||
APPROVED="rworkman"
|
|
|
@ -1,309 +0,0 @@
|
||||||
/* XPM */
|
|
||||||
static char *glest-2[] = {
|
|
||||||
/* columns rows colors chars-per-pixel */
|
|
||||||
"48 48 255 2",
|
|
||||||
" c #101004",
|
|
||||||
". c #191203",
|
|
||||||
"X c #1A1807",
|
|
||||||
"o c #1C292A",
|
|
||||||
"O c #230501",
|
|
||||||
"+ c #231800",
|
|
||||||
"@ c #221A08",
|
|
||||||
"# c #23180D",
|
|
||||||
"$ c #2A2008",
|
|
||||||
"% c #2F240E",
|
|
||||||
"& c #292110",
|
|
||||||
"* c #2A2417",
|
|
||||||
"= c #332506",
|
|
||||||
"- c #39290B",
|
|
||||||
"; c #312710",
|
|
||||||
": c #322A19",
|
|
||||||
"> c #3B3016",
|
|
||||||
", c #322C20",
|
|
||||||
"< c #3B3220",
|
|
||||||
"1 c gray20",
|
|
||||||
"2 c #162970",
|
|
||||||
"3 c #354A3A",
|
|
||||||
"4 c #3F433C",
|
|
||||||
"5 c #2D4057",
|
|
||||||
"6 c #24505E",
|
|
||||||
"7 c #3B4B59",
|
|
||||||
"8 c #35476D",
|
|
||||||
"9 c #3C5A7B",
|
|
||||||
"0 c #4E3706",
|
|
||||||
"q c #48350C",
|
|
||||||
"w c #423210",
|
|
||||||
"e c #423519",
|
|
||||||
"r c #4A3A1A",
|
|
||||||
"t c #523D0E",
|
|
||||||
"y c #593D00",
|
|
||||||
"u c #533A1D",
|
|
||||||
"i c #423821",
|
|
||||||
"p c #493B20",
|
|
||||||
"a c #4A3E22",
|
|
||||||
"s c #6D3E09",
|
|
||||||
"d c #4C4C0C",
|
|
||||||
"f c #5E4207",
|
|
||||||
"g c #52421C",
|
|
||||||
"h c #5A4313",
|
|
||||||
"j c #4F4329",
|
|
||||||
"k c #4E4C38",
|
|
||||||
"l c #514223",
|
|
||||||
"z c #544927",
|
|
||||||
"x c #5C4A21",
|
|
||||||
"c c #5A4B28",
|
|
||||||
"v c #5A4D30",
|
|
||||||
"b c #5B5738",
|
|
||||||
"n c #694309",
|
|
||||||
"m c #634911",
|
|
||||||
"M c #614B1A",
|
|
||||||
"N c #6B521B",
|
|
||||||
"B c #744C0C",
|
|
||||||
"V c #7A510F",
|
|
||||||
"C c #735E1E",
|
|
||||||
"Z c #645328",
|
|
||||||
"A c #6A5420",
|
|
||||||
"S c #6C572A",
|
|
||||||
"D c #625436",
|
|
||||||
"F c #645430",
|
|
||||||
"G c #6F5B31",
|
|
||||||
"H c #6B5D3B",
|
|
||||||
"J c #725B2A",
|
|
||||||
"K c #65670B",
|
|
||||||
"L c #736C11",
|
|
||||||
"P c #756924",
|
|
||||||
"I c #766132",
|
|
||||||
"U c #786339",
|
|
||||||
"Y c #7E693A",
|
|
||||||
"T c #485255",
|
|
||||||
"R c #5A5256",
|
|
||||||
"E c #475560",
|
|
||||||
"W c #58716D",
|
|
||||||
"Q c #655A62",
|
|
||||||
"! c #696450",
|
|
||||||
"~ c #756440",
|
|
||||||
"^ c #7D6B42",
|
|
||||||
"/ c #777355",
|
|
||||||
"( c #64737B",
|
|
||||||
") c #7C706F",
|
|
||||||
"_ c #1B48AF",
|
|
||||||
"` c #2D4B9B",
|
|
||||||
"' c #0F5AE3",
|
|
||||||
"] c #2F76D4",
|
|
||||||
"[ c #3366CC",
|
|
||||||
"{ c #3C77FC",
|
|
||||||
"} c #4F6D87",
|
|
||||||
"| c #5C7387",
|
|
||||||
" . c #597893",
|
|
||||||
".. c #456BAA",
|
|
||||||
"X. c #4F6ABE",
|
|
||||||
"o. c #6076A7",
|
|
||||||
"O. c #4177C7",
|
|
||||||
"+. c #6C7ACA",
|
|
||||||
"@. c #3F9DFA",
|
|
||||||
"#. c #5B859B",
|
|
||||||
"$. c #52949C",
|
|
||||||
"%. c #6A869E",
|
|
||||||
"&. c #7F8D9B",
|
|
||||||
"*. c #6F8FA8",
|
|
||||||
"=. c #7A94B0",
|
|
||||||
"-. c #4E83E0",
|
|
||||||
";. c #55A1FF",
|
|
||||||
":. c #6C96C1",
|
|
||||||
">. c #7B8FD7",
|
|
||||||
",. c #739BE2",
|
|
||||||
"<. c #70ABE9",
|
|
||||||
"1. c #73A8F7",
|
|
||||||
"2. c #78AFFF",
|
|
||||||
"3. c #73BAFF",
|
|
||||||
"4. c #7CCFFF",
|
|
||||||
"5. c #804D02",
|
|
||||||
"6. c #8E5103",
|
|
||||||
"7. c #905A15",
|
|
||||||
"8. c #8D6100",
|
|
||||||
"9. c #996600",
|
|
||||||
"0. c #9C7F1D",
|
|
||||||
"q. c #896C2D",
|
|
||||||
"w. c #A54C00",
|
|
||||||
"e. c #B34100",
|
|
||||||
"r. c #A86A00",
|
|
||||||
"t. c #B16704",
|
|
||||||
"y. c #846F42",
|
|
||||||
"u. c #857249",
|
|
||||||
"i. c #89754A",
|
|
||||||
"p. c #857D55",
|
|
||||||
"a. c #CC6600",
|
|
||||||
"s. c #C47700",
|
|
||||||
"d. c #D77B00",
|
|
||||||
"f. c #8C8D02",
|
|
||||||
"g. c #828415",
|
|
||||||
"h. c #8A832C",
|
|
||||||
"j. c #838A37",
|
|
||||||
"k. c #9B8238",
|
|
||||||
"l. c #A2830A",
|
|
||||||
"z. c #A09B02",
|
|
||||||
"x. c #A99317",
|
|
||||||
"c. c #B08C07",
|
|
||||||
"v. c #B88101",
|
|
||||||
"b. c #B4900B",
|
|
||||||
"n. c #A2973F",
|
|
||||||
"m. c #B2AA00",
|
|
||||||
"M. c #ADA224",
|
|
||||||
"N. c #B1A733",
|
|
||||||
"B. c #998D58",
|
|
||||||
"V. c #8D8E79",
|
|
||||||
"C. c #96AA55",
|
|
||||||
"Z. c #AD964B",
|
|
||||||
"A. c #B29C5F",
|
|
||||||
"S. c #A6997C",
|
|
||||||
"D. c #B2A157",
|
|
||||||
"F. c #B1AB77",
|
|
||||||
"G. c #C08600",
|
|
||||||
"H. c #CF8F0A",
|
|
||||||
"J. c #C09100",
|
|
||||||
"K. c #C0941A",
|
|
||||||
"L. c #DC8300",
|
|
||||||
"P. c #CC9933",
|
|
||||||
"I. c #C1BD06",
|
|
||||||
"U. c #D4AD02",
|
|
||||||
"Y. c #E09F00",
|
|
||||||
"T. c #ED9A00",
|
|
||||||
"R. c #F28300",
|
|
||||||
"E. c #F89D02",
|
|
||||||
"W. c #FF9900",
|
|
||||||
"Q. c #F7AC00",
|
|
||||||
"!. c #FFAF00",
|
|
||||||
"~. c #F5B902",
|
|
||||||
"^. c #F5B828",
|
|
||||||
"/. c #C0A659",
|
|
||||||
"(. c #D0CD0A",
|
|
||||||
"). c #DDC108",
|
|
||||||
"_. c #D8C01E",
|
|
||||||
"`. c #DBD406",
|
|
||||||
"'. c #CCCC33",
|
|
||||||
"]. c #DEDA3A",
|
|
||||||
"[. c #DAE128",
|
|
||||||
"{. c #EFCF00",
|
|
||||||
"}. c #FFC000",
|
|
||||||
"|. c #FFCC00",
|
|
||||||
" X c #FCCF13",
|
|
||||||
".X c #FBDC18",
|
|
||||||
"XX c #F8D83A",
|
|
||||||
"oX c #E3E104",
|
|
||||||
"OX c #FFE000",
|
|
||||||
"+X c #FDF200",
|
|
||||||
"@X c yellow",
|
|
||||||
"#X c #F4F711",
|
|
||||||
"$X c #FDF418",
|
|
||||||
"%X c #E3E123",
|
|
||||||
"&X c #FFFF33",
|
|
||||||
"*X c #D2C370",
|
|
||||||
"=X c #D9E273",
|
|
||||||
"-X c #F4CB52",
|
|
||||||
";X c #F9F642",
|
|
||||||
":X c #FFF246",
|
|
||||||
">X c #F9E965",
|
|
||||||
",X c #858F90",
|
|
||||||
"<X c #909E88",
|
|
||||||
"1X c gray60",
|
|
||||||
"2X c #949FAC",
|
|
||||||
"3X c #9CB184",
|
|
||||||
"4X c #89A1AD",
|
|
||||||
"5X c #94A4B5",
|
|
||||||
"6X c #9BB7BC",
|
|
||||||
"7X c #AA9F86",
|
|
||||||
"8X c #AEA38A",
|
|
||||||
"9X c #A5A59F",
|
|
||||||
"0X c #B4A78C",
|
|
||||||
"qX c #B5AD94",
|
|
||||||
"wX c #BBAF96",
|
|
||||||
"eX c #BFBC8A",
|
|
||||||
"rX c #BFB69F",
|
|
||||||
"tX c #B2B2AD",
|
|
||||||
"yX c #B2B3B7",
|
|
||||||
"uX c #8898C5",
|
|
||||||
"iX c #81A4DE",
|
|
||||||
"pX c #97ABD5",
|
|
||||||
"aX c #85B2FF",
|
|
||||||
"sX c #93A8E5",
|
|
||||||
"dX c #91BEE0",
|
|
||||||
"fX c #91B6F0",
|
|
||||||
"gX c #AFBCD7",
|
|
||||||
"hX c #99CCFF",
|
|
||||||
"jX c #94DCFF",
|
|
||||||
"kX c #BAC5D4",
|
|
||||||
"lX c #BED2D2",
|
|
||||||
"zX c #A6CDFF",
|
|
||||||
"xX c #B3C5E0",
|
|
||||||
"cX c #A6E3FF",
|
|
||||||
"vX c #A6F0F3",
|
|
||||||
"bX c #AFFFFF",
|
|
||||||
"nX c #BDE3FF",
|
|
||||||
"mX c #CFCB91",
|
|
||||||
"MX c #CFE8A6",
|
|
||||||
"NX c #D9F6B6",
|
|
||||||
"BX c #EFEE84",
|
|
||||||
"VX c #FFFF8E",
|
|
||||||
"CX c #F2F199",
|
|
||||||
"ZX c #EFF1B5",
|
|
||||||
"AX c #FFFFA3",
|
|
||||||
"SX c gray80",
|
|
||||||
"DX c #CADFF9",
|
|
||||||
"FX c #DAE6CE",
|
|
||||||
"GX c #CCFFFF",
|
|
||||||
"HX c #D7EAFF",
|
|
||||||
"JX c #D7FFFF",
|
|
||||||
"KX c #FFFFCC",
|
|
||||||
"LX c #E6FFE6",
|
|
||||||
"PX c #EDFFFF",
|
|
||||||
"IX c gray100",
|
|
||||||
/* pixels */
|
|
||||||
"wXBXAXZXqXwXrXrXrX0X0XwXwXrXrX0XrXrXrXrX7XwXwX0XrXrXrXrXrXqX7XwXwXrXrXwXwX8X8XwXwX0X0XwXrXwXp.~ ",
|
|
||||||
"k.^.KXFXN N M I u.^ f y y N J y y m U u.A U i.f J Y Y ^ ^ i.Y J J i.i.I U I J Y J N U N N ^ I r ",
|
|
||||||
"-XVXKX>XN.S h S U H D ~ N I i.y.A A t D Z A i.A A A x r h u.i.A y y S H D ~ J u.U y Y u.t c H @ ",
|
|
||||||
"mXmX X!.XXN.0 G ~ z b.D S A i.i.i.U q b.z m A N m G c b.v u.u.Y J m m z b.D ^ i.i.N J u.c b.D : ",
|
|
||||||
"S.h 7.L.t. Xx.Z F g r x y y i.Y Y J x D H I Y Y A u.~ g G I N y.i.I m h q t u.i.y.J J I G D x * ",
|
|
||||||
"0XG M V t.W.XXx.& & & & : ; > > > $ $ : $ ; < : : ; $ $ : $ ; < % > < < $ : < % $ : & N h G M & ",
|
|
||||||
"wXu.A 0 0.T.d. Xn.> > > i i i p p p > a > - j p p p > - a - - j > > - a a > j a = = & Y k.Y u.: ",
|
|
||||||
"0Xu.S 0 h B t.R.;Xh.e e p p p p l z z z z a w a a c c w z r w c c r l = v - r l p $ m `.I.M S : ",
|
|
||||||
"7Xy.y.~ Z & V Q.E.~.x.p.v p l p.B.F l l l l l l l l l z z z - z z l r w l - - r L m.@XoXm t t & ",
|
|
||||||
"0XI ^ ^ M & > B t.w.>XAXmXp.*XF.D p l l l l a r - r p w j j - j j r w - a z L I.OXOX+XC p g x @ ",
|
|
||||||
"0X0 c H U % e > s -XCXF.BXCXp.e a a a j a a g h C n V n t g r r e j - - L (.@X|.d.OXK a j - q + ",
|
|
||||||
"qXg c.D ^ : - p h VXeXBXAXlXk > p p - g g.I.).{.~.~.E.E.R.d.s.r.6.s 0.`.@X|.v.e.}.I.. - j l.v & ",
|
|
||||||
"qX~ g g N : p w l A.BXAX} o.kXk ; g z.oX@X|.T.s.r.8.8.l.v.v.L.R.R.R.}.}.d.` 2 Q.+X. X = w c F & ",
|
|
||||||
"7XI G M m ; a a r u =XS.} | =.6Xg.oX@X!.r.G ( *.iXfXzXnXhX<.uX&.V.n.V y.3.' s.@Xd X # t h M h $ ",
|
|
||||||
"0Xy.y.A m % e v l q.*Xi 4 %.W '.@X}.7.9 ,.nXIXIXIXIXIXIXIXIXIXPXJXJXDXPX3.t.+Xf.X * @ Z ^ y.J @ ",
|
|
||||||
"qXY Y y.J % > > z A.~ > ; k [.@Xd.R 1.PXIXIXIXLXNXMXMXFXGXJXPXIXIXIXIXcXv }.`.X @ @ & M A i.i.& ",
|
|
||||||
"qXU y.i.I $ $ r M B.p > e (.@X6.` cXIXIXJXdX/.Q.}.}.}.Q.T.Z.#.1.IXIXPX9 a.|.= & : < : I J u.y.& ",
|
|
||||||
"wXI U u.U > e r x x a i I.@X6._ GXIXIXJX] t.}.|.m.z.m.U.E.R.s.3 ,.IXhXM }.5.X * > e : A A u.u.@ ",
|
|
||||||
"qXZ g Z ^ < j j a r a L +XL.2 bXIXIXIX] 6.+XI.$ # . . - - 5.s.| JXuXv.|.$ & : i i : f t c F @ ",
|
|
||||||
"8Xr c.g u.: j j j e e (.OX, 4.IXIXIX3.s +X(.X X & & ; $ : @ . a.*XjXV.E.b.X ; > p p : M g b.v & ",
|
|
||||||
"0Xx r x A $ j r r r m +Xt.O.IXIXIXPX8 !.@Xo T , @ > a - e > = a./.4.Z.!.B # ; e a a : I Z v ~ : ",
|
|
||||||
"qXJ U I m $ e z r r l.|.C nXIXIXIXaX9.@XL o E ,X< ; > > > > $ a./.;.P.}.d & > i a a : i.Y U U % ",
|
|
||||||
"qXJ y.U U : e - z > H.W.) PXIXIXIXuXY.+X# 5 5 %.yXj ; ; 0 d f a.Z.[ H.{.$ * > p p p : A y.J Y : ",
|
|
||||||
"0XA Y Y i.> > r r w L.L.2XIXIXIXIX1X!.U. 1 } 9 *.eXM.(.oXoX{.}.0.8 |.).X * > e p p : N Y f f : ",
|
|
||||||
"8XN y.J Y : > l l w d.G.6XIXIXIXIX8X!.r.X # 4 C.[.#X@X|.J.r.G.Y.P j |.}.B # > a a e : Y Y Y A ; ",
|
|
||||||
"8Xf J y.I : > e j > s.v.5XIXIXIXPX<XQ.5.X d `.+XOXG.V Q o.+.pXxXdX=.y.L.!.9.& > a e : y.J Y Y : ",
|
|
||||||
"qXI S I J < e e a ; t.v.4XIXIXIXPX%.L.v.m.+XOXv.! +.hXGXPXPXIXIXIXIXcXO.x.!.9.& e e : u.J I A $ ",
|
|
||||||
"qX~ D x f > p p w < 6.G.( IXIXIXIX<.G.@X+XJ.) 1.bXJXIXKXVXVXdXzXIXIXIXJX@.x.!.n : > : I x D ~ & ",
|
|
||||||
"7Xg b.D A % j - - i s Y.k nXIXIXIXGX0.U.( ;.jXLXVXXX|.OXOX}.J.6 fXIXIXIXJX:.E.s.& > ; I g b.D : ",
|
|
||||||
"7Xt F ~ U ; = v = = $ L.P ,.PXDXHXIX:.$.4.ZX:XOXOX+X{.I.g.f t.l.` IXIXIXIX3.l.E.- ; ; G h g F & ",
|
|
||||||
"wXA S Y J > a a - e > 5.J.` gXlX5XSXcX4XOXOXOXm.f.K = X o o O d./ aXIXPXIX4.k.!.f & & S N U U $ ",
|
|
||||||
"rXy.i.i.A < a z - r > : OXg._ yX2X&.xXhXK.|.J. . # # # 1 v !.h.-.HXkXDXjXZ.}.n & & U J y.y., ",
|
|
||||||
"wXJ Y i.J < j j - r r z.+X|.2 X.tX4X,XxXhXN.!.s.0 # * * * e %XOX/ aXgX,XDX2.K.|.q & & A A Y y., ",
|
|
||||||
"0Xy M i.J $ p z - g.oX+X+X$X).O.fXtX4X,XxXhXC.|.|.~.U.m.m.#X@Xx.sXxX( 7XhX .~.~.# * * A A f m : ",
|
|
||||||
"wXI G S S : e e I.$X$X.XXX0.U.%X..+.kXtX1XgX2.#.M.|.OXOX+X{.j.,.gX) 1XcX-.J.@XL @ ; ; ^ U N N & ",
|
|
||||||
"8XF c c ^ + K %X&X&XN.G X O Y.oX} [ >.tX8XtXuXX.:.,Xp.b 5 >.gX1XzXbX:.G.@X'.X & & & ^ F z ~ & ",
|
|
||||||
"8Xz l.r h.'.;X;XN.r & & , * # O G.+XC.[ { 1.5X2XyXuX+.+.+.>.sXcXbXbXD.Q.$X'.4 # : : * ^ g c.D : ",
|
|
||||||
"qXH P '.;X;XN.g % % % > % i < & r.OXoX3XaX1.3.4.<.<.4.jXvXvXNX>X!.OX>XC.o E ) < : : ~ x r ~ : ",
|
|
||||||
"qXn.].;XN.$ + + ; i ; a j e j i : . s Q.OXOXXX>XBX=X=X>X>X:X$XOX+X&XD.< o 7 7 &.9Xi * ~ Z t N * ",
|
|
||||||
"F.N.N.N v . + + $ e e w p p l l a % @ @ 5.J.{.+X+X$X$X$X$X.X_.M.h.> # # # 4 | 9 6XtX: ~ ~ m y * ",
|
|
||||||
"S.m Z F x . ; ; - r l w w - - e l > ; < $ @ > d K L L K d - X X # : % > < ; T *.} pX9XF ~ ~ M : ",
|
|
||||||
"S.f S G x . ; j j j p > j p > - > - - i ; @ $ : : * * & @ & : & & : : $ i ; ; T =. .xX8XF F Z : ",
|
|
||||||
"0XN J y.J . . < < < : $ < < : % < < + $ $ : : . @ * * * @ @ : $ , : + : % : @ @ T %. .xXV.t 0 & ",
|
|
||||||
"wXA h Y I N J U A m I U u.Y J i.i.Y U U U J ^ ^ I I G G Z h A ^ U N A I Z Z Z G g R | #.gX! g X ",
|
|
||||||
"8Xx q F J m A u.Y 0 0 x Y Y J J A ^ h q F A A i.Y y g g F A m J y.I M M c F M U S Z b | =.5Xb @ ",
|
|
||||||
"8Xz b.F ^ J f I u.z b.v ^ J Y y.A U c b.D U y U u.S g c.g ^ U Y u.Y M F b.v h A S S H v W %.( X ",
|
|
||||||
"p.Z r h u.u.A A u.x q H y.I I i.I S S z H u.J J i.u.~ D x Y J f y.y.h t z H Y J A A ~ D - 4 ( o ",
|
|
||||||
"~ p & & : : & * : & @ * : : : : : * @ @ & : & @ : : & & & : : & & : : + + * * & & * * * # # # "
|
|
||||||
};
|
|
|
@ -1,277 +0,0 @@
|
||||||
Index: source/g3d_viewer/main.cpp
|
|
||||||
===================================================================
|
|
||||||
--- source/g3d_viewer/main.cpp (Revision 191)
|
|
||||||
+++ source/g3d_viewer/main.cpp (Arbeitskopie)
|
|
||||||
@@ -2,7 +2,6 @@
|
|
||||||
|
|
||||||
#include <stdexcept>
|
|
||||||
|
|
||||||
-#include "graphics_factory_basic_gl.h"
|
|
||||||
#include "graphics_interface.h"
|
|
||||||
#include "util.h"
|
|
||||||
|
|
||||||
@@ -11,8 +10,15 @@
|
|
||||||
using namespace Shared::Graphics::Gl;
|
|
||||||
using namespace Shared::Util;
|
|
||||||
|
|
||||||
-using namespace std;
|
|
||||||
+using std::exception;
|
|
||||||
|
|
||||||
+#if (wxUSE_UNICODE == 1)
|
|
||||||
+#define STRCONV(x) wxConvUTF8.cMB2WC(x)
|
|
||||||
+#else
|
|
||||||
+#define STRCONV(x) x
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+
|
|
||||||
namespace Shared{ namespace G3dViewer{
|
|
||||||
|
|
||||||
// ===============================================
|
|
||||||
@@ -24,7 +30,7 @@
|
|
||||||
|
|
||||||
MainWindow::MainWindow(const string &modelPath):
|
|
||||||
wxFrame(
|
|
||||||
- NULL, -1, winHeader.c_str(),
|
|
||||||
+ NULL, -1, STRCONV(winHeader.c_str()),
|
|
||||||
wxPoint(Renderer::windowX, Renderer::windowY),
|
|
||||||
wxSize(Renderer::windowW, Renderer::windowH))
|
|
||||||
{
|
|
||||||
@@ -37,38 +43,33 @@
|
|
||||||
|
|
||||||
glCanvas = new GlCanvas(this);
|
|
||||||
|
|
||||||
- glCanvas->SetCurrent();
|
|
||||||
-
|
|
||||||
- renderer->init();
|
|
||||||
-
|
|
||||||
-
|
|
||||||
menu= new wxMenuBar();
|
|
||||||
|
|
||||||
//menu
|
|
||||||
menuFile= new wxMenu();
|
|
||||||
- menuFile->Append(miFileLoad, "Load");
|
|
||||||
- menu->Append(menuFile, "File");
|
|
||||||
+ menuFile->Append(miFileLoad, wxT("Load"));
|
|
||||||
+ menu->Append(menuFile, wxT("File"));
|
|
||||||
|
|
||||||
//mode
|
|
||||||
menuMode= new wxMenu();
|
|
||||||
- menuMode->AppendCheckItem(miModeNormals, "Normals");
|
|
||||||
- menuMode->AppendCheckItem(miModeWireframe, "Wireframe");
|
|
||||||
- menuMode->AppendCheckItem(miModeGrid, "Grid");
|
|
||||||
- menu->Append(menuMode, "Mode");
|
|
||||||
+ menuMode->AppendCheckItem(miModeNormals, wxT("Normals"));
|
|
||||||
+ menuMode->AppendCheckItem(miModeWireframe, wxT("Wireframe"));
|
|
||||||
+ menuMode->AppendCheckItem(miModeGrid, wxT("Grid"));
|
|
||||||
+ menu->Append(menuMode, wxT("Mode"));
|
|
||||||
|
|
||||||
//mode
|
|
||||||
menuSpeed= new wxMenu();
|
|
||||||
- menuSpeed->Append(miSpeedSlower, "Slower");
|
|
||||||
- menuSpeed->Append(miSpeedFaster, "Faster");
|
|
||||||
- menu->Append(menuSpeed, "Speed");
|
|
||||||
+ menuSpeed->Append(miSpeedSlower, wxT("Slower"));
|
|
||||||
+ menuSpeed->Append(miSpeedFaster, wxT("Faster"));
|
|
||||||
+ menu->Append(menuSpeed, wxT("Speed"));
|
|
||||||
|
|
||||||
//custom color
|
|
||||||
menuCustomColor= new wxMenu();
|
|
||||||
- menuCustomColor->AppendCheckItem(miColorRed, "Red");
|
|
||||||
- menuCustomColor->AppendCheckItem(miColorBlue, "Blue");
|
|
||||||
- menuCustomColor->AppendCheckItem(miColorYellow, "Yellow");
|
|
||||||
- menuCustomColor->AppendCheckItem(miColorGreen, "Green");
|
|
||||||
- menu->Append(menuCustomColor, "Custom Color");
|
|
||||||
+ menuCustomColor->AppendCheckItem(miColorRed, wxT("Red"));
|
|
||||||
+ menuCustomColor->AppendCheckItem(miColorBlue, wxT("Blue"));
|
|
||||||
+ menuCustomColor->AppendCheckItem(miColorYellow, wxT("Yellow"));
|
|
||||||
+ menuCustomColor->AppendCheckItem(miColorGreen, wxT("Green"));
|
|
||||||
+ menu->Append(menuCustomColor, wxT("Custom Color"));
|
|
||||||
|
|
||||||
menuMode->Check(miModeGrid, true);
|
|
||||||
menuCustomColor->Check(miColorRed, true);
|
|
||||||
@@ -88,13 +89,6 @@
|
|
||||||
|
|
||||||
timer = new wxTimer(this);
|
|
||||||
timer->Start(40);
|
|
||||||
-
|
|
||||||
- if(!modelPath.empty()){
|
|
||||||
- Model *tmpModel= new ModelGl();
|
|
||||||
- renderer->loadTheModel(tmpModel, modelPath);
|
|
||||||
- model= tmpModel;
|
|
||||||
- GetStatusBar()->SetStatusText(getModelInfo().c_str());
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
|
|
||||||
MainWindow::~MainWindow(){
|
|
||||||
@@ -104,6 +98,17 @@
|
|
||||||
delete glCanvas;
|
|
||||||
}
|
|
||||||
|
|
||||||
+void MainWindow::init(){
|
|
||||||
+ glCanvas->SetCurrent();
|
|
||||||
+ renderer->init();
|
|
||||||
+ if(!modelPath.empty()){
|
|
||||||
+ Model *tmpModel= new ModelGl();
|
|
||||||
+ renderer->loadTheModel(tmpModel, modelPath);
|
|
||||||
+ model= tmpModel;
|
|
||||||
+ GetStatusBar()->SetStatusText(STRCONV(getModelInfo().c_str()));
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void MainWindow::onPaint(wxPaintEvent &event){
|
|
||||||
renderer->reset(GetClientSize().x, GetClientSize().y, playerColor);
|
|
||||||
renderer->transform(rotX, rotY, zoom);
|
|
||||||
@@ -141,13 +146,14 @@
|
|
||||||
void MainWindow::onMenuFileLoad(wxCommandEvent &event){
|
|
||||||
string fileName;
|
|
||||||
wxFileDialog fileDialog(this);
|
|
||||||
- fileDialog.SetWildcard("G3D files (*.g3d)|*.g3d");
|
|
||||||
+ fileDialog.SetWildcard(wxT("G3D files (*.g3d)|*.g3d"));
|
|
||||||
if(fileDialog.ShowModal()==wxID_OK){
|
|
||||||
delete model;
|
|
||||||
Model *tmpModel= new ModelGl();
|
|
||||||
- renderer->loadTheModel(tmpModel, fileDialog.GetPath().c_str());
|
|
||||||
+ fileName = wxFNCONV(fileDialog.GetPath());
|
|
||||||
+ renderer->loadTheModel(tmpModel, fileName);
|
|
||||||
model= tmpModel;
|
|
||||||
- GetStatusBar()->SetStatusText(getModelInfo().c_str());
|
|
||||||
+ GetStatusBar()->SetStatusText(wxString(getModelInfo().c_str(), wxConvUTF8));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -252,7 +258,7 @@
|
|
||||||
// =====================================================
|
|
||||||
|
|
||||||
GlCanvas::GlCanvas(MainWindow * mainWindow):
|
|
||||||
- wxGLCanvas(mainWindow, -1)
|
|
||||||
+ wxGLCanvas(mainWindow, -1, wxDefaultPosition)
|
|
||||||
{
|
|
||||||
this->mainWindow = mainWindow;
|
|
||||||
}
|
|
||||||
@@ -261,13 +267,8 @@
|
|
||||||
mainWindow->onMouseMove(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
-void GlCanvas::onPaint(wxPaintEvent &event){
|
|
||||||
- mainWindow->onPaint(event);
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
BEGIN_EVENT_TABLE(GlCanvas, wxGLCanvas)
|
|
||||||
EVT_MOTION(GlCanvas::onMouseMove)
|
|
||||||
- EVT_PAINT(GlCanvas::onPaint)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
// ===============================================
|
|
||||||
@@ -277,11 +278,12 @@
|
|
||||||
bool App::OnInit(){
|
|
||||||
string modelPath;
|
|
||||||
if(argc==2){
|
|
||||||
- modelPath= argv[1];
|
|
||||||
+ modelPath = wxFNCONV(argv[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
mainWindow= new MainWindow(modelPath);
|
|
||||||
mainWindow->Show();
|
|
||||||
+ mainWindow->init();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -290,9 +292,9 @@
|
|
||||||
return wxApp::MainLoop();
|
|
||||||
}
|
|
||||||
catch(const exception &e){
|
|
||||||
- wxMessageDialog(NULL, e.what(), "Exception", wxOK | wxICON_ERROR).ShowModal();
|
|
||||||
- return 0;
|
|
||||||
+ wxMessageDialog(NULL, STRCONV(e.what()), wxT("Exception"), wxOK | wxICON_ERROR).ShowModal();
|
|
||||||
}
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int App::OnExit(){
|
|
||||||
Index: source/g3d_viewer/main.h
|
|
||||||
===================================================================
|
|
||||||
--- source/g3d_viewer/main.h (Revision 191)
|
|
||||||
+++ source/g3d_viewer/main.h (Arbeitskopie)
|
|
||||||
@@ -7,12 +7,13 @@
|
|
||||||
#include <wx/timer.h>
|
|
||||||
#include <wx/glcanvas.h>
|
|
||||||
|
|
||||||
+#include "graphics_factory_basic_gl.h"
|
|
||||||
#include "renderer.h"
|
|
||||||
#include "util.h"
|
|
||||||
#include "window.h"
|
|
||||||
|
|
||||||
-using Shared::Platform::Window;
|
|
||||||
-using Shared::Platform::MouseState;
|
|
||||||
+//using Shared::Platform::Window;
|
|
||||||
+//using Shared::Platform::MouseState;
|
|
||||||
|
|
||||||
using std::string;
|
|
||||||
|
|
||||||
@@ -70,6 +71,8 @@
|
|
||||||
MainWindow(const string &modelPath);
|
|
||||||
~MainWindow();
|
|
||||||
|
|
||||||
+ void init();
|
|
||||||
+
|
|
||||||
void Notify();
|
|
||||||
|
|
||||||
void onPaint(wxPaintEvent &event);
|
|
||||||
Index: mk/linux/Jamfile
|
|
||||||
===================================================================
|
|
||||||
--- mk/linux/Jamfile (Revision 191)
|
|
||||||
+++ mk/linux/Jamfile (Arbeitskopie)
|
|
||||||
@@ -26,7 +26,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
Library glestlib : $(LIB_SOURCES) ;
|
|
||||||
-ExternalLibs glestlib : SDL GL GLU XERCES VORBIS VORBISFILE OGG OPENAL LUA ;
|
|
||||||
+ExternalLibs glestlib : SDL GL GLU XERCES VORBISFILE OPENAL LUA ;
|
|
||||||
IncludeDir glestlib : $(LIB_INCLUDE_DIRS) ;
|
|
||||||
|
|
||||||
#### Game ####
|
|
||||||
@@ -55,7 +55,7 @@
|
|
||||||
|
|
||||||
Application glest : $(GLEST_SOURCES) ;
|
|
||||||
LinkWith glest : glestlib ;
|
|
||||||
-ExternalLibs glest : SDL GL GLU XERCES VORBIS VORBISFILE OGG OPENAL LUA ;
|
|
||||||
+ExternalLibs glest : SDL GL GLU XERCES VORBISFILE OPENAL LUA ;
|
|
||||||
IncludeDir glest : ../shared_lib/include/$(LIB_INCLUDE_DIRS) $(GLEST_DIRS) ;
|
|
||||||
|
|
||||||
#### Editor ####
|
|
||||||
@@ -69,7 +69,22 @@
|
|
||||||
|
|
||||||
Application glest_editor : $(GLEST_MAP_SOURCES) ;
|
|
||||||
LinkWith glest_editor : glestlib ;
|
|
||||||
- ExternalLibs glest_editor : SDL GL GLU XERCES VORBIS VORBISFILE OGG OPENAL WX ;
|
|
||||||
+ ExternalLibs glest_editor : SDL GL GLU XERCES VORBISFILE OPENAL WX ;
|
|
||||||
IncludeDir glest_editor : ../shared_lib/include/$(LIB_INCLUDE_DIRS) $(GLEST_MAP_DIRS) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
+### Viewer ###
|
|
||||||
+if $(WX_AVAILABLE) = "yes" {
|
|
||||||
+ SubDir TOP g3d_viewer ;
|
|
||||||
+
|
|
||||||
+ GLEST_VIEWER_DIRS = . ;
|
|
||||||
+ for i in $(GLEST_DIRS) {
|
|
||||||
+ GLEST_VIEWER_SOURCES += [ Wildcard $(i) : *.cpp *.h ] ;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ Application glest_g3dviewer : $(GLEST_VIEWER_SOURCES) ;
|
|
||||||
+ LinkWith glest_g3dviewer : glestlib ;
|
|
||||||
+ ExternalLibs glest_g3dviewer : SDL GL GLU XERCES VORBISFILE OPENAL WX ;
|
|
||||||
+ IncludeDir glest_g3dviewer : ../shared_lib/include/$(LIB_INCLUDE_DIRS) $(GLEST_VIEWER_DIRS) ;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
Index: mk/linux/autogen.sh
|
|
||||||
===================================================================
|
|
||||||
--- mk/linux/autogen.sh (Revision 191)
|
|
||||||
+++ mk/linux/autogen.sh (Arbeitskopie)
|
|
||||||
@@ -34,4 +34,6 @@
|
|
||||||
if [ ! -d glest_map_editor ]; then
|
|
||||||
ln -sf ../../source/glest_map_editor .
|
|
||||||
fi
|
|
||||||
-
|
|
||||||
+if [ ! -d g3d_viewer ]; then
|
|
||||||
+ ln -sf ../../source/g3d_viewer .
|
|
||||||
+fi
|
|
|
@ -1,10 +0,0 @@
|
||||||
--- source/shared_lib/sources/platform/posix/socket.cpp
|
|
||||||
+++ source/shared_lib/sources/platform/posix/socket.cpp
|
|
||||||
@@ -10,6 +10,7 @@
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
#include <cstdlib>
|
|
||||||
+#include <cstdio>
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <sstream>
|
|
||||||
#if defined(HAVE_SYS_IOCTL_H)
|
|
|
@ -1,143 +0,0 @@
|
||||||
--- source/glest_game/ai/ai_interface.h 2009-04-15 11:17:19.000000000 +0400
|
|
||||||
+++ source/glest_game/ai/ai_interface.h 2009-04-15 12:25:04.000000000 +0400
|
|
||||||
@@ -84,7 +84,11 @@
|
|
||||||
bool isFreeCells(const Vec2i &pos, int size, Field field);
|
|
||||||
|
|
||||||
private:
|
|
||||||
- string getLogFilename() const {return "ai"+intToStr(factionIndex)+".log";}
|
|
||||||
+ string getLogFilename() const {
|
|
||||||
+ string logfn=getenv("HOME");
|
|
||||||
+ logfn+="/.glest/ai"+intToStr(factionIndex)+".log";
|
|
||||||
+ return logfn;
|
|
||||||
+ }
|
|
||||||
};
|
|
||||||
|
|
||||||
}}//end namespace
|
|
||||||
--- source/glest_game/ai/ai_rule.cpp 2009-04-15 11:17:19.000000000 +0400
|
|
||||||
+++ source/glest_game/ai/ai_rule.cpp 2009-04-15 11:19:02.000000000 +0400
|
|
||||||
@@ -17,6 +17,8 @@
|
|
||||||
#include "unit.h"
|
|
||||||
#include "leak_dumper.h"
|
|
||||||
|
|
||||||
+#include <limits.h>
|
|
||||||
+
|
|
||||||
using Shared::Graphics::Vec2i;
|
|
||||||
|
|
||||||
namespace Glest{ namespace Game{
|
|
||||||
--- source/glest_game/game/game.cpp 2009-04-15 11:17:19.000000000 +0400
|
|
||||||
+++ source/glest_game/game/game.cpp 2009-04-15 12:21:29.000000000 +0400
|
|
||||||
@@ -443,7 +443,8 @@
|
|
||||||
}
|
|
||||||
else if(key=='E'){
|
|
||||||
for(int i=0; i<100; ++i){
|
|
||||||
- string path= "screens/screen" + intToStr(i) + ".tga";
|
|
||||||
+ string path=getenv("HOME");
|
|
||||||
+ path+="/.glest/screens/screen" + intToStr(i) + ".tga";
|
|
||||||
|
|
||||||
FILE *f= fopen(path.c_str(), "rb");
|
|
||||||
if(f==NULL){
|
|
||||||
--- source/glest_game/main/main.cpp 2009-04-15 11:17:19.000000000 +0400
|
|
||||||
+++ source/glest_game/main/main.cpp 2009-04-15 12:32:04.000000000 +0400
|
|
||||||
@@ -114,6 +114,17 @@
|
|
||||||
// =====================================================
|
|
||||||
|
|
||||||
int glestMain(int argc, char** argv){
|
|
||||||
+ if (!getenv("HOME"))
|
|
||||||
+ throw runtime_error("HOME external variable is not set");
|
|
||||||
+
|
|
||||||
+ char path[PATH_MAX];
|
|
||||||
+ snprintf(path, PATH_MAX, "%s/.glest", getenv("HOME"));
|
|
||||||
+ mkdir(path, 0750);
|
|
||||||
+
|
|
||||||
+ snprintf(path, PATH_MAX, "%s/.glest/screens", getenv("HOME"));
|
|
||||||
+ mkdir(path, 0750);
|
|
||||||
+
|
|
||||||
+ chdir("/usr/share/glest");
|
|
||||||
|
|
||||||
MainWindow *mainWindow= NULL;
|
|
||||||
Program *program= NULL;
|
|
||||||
--- source/glest_game/main/program.cpp 2009-04-15 11:17:19.000000000 +0400
|
|
||||||
+++ source/glest_game/main/program.cpp 2009-04-15 12:11:51.000000000 +0400
|
|
||||||
@@ -196,9 +196,11 @@
|
|
||||||
updateTimer.init(GameConstants::updateFps, maxTimes);
|
|
||||||
updateCameraTimer.init(GameConstants::cameraFps, maxTimes);
|
|
||||||
|
|
||||||
- //log start
|
|
||||||
- Logger &logger= Logger::getInstance();
|
|
||||||
- logger.setFile("glest.log");
|
|
||||||
+ //log start
|
|
||||||
+ char path[PATH_MAX];
|
|
||||||
+ snprintf(path, PATH_MAX, "%s/.glest/glest.log", getenv("HOME"));
|
|
||||||
+ Logger &logger= Logger::getInstance();
|
|
||||||
+ logger.setFile(path);
|
|
||||||
logger.clear();
|
|
||||||
|
|
||||||
//lang
|
|
||||||
--- source/shared_lib/sources/util/leak_dumper.cpp 2009-04-15 11:17:19.000000000 +0400
|
|
||||||
+++ source/shared_lib/sources/util/leak_dumper.cpp 2009-04-15 12:04:49.000000000 +0400
|
|
||||||
@@ -52,7 +52,9 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
AllocRegistry::~AllocRegistry(){
|
|
||||||
- dump("leak_dump.log");
|
|
||||||
+ char path[PATH_MAX];
|
|
||||||
+ snprintf(path, PATH_MAX, "%s/.glest/leak_dump.log", getenv("HOME"));
|
|
||||||
+ dump(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AllocRegistry::allocate(AllocInfo info){
|
|
||||||
--- source/shared_lib/sources/util/profiler.cpp 2009-04-15 11:17:19.000000000 +0400
|
|
||||||
+++ source/shared_lib/sources/util/profiler.cpp 2009-04-15 12:01:52.000000000 +0400
|
|
||||||
@@ -71,9 +71,11 @@
|
|
||||||
Profiler::~Profiler(){
|
|
||||||
rootSection->stop();
|
|
||||||
|
|
||||||
- FILE *f= fopen("profiler.log", "w");
|
|
||||||
+ char path[PATH_MAX];
|
|
||||||
+ snprintf(path, PATH_MAX, "%s/.glest/profiler.log", getenv("HOME"));
|
|
||||||
+ FILE *f= fopen(path, "w");
|
|
||||||
if(f==NULL)
|
|
||||||
- throw runtime_error("Can not open file: profiler.log");
|
|
||||||
+ throw runtime_error("Can not open file: %s",path);
|
|
||||||
|
|
||||||
fprintf(f, "Profiler Results\n\n");
|
|
||||||
|
|
||||||
--- source/shared_lib/sources/util/properties.cpp 2009-04-15 11:17:19.000000000 +0400
|
|
||||||
+++ source/shared_lib/sources/util/properties.cpp 2009-04-15 13:09:33.000000000 +0400
|
|
||||||
@@ -15,6 +15,9 @@
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
+#include <limits.h>
|
|
||||||
+#include <stdlib.h>
|
|
||||||
+
|
|
||||||
#include "conversion.h"
|
|
||||||
#include "leak_dumper.h"
|
|
||||||
|
|
||||||
@@ -34,9 +37,13 @@
|
|
||||||
|
|
||||||
this->path= path;
|
|
||||||
|
|
||||||
- fileStream.open(path.c_str(), ios_base::in);
|
|
||||||
+ char str[PATH_MAX];
|
|
||||||
+ snprintf(str, PATH_MAX, "%s/.glest/%s", getenv("HOME"), path.c_str());
|
|
||||||
+ fileStream.open(str, ios_base::in);
|
|
||||||
if(fileStream.fail()){
|
|
||||||
- throw runtime_error("Can't open propertyMap file: " + path);
|
|
||||||
+ fileStream.open(path.c_str(), ios_base::in); // use defaults
|
|
||||||
+ if(fileStream.fail())
|
|
||||||
+ throw runtime_error("Can't open propertyMap file: " + path + " cwd: "+ getenv("PWD"));
|
|
||||||
}
|
|
||||||
|
|
||||||
propertyMap.clear();
|
|
||||||
@@ -71,7 +78,9 @@
|
|
||||||
void Properties::save(const string &path){
|
|
||||||
ofstream fileStream;
|
|
||||||
|
|
||||||
- fileStream.open(path.c_str(), ios_base::out | ios_base::trunc);
|
|
||||||
+ char str[PATH_MAX];
|
|
||||||
+ snprintf(str, PATH_MAX, "%s/.glest/%s", getenv("HOME"), path.c_str());
|
|
||||||
+ fileStream.open(str, ios_base::out | ios_base::trunc);
|
|
||||||
|
|
||||||
fileStream << "; === propertyMap File === \n";
|
|
||||||
fileStream << '\n';
|
|
|
@ -1,41 +0,0 @@
|
||||||
--- source/shared_lib/sources/xml/xml_parser.cpp.old 2008-02-16 16:01:28.000000000 +0300
|
|
||||||
+++ source/shared_lib/sources/xml/xml_parser.cpp 2009-03-19 18:28:08.000000000 +0300
|
|
||||||
@@ -87,10 +87,17 @@
|
|
||||||
|
|
||||||
try{
|
|
||||||
ErrorHandler errorHandler;
|
|
||||||
+#if XERCES_VERSION_MAJOR < 3
|
|
||||||
DOMBuilder *parser= (static_cast<DOMImplementationLS*>(implementation))->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
|
|
||||||
parser->setErrorHandler(&errorHandler);
|
|
||||||
parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true);
|
|
||||||
parser->setFeature(XMLUni::fgDOMValidation, true);
|
|
||||||
+#else
|
|
||||||
+ DOMLSParser *parser = (static_cast<DOMImplementationLS*>(implementation))->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
|
|
||||||
+ DOMConfiguration *config = parser->getDomConfig();
|
|
||||||
+ config->setParameter(XMLUni::fgXercesSchemaFullChecking, true);
|
|
||||||
+ config->setParameter(XMLUni::fgDOMValidate, true);
|
|
||||||
+#endif
|
|
||||||
DOMDocument *document= parser->parseURI(path.c_str());
|
|
||||||
|
|
||||||
if(document==NULL){
|
|
||||||
@@ -119,9 +126,20 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
LocalFileFormatTarget file(path.c_str());
|
|
||||||
+#if XERCES_VERSION_MAJOR < 3
|
|
||||||
DOMWriter* writer = implementation->createDOMWriter();
|
|
||||||
writer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
|
|
||||||
writer->writeNode(&file, *document);
|
|
||||||
+#else
|
|
||||||
+ DOMLSSerializer *serializer = implementation->createLSSerializer();
|
|
||||||
+ DOMLSOutput* output=implementation->createLSOutput();
|
|
||||||
+ DOMConfiguration* config=serializer->getDomConfig();
|
|
||||||
+ config->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint,true);
|
|
||||||
+ output->setByteStream(&file);
|
|
||||||
+ serializer->write(document,output);
|
|
||||||
+ output->release();
|
|
||||||
+ serializer->release();
|
|
||||||
+#endif
|
|
||||||
document->release();
|
|
||||||
}
|
|
||||||
catch(const DOMException &e){
|
|
|
@ -1,19 +0,0 @@
|
||||||
# HOW TO EDIT THIS FILE:
|
|
||||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
|
||||||
# up the first '|' above the ':' following the base package name, and the '|' on
|
|
||||||
# the right side marks the last column you can put a character in. You must make
|
|
||||||
# exactly 11 lines for the formatting to be correct. It's also customary to
|
|
||||||
# leave one space after the ':'.
|
|
||||||
|
|
||||||
|-----handy-ruler------------------------------------------------------|
|
|
||||||
glest: glest (A free 3d real-time customizable strategy game)
|
|
||||||
glest:
|
|
||||||
glest: Glest is a free 3D real-time strategy game, where you control the
|
|
||||||
glest: armies of two different factions: Tech, which is mainly composed of
|
|
||||||
glest: warriors and mechanical devices, and Magic, that prefers mages and
|
|
||||||
glest: summoned creatures in the battlefield.
|
|
||||||
glest:
|
|
||||||
glest: Homepage: http://glest.org/en/index.php
|
|
||||||
glest:
|
|
||||||
glest:
|
|
||||||
glest:
|
|
Loading…
Reference in New Issue