Unremovable changes

main/yubo-dev
Nuno 3 years ago
parent 703c21cbc5
commit 52c94ee0c6

@ -1,7 +1,7 @@
/** \file driver_direct3d_pixel_program.cpp
* Direct 3d driver implementation
*
* $Id: driver_direct3d_pixel_program.cpp,v 1.1.2.4 2007/07/09 15:26:35 legallo Exp $
* $Id$
*
* \todo manage better the init/release system (if a throw occurs in the init, we must release correctly the driver)
*/

@ -1,7 +1,7 @@
/** \file driver_opengl_pixel_program.cpp
* OpenGL driver implementation for pixel program manipulation.
*
* $Id: driver_opengl_pixel_program.cpp,v 1.1.2.4 2007/07/09 15:29:00 legallo Exp $
* $Id$
*
* \todo manage better the init/release system (if a throw occurs in the init, we must release correctly the driver)
*/

File diff suppressed because it is too large Load Diff

@ -1,16 +1,16 @@
#!/bin/bash
rm log.log 2> /dev/null
# Log error
echo ------- > log.log
echo --- Build anim : optimze >> log.log
echo ------- >> log.log
echo -------
echo --- Build anim : optimze
echo -------
date >> log.log
date
# Execute the build
anim_builder.exe anim_export anim ../../cfg/properties.cfg
#!/bin/bash
rm log.log 2> /dev/null
# Log error
echo ------- > log.log
echo --- Build anim : optimze >> log.log
echo ------- >> log.log
echo -------
echo --- Build anim : optimze
echo -------
date >> log.log
date
# Execute the build
anim_builder.exe anim_export anim ../../cfg/properties.cfg

@ -1,57 +1,57 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export animation files (.anim) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "anim_export_timeout" | sed -e 's/anim_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the anim directories
anim_source_directories=`cat ../../cfg/directories.cfg | grep "anim_source_directory" | sed -e 's/anim_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export animation >> log.log
echo ------- >> log.log
echo -------
echo --- Export animation
echo -------
date >> log.log
date
# For each directoy
for i in $anim_source_directories ; do
# Copy the script
cat maxscript/anim_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/anim/log.log&g" | sed -e "s&anim_source_directory&$database_directory/$i&g" | sed -e "s&output_directory&$build_gamedata_directory/processes/anim/anim_export&g" > $max_directory/scripts/anim_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript anim_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript anim_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript anim_export.ms -q -mi -vn
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export animation files (.anim) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "anim_export_timeout" | sed -e 's/anim_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the anim directories
anim_source_directories=`cat ../../cfg/directories.cfg | grep "anim_source_directory" | sed -e 's/anim_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export animation >> log.log
echo ------- >> log.log
echo -------
echo --- Export animation
echo -------
date >> log.log
date
# For each directoy
for i in $anim_source_directories ; do
# Copy the script
cat maxscript/anim_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/anim/log.log&g" | sed -e "s&anim_source_directory&$database_directory/$i&g" | sed -e "s&output_directory&$build_gamedata_directory/processes/anim/anim_export&g" > $max_directory/scripts/anim_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript anim_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript anim_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript anim_export.ms -q -mi -vn
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install anim in the client data
# Get the anim install directory
anim_install_directory=`cat ../../cfg/directories.cfg | grep "anim_install_directory" | sed -e 's/anim_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install animation >> log.log
echo ------- >> log.log
echo -------
echo --- Install animation
echo -------
date >> log.log
date
cp -u -p -R anim/. $client_directory/$anim_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install anim in the client data
# Get the anim install directory
anim_install_directory=`cat ../../cfg/directories.cfg | grep "anim_install_directory" | sed -e 's/anim_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install animation >> log.log
echo ------- >> log.log
echo -------
echo --- Install animation
echo -------
date >> log.log
date
cp -u -p -R anim/. $client_directory/$anim_install_directory 2>> log.log

@ -1,26 +1,26 @@
#!/bin/bash
rm log.log 2> /dev/null
# Log error
echo ------- > log.log
echo --- Build clod : build .clodbank >> log.log
echo ------- >> log.log
echo -------
echo --- Build clod : build .clodbank
echo -------
date >> log.log
date
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the lod config file in the database
clod_config_file=`cat ../../cfg/config.cfg | grep "clod_config_file" | sed -e 's/clod_config_file//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the Lod character bank name
clod_bank_file_name=`cat ../../cfg/config.cfg | grep "clod_bank_file_name" | sed -e 's/clod_bank_file_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Execute the build
build_clod_bank.exe cfg/local_path.cfg $database_directory/$clod_config_file clodbank/$clod_bank_file_name
#!/bin/bash
rm log.log 2> /dev/null
# Log error
echo ------- > log.log
echo --- Build clod : build .clodbank >> log.log
echo ------- >> log.log
echo -------
echo --- Build clod : build .clodbank
echo -------
date >> log.log
date
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the lod config file in the database
clod_config_file=`cat ../../cfg/config.cfg | grep "clod_config_file" | sed -e 's/clod_config_file//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the Lod character bank name
clod_bank_file_name=`cat ../../cfg/config.cfg | grep "clod_bank_file_name" | sed -e 's/clod_bank_file_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Execute the build
build_clod_bank.exe cfg/local_path.cfg $database_directory/$clod_config_file clodbank/$clod_bank_file_name

@ -1,60 +1,60 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export character lod shape files (.clod) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "shape_export_timeout" | sed -e 's/shape_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the shape directories
clod_source_directories=`cat ../../cfg/directories.cfg | grep "clod_source_directory" | sed -e 's/clod_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export clod >> log.log
echo ------- >> log.log
echo -------
echo --- Export clod
echo -------
date >> log.log
date
# For each directoy
for i in $clod_source_directories ; do
# Copy the script
cat maxscript/clod_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/clodbank/log.log&g" | sed -e "s&shape_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_clod&$build_gamedata_directory/processes/clodbank/clod&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/clodbank/tag&g" > $max_directory/scripts/clod_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export character lod shape files (.clod) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "shape_export_timeout" | sed -e 's/shape_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the shape directories
clod_source_directories=`cat ../../cfg/directories.cfg | grep "clod_source_directory" | sed -e 's/clod_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export clod >> log.log
echo ------- >> log.log
echo -------
echo --- Export clod
echo -------
date >> log.log
date
# For each directoy
for i in $clod_source_directories ; do
# Copy the script
cat maxscript/clod_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/clodbank/log.log&g" | sed -e "s&shape_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_clod&$build_gamedata_directory/processes/clodbank/clod&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/clodbank/tag&g" > $max_directory/scripts/clod_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install clodbank in the client data, in the "shapes/" directory
# Get the shape install directory
shape_install_directory=`cat ../../cfg/directories.cfg | grep "shape_install_directory" | sed -e 's/shape_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install clodbank >> log.log
echo ------- >> log.log
echo -------
echo --- Install clodbank
echo -------
date >> log.log
date
cp -u -p -R clodbank/. $client_directory/$shape_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install clodbank in the client data, in the "shapes/" directory
# Get the shape install directory
shape_install_directory=`cat ../../cfg/directories.cfg | grep "shape_install_directory" | sed -e 's/shape_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install clodbank >> log.log
echo ------- >> log.log
echo -------
echo --- Install clodbank
echo -------
date >> log.log
date
cp -u -p -R clodbank/. $client_directory/$shape_install_directory 2>> log.log

@ -1,29 +1,29 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export displace tile (.tga)
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the displace directories
displace_source_directories=`cat ../../cfg/directories.cfg | grep "displace_source_directories" | sed -e 's/displace_source_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export displace >> log.log
echo ------- >> log.log
echo -------
echo --- Export displace
echo -------
date >> log.log
date
# For each displace directory
for i in $displace_source_directories ; do
# Copy
cp -u -p $database_directory/$i/*.[tT][gG][aA] tga 2>> log.log
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export displace tile (.tga)
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the displace directories
displace_source_directories=`cat ../../cfg/directories.cfg | grep "displace_source_directories" | sed -e 's/displace_source_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export displace >> log.log
echo ------- >> log.log
echo -------
echo --- Export displace
echo -------
date >> log.log
date
# For each displace directory
for i in $displace_source_directories ; do
# Copy
cp -u -p $database_directory/$i/*.[tT][gG][aA] tga 2>> log.log
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install the displace in the client data
# Get the displace install directory
displace_install_directory=`cat ../../cfg/directories.cfg | grep "displace_install_directory" | sed -e 's/displace_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install displace >> log.log
echo ------- >> log.log
echo -------
echo --- Install displace
echo -------
date >> log.log
date
cp -u -p -R tga/. $client_directory/$displace_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install the displace in the client data
# Get the displace install directory
displace_install_directory=`cat ../../cfg/directories.cfg | grep "displace_install_directory" | sed -e 's/displace_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install displace >> log.log
echo ------- >> log.log
echo -------
echo --- Install displace
echo -------
date >> log.log
date
cp -u -p -R tga/. $client_directory/$displace_install_directory 2>> log.log

@ -1,89 +1,89 @@
#!/bin/bash
rm log.log 2> /dev/null
# Build the farbank
build_farbank='build_far_bank.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "farbank_build_timeout" | sed -e 's/farbank_build_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the tiles root directories
tile_root_source_directory=`cat ../../cfg/directories.cfg | grep "tile_root_source_directory" | sed -e 's/tile_root_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the extension list
multiple_tiles_postfix=`cat ../../cfg/config.cfg | grep "multiple_tiles_postfix" | sed -e 's/multiple_tiles_postfix//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Build farbank >> log.log
echo ------- >> log.log
echo -------
echo --- Build farbank
echo -------
date >> log.log
date
# list all the bank
bank_list=`ls -1 ../smallbank/smallbank/*.[sS][mM][aA][lL][lL][bB][aA][nN][kK]`
# For each bank
for i in $bank_list ; do
if ( test "$multiple_tiles_postfix" ) then
for j in $multiple_tiles_postfix ; do
# Destination the name
dest=`echo $i | sed -e "s&\.smallbank&\$j.farbank&g" | sed -e 's&../smallbank/smallbank&farbank&g'`
echo $i
echo $dest
# Make the dependencies
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
$exec_timeout $timeout $build_farbank $i $dest -d$database_directory/$tile_root_source_directory$j/ -p$j
if ( test -e $dest )
then
echo OK $dest >> log.log
else
echo ERROR building $dest >> log.log
fi
else
echo SKIPPED $dest >> log.log
fi
# Idle
../../idle.bat
done
else
# Destination the name
dest=`echo $i | sed -e 's&\.smallbank&\.farbank&g' | sed -e 's&../smallbank/smallbank&farbank&g'`
echo $i
echo $dest
# Make the dependencies
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
$exec_timeout $timeout $build_farbank $i $dest
if ( test -e $dest )
then
echo OK $dest >> log.log
else
echo ERROR building $dest >> log.log
fi
else
echo SKIPPED $dest >> log.log
fi
fi
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# Build the farbank
build_farbank='build_far_bank.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "farbank_build_timeout" | sed -e 's/farbank_build_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the tiles root directories
tile_root_source_directory=`cat ../../cfg/directories.cfg | grep "tile_root_source_directory" | sed -e 's/tile_root_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the extension list
multiple_tiles_postfix=`cat ../../cfg/config.cfg | grep "multiple_tiles_postfix" | sed -e 's/multiple_tiles_postfix//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Build farbank >> log.log
echo ------- >> log.log
echo -------
echo --- Build farbank
echo -------
date >> log.log
date
# list all the bank
bank_list=`ls -1 ../smallbank/smallbank/*.[sS][mM][aA][lL][lL][bB][aA][nN][kK]`
# For each bank
for i in $bank_list ; do
if ( test "$multiple_tiles_postfix" ) then
for j in $multiple_tiles_postfix ; do
# Destination the name
dest=`echo $i | sed -e "s&\.smallbank&\$j.farbank&g" | sed -e 's&../smallbank/smallbank&farbank&g'`
echo $i
echo $dest
# Make the dependencies
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
$exec_timeout $timeout $build_farbank $i $dest -d$database_directory/$tile_root_source_directory$j/ -p$j
if ( test -e $dest )
then
echo OK $dest >> log.log
else
echo ERROR building $dest >> log.log
fi
else
echo SKIPPED $dest >> log.log
fi
# Idle
../../idle.bat
done
else
# Destination the name
dest=`echo $i | sed -e 's&\.smallbank&\.farbank&g' | sed -e 's&../smallbank/smallbank&farbank&g'`
echo $i
echo $dest
# Make the dependencies
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
$exec_timeout $timeout $build_farbank $i $dest
if ( test -e $dest )
then
echo OK $dest >> log.log
else
echo ERROR building $dest >> log.log
fi
else
echo SKIPPED $dest >> log.log
fi
fi
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install the farbank in the client data
# Get the bank install directory
bank_install_directory=`cat ../../cfg/directories.cfg | grep "bank_install_directory" | sed -e 's/bank_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install farbank >> log.log
echo ------- >> log.log
echo -------
echo --- Install farbank
echo -------
date >> log.log
date
cp -u -p -R farbank/. $client_directory/$bank_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install the farbank in the client data
# Get the bank install directory
bank_install_directory=`cat ../../cfg/directories.cfg | grep "bank_install_directory" | sed -e 's/bank_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install farbank >> log.log
echo ------- >> log.log
echo -------
echo --- Install farbank
echo -------
date >> log.log
date
cp -u -p -R farbank/. $client_directory/$bank_install_directory 2>> log.log

@ -1,32 +1,32 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export fonts
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the ps directories
font_source_directories=`cat ../../cfg/directories.cfg | grep "font_source_directories" | sed -e 's/font_source_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export fonts >> log.log
echo ------- >> log.log
echo -------
echo --- Export fonts
echo -------
date >> log.log
date
# For each font directory
for i in $font_source_directories ; do
# Copy
cp -u -p $database_directory/$i/*.[tT][tT][fF] fonts 2>> log.log
cp -u -p $database_directory/$i/*.[aA][fF][mM] fonts 2>> log.log
cp -u -p $database_directory/$i/*.[pP][fF][bB] fonts 2>> log.log
cp -u -p $database_directory/$i/*.[pP][fF][mM] fonts 2>> log.log
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export fonts
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the ps directories
font_source_directories=`cat ../../cfg/directories.cfg | grep "font_source_directories" | sed -e 's/font_source_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export fonts >> log.log
echo ------- >> log.log
echo -------
echo --- Export fonts
echo -------
date >> log.log
date
# For each font directory
for i in $font_source_directories ; do
# Copy
cp -u -p $database_directory/$i/*.[tT][tT][fF] fonts 2>> log.log
cp -u -p $database_directory/$i/*.[aA][fF][mM] fonts 2>> log.log
cp -u -p $database_directory/$i/*.[pP][fF][bB] fonts 2>> log.log
cp -u -p $database_directory/$i/*.[pP][fF][mM] fonts 2>> log.log
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install the fonts in the client data
# Get the fonts install directory
fonts_install_directory=`cat ../../cfg/directories.cfg | grep "fonts_install_directory" | sed -e 's/fonts_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install fonts >> log.log
echo ------- >> log.log
echo -------
echo --- Install fonts
echo -------
date >> log.log
date
cp -u -p -R fonts/. $client_directory/$fonts_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install the fonts in the client data
# Get the fonts install directory
fonts_install_directory=`cat ../../cfg/directories.cfg | grep "fonts_install_directory" | sed -e 's/fonts_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install fonts >> log.log
echo ------- >> log.log
echo -------
echo --- Install fonts
echo -------
date >> log.log
date
cp -u -p -R fonts/. $client_directory/$fonts_install_directory 2>> log.log

@ -1,304 +1,304 @@
#!/bin/bash
rm log.log 2> /dev/null
# ig_land_max: landscape IG eported from 3dsmax not elevated by the heightmap
# ig_land_max_elev: landscape IG eported from 3dsmax elevated by the heightmap
# ig_land_ligo: landscape IG found in ligo bricks not elevated by the heightmap
# ig_land_ligo_elev: landscape IG found in ligo bricks from 3dsmax elevated by the heightmap
# ig_land_ld: landscape IG generated by the land exporter (already elevated by the land exporter)
# ig_land: final IG directory for landscape IGs
# ig_land_compare: Tmp final IG directory for landscape IGs before comparison
# ig_other: final IG directory for village or construction IGs
# Log error
echo ------- >> log.log
echo --- Build ig >> log.log
echo ------- >> log.log
echo -------
echo --- Build ig
echo -------
date >> log.log
date
# ************************************************
# Build the IG_LAND made with the LevelDesign Tool
# ************************************************
# Get the primitive directory
continentdir=`cat ../../cfg/config.cfg | grep "leveldesign_igexport_continent_dir" | sed -e 's/leveldesign_igexport_continent_dir//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/;//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the primitive directories
ligo_ig_primitive_directory=`cat ../../cfg/directories.cfg | grep "ligo_ig_primitive_directory" | sed -e 's/ligo_ig_primitive_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the form directory
form_dir=`cat ../../cfg/site.cfg | grep "level_design_directory" | sed -e 's/level_design_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
if ( test "$continentdir" || test "$ligo_ig_primitive_directory" )
then
land_name=`cat ../../cfg/config.cfg | grep "ligo_export_land" | sed -e 's/ligo_export_land//' | sed -e 's/ //g' | sed -e 's/=//g'`
if ( test "$land_name" )
then
echo [Prim IG] ON
echo [Prim IG] ON >> log.log
# create cfg file
# +++++++++++++++
rm prim_export.cfg
echo "// prim_export.cfg" > prim_export.cfg
echo "OutIGDir = \"ig_land_ld\";" >> prim_export.cfg
echo "ZoneWDir = \"..\\zone\\zone_welded\";" >> prim_export.cfg
name_bank=`cat ../../cfg/properties.cfg | grep "bank_name" | sed -e 's/bank_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "SmallBank = $name_bank" >> prim_export.cfg
name_farbank=`cat ../../cfg/properties.cfg | grep "bankfar_name" | sed -e 's/bankfar_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "FarBank = $name_farbank" >> prim_export.cfg
displacedir=`cat ../../cfg/directories.cfg | grep "displace_source_directory" | sed -e 's/displace_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_database=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "DisplaceDir = \"$dir_database/$displacedir\";" >> prim_export.cfg
echo "CellSize = 160.0;" >> prim_export.cfg
# Set the continent directory to export
echo "PrimDirs = {" >> prim_export.cfg
echo " $continentdir," >> prim_export.cfg
for dir in $ligo_ig_primitive_directory ; do
echo " \"$database_directory/$dir\"," >> prim_export.cfg
done
echo "};" >> prim_export.cfg
# Set the dfn directory to export
echo "FormDir = \"$form_dir\";" >> prim_export.cfg
# *******************
# Launch the exporter
# *******************
prim_export.exe prim_export.cfg
# *******************
# Merge it with the IG_LAND exported from Max + elvated with heightmap
# *******************
# elevation of the heightmap for land_max
# ++++++++++++++++++++++++++++++++++++++++++++
rm ig_elevation.cfg
echo "// ig_elevation.cfg" > ig_elevation.cfg
echo "OutputIGDir = \"ig_land_max_elev\";" >> ig_elevation.cfg
echo "InputIGDir = \"ig_land_max\";" >> ig_elevation.cfg
echo "CellSize = 160.0;" >> ig_elevation.cfg
# HeightMapFile1 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
dir_database=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_ligosrc=`cat ../../cfg/directories.cfg | grep "ligo_source_directory" | sed -e 's/ligo_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
hmf1=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap1" | sed -e 's/ligo_export_heightmap1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile1 = \"$dir_database/$dir_ligosrc/$hmf1\";" >> ig_elevation.cfg
# ZFactor1 is the heightmap factor
zf1=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor1" | sed -e 's/ligo_export_zfactor1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor1 = $zf1;" >> ig_elevation.cfg
# HeightMapFile2 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
hmf2=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap2" | sed -e 's/ligo_export_heightmap2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile2 = \"$dir_database/$dir_ligosrc/$hmf2\";" >> ig_elevation.cfg
# ZFactor2 is the heightmap factor
zf2=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor2" | sed -e 's/ligo_export_zfactor2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor2 = $zf2;" >> ig_elevation.cfg
echo "LandFile = \"$dir_database/$dir_ligosrc/$land_name\";" >> ig_elevation.cfg
ig_elevation ig_elevation.cfg
# elevation of the heightmap for land_ligo
# ++++++++++++++++++++++++++++++++++++++++++++
rm ig_elevation.cfg
echo "// ig_elevation.cfg" > ig_elevation.cfg
echo "OutputIGDir = \"ig_land_ligo_elev\";" >> ig_elevation.cfg
echo "InputIGDir = \"ig_land_ligo\";" >> ig_elevation.cfg
echo "CellSize = 160.0;" >> ig_elevation.cfg
# HeightMapFile1 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
dir_database=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_ligosrc=`cat ../../cfg/directories.cfg | grep "ligo_source_directory" | sed -e 's/ligo_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
hmf1=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap1" | sed -e 's/ligo_export_heightmap1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile1 = \"$dir_database/$dir_ligosrc/$hmf1\";" >> ig_elevation.cfg
# ZFactor1 is the heightmap factor
zf1=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor1" | sed -e 's/ligo_export_zfactor1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor1 = $zf1;" >> ig_elevation.cfg
# HeightMapFile2 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
hmf2=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap2" | sed -e 's/ligo_export_heightmap2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile2 = \"$dir_database/$dir_ligosrc/$hmf2\";" >> ig_elevation.cfg
# ZFactor2 is the heightmap factor
zf2=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor2" | sed -e 's/ligo_export_zfactor2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor2 = $zf2;" >> ig_elevation.cfg
land_name=`cat ../../cfg/config.cfg | grep "ligo_export_land" | sed -e 's/ligo_export_land//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "LandFile = \"$dir_database/$dir_ligosrc/$land_name\";" >> ig_elevation.cfg
ig_elevation ig_elevation.cfg
else
echo [Prim IG] OFF
echo [Prim IG] OFF >> log.log
fi
else
echo [Prim IG] OFF
echo [Prim IG] OFF >> log.log
fi
# Erase ig in ig_merge_tmp and ig_land_compare
rm ig_merge_tmp/*
rm ig_land_compare/*
# Merge ig in ig_land_ld with ig_land_max_elev in ig_merge_tmp
dir_current=`pwd`
cd ig_land_ld
list_ig=`ls -1 *.[iI][gG] 2> /dev/null`
cd $dir_current
for filename in $list_ig ; do
# Does this file exist in ig_land_max_elev ?
if test -e ig_land_max_elev/$filename ; then
# Yes, lets merge it
ig_add ig_merge_tmp/$filename ig_land_max_elev/$filename ig_land_ld/$filename ;
else
# No, only copy it
cp ig_land_ld/$filename ig_merge_tmp/$filename ;
fi
# Idle
../../idle.bat
done
# Merge ig in ig_land_max_elev with ig_land_ld in ig_merge_tmp
cd ig_land_max_elev
list_ig=`ls -1 *.[iI][gG] 2> /dev/null`
cd $dir_current
for filename in $list_ig ; do
# Does this file exist in ig_land_ld ?
if !(test -e ig_land_ld/$filename) then
# No, only copy it
cp ig_land_max_elev/$filename ig_merge_tmp/$filename ;
fi
# Idle
../../idle.bat
done
# Merge ig in ig_merge_tmp with ig_land_ligo_elev in ig_land_compare
cd ig_merge_tmp
list_ig=`ls -1 *.[iI][gG] 2> /dev/null`
cd $dir_current
for filename in $list_ig ; do
# Does this file exist in ig_land_ligo_elev ?
if (test -e ig_land_ligo_elev/$filename) then
# Yes, lets merge it
ig_add ig_land_compare/$filename ig_merge_tmp/$filename ig_land_ligo_elev/$filename ;
else
# No, only copy it
cp ig_merge_tmp/$filename ig_land_compare/$filename ;
fi
# Idle
../../idle.bat
done
# Merge ig in ig_land_ligo_elev with ig_merge_tmp in ig_land_compare
cd ig_land_ligo_elev
list_ig=`ls -1 *.[iI][gG] 2> /dev/null`
cd $dir_current
for filename in $list_ig ; do
# Does this file exist in ig_merge_tmp ?
if !(test -e ig_merge_tmp/$filename) then
# No, only copy it
cp ig_land_ligo_elev/$filename ig_land_compare/$filename ;
fi
# Idle
../../idle.bat
done
# Compare and update
cd ig_land_compare
list_ig=`ls -1 *.[iI][gG]`
for filename in $list_ig ; do
echo "Checking $filename for update"
if test -e ../ig_land/$filename ; then
must_update=`diff --binary -q $filename ../ig_land/$filename` ;
else
must_update=YES ;
fi
if test -n "$must_update" ; then
echo " Updating"
cp -u -p $filename ../ig_land/$filename ;
fi
# Idle
../../../idle.bat
done
cd ../ig_land
list_ig=`ls -1 *.[iI][gG]`
for filename in $list_ig ; do
if !(test -e ../ig_land_compare/$filename) then
echo "Remove $filename"
rm $filename ;
fi
# Idle
../../../idle.bat
done
cd $dir_current
# ******************
# List all the zones
# ******************
# Get the landscape name
landscape_name=`cat ../../cfg/config.cfg | grep "landscape_name" | sed -e 's/landscape_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Landscape name exist ?
if ( test "$landscape_name" )
then
# If the list file exists, erase it
if ( test -f "$landscape_name"_ig.txt )
then
rm "$landscape_name"_ig.txt
fi
cd ig_land
for i in *.[iI][gG] ; do
# Build an ig list
if ( test -f $i )
then
echo $i >> ../"$landscape_name"_ig.txt
else
echo >> ../"$landscape_name"_ig.txt
fi
done
cd ..
# Idle
../../idle.bat
fi
#!/bin/bash
rm log.log 2> /dev/null
# ig_land_max: landscape IG eported from 3dsmax not elevated by the heightmap
# ig_land_max_elev: landscape IG eported from 3dsmax elevated by the heightmap
# ig_land_ligo: landscape IG found in ligo bricks not elevated by the heightmap
# ig_land_ligo_elev: landscape IG found in ligo bricks from 3dsmax elevated by the heightmap
# ig_land_ld: landscape IG generated by the land exporter (already elevated by the land exporter)
# ig_land: final IG directory for landscape IGs
# ig_land_compare: Tmp final IG directory for landscape IGs before comparison
# ig_other: final IG directory for village or construction IGs
# Log error
echo ------- >> log.log
echo --- Build ig >> log.log
echo ------- >> log.log
echo -------
echo --- Build ig
echo -------
date >> log.log
date
# ************************************************
# Build the IG_LAND made with the LevelDesign Tool
# ************************************************
# Get the primitive directory
continentdir=`cat ../../cfg/config.cfg | grep "leveldesign_igexport_continent_dir" | sed -e 's/leveldesign_igexport_continent_dir//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/;//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the primitive directories
ligo_ig_primitive_directory=`cat ../../cfg/directories.cfg | grep "ligo_ig_primitive_directory" | sed -e 's/ligo_ig_primitive_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the form directory
form_dir=`cat ../../cfg/site.cfg | grep "level_design_directory" | sed -e 's/level_design_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
if ( test "$continentdir" || test "$ligo_ig_primitive_directory" )
then
land_name=`cat ../../cfg/config.cfg | grep "ligo_export_land" | sed -e 's/ligo_export_land//' | sed -e 's/ //g' | sed -e 's/=//g'`
if ( test "$land_name" )
then
echo [Prim IG] ON
echo [Prim IG] ON >> log.log
# create cfg file
# +++++++++++++++
rm prim_export.cfg
echo "// prim_export.cfg" > prim_export.cfg
echo "OutIGDir = \"ig_land_ld\";" >> prim_export.cfg
echo "ZoneWDir = \"..\\zone\\zone_welded\";" >> prim_export.cfg
name_bank=`cat ../../cfg/properties.cfg | grep "bank_name" | sed -e 's/bank_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "SmallBank = $name_bank" >> prim_export.cfg
name_farbank=`cat ../../cfg/properties.cfg | grep "bankfar_name" | sed -e 's/bankfar_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "FarBank = $name_farbank" >> prim_export.cfg
displacedir=`cat ../../cfg/directories.cfg | grep "displace_source_directory" | sed -e 's/displace_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_database=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "DisplaceDir = \"$dir_database/$displacedir\";" >> prim_export.cfg
echo "CellSize = 160.0;" >> prim_export.cfg
# Set the continent directory to export
echo "PrimDirs = {" >> prim_export.cfg
echo " $continentdir," >> prim_export.cfg
for dir in $ligo_ig_primitive_directory ; do
echo " \"$database_directory/$dir\"," >> prim_export.cfg
done
echo "};" >> prim_export.cfg
# Set the dfn directory to export
echo "FormDir = \"$form_dir\";" >> prim_export.cfg
# *******************
# Launch the exporter
# *******************
prim_export.exe prim_export.cfg
# *******************
# Merge it with the IG_LAND exported from Max + elvated with heightmap
# *******************
# elevation of the heightmap for land_max
# ++++++++++++++++++++++++++++++++++++++++++++
rm ig_elevation.cfg
echo "// ig_elevation.cfg" > ig_elevation.cfg
echo "OutputIGDir = \"ig_land_max_elev\";" >> ig_elevation.cfg
echo "InputIGDir = \"ig_land_max\";" >> ig_elevation.cfg
echo "CellSize = 160.0;" >> ig_elevation.cfg
# HeightMapFile1 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
dir_database=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_ligosrc=`cat ../../cfg/directories.cfg | grep "ligo_source_directory" | sed -e 's/ligo_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
hmf1=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap1" | sed -e 's/ligo_export_heightmap1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile1 = \"$dir_database/$dir_ligosrc/$hmf1\";" >> ig_elevation.cfg
# ZFactor1 is the heightmap factor
zf1=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor1" | sed -e 's/ligo_export_zfactor1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor1 = $zf1;" >> ig_elevation.cfg
# HeightMapFile2 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
hmf2=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap2" | sed -e 's/ligo_export_heightmap2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile2 = \"$dir_database/$dir_ligosrc/$hmf2\";" >> ig_elevation.cfg
# ZFactor2 is the heightmap factor
zf2=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor2" | sed -e 's/ligo_export_zfactor2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor2 = $zf2;" >> ig_elevation.cfg
echo "LandFile = \"$dir_database/$dir_ligosrc/$land_name\";" >> ig_elevation.cfg
ig_elevation ig_elevation.cfg
# elevation of the heightmap for land_ligo
# ++++++++++++++++++++++++++++++++++++++++++++
rm ig_elevation.cfg
echo "// ig_elevation.cfg" > ig_elevation.cfg
echo "OutputIGDir = \"ig_land_ligo_elev\";" >> ig_elevation.cfg
echo "InputIGDir = \"ig_land_ligo\";" >> ig_elevation.cfg
echo "CellSize = 160.0;" >> ig_elevation.cfg
# HeightMapFile1 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
dir_database=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_ligosrc=`cat ../../cfg/directories.cfg | grep "ligo_source_directory" | sed -e 's/ligo_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
hmf1=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap1" | sed -e 's/ligo_export_heightmap1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile1 = \"$dir_database/$dir_ligosrc/$hmf1\";" >> ig_elevation.cfg
# ZFactor1 is the heightmap factor
zf1=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor1" | sed -e 's/ligo_export_zfactor1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor1 = $zf1;" >> ig_elevation.cfg
# HeightMapFile2 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
hmf2=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap2" | sed -e 's/ligo_export_heightmap2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile2 = \"$dir_database/$dir_ligosrc/$hmf2\";" >> ig_elevation.cfg
# ZFactor2 is the heightmap factor
zf2=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor2" | sed -e 's/ligo_export_zfactor2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor2 = $zf2;" >> ig_elevation.cfg
land_name=`cat ../../cfg/config.cfg | grep "ligo_export_land" | sed -e 's/ligo_export_land//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "LandFile = \"$dir_database/$dir_ligosrc/$land_name\";" >> ig_elevation.cfg
ig_elevation ig_elevation.cfg
else
echo [Prim IG] OFF
echo [Prim IG] OFF >> log.log
fi
else
echo [Prim IG] OFF
echo [Prim IG] OFF >> log.log
fi
# Erase ig in ig_merge_tmp and ig_land_compare
rm ig_merge_tmp/*
rm ig_land_compare/*
# Merge ig in ig_land_ld with ig_land_max_elev in ig_merge_tmp
dir_current=`pwd`
cd ig_land_ld
list_ig=`ls -1 *.[iI][gG] 2> /dev/null`
cd $dir_current
for filename in $list_ig ; do
# Does this file exist in ig_land_max_elev ?
if test -e ig_land_max_elev/$filename ; then
# Yes, lets merge it
ig_add ig_merge_tmp/$filename ig_land_max_elev/$filename ig_land_ld/$filename ;
else
# No, only copy it
cp ig_land_ld/$filename ig_merge_tmp/$filename ;
fi
# Idle
../../idle.bat
done
# Merge ig in ig_land_max_elev with ig_land_ld in ig_merge_tmp
cd ig_land_max_elev
list_ig=`ls -1 *.[iI][gG] 2> /dev/null`
cd $dir_current
for filename in $list_ig ; do
# Does this file exist in ig_land_ld ?
if !(test -e ig_land_ld/$filename) then
# No, only copy it
cp ig_land_max_elev/$filename ig_merge_tmp/$filename ;
fi
# Idle
../../idle.bat
done
# Merge ig in ig_merge_tmp with ig_land_ligo_elev in ig_land_compare
cd ig_merge_tmp
list_ig=`ls -1 *.[iI][gG] 2> /dev/null`
cd $dir_current
for filename in $list_ig ; do
# Does this file exist in ig_land_ligo_elev ?
if (test -e ig_land_ligo_elev/$filename) then
# Yes, lets merge it
ig_add ig_land_compare/$filename ig_merge_tmp/$filename ig_land_ligo_elev/$filename ;
else
# No, only copy it
cp ig_merge_tmp/$filename ig_land_compare/$filename ;
fi
# Idle
../../idle.bat
done
# Merge ig in ig_land_ligo_elev with ig_merge_tmp in ig_land_compare
cd ig_land_ligo_elev
list_ig=`ls -1 *.[iI][gG] 2> /dev/null`
cd $dir_current
for filename in $list_ig ; do
# Does this file exist in ig_merge_tmp ?
if !(test -e ig_merge_tmp/$filename) then
# No, only copy it
cp ig_land_ligo_elev/$filename ig_land_compare/$filename ;
fi
# Idle
../../idle.bat
done
# Compare and update
cd ig_land_compare
list_ig=`ls -1 *.[iI][gG]`
for filename in $list_ig ; do
echo "Checking $filename for update"
if test -e ../ig_land/$filename ; then
must_update=`diff --binary -q $filename ../ig_land/$filename` ;
else
must_update=YES ;
fi
if test -n "$must_update" ; then
echo " Updating"
cp -u -p $filename ../ig_land/$filename ;
fi
# Idle
../../../idle.bat
done
cd ../ig_land
list_ig=`ls -1 *.[iI][gG]`
for filename in $list_ig ; do
if !(test -e ../ig_land_compare/$filename) then
echo "Remove $filename"
rm $filename ;
fi
# Idle
../../../idle.bat
done
cd $dir_current
# ******************
# List all the zones
# ******************
# Get the landscape name
landscape_name=`cat ../../cfg/config.cfg | grep "landscape_name" | sed -e 's/landscape_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Landscape name exist ?
if ( test "$landscape_name" )
then
# If the list file exists, erase it
if ( test -f "$landscape_name"_ig.txt )
then
rm "$landscape_name"_ig.txt
fi
cd ig_land
for i in *.[iI][gG] ; do
# Build an ig list
if ( test -f $i )
then
echo $i >> ../"$landscape_name"_ig.txt
else
echo >> ../"$landscape_name"_ig.txt
fi
done
cd ..
# Idle
../../idle.bat
fi

@ -1,90 +1,90 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export ig files (.ig) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "ig_export_timeout" | sed -e 's/ig_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the ig directories
ig_land_source_directories=`cat ../../cfg/directories.cfg | grep "ig_land_source_directory" | sed -e 's/ig_land_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the ig directories
ig_other_source_directories=`cat ../../cfg/directories.cfg | grep "ig_other_source_directory" | sed -e 's/ig_other_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export ig >> log.log
echo ------- >> log.log
echo -------
echo --- Export ig
echo -------
date >> log.log
date
# For each directoy
# List landscape ig
for i in $ig_land_source_directories ; do
# Copy the script
cat maxscript/ig_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/ig/log.log&g" | sed -e "s&ig_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/ig/tag&g" | sed -e "s&output_directory_ig&$build_gamedata_directory/processes/ig/ig_land_max&g" > $max_directory/scripts/ig_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
done
for i in $ig_other_source_directories ; do
# Copy the script
cat maxscript/ig_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/ig/log.log&g" | sed -e "s&ig_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/ig/tag&g" | sed -e "s&output_directory_ig&$build_gamedata_directory/processes/ig/ig_other&g" > $max_directory/scripts/ig_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export ig files (.ig) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "ig_export_timeout" | sed -e 's/ig_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the ig directories
ig_land_source_directories=`cat ../../cfg/directories.cfg | grep "ig_land_source_directory" | sed -e 's/ig_land_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the ig directories
ig_other_source_directories=`cat ../../cfg/directories.cfg | grep "ig_other_source_directory" | sed -e 's/ig_other_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export ig >> log.log
echo ------- >> log.log
echo -------
echo --- Export ig
echo -------
date >> log.log
date
# For each directoy
# List landscape ig
for i in $ig_land_source_directories ; do
# Copy the script
cat maxscript/ig_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/ig/log.log&g" | sed -e "s&ig_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/ig/tag&g" | sed -e "s&output_directory_ig&$build_gamedata_directory/processes/ig/ig_land_max&g" > $max_directory/scripts/ig_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
done
for i in $ig_other_source_directories ; do
# Copy the script
cat maxscript/ig_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/ig/log.log&g" | sed -e "s&ig_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/ig/tag&g" | sed -e "s&output_directory_ig&$build_gamedata_directory/processes/ig/ig_other&g" > $max_directory/scripts/ig_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript ig_export.ms -q -mi -vn
# Idle
../../idle.bat
done

@ -1,30 +1,30 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install ig in the client data
# Get the ig install directory
ig_install_directory=`cat ../../cfg/directories.cfg | grep "ig_install_directory" | sed -e 's/ig_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the landscape name
landscape_name=`cat ../../cfg/config.cfg | grep "landscape_name" | sed -e 's/landscape_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install Ig >> log.log
echo ------- >> log.log
echo -------
echo --- Install Ig
echo -------
date >> log.log
date
cp -u -p "$landscape_name"_ig.txt $client_directory/$ig_install_directory 2>> log.log
# Do not copy ig_land, because zone process will copy zone ig lighted versions into client directory.
#cp -u -p ig_land/*.[iI][gG] $client_directory/$ig_install_directory 2>> log.log
# Do not copy ig_other, because ig_light process will copy ig lighted versions into client directory.
#cp -u -p ig_other/*.[iI][gG] $client_directory/$ig_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install ig in the client data
# Get the ig install directory
ig_install_directory=`cat ../../cfg/directories.cfg | grep "ig_install_directory" | sed -e 's/ig_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the landscape name
landscape_name=`cat ../../cfg/config.cfg | grep "landscape_name" | sed -e 's/landscape_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install Ig >> log.log
echo ------- >> log.log
echo -------
echo --- Install Ig
echo -------
date >> log.log
date
cp -u -p "$landscape_name"_ig.txt $client_directory/$ig_install_directory 2>> log.log
# Do not copy ig_land, because zone process will copy zone ig lighted versions into client directory.
#cp -u -p ig_land/*.[iI][gG] $client_directory/$ig_install_directory 2>> log.log
# Do not copy ig_other, because ig_light process will copy ig lighted versions into client directory.
#cp -u -p ig_other/*.[iI][gG] $client_directory/$ig_install_directory 2>> log.log

@ -1,23 +1,23 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install ig in the client data
# Get the ig install directory
ig_install_directory=`cat ../../cfg/directories.cfg | grep "ig_install_directory" | sed -e 's/ig_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install Lighted Ig >> log.log
echo ------- >> log.log
echo -------
echo --- Install Lighted Ig
echo -------
date >> log.log
date
cp -u -p -R ig_other_lighted/. $client_directory/$ig_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install ig in the client data
# Get the ig install directory
ig_install_directory=`cat ../../cfg/directories.cfg | grep "ig_install_directory" | sed -e 's/ig_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install Lighted Ig >> log.log
echo ------- >> log.log
echo -------
echo --- Install Lighted Ig
echo -------
date >> log.log
date
cp -u -p -R ig_other_lighted/. $client_directory/$ig_install_directory 2>> log.log

@ -1,60 +1,60 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Build interface
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the interface directories
interface_source_directories=`cat ../../cfg/directories.cfg | grep "interface_source_directories" | sed -e 's/interface_source_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the interface directories to compress in one DXTC only
interface_source_dxtc_directories=`cat ../../cfg/directories.cfg | grep "interface_source_dxtc_directories" | sed -e 's/interface_source_dxtc_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Build interface >> log.log
echo ------- >> log.log
echo -------
echo --- Build interface
echo -------
date >> log.log
date
# For each interface directory
for i in $interface_source_directories ; do
# Copy
niouname=`echo $i | sed -e 's&/&_&g'`
rm tga_tmp/*.[tT][gG][aA]
cp -u -p $database_directory/$i/*.[tT][gG][aA] tga_tmp 2>> log.log
build_interface.exe tga/texture_$niouname.tga tga_tmp
# Idle
../../idle.bat
done
# For each interface directory to compress in one DXTC
rm tga_tmp/*.[tT][gG][aA]
for i in $interface_source_dxtc_directories ; do
# Copy
cp -u -p $database_directory/$i/*.[tT][gG][aA] tga_tmp 2>> log.log
done
# build all files in tga_tmp into one tga. Let the OpenGL compress it at runTime (better result for some important cases)
build_interface.exe tga/texture_interfaces_dxtc.tga tga_tmp
# DO NOT COMPRESS ../../bin/tga2dds tga_tmp/texture_interfaces_dxtc.tga -o tga/texture_interfaces_dxtc.dds -a 5
# Compress animation. Important to avoid 'memory fragmentation'
mv -u 3d/*.[aA][nN][iI][mM] anim_tmp 2>> log.log
anim_builder.exe anim_tmp 3d ../../cfg/properties.cfg
# Idle
../../idle.bat
#!/bin/bash
rm log.log 2> /dev/null
# *** Build interface
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the interface directories
interface_source_directories=`cat ../../cfg/directories.cfg | grep "interface_source_directories" | sed -e 's/interface_source_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the interface directories to compress in one DXTC only
interface_source_dxtc_directories=`cat ../../cfg/directories.cfg | grep "interface_source_dxtc_directories" | sed -e 's/interface_source_dxtc_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Build interface >> log.log
echo ------- >> log.log
echo -------
echo --- Build interface
echo -------
date >> log.log
date
# For each interface directory
for i in $interface_source_directories ; do
# Copy
niouname=`echo $i | sed -e 's&/&_&g'`
rm tga_tmp/*.[tT][gG][aA]
cp -u -p $database_directory/$i/*.[tT][gG][aA] tga_tmp 2>> log.log
build_interface.exe tga/texture_$niouname.tga tga_tmp
# Idle
../../idle.bat
done
# For each interface directory to compress in one DXTC
rm tga_tmp/*.[tT][gG][aA]
for i in $interface_source_dxtc_directories ; do
# Copy
cp -u -p $database_directory/$i/*.[tT][gG][aA] tga_tmp 2>> log.log
done
# build all files in tga_tmp into one tga. Let the OpenGL compress it at runTime (better result for some important cases)
build_interface.exe tga/texture_interfaces_dxtc.tga tga_tmp
# DO NOT COMPRESS ../../bin/tga2dds tga_tmp/texture_interfaces_dxtc.tga -o tga/texture_interfaces_dxtc.dds -a 5
# Compress animation. Important to avoid 'memory fragmentation'
mv -u 3d/*.[aA][nN][iI][mM] anim_tmp 2>> log.log
anim_builder.exe anim_tmp 3d ../../cfg/properties.cfg
# Idle
../../idle.bat

@ -1,62 +1,62 @@
#!/bin/bash
rm log.log 2> /dev/null
# Bin
tga_2_dds='tga2dds.exe'
# *** Export interface tile (.tga)
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the interface fullscreen directories
interface_fullscreen_directories=`cat ../../cfg/directories.cfg | grep "interface_fullscreen_directories" | sed -e 's/interface_fullscreen_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the interface 3d directories
interface_3d_directories=`cat ../../cfg/directories.cfg | grep "interface_3d_directories" | sed -e 's/interface_3d_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export interface >> log.log
echo ------- >> log.log
echo -------
echo --- Export interface
echo -------
date >> log.log
date
# For each interface fullscreen directory compress independently all in dds
rm tga_tmp/*.[tT][gG][aA]
for i in $interface_fullscreen_directories; do
# Copy
cp -u -p $database_directory/$i/*.[tT][gG][aA] tga_tmp 2>> log.log
# Idle
../../idle.bat
done
for i in tga_tmp/*.[tT][gG][aA] ; do
# Destination file
dest=`echo $i | sed -e 's/tga_tmp/tga/g'`
dest=`echo $dest | sed -e 's/\.[tT][gG][aA]/.dds/g'`
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
# Convert
$tga_2_dds $i -o $dest -a 5 2>> log.log
fi
# Idle
../../idle.bat
done
# For each interface 3d directory
for i in $interface_3d_directories; do
# Copy
cp -u -p $database_directory/$i/* 3d 2>> log.log
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# Bin
tga_2_dds='tga2dds.exe'
# *** Export interface tile (.tga)
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the interface fullscreen directories
interface_fullscreen_directories=`cat ../../cfg/directories.cfg | grep "interface_fullscreen_directories" | sed -e 's/interface_fullscreen_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the interface 3d directories
interface_3d_directories=`cat ../../cfg/directories.cfg | grep "interface_3d_directories" | sed -e 's/interface_3d_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export interface >> log.log
echo ------- >> log.log
echo -------
echo --- Export interface
echo -------
date >> log.log
date
# For each interface fullscreen directory compress independently all in dds
rm tga_tmp/*.[tT][gG][aA]
for i in $interface_fullscreen_directories; do
# Copy
cp -u -p $database_directory/$i/*.[tT][gG][aA] tga_tmp 2>> log.log
# Idle
../../idle.bat
done
for i in tga_tmp/*.[tT][gG][aA] ; do
# Destination file
dest=`echo $i | sed -e 's/tga_tmp/tga/g'`
dest=`echo $dest | sed -e 's/\.[tT][gG][aA]/.dds/g'`
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
# Convert
$tga_2_dds $i -o $dest -a 5 2>> log.log
fi
# Idle
../../idle.bat
done
# For each interface 3d directory
for i in $interface_3d_directories; do
# Copy
cp -u -p $database_directory/$i/* 3d 2>> log.log
# Idle
../../idle.bat
done

@ -1,24 +1,24 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install the interface in the client data
# Get the interface install directory
interface_install_directory=`cat ../../cfg/directories.cfg | grep "interface_install_directory" | sed -e 's/interface_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install interface >> log.log
echo ------- >> log.log
echo -------
echo --- Install interface
echo -------
date >> log.log
date
cp -u -p -R tga/. $client_directory/$interface_install_directory 2>> log.log
cp -u -p -R 3d/. $client_directory/$interface_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install the interface in the client data
# Get the interface install directory
interface_install_directory=`cat ../../cfg/directories.cfg | grep "interface_install_directory" | sed -e 's/interface_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install interface >> log.log
echo ------- >> log.log
echo -------
echo --- Install interface
echo -------
date >> log.log
date
cp -u -p -R tga/. $client_directory/$interface_install_directory 2>> log.log
cp -u -p -R 3d/. $client_directory/$interface_install_directory 2>> log.log

@ -1,202 +1,202 @@
#!/bin/bash
rm log.log 2> /dev/null
echo > log.log
# ********************
# Make the config file
# ********************
exec_timeout='exec_timeout.exe'
# Get the timeout
land_exporter_timeout=`cat ../../cfg/config.cfg | grep "ligo_build_timeout" | sed -e 's/ligo_build_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
rm land_exporter.cfg
echo "// land_exporter.cfg" > land_exporter.cfg
# OutZoneDir is Where to put all .zone generated
#dir_gamedata=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
#echo "OutZoneDir = \"$dir_gamedata/processes/ligo/output\";" >> land_exporter.cfg
echo "OutZoneDir = \"output\";" >> land_exporter.cfg
echo "OutIGDir = \"../ig/ig_land_ligo\";" >> land_exporter.cfg
echo "AdditionnalIGOutDir = \"../ig/ig_other\";" >> land_exporter.cfg
# RefZoneDir is Where the reference zones are
dir_database=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_ligosrc=`cat ../../cfg/directories.cfg | grep "ligo_source_directory" | sed -e 's/ligo_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_ligobricks=`cat ../../cfg/directories.cfg | grep "ligo_bricks_directory" | sed -e 's/ligo_bricks_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_dfn=`cat ../../cfg/site.cfg | grep "level_design_dfn_directory" | sed -e 's/level_design_dfn_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
continent_file=`cat ../../cfg/config.cfg | grep "continent_file" | sed -e 's/continent_file//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_world=`cat ../../cfg/site.cfg | grep "level_design_world_directory" | sed -e 's/level_design_world_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# dir_continents=`cat ../../cfg/site.cfg | grep "continents_directory" | sed -e 's/continents_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "RefZoneDir = \"$dir_ligobricks/zones\";" >> land_exporter.cfg
echo "RefIGDir = \"$dir_ligobricks/igs\";" >> land_exporter.cfg
echo "AdditionnalIGInDir = \"$dir_ligobricks/igs\";" >> land_exporter.cfg
# echo "ContinentsDir = \"$dir_continents\";" >> land_exporter.cfg
echo "ContinentsDir = \"$dir_world\";" >> land_exporter.cfg
# LigoBankDir is Where all .ligozone are (those used by the .land)
echo "LigoBankDir = \"$dir_ligobricks/zoneligos\";" >> land_exporter.cfg
# TileBankFile is the .bank file (used to know if a tile is oriented and the like)
name_bank=`cat ../../cfg/properties.cfg | grep "bank_name" | sed -e 's/bank_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "TileBankFile = $name_bank" >> land_exporter.cfg
# ColorMapFile
cmf=`cat ../../cfg/config.cfg | grep "ligo_export_colormap" | sed -e 's/ligo_export_colormap//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ColorMapFile = \"$dir_database/$dir_ligosrc/$cmf\";" >> land_exporter.cfg
# HeightMapFile1 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
hmf1=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap1" | sed -e 's/ligo_export_heightmap1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile1 = \"$dir_database/$dir_ligosrc/$hmf1\";" >> land_exporter.cfg
# ZFactor1 is the heightmap factor
zf1=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor1" | sed -e 's/ligo_export_zfactor1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor1 = $zf1;" >> land_exporter.cfg
# HeightMapFile2 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
hmf2=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap2" | sed -e 's/ligo_export_heightmap2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile2 = \"$dir_database/$dir_ligosrc/$hmf2\";" >> land_exporter.cfg
# ZFactor2 is the heightmap factor
zf2=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor2" | sed -e 's/ligo_export_zfactor2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor2 = $zf2;" >> land_exporter.cfg
# ZoneLight is Roughly light the zone (0-none, 1-patch, 2-noise)
echo "ZoneLight = 0;" >> land_exporter.cfg
# CellSize is the size of the cell (zone size) in meter
echo "CellSize = 160;" >> land_exporter.cfg
# Threshild is the weld threshold in meter
echo "Threshold = 1;" >> land_exporter.cfg
# Where to take dfn files
echo "DFNDir = \"$dir_dfn\";" >> land_exporter.cfg
# CMB input directory
echo "RefCMBDir = \"$dir_ligobricks/cmb\";" >> land_exporter.cfg
# CMB output directory
echo "OutCMBDir = \"../rbank/cmb\";" >> land_exporter.cfg
#input .continent file
echo "ContinentFile = \"$dir_world/$continent_file\";" >> land_exporter.cfg
# Force export of collisions and additionnal igs
echo "ExportCollisions = 1;" >> land_exporter.cfg
echo "ExportAdditionnalIGs = 1;" >> land_exporter.cfg
# ZoneRegionFile is the .land to compute
dir_current=`pwd`
land_name=`cat ../../cfg/config.cfg | grep "ligo_export_land" | sed -e 's/ligo_export_land//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZoneRegionFile = \"$dir_database/$dir_ligosrc/$land_name\";" >> land_exporter.cfg
# if there is no .land then do not generate all zones and zone welded
if test -z "$land_name" ; then
echo No .land set -- Exiting --
exit;
fi
# *******************
# launch the exporter
# *******************
echo ------- >> log.log
echo --- Generate ligo zone >> log.log
echo ------- >> log.log
echo -------
echo --- Generate ligo zone
echo -------
date >> log.log
date
echo Exporting
$exec_timeout $land_exporter_timeout land_export.exe land_exporter.cfg
# rename *.[zZ][oO][nN][eE][lL] *.[zZ][oO][nN][eE]
# script is just too slow to do renaming... And we can't call directly dos command
cd output
../sh/renametozone.bat
cd ..
# **************
# Copy the zones
# **************
cd ../zone
mkdir zone_exported 2> /dev/null
# Try to copy ligo zone if any
# ****************************
ligo_flag=`cat ../../cfg/config.cfg | grep "process_to_complete" | grep "ligo"`
dir_current=`pwd`
cd ../ligo/output
list_zone=`ls -1 *.[zZ][oO][nN][eE]*`
for filename in $list_zone ; do
echo "Checking $filename for update"
if test -e ../../zone/zone_exported/$filename ; then
must_update=`diff --binary -q $filename ../../zone/zone_exported/$filename` ;
else
must_update=YES ;
fi
if test -n "$must_update" ; then
echo " Updating"
cp -u -p $filename ../../zone/zone_exported/$filename ;
fi
# Idle
../../../idle.bat
done
cd $dir_current
# delete files only present in the zone_exported directory
if ( test "$ligo_flag" )
then
cd ./zone_exported
list_zone=`ls -1 *.[zZ][oO][nN][eE]*`
for filename in $list_zone ; do
if test -e ../../ligo/output/$filename ; then
must_update=NO ;
else
echo "Removing $filename"
rm $filename ;
fi
# Idle
../../../idle.bat
done
cd ..
fi
#!/bin/bash
rm log.log 2> /dev/null
echo > log.log
# ********************
# Make the config file
# ********************
exec_timeout='exec_timeout.exe'
# Get the timeout
land_exporter_timeout=`cat ../../cfg/config.cfg | grep "ligo_build_timeout" | sed -e 's/ligo_build_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
rm land_exporter.cfg
echo "// land_exporter.cfg" > land_exporter.cfg
# OutZoneDir is Where to put all .zone generated
#dir_gamedata=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
#echo "OutZoneDir = \"$dir_gamedata/processes/ligo/output\";" >> land_exporter.cfg
echo "OutZoneDir = \"output\";" >> land_exporter.cfg
echo "OutIGDir = \"../ig/ig_land_ligo\";" >> land_exporter.cfg
echo "AdditionnalIGOutDir = \"../ig/ig_other\";" >> land_exporter.cfg
# RefZoneDir is Where the reference zones are
dir_database=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_ligosrc=`cat ../../cfg/directories.cfg | grep "ligo_source_directory" | sed -e 's/ligo_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_ligobricks=`cat ../../cfg/directories.cfg | grep "ligo_bricks_directory" | sed -e 's/ligo_bricks_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_dfn=`cat ../../cfg/site.cfg | grep "level_design_dfn_directory" | sed -e 's/level_design_dfn_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
continent_file=`cat ../../cfg/config.cfg | grep "continent_file" | sed -e 's/continent_file//' | sed -e 's/ //g' | sed -e 's/=//g'`
dir_world=`cat ../../cfg/site.cfg | grep "level_design_world_directory" | sed -e 's/level_design_world_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# dir_continents=`cat ../../cfg/site.cfg | grep "continents_directory" | sed -e 's/continents_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "RefZoneDir = \"$dir_ligobricks/zones\";" >> land_exporter.cfg
echo "RefIGDir = \"$dir_ligobricks/igs\";" >> land_exporter.cfg
echo "AdditionnalIGInDir = \"$dir_ligobricks/igs\";" >> land_exporter.cfg
# echo "ContinentsDir = \"$dir_continents\";" >> land_exporter.cfg
echo "ContinentsDir = \"$dir_world\";" >> land_exporter.cfg
# LigoBankDir is Where all .ligozone are (those used by the .land)
echo "LigoBankDir = \"$dir_ligobricks/zoneligos\";" >> land_exporter.cfg
# TileBankFile is the .bank file (used to know if a tile is oriented and the like)
name_bank=`cat ../../cfg/properties.cfg | grep "bank_name" | sed -e 's/bank_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "TileBankFile = $name_bank" >> land_exporter.cfg
# ColorMapFile
cmf=`cat ../../cfg/config.cfg | grep "ligo_export_colormap" | sed -e 's/ligo_export_colormap//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ColorMapFile = \"$dir_database/$dir_ligosrc/$cmf\";" >> land_exporter.cfg
# HeightMapFile1 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
hmf1=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap1" | sed -e 's/ligo_export_heightmap1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile1 = \"$dir_database/$dir_ligosrc/$hmf1\";" >> land_exporter.cfg
# ZFactor1 is the heightmap factor
zf1=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor1" | sed -e 's/ligo_export_zfactor1//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor1 = $zf1;" >> land_exporter.cfg
# HeightMapFile2 is the grayscale .tga file (127 is 0, 0 is -127*ZFactor and 255 is +128*ZFactor)
hmf2=`cat ../../cfg/config.cfg | grep "ligo_export_heightmap2" | sed -e 's/ligo_export_heightmap2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "HeightMapFile2 = \"$dir_database/$dir_ligosrc/$hmf2\";" >> land_exporter.cfg
# ZFactor2 is the heightmap factor
zf2=`cat ../../cfg/config.cfg | grep "ligo_export_zfactor2" | sed -e 's/ligo_export_zfactor2//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZFactor2 = $zf2;" >> land_exporter.cfg
# ZoneLight is Roughly light the zone (0-none, 1-patch, 2-noise)
echo "ZoneLight = 0;" >> land_exporter.cfg
# CellSize is the size of the cell (zone size) in meter
echo "CellSize = 160;" >> land_exporter.cfg
# Threshild is the weld threshold in meter
echo "Threshold = 1;" >> land_exporter.cfg
# Where to take dfn files
echo "DFNDir = \"$dir_dfn\";" >> land_exporter.cfg
# CMB input directory
echo "RefCMBDir = \"$dir_ligobricks/cmb\";" >> land_exporter.cfg
# CMB output directory
echo "OutCMBDir = \"../rbank/cmb\";" >> land_exporter.cfg
#input .continent file
echo "ContinentFile = \"$dir_world/$continent_file\";" >> land_exporter.cfg
# Force export of collisions and additionnal igs
echo "ExportCollisions = 1;" >> land_exporter.cfg
echo "ExportAdditionnalIGs = 1;" >> land_exporter.cfg
# ZoneRegionFile is the .land to compute
dir_current=`pwd`
land_name=`cat ../../cfg/config.cfg | grep "ligo_export_land" | sed -e 's/ligo_export_land//' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "ZoneRegionFile = \"$dir_database/$dir_ligosrc/$land_name\";" >> land_exporter.cfg
# if there is no .land then do not generate all zones and zone welded
if test -z "$land_name" ; then
echo No .land set -- Exiting --
exit;
fi
# *******************
# launch the exporter
# *******************
echo ------- >> log.log
echo --- Generate ligo zone >> log.log
echo ------- >> log.log
echo -------
echo --- Generate ligo zone
echo -------
date >> log.log
date
echo Exporting
$exec_timeout $land_exporter_timeout land_export.exe land_exporter.cfg
# rename *.[zZ][oO][nN][eE][lL] *.[zZ][oO][nN][eE]
# script is just too slow to do renaming... And we can't call directly dos command
cd output
../sh/renametozone.bat
cd ..
# **************
# Copy the zones
# **************
cd ../zone
mkdir zone_exported 2> /dev/null
# Try to copy ligo zone if any
# ****************************
ligo_flag=`cat ../../cfg/config.cfg | grep "process_to_complete" | grep "ligo"`
dir_current=`pwd`
cd ../ligo/output
list_zone=`ls -1 *.[zZ][oO][nN][eE]*`
for filename in $list_zone ; do
echo "Checking $filename for update"
if test -e ../../zone/zone_exported/$filename ; then
must_update=`diff --binary -q $filename ../../zone/zone_exported/$filename` ;
else
must_update=YES ;
fi
if test -n "$must_update" ; then
echo " Updating"
cp -u -p $filename ../../zone/zone_exported/$filename ;
fi
# Idle
../../../idle.bat
done
cd $dir_current
# delete files only present in the zone_exported directory
if ( test "$ligo_flag" )
then
cd ./zone_exported
list_zone=`ls -1 *.[zZ][oO][nN][eE]*`
for filename in $list_zone ; do
if test -e ../../ligo/output/$filename ; then
must_update=NO ;
else
echo "Removing $filename"
rm $filename ;
fi
# Idle
../../../idle.bat
done
cd ..
fi

@ -1,72 +1,72 @@
#!/bin/bash
rm log.log 2> /dev/null
echo > log.log
# *** Export ligo zone files from Max ***
# *** ******************************* ***
echo ------- >> log.log
echo --- Export ligo zone >> log.log
echo ------- >> log.log
echo -------
echo --- Export ligo zone
echo -------
date >> log.log
date
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "ligo_export_timeout" | sed -e 's/ligo_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get current directory
dir_gamedata=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's&\/&\\\&g'`
dir_gamedata_maxscript=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the bank filename
bank_filename=`cat ../../cfg/properties.cfg | grep "bank_name" | sed -e 's/bank_name//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/"//g' | sed -e 's/;//g'`
bankfar_filename=`cat ../../cfg/properties.cfg | grep "bankfar_name" | sed -e 's/bankfar_name//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/"//g' | sed -e 's/;//g'`
# Copy the bank file
cp $bank_filename smallbank/ligo.smallbank 2>> log.log
cp $bankfar_filename smallbank/ligo.farbank 2>> log.log
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# delete ini file
rm $max_directory/plugcfg/nelligo.ini
# echo "$max_directory/plugcfg/nelligo.ini" >> log.log
# create the ini file
echo "[LigoConfig]" > $max_directory/plugcfg/nelligo.ini
# copy the ligo export script
cat maxscript/nel_ligo_export.ms | sed -e "s&output_directory_tag&$dir_gamedata_maxscript/processes/ligo/tag&g" | sed -e "s&output_logfile&$dir_gamedata_maxscript/processes/ligo/log.log&g" | sed -e "s&bankFilename&$dir_gamedata_maxscript/processes/ligo/smallbank/ligo.smallbank&g" > $max_directory/scripts/nel_ligo_export.ms
dir_database=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's&\/&\\\&g'`
dir_ligosrc=`cat ../../cfg/directories.cfg | grep "ligo_source_directory" | sed -e 's/ligo_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's&\/&\\\&g'`
echo "LigoPath=$dir_database\\$dir_ligosrc\\max\\" >> $max_directory/plugcfg/nelligo.ini
#echo "LigoExportPath=$dir_database\\$dir_ligosrc\\" >> $max_directory/plugcfg/nelligo.ini
echo "LigoExportPath=$dir_gamedata\\processes\\ligo\\" >> $max_directory/plugcfg/nelligo.ini
# export only if no .land set
land_name=`cat ../../cfg/config.cfg | grep "ligo_export_land" | sed -e 's/ligo_export_land//' | sed -e 's/ //g' | sed -e 's/=//g'`
ligo_export_one_pass=`cat ../../cfg/config.cfg | grep "ligo_export_one_pass" | sed -e 's/ligo_export_one_pass//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/"//g' | sed -e 's/;//g'`
if [ -z "$land_name" -o "$ligo_export_one_pass" == "1" ] ; then
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript nel_ligo_export.ms -q -mi -vn
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript nel_ligo_export.ms -q -mi -vn
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript nel_ligo_export.ms -q -mi -vn
fi
#!/bin/bash
rm log.log 2> /dev/null
echo > log.log
# *** Export ligo zone files from Max ***
# *** ******************************* ***
echo ------- >> log.log
echo --- Export ligo zone >> log.log
echo ------- >> log.log
echo -------
echo --- Export ligo zone
echo -------
date >> log.log
date
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "ligo_export_timeout" | sed -e 's/ligo_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get current directory
dir_gamedata=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's&\/&\\\&g'`
dir_gamedata_maxscript=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the bank filename
bank_filename=`cat ../../cfg/properties.cfg | grep "bank_name" | sed -e 's/bank_name//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/"//g' | sed -e 's/;//g'`
bankfar_filename=`cat ../../cfg/properties.cfg | grep "bankfar_name" | sed -e 's/bankfar_name//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/"//g' | sed -e 's/;//g'`
# Copy the bank file
cp $bank_filename smallbank/ligo.smallbank 2>> log.log
cp $bankfar_filename smallbank/ligo.farbank 2>> log.log
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# delete ini file
rm $max_directory/plugcfg/nelligo.ini
# echo "$max_directory/plugcfg/nelligo.ini" >> log.log
# create the ini file
echo "[LigoConfig]" > $max_directory/plugcfg/nelligo.ini
# copy the ligo export script
cat maxscript/nel_ligo_export.ms | sed -e "s&output_directory_tag&$dir_gamedata_maxscript/processes/ligo/tag&g" | sed -e "s&output_logfile&$dir_gamedata_maxscript/processes/ligo/log.log&g" | sed -e "s&bankFilename&$dir_gamedata_maxscript/processes/ligo/smallbank/ligo.smallbank&g" > $max_directory/scripts/nel_ligo_export.ms
dir_database=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's&\/&\\\&g'`
dir_ligosrc=`cat ../../cfg/directories.cfg | grep "ligo_source_directory" | sed -e 's/ligo_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's&\/&\\\&g'`
echo "LigoPath=$dir_database\\$dir_ligosrc\\max\\" >> $max_directory/plugcfg/nelligo.ini
#echo "LigoExportPath=$dir_database\\$dir_ligosrc\\" >> $max_directory/plugcfg/nelligo.ini
echo "LigoExportPath=$dir_gamedata\\processes\\ligo\\" >> $max_directory/plugcfg/nelligo.ini
# export only if no .land set
land_name=`cat ../../cfg/config.cfg | grep "ligo_export_land" | sed -e 's/ligo_export_land//' | sed -e 's/ //g' | sed -e 's/=//g'`
ligo_export_one_pass=`cat ../../cfg/config.cfg | grep "ligo_export_one_pass" | sed -e 's/ligo_export_one_pass//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/"//g' | sed -e 's/;//g'`
if [ -z "$land_name" -o "$ligo_export_one_pass" == "1" ] ; then
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript nel_ligo_export.ms -q -mi -vn
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript nel_ligo_export.ms -q -mi -vn
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript nel_ligo_export.ms -q -mi -vn
fi

@ -1,140 +1,140 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Build map files (.tga / .dds)
# Bin
tga_2_dds='tga2dds.exe'
# Log error
echo ------- > log.log
echo --- Build map >> log.log
echo ------- >> log.log
echo -------
echo --- Build map
echo -------
date >> log.log
date
#*** Build panoply files (.tga / .dds), and copy the result in the tga directory
# Copy panoply containt into cache if the process as been stopped before the end of build.
echo Copy panoply into cache
cp -u -p -R panoply/. cache 2>> log.log
echo Remove panoply directory
rm -r panoply 2>> log.log
echo Copy hlsinfo into cache
cp -u -p -R hlsinfo/. cache 2>> log.log
echo Remove hlsinfo directory
rm -r hlsinfo 2>> log.log
mkdir panoply
mkdir hlsinfo
# Bin
panoply_maker='panoply_maker.exe'
# Log error
echo ------- > log.log
echo --- Build panoply >> log.log
echo ------- >> log.log
echo -------
echo --- Build panoply
echo -------
date >> log.log
date
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Reduce bitmap size factor
reduce_bitmap_factor=`cat ../../cfg/config.cfg | grep "reduce_bitmap_factor" | sed -e 's/reduce_bitmap_factor//' | sed -e 's/ //g' | sed -e 's/=//g'`
panoply_file_list=`cat ../../cfg/config.cfg | grep "panoply_file_list" | sed -e 's/panoply_file_list//' | sed -e 's/ //g' | sed -e 's/=//g'`
if test "$panoply_file_list" ; then
rm $panoply_file_list
panoply_config_file=`cat ../../cfg/directories.cfg | grep "panoply_config_file" | sed -e 's/panoply_config_file//' | sed -e 's/ //g' | sed -e 's/=//g'`
for psource in $panoply_config_file ; do
cp $database_directory/$psource current_panoply.cfg
echo "output_path=\"panoply\";" >> current_panoply.cfg
echo "cache_path=\"cache\";" >> current_panoply.cfg
panoply_maker.exe current_panoply.cfg
# Idle
../../idle.bat
done
ls panoply >> $panoply_file_list
fi
# For each directoy
for i in tga/*.[tT][gG][aA] ; do
# Destination file
dest=`echo $i | sed -e 's/[tT][gG][aA]/dds/' | sed -e 's/\.[tT][gG][aA]/.dds/g'`
dds=`echo $i | sed -e 's/\.[tT][gG][aA]/.dds/g'`
# Convert the lightmap in 16 bits mode
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
# Copy the dds file
if (test -f $dds)
then
cp $dds $dest
fi
# Convert
$tga_2_dds $i -o $dest -m -r$reduce_bitmap_factor 2>> log.log
fi
# Idle
../../idle.bat
done
for i in panoply/*.[tT][gG][aA] ; do
# Destination file
dest=`echo $i | sed -e 's%panoply/%dds/%g' | sed -e 's/[tT][gG][aA]/dds/g'`
dds=`echo $i | sed -e 's/\.[tT][gG][aA]/.dds/g'`
# Convert the lightmap in 16 bits mode
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
# Copy the dds file
if (test -f $dds)
then
cp $dds $dest
fi
# Convert
$tga_2_dds $i -o $dest -m -r$reduce_bitmap_factor 2>> log.log
fi
# Idle
../../idle.bat
done
# Bin
hls_bank_maker='hls_bank_maker.exe'
# build the HLSBank (if hlsInfo present, and if build wanted)
hls_bank_file_name=`cat ../../cfg/config.cfg | grep "hls_bank_file_name" | sed -e 's/hls_bank_file_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
if test "$hls_bank_file_name" ; then
rm $hls_bank_file_name
$hls_bank_maker hlsinfo $hls_bank_file_name
fi
# Put old panoply in cache
echo Remove the panoply cache
rm -r cache 2>> log.log
echo Rename panoply as cache
mv panoply cache 2>> log.log
echo Move hlsinfo into cache
cp -u -p -R hlsinfo/. cache 2>> log.log
echo Remove the hlsinfo
rm -r hlsinfo 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# *** Build map files (.tga / .dds)
# Bin
tga_2_dds='tga2dds.exe'
# Log error
echo ------- > log.log
echo --- Build map >> log.log
echo ------- >> log.log
echo -------
echo --- Build map
echo -------
date >> log.log
date
#*** Build panoply files (.tga / .dds), and copy the result in the tga directory
# Copy panoply containt into cache if the process as been stopped before the end of build.
echo Copy panoply into cache
cp -u -p -R panoply/. cache 2>> log.log
echo Remove panoply directory
rm -r panoply 2>> log.log
echo Copy hlsinfo into cache
cp -u -p -R hlsinfo/. cache 2>> log.log
echo Remove hlsinfo directory
rm -r hlsinfo 2>> log.log
mkdir panoply
mkdir hlsinfo
# Bin
panoply_maker='panoply_maker.exe'
# Log error
echo ------- > log.log
echo --- Build panoply >> log.log
echo ------- >> log.log
echo -------
echo --- Build panoply
echo -------
date >> log.log
date
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Reduce bitmap size factor
reduce_bitmap_factor=`cat ../../cfg/config.cfg | grep "reduce_bitmap_factor" | sed -e 's/reduce_bitmap_factor//' | sed -e 's/ //g' | sed -e 's/=//g'`
panoply_file_list=`cat ../../cfg/config.cfg | grep "panoply_file_list" | sed -e 's/panoply_file_list//' | sed -e 's/ //g' | sed -e 's/=//g'`
if test "$panoply_file_list" ; then
rm $panoply_file_list
panoply_config_file=`cat ../../cfg/directories.cfg | grep "panoply_config_file" | sed -e 's/panoply_config_file//' | sed -e 's/ //g' | sed -e 's/=//g'`
for psource in $panoply_config_file ; do
cp $database_directory/$psource current_panoply.cfg
echo "output_path=\"panoply\";" >> current_panoply.cfg
echo "cache_path=\"cache\";" >> current_panoply.cfg
panoply_maker.exe current_panoply.cfg
# Idle
../../idle.bat
done
ls panoply >> $panoply_file_list
fi
# For each directoy
for i in tga/*.[tT][gG][aA] ; do
# Destination file
dest=`echo $i | sed -e 's/[tT][gG][aA]/dds/' | sed -e 's/\.[tT][gG][aA]/.dds/g'`
dds=`echo $i | sed -e 's/\.[tT][gG][aA]/.dds/g'`
# Convert the lightmap in 16 bits mode
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
# Copy the dds file
if (test -f $dds)
then
cp $dds $dest
fi
# Convert
$tga_2_dds $i -o $dest -m -r$reduce_bitmap_factor 2>> log.log
fi
# Idle
../../idle.bat
done
for i in panoply/*.[tT][gG][aA] ; do
# Destination file
dest=`echo $i | sed -e 's%panoply/%dds/%g' | sed -e 's/[tT][gG][aA]/dds/g'`
dds=`echo $i | sed -e 's/\.[tT][gG][aA]/.dds/g'`
# Convert the lightmap in 16 bits mode
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
# Copy the dds file
if (test -f $dds)
then
cp $dds $dest
fi
# Convert
$tga_2_dds $i -o $dest -m -r$reduce_bitmap_factor 2>> log.log
fi
# Idle
../../idle.bat
done
# Bin
hls_bank_maker='hls_bank_maker.exe'
# build the HLSBank (if hlsInfo present, and if build wanted)
hls_bank_file_name=`cat ../../cfg/config.cfg | grep "hls_bank_file_name" | sed -e 's/hls_bank_file_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
if test "$hls_bank_file_name" ; then
rm $hls_bank_file_name
$hls_bank_maker hlsinfo $hls_bank_file_name
fi
# Put old panoply in cache
echo Remove the panoply cache
rm -r cache 2>> log.log
echo Rename panoply as cache
mv panoply cache 2>> log.log
echo Move hlsinfo into cache
cp -u -p -R hlsinfo/. cache 2>> log.log
echo Remove the hlsinfo
rm -r hlsinfo 2>> log.log

@ -1,57 +1,57 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export maps files (.tga / *.[dD][dD][sS]) from the database
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the maps directories
map_source_directories=`cat ../../cfg/directories.cfg | grep "map_source_directory" | sed -e 's/map_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
map_uncompressed_source_directories=`cat ../../cfg/directories.cfg | grep "map_uncompressed_source_directory" | sed -e 's/map_uncompressed_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export map >> log.log
echo ------- >> log.log
echo -------
echo --- Export map
echo -------
date >> log.log
date
# For each directoy
for i in $map_source_directories; do
for j in $database_directory/$i/*.[tT][gG][aA]; do
if ( test -f $j )
then
# Get the dds version
dds=`echo $j | sed -e 's&.tga&.dds&g'`
# Copy the dds and the tga
cp -u -p $j tga 2>> log.log
if ( test -f $dds )
then
cp -u -p $dds tga 2>> log.log
fi
fi
done
# Idle
../../idle.bat
done
for i in $map_uncompressed_source_directories; do
for j in $database_directory/$i/*.[tT][gG][aA]; do
if ( test -f $j )
then
# Copy the dds and the tga
cp -u -p $j tga_uncompressed 2>> log.log
fi
done
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export maps files (.tga / *.[dD][dD][sS]) from the database
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the maps directories
map_source_directories=`cat ../../cfg/directories.cfg | grep "map_source_directory" | sed -e 's/map_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
map_uncompressed_source_directories=`cat ../../cfg/directories.cfg | grep "map_uncompressed_source_directory" | sed -e 's/map_uncompressed_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export map >> log.log
echo ------- >> log.log
echo -------
echo --- Export map
echo -------
date >> log.log
date
# For each directoy
for i in $map_source_directories; do
for j in $database_directory/$i/*.[tT][gG][aA]; do
if ( test -f $j )
then
# Get the dds version
dds=`echo $j | sed -e 's&.tga&.dds&g'`
# Copy the dds and the tga
cp -u -p $j tga 2>> log.log
if ( test -f $dds )
then
cp -u -p $dds tga 2>> log.log
fi
fi
done
# Idle
../../idle.bat
done
for i in $map_uncompressed_source_directories; do
for j in $database_directory/$i/*.[tT][gG][aA]; do
if ( test -f $j )
then
# Copy the dds and the tga
cp -u -p $j tga_uncompressed 2>> log.log
fi
done
# Idle
../../idle.bat
done

@ -1,55 +1,55 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install maps in the client data
# Get the skel install directory
bitmap_install_directory=`cat ../../cfg/directories.cfg | grep "bitmap_install_directory" | sed -e 's/bitmap_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install maps >> log.log
echo ------- >> log.log
echo -------
echo --- Install maps
echo -------
date >> log.log
date
cp -u -p -R dds/. $client_directory/$bitmap_install_directory 2>> log.log
cp -u -p -R tga_uncompressed/. $client_directory/$bitmap_install_directory 2>> log.log
panoply_file_list=`cat ../../cfg/config.cfg | grep "panoply_file_list" | sed -e 's/panoply_file_list//' | sed -e 's/ //g' | sed -e 's/=//g'`
if test "$panoply_file_list" ; then
cp -u -p $panoply_file_list $client_directory/$bitmap_install_directory 2>> log.log
panoply_config_file=`cat ../../cfg/directories.cfg | grep "panoply_config_file" | sed -e 's/panoply_config_file//' | sed -e 's/ //g' | sed -e 's/=//g'`
for psource in $panoply_config_file ; do
cp $database_directory/$psource $client_directory/$bitmap_install_directory/panoply.cfg
done
ls panoply >> $panoply_file_list
fi
# Install hlsbank in the client data, in the "maps/" directory
# Log error
echo --- Install hlsbank >> log.log
echo ------- >> log.log
echo -------
echo --- Install hlsbank
echo -------
date >> log.log
date
# build the HLSBank (if hlsInfo present, and if build wanted)
hls_bank_file_name=`cat ../../cfg/config.cfg | grep "hls_bank_file_name" | sed -e 's/hls_bank_file_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
if test "$hls_bank_file_name" ; then
cp -u -p -R $hls_bank_file_name $client_directory/$bitmap_install_directory 2>> log.log
fi
#!/bin/bash
rm log.log 2> /dev/null
# Install maps in the client data
# Get the skel install directory
bitmap_install_directory=`cat ../../cfg/directories.cfg | grep "bitmap_install_directory" | sed -e 's/bitmap_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install maps >> log.log
echo ------- >> log.log
echo -------
echo --- Install maps
echo -------
date >> log.log
date
cp -u -p -R dds/. $client_directory/$bitmap_install_directory 2>> log.log
cp -u -p -R tga_uncompressed/. $client_directory/$bitmap_install_directory 2>> log.log
panoply_file_list=`cat ../../cfg/config.cfg | grep "panoply_file_list" | sed -e 's/panoply_file_list//' | sed -e 's/ //g' | sed -e 's/=//g'`
if test "$panoply_file_list" ; then
cp -u -p $panoply_file_list $client_directory/$bitmap_install_directory 2>> log.log
panoply_config_file=`cat ../../cfg/directories.cfg | grep "panoply_config_file" | sed -e 's/panoply_config_file//' | sed -e 's/ //g' | sed -e 's/=//g'`
for psource in $panoply_config_file ; do
cp $database_directory/$psource $client_directory/$bitmap_install_directory/panoply.cfg
done
ls panoply >> $panoply_file_list
fi
# Install hlsbank in the client data, in the "maps/" directory
# Log error
echo --- Install hlsbank >> log.log
echo ------- >> log.log
echo -------
echo --- Install hlsbank
echo -------
date >> log.log
date
# build the HLSBank (if hlsInfo present, and if build wanted)
hls_bank_file_name=`cat ../../cfg/config.cfg | grep "hls_bank_file_name" | sed -e 's/hls_bank_file_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
if test "$hls_bank_file_name" ; then
cp -u -p -R $hls_bank_file_name $client_directory/$bitmap_install_directory 2>> log.log
fi

@ -1,59 +1,59 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export pacs_prim files (.pacs_prim) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "pacs_prim_export_timeout" | sed -e 's/pacs_prim_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the collision directories
pacs_prim_source_directories=`cat ../../cfg/directories.cfg | grep "pacs_prim_source_directories" | sed -e 's/pacs_prim_source_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export pacs_prim for pacs_prim >> log.log
echo ------- >> log.log
echo -------
echo --- Export pacs_prim for pacs_prim
echo -------
date >> log.log
date
# For each directoy
for i in $pacs_prim_source_directories ; do
# Copy the script
cat maxscript/pacs_prim_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/pacs_prim/log.log&g" | sed -e "s&pacs_prim_source_directory&$database_directory/$i&g" | sed -e "s&output_directory&$build_gamedata_directory/processes/pacs_prim/pacs_prim&g" > $max_directory/scripts/pacs_prim_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript pacs_prim_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript pacs_prim_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript pacs_prim_export.ms -q -mi -vn
# Idle
../../idle.bat
done
rm landscape_col_prim_pacs_list.txt
#!/bin/bash
rm log.log 2> /dev/null
# *** Export pacs_prim files (.pacs_prim) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "pacs_prim_export_timeout" | sed -e 's/pacs_prim_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the collision directories
pacs_prim_source_directories=`cat ../../cfg/directories.cfg | grep "pacs_prim_source_directories" | sed -e 's/pacs_prim_source_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export pacs_prim for pacs_prim >> log.log
echo ------- >> log.log
echo -------
echo --- Export pacs_prim for pacs_prim
echo -------
date >> log.log
date
# For each directoy
for i in $pacs_prim_source_directories ; do
# Copy the script
cat maxscript/pacs_prim_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/pacs_prim/log.log&g" | sed -e "s&pacs_prim_source_directory&$database_directory/$i&g" | sed -e "s&output_directory&$build_gamedata_directory/processes/pacs_prim/pacs_prim&g" > $max_directory/scripts/pacs_prim_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript pacs_prim_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript pacs_prim_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript pacs_prim_export.ms -q -mi -vn
# Idle
../../idle.bat
done
rm landscape_col_prim_pacs_list.txt

@ -1,30 +1,30 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install the zonels in the client data
# Get the zone install directory
pacs_primitive_install_directory=`cat ../../cfg/directories.cfg | grep "pacs_primitive_install_directory" | sed -e 's/pacs_primitive_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Test if there is a need for the prim pacs directory
want_landscape_col_prim_pacs_list=`cat ../../cfg/config.cfg | grep "want_landscape_col_prim_pacs_list"`
# Log error
echo ------- > log.log
echo --- Install zone >> log.log
echo ------- >> log.log
echo -------
echo --- Install zone
echo -------
date >> log.log
date
cp -u -p -R pacs_prim/. $client_directory/$pacs_primitive_install_directory 2>> log.log
if test "$want_landscape_col_prim_pacs_list" ; then
ls pacs_prim | grep ".pacs_prim" >> $client_directory/landscape_col_prim_pacs_list.txt
fi
#!/bin/bash
rm log.log 2> /dev/null
# Install the zonels in the client data
# Get the zone install directory
pacs_primitive_install_directory=`cat ../../cfg/directories.cfg | grep "pacs_primitive_install_directory" | sed -e 's/pacs_primitive_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Test if there is a need for the prim pacs directory
want_landscape_col_prim_pacs_list=`cat ../../cfg/config.cfg | grep "want_landscape_col_prim_pacs_list"`
# Log error
echo ------- > log.log
echo --- Install zone >> log.log
echo ------- >> log.log
echo -------
echo --- Install zone
echo -------
date >> log.log
date
cp -u -p -R pacs_prim/. $client_directory/$pacs_primitive_install_directory 2>> log.log
if test "$want_landscape_col_prim_pacs_list" ; then
ls pacs_prim | grep ".pacs_prim" >> $client_directory/landscape_col_prim_pacs_list.txt
fi

@ -1,31 +1,31 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export particle system file (.ps)
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the ps directories
ps_source_directories=`cat ../../cfg/directories.cfg | grep "ps_source_directory" | sed -e 's/ps_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export ps >> log.log
echo ------- >> log.log
echo -------
echo --- Export ps
echo -------
date >> log.log
date
# For each ps directory
for i in $ps_source_directories ; do
# Copy
cp -u -p $database_directory/$i/*.[pP][sS] ps 2>> log.log
cp -u -p $database_directory/$i/*.[sS][hH][aA][pP][eE] ps 2>> log.log
cp -u -p $database_directory/$i/*.[pP][rR][iI][mM][iI][tT][iI][vV][eE] ps 2>> log.log
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export particle system file (.ps)
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the ps directories
ps_source_directories=`cat ../../cfg/directories.cfg | grep "ps_source_directory" | sed -e 's/ps_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export ps >> log.log
echo ------- >> log.log
echo -------
echo --- Export ps
echo -------
date >> log.log
date
# For each ps directory
for i in $ps_source_directories ; do
# Copy
cp -u -p $database_directory/$i/*.[pP][sS] ps 2>> log.log
cp -u -p $database_directory/$i/*.[sS][hH][aA][pP][eE] ps 2>> log.log
cp -u -p $database_directory/$i/*.[pP][rR][iI][mM][iI][tT][iI][vV][eE] ps 2>> log.log
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install the particule system in the client data
# Get the ps install directory
ps_install_directory=`cat ../../cfg/directories.cfg | grep "ps_install_directory" | sed -e 's/ps_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install ps >> log.log
echo ------- >> log.log
echo -------
echo --- Install ps
echo -------
date >> log.log
date
cp -u -p -R ps/. $client_directory/$ps_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install the particule system in the client data
# Get the ps install directory
ps_install_directory=`cat ../../cfg/directories.cfg | grep "ps_install_directory" | sed -e 's/ps_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install ps >> log.log
echo ------- >> log.log
echo -------
echo --- Install ps
echo -------
date >> log.log
date
cp -u -p -R ps/. $client_directory/$ps_install_directory 2>> log.log

@ -1,358 +1,358 @@
#!/bin/bash
rm log.log 2> /dev/null
# Build zone
build_rbank='build_rbank.exe'
build_indoor_rbank='build_indoor_rbank.exe'
build_ig_boxes='build_ig_boxes.exe'
ai_build_wmap='ai_build_wmap_r.exe'
get_neighbors='get_neighbors.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
tessel_timeout=`cat ../../cfg/config.cfg | grep "rbank_build_tessel_timeout" | sed -e 's/rbank_build_tessel_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
smooth_timeout=`cat ../../cfg/config.cfg | grep "rbank_build_smooth_timeout" | sed -e 's/rbank_build_smooth_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
proclocal_timeout=`cat ../../cfg/config.cfg | grep "rbank_build_proclocal_timeout" | sed -e 's/rbank_build_proclocal_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
procglobal_timeout=`cat ../../cfg/config.cfg | grep "rbank_build_procglobal_timeout" | sed -e 's/rbank_build_procglobal_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
indoor_timeout=`cat ../../cfg/config.cfg | grep "rbank_build_indoor_timeout" | sed -e 's/rbank_build_indoor_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
build_wmap_timeout=`cat ../../cfg/config.cfg | grep "build_wmap_timeout" | sed -e 's/build_wmap_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the quality option to choose the goor properties.cfg file
quality_flag=`cat ../../cfg/site.cfg | grep "build_quality" | grep "1"`
# **** Copy ig and shapes
# Log error
echo >> log.log
echo ------- > log.log
echo --- Generate config script >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Generate config script
echo -------
echo
date >> log.log
date
# Get arguments
rbank_bank_name=`cat ../../cfg/properties.cfg | grep "bank_name" | sed -e 's/bank_name//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/"//g' | sed -e 's/;//g'`
rbank_reduce_surfaces=`cat ../../cfg/config.cfg | grep "rbank_reduce_surfaces" | sed -e 's/rbank_reduce_surfaces//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_smooth_borders=`cat ../../cfg/config.cfg | grep "rbank_smooth_borders" | sed -e 's/rbank_smooth_borders//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_compute_elevation=`cat ../../cfg/config.cfg | grep "rbank_compute_elevation" | sed -e 's/rbank_compute_elevation//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_compute_levels=`cat ../../cfg/config.cfg | grep "rbank_compute_levels" | sed -e 's/rbank_compute_levels//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_link_elements=`cat ../../cfg/config.cfg | grep "rbank_link_elements" | sed -e 's/rbank_link_elements//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_cut_edges=`cat ../../cfg/config.cfg | grep "rbank_cut_edges" | sed -e 's/rbank_cut_edges//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_use_zone_square=`cat ../../cfg/config.cfg | grep "rbank_use_zone_square" | sed -e 's/rbank_use_zone_square//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_zone_ul=`cat ../../cfg/config.cfg | grep "rbank_zone_ul" | sed -e 's/rbank_zone_ul//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_zone_dr=`cat ../../cfg/config.cfg | grep "rbank_zone_dr" | sed -e 's/rbank_zone_dr//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_rbank_name=`cat ../../cfg/config.cfg | grep "rbank_rbank_name" | sed -e 's/rbank_rbank_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_ig_pathes=`cat ../../cfg/config.cfg | grep "rbank_ig_path" | sed -e 's/rbank_ig_path//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_shape_pathes=`cat ../../cfg/config.cfg | grep "rbank_shape_path" | sed -e 's/rbank_shape_path//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Global options
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Build the bbox file >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Build the bbox file
echo -------
echo
date >> log.log
date
# ***** Build the bbox file
# Remove the config file
rm build_ig_boxes.cfg
# List ig pathes
echo Pathes = \{ >> build_ig_boxes.cfg
for i in $rbank_ig_pathes ; do
echo \"$i\"\, >> build_ig_boxes.cfg
done
for i in $rbank_shape_pathes ; do
echo \"$i\"\, >> build_ig_boxes.cfg
done
echo \}\; >> build_ig_boxes.cfg
# List igs
echo IGs = \{ >> build_ig_boxes.cfg
for i in $rbank_ig_pathes ; do
cd $i
list_ig=`ls -1 *.[iI][gG]`
cd $build_gamedata_directory"/processes/rbank"
for j in $list_ig ; do
n=`echo $j | sed -e 's/.ig//'`
echo \"$n\"\, >> build_ig_boxes.cfg
done
# Idle
../../idle.bat
done
echo \}\; >> build_ig_boxes.cfg
echo Output = \"bbox/temp.bbox\"\; >> build_ig_boxes.cfg
# -- NOT NEEDED ANYMORE
$build_ig_boxes
# ***** Build the rbank, gr files
# Copy the good template file
if ( test "$quality_flag" )
then
# We are in BEST mode
`cat cfg/template_final.cfg | sed -e "s&rbank_bank_name&$rbank_bank_name&g" | sed -e "s&rbank_reduce_surfaces&$rbank_reduce_surfaces&g" | sed -e "s&rbank_smooth_borders&$rbank_smooth_borders&g" | sed -e "s&rbank_compute_elevation&$rbank_compute_elevation&g" | sed -e "s&rbank_compute_levels&$rbank_compute_levels&g" | sed -e "s&rbank_link_elements&$rbank_link_elements&g" | sed -e "s&rbank_cut_edges&$rbank_cut_edges&g" | sed -e "s&rbank_use_zone_square&$rbank_use_zone_square&g" | sed -e "s&rbank_zone_ul&$rbank_zone_ul&g" | sed -e "s&rbank_zone_dr&$rbank_zone_dr&g" > build_rbank.cfg`
else
# We are in DRAFT mode
`cat cfg/template_draft.cfg | sed -e "s&rbank_bank_name&$rbank_bank_name&g" | sed -e "s&rbank_reduce_surfaces&$rbank_reduce_surfaces&g" | sed -e "s&rbank_smooth_borders&$rbank_smooth_borders&g" | sed -e "s&rbank_compute_elevation&$rbank_compute_elevation&g" | sed -e "s&rbank_compute_levels&$rbank_compute_levels&g" | sed -e "s&rbank_link_elements&$rbank_link_elements&g" | sed -e "s&rbank_cut_edges&$rbank_cut_edges&g" | sed -e "s&rbank_use_zone_square&$rbank_use_zone_square&g" | sed -e "s&rbank_zone_ul&$rbank_zone_ul&g" | sed -e "s&rbank_zone_dr&$rbank_zone_dr&g" > build_rbank.cfg`
fi
# List the zones to add
cd ../zone/zone_welded
list_zone=`ls -1 *.[zZ][oO][nN][eE][wW]`
cd ../../rbank
# Make a zone list
for i in $list_zone ; do
echo \"$i\", >> build_rbank.cfg
done
# Close the file
echo "};" >> build_rbank.cfg
echo " " >> build_rbank.cfg
# List ig pathes
echo Pathes = \{ >> build_rbank.cfg
for i in $rbank_ig_pathes ; do
echo \"$i\"\, >> build_rbank.cfg
done
for i in $rbank_shape_pathes ; do
echo \"$i\"\, >> build_rbank.cfg
done
echo \}\; >> build_rbank.cfg
echo " " >> build_rbank.cfg
# Log error
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Check pacs primitives consistency >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Check pacs primitives consistency
echo -------
echo
date >> log.log
date
# ******* PASS 1 Generate smooth lr
# For each ../zone/zone_welded/*.[zZ][oO][nN][eE][wW] files, checks if the associated scratch/tesselation/*.[tT][eE][sS][sS][eE][lL] file
# are up to date with the .zonew and the 8 neighbor .zonew file. If note, tesselate it.
$exec_timeout $tessel_timeout $build_rbank -C -p -g
# Log error
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Generate lr >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Generate lr
echo -------
echo
date >> log.log
date
for i in $list_zone ; do
# Get destination file
zone=`echo $i | sed -e 's/.zonew//'`
# Lr final
lr1=`echo "smooth/"$zone".lr"`
# Get the 9 zones list
near_zone=`$get_neighbors $zone`
# Zone to build
zone_to_build=`echo ""`
# For each zone near
if ( ! test -e $lr1 )
then
zone_to_build=`echo "../zone/zone_welded/"$i`
else
for j in $near_zone ; do
if ( test "../zone/zone_welded/"$j.zonew -nt $lr1 )
then
zone_to_build=`echo "../zone/zone_welded/"$i`
fi
done
fi
# Build it only if the file exist
if ( test "$zone_to_build" )
then
# Build lr
$exec_timeout $tessel_timeout $build_rbank -c -P -g $i
echo
echo >> log.log
else
echo SKIPPED $dest
echo
echo SKIPPED $lr1 >> log.log
echo >> log.log
fi
# Idle
../../idle.bat
done
# Log error
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Procglobal >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Procglobal
echo -------
echo
date >> log.log
date
# Procglobal
$exec_timeout $procglobal_timeout $build_rbank -c -p -G
# ***** Build the cfg for interiors
rm build_indoor_rbank.cfg
echo MeshPath = \"cmb/\"\; >> build_indoor_rbank.cfg
echo Meshes = { >> build_indoor_rbank.cfg
# List the cmb to merge
cd cmb
list_cmb=`ls -1 *.[cC][mM][bB]`
cd ..
for i in $list_cmb ; do
n=`echo $i | sed -e 's/.cmb//'`
echo \"$n\", >> build_indoor_rbank.cfg
# Idle
../../idle.bat
done
echo "};" >> build_indoor_rbank.cfg
echo OutputPath = \""retrievers/"\"\; >> build_indoor_rbank.cfg
echo OutputPrefix = "unused"\; >> build_indoor_rbank.cfg
echo Merge = 1\; >> build_indoor_rbank.cfg
echo MergePath = \""smooth/"\"\; >> build_indoor_rbank.cfg
echo MergeInputPrefix = \"temp\"\; >> build_indoor_rbank.cfg
echo MergeOutputPrefix = \"tempMerged\"\; >> build_indoor_rbank.cfg
echo AddToRetriever = \"1\"\; >> build_indoor_rbank.cfg
# Log error
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Merge cmb in rbank >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Merge cmb in rbank
echo -------
echo
date >> log.log
date
$exec_timeout $indoor_timeout $build_indoor_rbank
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Copy gr, rbank and lr >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Copy gr, rbank and lr
echo -------
echo
date >> log.log
date
# Copy the files
mv "retrievers"/tempMerged.rbank output/$rbank_rbank_name".rbank" 2>> log.log
mv "retrievers"/tempMerged.gr output/$rbank_rbank_name".gr" 2>> log.log
for i in "retrievers"/tempMerged_*.lr ; do
finalname=`echo $i | sed -e "s/tempMerged/$rbank_rbank_name/" | sed -e 's/retrievers/output/'`
mv $i $finalname
done
#
# removed from pacs process, ai_build_wmap is built later, independently
#
# Check ai_build_wmap exist
#if ( test -f $ai_build_wmap )
#then
# # setup config file for ai_build_wmap
# rm ./ai_build_wmap.cfg
# cp cfg/ai_build_wmap.cfg ./ai_build_wmap.cfg
#
# # generate wmap
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsCrunch $rbank_rbank_name"
#
# # generate sizes
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildGabarit $rbank_rbank_name"
#
# # generate cwmaps for each size
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildWmap ${rbank_rbank_name}_0"
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildWmap ${rbank_rbank_name}_1"
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildWmap ${rbank_rbank_name}_2"
#
# # generate bitmap for each size
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildBitmap ${rbank_rbank_name}_0"
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildBitmap ${rbank_rbank_name}_1"
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildBitmap ${rbank_rbank_name}_2"
#
# # clear height maps for size 1 and 2
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsClearHeightmap ${rbank_rbank_name}_1"
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsClearHeightmap ${rbank_rbank_name}_2"
#
# rm output/$rbank_rbank_name.wmap
# rm output/${rbank_rbank_name}_0.wmap
# rm output/${rbank_rbank_name}_1.wmap
# rm output/${rbank_rbank_name}_2.wmap
#fi
#!/bin/bash
rm log.log 2> /dev/null
# Build zone
build_rbank='build_rbank.exe'
build_indoor_rbank='build_indoor_rbank.exe'
build_ig_boxes='build_ig_boxes.exe'
ai_build_wmap='ai_build_wmap_r.exe'
get_neighbors='get_neighbors.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
tessel_timeout=`cat ../../cfg/config.cfg | grep "rbank_build_tessel_timeout" | sed -e 's/rbank_build_tessel_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
smooth_timeout=`cat ../../cfg/config.cfg | grep "rbank_build_smooth_timeout" | sed -e 's/rbank_build_smooth_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
proclocal_timeout=`cat ../../cfg/config.cfg | grep "rbank_build_proclocal_timeout" | sed -e 's/rbank_build_proclocal_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
procglobal_timeout=`cat ../../cfg/config.cfg | grep "rbank_build_procglobal_timeout" | sed -e 's/rbank_build_procglobal_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
indoor_timeout=`cat ../../cfg/config.cfg | grep "rbank_build_indoor_timeout" | sed -e 's/rbank_build_indoor_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
build_wmap_timeout=`cat ../../cfg/config.cfg | grep "build_wmap_timeout" | sed -e 's/build_wmap_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the quality option to choose the goor properties.cfg file
quality_flag=`cat ../../cfg/site.cfg | grep "build_quality" | grep "1"`
# **** Copy ig and shapes
# Log error
echo >> log.log
echo ------- > log.log
echo --- Generate config script >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Generate config script
echo -------
echo
date >> log.log
date
# Get arguments
rbank_bank_name=`cat ../../cfg/properties.cfg | grep "bank_name" | sed -e 's/bank_name//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/"//g' | sed -e 's/;//g'`
rbank_reduce_surfaces=`cat ../../cfg/config.cfg | grep "rbank_reduce_surfaces" | sed -e 's/rbank_reduce_surfaces//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_smooth_borders=`cat ../../cfg/config.cfg | grep "rbank_smooth_borders" | sed -e 's/rbank_smooth_borders//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_compute_elevation=`cat ../../cfg/config.cfg | grep "rbank_compute_elevation" | sed -e 's/rbank_compute_elevation//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_compute_levels=`cat ../../cfg/config.cfg | grep "rbank_compute_levels" | sed -e 's/rbank_compute_levels//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_link_elements=`cat ../../cfg/config.cfg | grep "rbank_link_elements" | sed -e 's/rbank_link_elements//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_cut_edges=`cat ../../cfg/config.cfg | grep "rbank_cut_edges" | sed -e 's/rbank_cut_edges//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_use_zone_square=`cat ../../cfg/config.cfg | grep "rbank_use_zone_square" | sed -e 's/rbank_use_zone_square//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_zone_ul=`cat ../../cfg/config.cfg | grep "rbank_zone_ul" | sed -e 's/rbank_zone_ul//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_zone_dr=`cat ../../cfg/config.cfg | grep "rbank_zone_dr" | sed -e 's/rbank_zone_dr//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_rbank_name=`cat ../../cfg/config.cfg | grep "rbank_rbank_name" | sed -e 's/rbank_rbank_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_ig_pathes=`cat ../../cfg/config.cfg | grep "rbank_ig_path" | sed -e 's/rbank_ig_path//' | sed -e 's/ //g' | sed -e 's/=//g'`
rbank_shape_pathes=`cat ../../cfg/config.cfg | grep "rbank_shape_path" | sed -e 's/rbank_shape_path//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Global options
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Build the bbox file >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Build the bbox file
echo -------
echo
date >> log.log
date
# ***** Build the bbox file
# Remove the config file
rm build_ig_boxes.cfg
# List ig pathes
echo Pathes = \{ >> build_ig_boxes.cfg
for i in $rbank_ig_pathes ; do
echo \"$i\"\, >> build_ig_boxes.cfg
done
for i in $rbank_shape_pathes ; do
echo \"$i\"\, >> build_ig_boxes.cfg
done
echo \}\; >> build_ig_boxes.cfg
# List igs
echo IGs = \{ >> build_ig_boxes.cfg
for i in $rbank_ig_pathes ; do
cd $i
list_ig=`ls -1 *.[iI][gG]`
cd $build_gamedata_directory"/processes/rbank"
for j in $list_ig ; do
n=`echo $j | sed -e 's/.ig//'`
echo \"$n\"\, >> build_ig_boxes.cfg
done
# Idle
../../idle.bat
done
echo \}\; >> build_ig_boxes.cfg
echo Output = \"bbox/temp.bbox\"\; >> build_ig_boxes.cfg
# -- NOT NEEDED ANYMORE
$build_ig_boxes
# ***** Build the rbank, gr files
# Copy the good template file
if ( test "$quality_flag" )
then
# We are in BEST mode
`cat cfg/template_final.cfg | sed -e "s&rbank_bank_name&$rbank_bank_name&g" | sed -e "s&rbank_reduce_surfaces&$rbank_reduce_surfaces&g" | sed -e "s&rbank_smooth_borders&$rbank_smooth_borders&g" | sed -e "s&rbank_compute_elevation&$rbank_compute_elevation&g" | sed -e "s&rbank_compute_levels&$rbank_compute_levels&g" | sed -e "s&rbank_link_elements&$rbank_link_elements&g" | sed -e "s&rbank_cut_edges&$rbank_cut_edges&g" | sed -e "s&rbank_use_zone_square&$rbank_use_zone_square&g" | sed -e "s&rbank_zone_ul&$rbank_zone_ul&g" | sed -e "s&rbank_zone_dr&$rbank_zone_dr&g" > build_rbank.cfg`
else
# We are in DRAFT mode
`cat cfg/template_draft.cfg | sed -e "s&rbank_bank_name&$rbank_bank_name&g" | sed -e "s&rbank_reduce_surfaces&$rbank_reduce_surfaces&g" | sed -e "s&rbank_smooth_borders&$rbank_smooth_borders&g" | sed -e "s&rbank_compute_elevation&$rbank_compute_elevation&g" | sed -e "s&rbank_compute_levels&$rbank_compute_levels&g" | sed -e "s&rbank_link_elements&$rbank_link_elements&g" | sed -e "s&rbank_cut_edges&$rbank_cut_edges&g" | sed -e "s&rbank_use_zone_square&$rbank_use_zone_square&g" | sed -e "s&rbank_zone_ul&$rbank_zone_ul&g" | sed -e "s&rbank_zone_dr&$rbank_zone_dr&g" > build_rbank.cfg`
fi
# List the zones to add
cd ../zone/zone_welded
list_zone=`ls -1 *.[zZ][oO][nN][eE][wW]`
cd ../../rbank
# Make a zone list
for i in $list_zone ; do
echo \"$i\", >> build_rbank.cfg
done
# Close the file
echo "};" >> build_rbank.cfg
echo " " >> build_rbank.cfg
# List ig pathes
echo Pathes = \{ >> build_rbank.cfg
for i in $rbank_ig_pathes ; do
echo \"$i\"\, >> build_rbank.cfg
done
for i in $rbank_shape_pathes ; do
echo \"$i\"\, >> build_rbank.cfg
done
echo \}\; >> build_rbank.cfg
echo " " >> build_rbank.cfg
# Log error
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Check pacs primitives consistency >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Check pacs primitives consistency
echo -------
echo
date >> log.log
date
# ******* PASS 1 Generate smooth lr
# For each ../zone/zone_welded/*.[zZ][oO][nN][eE][wW] files, checks if the associated scratch/tesselation/*.[tT][eE][sS][sS][eE][lL] file
# are up to date with the .zonew and the 8 neighbor .zonew file. If note, tesselate it.
$exec_timeout $tessel_timeout $build_rbank -C -p -g
# Log error
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Generate lr >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Generate lr
echo -------
echo
date >> log.log
date
for i in $list_zone ; do
# Get destination file
zone=`echo $i | sed -e 's/.zonew//'`
# Lr final
lr1=`echo "smooth/"$zone".lr"`
# Get the 9 zones list
near_zone=`$get_neighbors $zone`
# Zone to build
zone_to_build=`echo ""`
# For each zone near
if ( ! test -e $lr1 )
then
zone_to_build=`echo "../zone/zone_welded/"$i`
else
for j in $near_zone ; do
if ( test "../zone/zone_welded/"$j.zonew -nt $lr1 )
then
zone_to_build=`echo "../zone/zone_welded/"$i`
fi
done
fi
# Build it only if the file exist
if ( test "$zone_to_build" )
then
# Build lr
$exec_timeout $tessel_timeout $build_rbank -c -P -g $i
echo
echo >> log.log
else
echo SKIPPED $dest
echo
echo SKIPPED $lr1 >> log.log
echo >> log.log
fi
# Idle
../../idle.bat
done
# Log error
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Procglobal >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Procglobal
echo -------
echo
date >> log.log
date
# Procglobal
$exec_timeout $procglobal_timeout $build_rbank -c -p -G
# ***** Build the cfg for interiors
rm build_indoor_rbank.cfg
echo MeshPath = \"cmb/\"\; >> build_indoor_rbank.cfg
echo Meshes = { >> build_indoor_rbank.cfg
# List the cmb to merge
cd cmb
list_cmb=`ls -1 *.[cC][mM][bB]`
cd ..
for i in $list_cmb ; do
n=`echo $i | sed -e 's/.cmb//'`
echo \"$n\", >> build_indoor_rbank.cfg
# Idle
../../idle.bat
done
echo "};" >> build_indoor_rbank.cfg
echo OutputPath = \""retrievers/"\"\; >> build_indoor_rbank.cfg
echo OutputPrefix = "unused"\; >> build_indoor_rbank.cfg
echo Merge = 1\; >> build_indoor_rbank.cfg
echo MergePath = \""smooth/"\"\; >> build_indoor_rbank.cfg
echo MergeInputPrefix = \"temp\"\; >> build_indoor_rbank.cfg
echo MergeOutputPrefix = \"tempMerged\"\; >> build_indoor_rbank.cfg
echo AddToRetriever = \"1\"\; >> build_indoor_rbank.cfg
# Log error
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Merge cmb in rbank >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Merge cmb in rbank
echo -------
echo
date >> log.log
date
$exec_timeout $indoor_timeout $build_indoor_rbank
echo >> log.log
echo ------- >> log.log
echo --- Build RBank : Copy gr, rbank and lr >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Build RBank : Copy gr, rbank and lr
echo -------
echo
date >> log.log
date
# Copy the files
mv "retrievers"/tempMerged.rbank output/$rbank_rbank_name".rbank" 2>> log.log
mv "retrievers"/tempMerged.gr output/$rbank_rbank_name".gr" 2>> log.log
for i in "retrievers"/tempMerged_*.lr ; do
finalname=`echo $i | sed -e "s/tempMerged/$rbank_rbank_name/" | sed -e 's/retrievers/output/'`
mv $i $finalname
done
#
# removed from pacs process, ai_build_wmap is built later, independently
#
# Check ai_build_wmap exist
#if ( test -f $ai_build_wmap )
#then
# # setup config file for ai_build_wmap
# rm ./ai_build_wmap.cfg
# cp cfg/ai_build_wmap.cfg ./ai_build_wmap.cfg
#
# # generate wmap
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsCrunch $rbank_rbank_name"
#
# # generate sizes
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildGabarit $rbank_rbank_name"
#
# # generate cwmaps for each size
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildWmap ${rbank_rbank_name}_0"
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildWmap ${rbank_rbank_name}_1"
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildWmap ${rbank_rbank_name}_2"
#
# # generate bitmap for each size
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildBitmap ${rbank_rbank_name}_0"
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildBitmap ${rbank_rbank_name}_1"
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsBuildBitmap ${rbank_rbank_name}_2"
#
# # clear height maps for size 1 and 2
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsClearHeightmap ${rbank_rbank_name}_1"
# $exec_timeout $build_wmap_timeout $ai_build_wmap "pacsClearHeightmap ${rbank_rbank_name}_2"
#
# rm output/$rbank_rbank_name.wmap
# rm output/${rbank_rbank_name}_0.wmap
# rm output/${rbank_rbank_name}_1.wmap
# rm output/${rbank_rbank_name}_2.wmap
#fi

@ -1,31 +1,31 @@
#!/bin/bash
rm log.log 2> /dev/null
# Log error
echo >> log.log
echo ------- > log.log
echo --- Clean rbank >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Clean rbank
echo -------
echo
date >> log.log
date
# Get arguments
rbank_rbank_name=`cat ../../cfg/config.cfg | grep "rbank_rbank_name" | sed -e 's/rbank_rbank_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Delete temp files
rm tesselation/*.[tT][eE][sS][sS][eE][lL]
rm smooth/*.[lL][rR]
rm smooth/*.[oO][cC][hH][aA][iI][nN]
rm smooth/*.[gG][rR]
rm smooth/*.[rR][bB][aA][nN][kK]
rm smooth/preproc/*.[lL][rR]
rm retrievers/*.[gG][rR]
rm retrievers/*.[rR][bB][aA][nN][kK]
#!/bin/bash
rm log.log 2> /dev/null
# Log error
echo >> log.log
echo ------- > log.log
echo --- Clean rbank >> log.log
echo ------- >> log.log
echo >> log.log
echo
echo -------
echo --- Clean rbank
echo -------
echo
date >> log.log
date
# Get arguments
rbank_rbank_name=`cat ../../cfg/config.cfg | grep "rbank_rbank_name" | sed -e 's/rbank_rbank_name//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Delete temp files
rm tesselation/*.[tT][eE][sS][sS][eE][lL]
rm smooth/*.[lL][rR]
rm smooth/*.[oO][cC][hH][aA][iI][nN]
rm smooth/*.[gG][rR]
rm smooth/*.[rR][bB][aA][nN][kK]
rm smooth/preproc/*.[lL][rR]
rm retrievers/*.[gG][rR]
rm retrievers/*.[rR][bB][aA][nN][kK]

@ -1,57 +1,57 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export cmb files (.cmb) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "cmb_export_timeout" | sed -e 's/cmb_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the collision directories
collision_source_directories=`cat ../../cfg/directories.cfg | grep "cmb_source_directory" | sed -e 's/cmb_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export cmb for rbank >> log.log
echo ------- >> log.log
echo -------
echo --- Export cmb for rbank
echo -------
date >> log.log
date
# For each directoy
for i in $collision_source_directories ; do
# Copy the script
cat maxscript/rbank_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/rbank/log.log&g" | sed -e "s&collision_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_rbank&$build_gamedata_directory/processes/rbank/cmb&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/rbank/tag&g" > $max_directory/scripts/rbank_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript rbank_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript rbank_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript rbank_export.ms -q -mi -vn
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export cmb files (.cmb) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "cmb_export_timeout" | sed -e 's/cmb_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the collision directories
collision_source_directories=`cat ../../cfg/directories.cfg | grep "cmb_source_directory" | sed -e 's/cmb_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export cmb for rbank >> log.log
echo ------- >> log.log
echo -------
echo --- Export cmb for rbank
echo -------
date >> log.log
date
# For each directoy
for i in $collision_source_directories ; do
# Copy the script
cat maxscript/rbank_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/rbank/log.log&g" | sed -e "s&collision_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_rbank&$build_gamedata_directory/processes/rbank/cmb&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/rbank/tag&g" > $max_directory/scripts/rbank_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript rbank_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript rbank_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript rbank_export.ms -q -mi -vn
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install the zonels in the client data
# Get the zone install directory
pacs_install_directory=`cat ../../cfg/directories.cfg | grep "pacs_install_directory" | sed -e 's/pacs_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install zone >> log.log
echo ------- >> log.log
echo -------
echo --- Install zone
echo -------
date >> log.log
date
cp -u -p -R output/. $client_directory/$pacs_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install the zonels in the client data
# Get the zone install directory
pacs_install_directory=`cat ../../cfg/directories.cfg | grep "pacs_install_directory" | sed -e 's/pacs_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install zone >> log.log
echo ------- >> log.log
echo -------
echo --- Install zone
echo -------
date >> log.log
date
cp -u -p -R output/. $client_directory/$pacs_install_directory 2>> log.log

@ -1,236 +1,236 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Build shape files (.shape)
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Bin
tga_2_dds='tga2dds.exe'
build_coarse_mesh='build_coarse_mesh.exe'
lightmap_optimizer='lightmap_optimizer.exe'
build_clodtex='build_clodtex.exe'
build_shadow_skin='build_shadow_skin.exe'
# Log error
echo ------- > log.log
echo --- Build ShadowSkin shape >> log.log
echo ------- >> log.log
echo -------
echo --- Build ShadowSkin shape
echo -------
date >> log.log
date
# build shadow skin?
do_build_shadow_skin=`cat ../../cfg/config.cfg | grep -w "build_shadow_skin" | sed -e 's/build_shadow_skin//' | sed -e 's/ //g' | sed -e 's/=//g'`
build_shadow_skin_ratio=`cat ../../cfg/config.cfg | grep "build_shadow_skin_ratio" | sed -e 's/build_shadow_skin_ratio//' | sed -e 's/ //g' | sed -e 's/=//g'`
build_shadow_skin_maxface=`cat ../../cfg/config.cfg | grep "build_shadow_skin_maxface" | sed -e 's/build_shadow_skin_maxface//' | sed -e 's/ //g' | sed -e 's/=//g'`
# if config wanted then must compute shadowSkin
if ( test "$do_build_shadow_skin" = "1" )
then
for i in shape_not_optimized/*.[sS][hH][aA][pP][eE] ; do
if ( test -f $i )
then
dest=`echo $i | sed -e 's/shape_not_optimized/shape/g'`
# if date is newer in shape_not_optimized than in shape, compute
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
# NB: overwrite shape_not_optimized, because will be cloded/copied below to shapes/
$build_shadow_skin $i $i $build_shadow_skin_ratio $build_shadow_skin_maxface
fi
fi
done
fi
# Log error
echo ------- >> log.log
echo --- Build shape : Copy Shape / build CLodTex >> log.log
echo ------- >> log.log
echo -------
echo --- Build shape : Copy Shape / build CLodTex
echo -------
date >> log.log
date
# Get the lod config file in the database
clod_config_file=`cat ../../cfg/config.cfg | grep "clod_config_file" | sed -e 's/clod_config_file//' | sed -e 's/ //g' | sed -e 's/=//g'`
# if clod cfg is setup, build clod
if (test -f $database_directory/$clod_config_file)
then
# build the shape with clod texture. convert from 'shape_not_optimized' to 'shape'
$build_clodtex -d $database_directory/$clod_config_file clod shape_not_optimized shape
else
# just copy shape_not_optimized to shape
./sh/transfert_shape_optimize.bat
fi
# Log error
echo ------- >> log.log
echo --- Build shape : optimize lightmaps >> log.log
echo ------- >> log.log
echo -------
echo --- Build shape : optimize lightmaps
echo -------
date >> log.log
date
# copy lightmap_not_optimized to lightmap
./sh/transfert_lightmap_optimize.bat
quality_flag=`cat ../../cfg/site.cfg | grep "build_quality" | grep "1"`
# Optimize lightmaps if any. Additionnaly, output a file indicating which lightmaps are 8 bits
$lightmap_optimizer ./lightmap ./shape ./tag ./list_lm_8bit.txt
# Convert lightmap in 16 bits mode if they are not 8 bits lightmap
echo ------- >> log.log
echo --- Build shape : convert lightmaps in 16 or 8 bits >> log.log
echo ------- >> log.log
echo -------
echo --- Build shape : convert lightmaps in 16 or 8 bits
echo -------
date >> log.log
date
for i in lightmap/*.[tT][gG][aA] ; do
if ( test -f $i )
then
# Destination file
dest=`echo $i | sed -e 's/lightmap/lightmap_16_bits/g'`
# Convert the lightmap in 16 bits mode
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
fileTest=`echo $i | sed -e 's&lightmap/&&g'`
file8Bit=`cat ./list_lm_8bit.txt | grep "$fileTest"`
if ( test "$file8Bit" = "$fileTest" )
then
echo "export $fileTest in 8bit format"
$tga_2_dds $i -o $dest -a tga8 2>> log.log
else
echo "export $fileTest in 16bit format"
$tga_2_dds $i -o $dest -a tga16 2>> log.log
fi
fi
fi
# Idle
../../idle.bat
done
# Log error
echo ------- >> log.log
echo --- Build shape : build coarse meshes >> log.log
echo ------- >> log.log
echo -------
echo --- Build shape : build coarse meshes
echo -------
date >> log.log
date
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get texture pathes
map_source_directories=`cat ../../cfg/directories.cfg | grep "map_source_directory" | sed -e 's/map_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the texture mul size
texture_mul_size_value=`cat ../../cfg/config.cfg | grep "texture_mul_size_value" | sed -e 's/texture_mul_size_value//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the coarse mesh texture name
coarse_mesh_texture_names=`cat ../../cfg/config.cfg | grep "coarse_mesh_texture_names" | sed -e 's/coarse_mesh_texture_names//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Copy the config file header
cat cfg/config_header.cfg | sed -e "s/texture_mul_size_value/$texture_mul_size_value/g" > cfg/config_generated.cfg
# Corse meshes for this process ?
if ( test "$coarse_mesh_texture_names" ) then
# Add the shape directory
echo ' "'shape_with_coarse_mesh'"', >> cfg/config_generated.cfg
# For each texture path
for i in $map_source_directories ; do
# Add the path
echo ' "'$database_directory/$i'"', >> cfg/config_generated.cfg
# Idle
../../idle.bat
done
# Add the shape list header
echo '};' >> cfg/config_generated.cfg
echo ' ' >> cfg/config_generated.cfg
echo 'list_mesh =' >> cfg/config_generated.cfg
echo '{' >> cfg/config_generated.cfg
# For each shape with coarse mesh
for i in shape_with_coarse_mesh/*.[sS][hH][aA][pP][eE]; do
if ( test -f $i )
then
# Destination file
src=`echo $i | sed -e 's&shape_with_coarse_mesh/&&g'`
dest=`echo $i | sed -e 's&shape_with_coarse_mesh&shape_with_coarse_mesh_builded&g'`
# Add the shape
echo ' "'$src'", "'$dest'",' >> cfg/config_generated.cfg
# Destination file
dest=`echo $i | sed -e 's/lightmap/lightmap_16_bits/g'`
fi
# Idle
../../idle.bat
done
echo '};' >> cfg/config_generated.cfg
# Add output bitmap list
echo ' ' >> cfg/config_generated.cfg
echo 'output_textures = {' >> cfg/config_generated.cfg
# For each shape with coarse mesh
for i in $coarse_mesh_texture_names ; do
# Add the path
echo ' "shape_with_coarse_mesh/'$i'.tga"', >> cfg/config_generated.cfg
done
# Close the config file
echo '};' >> cfg/config_generated.cfg
# Execute the build
$build_coarse_mesh cfg/config_generated.cfg
# Log error
echo ------- >> log.log
echo --- Build shape : convert coarse texture to dds without mipmaps >> log.log
echo ------- >> log.log
echo -------
echo --- Build shape : convert coarse texture to dds without mipmaps
echo -------
date >> log.log
date
# Convert the coarse texture to dds
for i in $coarse_mesh_texture_names ; do
if ( test -f shape_with_coarse_mesh/$i.tga )
then
$tga_2_dds shape_with_coarse_mesh/$i.tga -o shape_with_coarse_mesh_builded/$i.dds -a 5 2>> log.log
fi
done
else
echo --- No coarse meshes texture defined >> log.log
echo --- No coarse meshes texture defined
fi
#!/bin/bash
rm log.log 2> /dev/null
# *** Build shape files (.shape)
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Bin
tga_2_dds='tga2dds.exe'
build_coarse_mesh='build_coarse_mesh.exe'
lightmap_optimizer='lightmap_optimizer.exe'
build_clodtex='build_clodtex.exe'
build_shadow_skin='build_shadow_skin.exe'
# Log error
echo ------- > log.log
echo --- Build ShadowSkin shape >> log.log
echo ------- >> log.log
echo -------
echo --- Build ShadowSkin shape
echo -------
date >> log.log
date
# build shadow skin?
do_build_shadow_skin=`cat ../../cfg/config.cfg | grep -w "build_shadow_skin" | sed -e 's/build_shadow_skin//' | sed -e 's/ //g' | sed -e 's/=//g'`
build_shadow_skin_ratio=`cat ../../cfg/config.cfg | grep "build_shadow_skin_ratio" | sed -e 's/build_shadow_skin_ratio//' | sed -e 's/ //g' | sed -e 's/=//g'`
build_shadow_skin_maxface=`cat ../../cfg/config.cfg | grep "build_shadow_skin_maxface" | sed -e 's/build_shadow_skin_maxface//' | sed -e 's/ //g' | sed -e 's/=//g'`
# if config wanted then must compute shadowSkin
if ( test "$do_build_shadow_skin" = "1" )
then
for i in shape_not_optimized/*.[sS][hH][aA][pP][eE] ; do
if ( test -f $i )
then
dest=`echo $i | sed -e 's/shape_not_optimized/shape/g'`
# if date is newer in shape_not_optimized than in shape, compute
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
# NB: overwrite shape_not_optimized, because will be cloded/copied below to shapes/
$build_shadow_skin $i $i $build_shadow_skin_ratio $build_shadow_skin_maxface
fi
fi
done
fi
# Log error
echo ------- >> log.log
echo --- Build shape : Copy Shape / build CLodTex >> log.log
echo ------- >> log.log
echo -------
echo --- Build shape : Copy Shape / build CLodTex
echo -------
date >> log.log
date
# Get the lod config file in the database
clod_config_file=`cat ../../cfg/config.cfg | grep "clod_config_file" | sed -e 's/clod_config_file//' | sed -e 's/ //g' | sed -e 's/=//g'`
# if clod cfg is setup, build clod
if (test -f $database_directory/$clod_config_file)
then
# build the shape with clod texture. convert from 'shape_not_optimized' to 'shape'
$build_clodtex -d $database_directory/$clod_config_file clod shape_not_optimized shape
else
# just copy shape_not_optimized to shape
./sh/transfert_shape_optimize.bat
fi
# Log error
echo ------- >> log.log
echo --- Build shape : optimize lightmaps >> log.log
echo ------- >> log.log
echo -------
echo --- Build shape : optimize lightmaps
echo -------
date >> log.log
date
# copy lightmap_not_optimized to lightmap
./sh/transfert_lightmap_optimize.bat
quality_flag=`cat ../../cfg/site.cfg | grep "build_quality" | grep "1"`
# Optimize lightmaps if any. Additionnaly, output a file indicating which lightmaps are 8 bits
$lightmap_optimizer ./lightmap ./shape ./tag ./list_lm_8bit.txt
# Convert lightmap in 16 bits mode if they are not 8 bits lightmap
echo ------- >> log.log
echo --- Build shape : convert lightmaps in 16 or 8 bits >> log.log
echo ------- >> log.log
echo -------
echo --- Build shape : convert lightmaps in 16 or 8 bits
echo -------
date >> log.log
date
for i in lightmap/*.[tT][gG][aA] ; do
if ( test -f $i )
then
# Destination file
dest=`echo $i | sed -e 's/lightmap/lightmap_16_bits/g'`
# Convert the lightmap in 16 bits mode
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
fileTest=`echo $i | sed -e 's&lightmap/&&g'`
file8Bit=`cat ./list_lm_8bit.txt | grep "$fileTest"`
if ( test "$file8Bit" = "$fileTest" )
then
echo "export $fileTest in 8bit format"
$tga_2_dds $i -o $dest -a tga8 2>> log.log
else
echo "export $fileTest in 16bit format"
$tga_2_dds $i -o $dest -a tga16 2>> log.log
fi
fi
fi
# Idle
../../idle.bat
done
# Log error
echo ------- >> log.log
echo --- Build shape : build coarse meshes >> log.log
echo ------- >> log.log
echo -------
echo --- Build shape : build coarse meshes
echo -------
date >> log.log
date
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get texture pathes
map_source_directories=`cat ../../cfg/directories.cfg | grep "map_source_directory" | sed -e 's/map_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the texture mul size
texture_mul_size_value=`cat ../../cfg/config.cfg | grep "texture_mul_size_value" | sed -e 's/texture_mul_size_value//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the coarse mesh texture name
coarse_mesh_texture_names=`cat ../../cfg/config.cfg | grep "coarse_mesh_texture_names" | sed -e 's/coarse_mesh_texture_names//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Copy the config file header
cat cfg/config_header.cfg | sed -e "s/texture_mul_size_value/$texture_mul_size_value/g" > cfg/config_generated.cfg
# Corse meshes for this process ?
if ( test "$coarse_mesh_texture_names" ) then
# Add the shape directory
echo ' "'shape_with_coarse_mesh'"', >> cfg/config_generated.cfg
# For each texture path
for i in $map_source_directories ; do
# Add the path
echo ' "'$database_directory/$i'"', >> cfg/config_generated.cfg
# Idle
../../idle.bat
done
# Add the shape list header
echo '};' >> cfg/config_generated.cfg
echo ' ' >> cfg/config_generated.cfg
echo 'list_mesh =' >> cfg/config_generated.cfg
echo '{' >> cfg/config_generated.cfg
# For each shape with coarse mesh
for i in shape_with_coarse_mesh/*.[sS][hH][aA][pP][eE]; do
if ( test -f $i )
then
# Destination file
src=`echo $i | sed -e 's&shape_with_coarse_mesh/&&g'`
dest=`echo $i | sed -e 's&shape_with_coarse_mesh&shape_with_coarse_mesh_builded&g'`
# Add the shape
echo ' "'$src'", "'$dest'",' >> cfg/config_generated.cfg
# Destination file
dest=`echo $i | sed -e 's/lightmap/lightmap_16_bits/g'`
fi
# Idle
../../idle.bat
done
echo '};' >> cfg/config_generated.cfg
# Add output bitmap list
echo ' ' >> cfg/config_generated.cfg
echo 'output_textures = {' >> cfg/config_generated.cfg
# For each shape with coarse mesh
for i in $coarse_mesh_texture_names ; do
# Add the path
echo ' "shape_with_coarse_mesh/'$i'.tga"', >> cfg/config_generated.cfg
done
# Close the config file
echo '};' >> cfg/config_generated.cfg
# Execute the build
$build_coarse_mesh cfg/config_generated.cfg
# Log error
echo ------- >> log.log
echo --- Build shape : convert coarse texture to dds without mipmaps >> log.log
echo ------- >> log.log
echo -------
echo --- Build shape : convert coarse texture to dds without mipmaps
echo -------
date >> log.log
date
# Convert the coarse texture to dds
for i in $coarse_mesh_texture_names ; do
if ( test -f shape_with_coarse_mesh/$i.tga )
then
$tga_2_dds shape_with_coarse_mesh/$i.tga -o shape_with_coarse_mesh_builded/$i.dds -a 5 2>> log.log
fi
done
else
echo --- No coarse meshes texture defined >> log.log
echo --- No coarse meshes texture defined
fi

@ -1,140 +1,140 @@
#!/bin/bash
rm log.log 2> /dev/null
# *********************************************
# *********************************************
# *** Export shape files (.shape) from Max
# *********************************************
# *********************************************
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "shape_export_timeout" | sed -e 's/shape_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the shape directories
shape_source_directories=`cat ../../cfg/directories.cfg | grep "shape_source_directory" | sed -e 's/shape_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the quality option to choose the goor properties.cfg file
quality_flag=`cat ../../cfg/site.cfg | grep "build_quality" | grep "1"`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Get the options
if ( test "$quality_flag" )
then
# We are in BEST mode
seoel=`cat ../../cfg/config.cfg | grep "shape_export_opt_export_lighting" | sed -e 's/shape_export_opt_export_lighting//' | sed -e 's/ //g' | sed -e 's/=//g'`
seos=`cat ../../cfg/config.cfg | grep "shape_export_opt_shadow" | sed -e 's/shape_export_opt_shadow//' | sed -e 's/ //g' | sed -e 's/=//g'`
seoll=`cat ../../cfg/config.cfg | grep "shape_export_opt_lighting_limit" | sed -e 's/shape_export_opt_lighting_limit//' | sed -e 's/ //g' | sed -e 's/=//g'`
seols=`cat ../../cfg/config.cfg | grep "shape_export_opt_lumel_size" | sed -e 's/shape_export_opt_lumel_size//' | sed -e 's/ //g' | sed -e 's/=//g'`
seoo=`cat ../../cfg/config.cfg | grep "shape_export_opt_oversampling" | sed -e 's/shape_export_opt_oversampling//' | sed -e 's/ //g' | sed -e 's/=//g'`
else
# We are in DRAFT mode
seoel='false'
seos='false'
seoll='0'
seols='0.25'
seoo='1'
fi
seolog=`cat ../../cfg/config.cfg | grep "shape_export_opt_lightmap_log" | sed -e 's/shape_export_opt_lightmap_log//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export shape >> log.log
echo ------- >> log.log
echo -------
echo --- Export shape
echo -------
date >> log.log
date
# For each directoy
for i in $shape_source_directories ; do
# Copy the script
cat maxscript/shape_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/shape/log.log&g" | sed -e "s&shape_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/shape/tag&g" | sed -e "s&output_directory_without_coarse_mesh&$build_gamedata_directory/processes/shape/shape_not_optimized&g" | sed -e "s&output_directory_with_coarse_mesh&$build_gamedata_directory/processes/shape/shape_with_coarse_mesh&g" | sed -e "s&shape_export_opt_export_lighting&$seoel&g" | sed -e "s&shape_export_opt_shadow&$seos&g" | sed -e "s&shape_export_opt_lighting_limit&$seoll&g" | sed -e "s&shape_export_opt_lumel_size&$seols&g" | sed -e "s&shape_export_opt_oversampling&$seoo&g"| sed -e "s&shape_export_opt_lightmap_log&$seolog&g" | sed -e "s&shape_lightmap_path&$build_gamedata_directory/processes/shape/lightmap_not_optimized&g" | sed -e "s&output_directory_anim&$build_gamedata_directory/processes/shape/anim&g" > $max_directory/scripts/shape_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript shape_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript shape_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript shape_export.ms -q -mi -vn
# Idle
../../idle.bat
done
# *********************************************
# *********************************************
# *** Export character lod shape files (.clod) from Max
# *********************************************
# *********************************************
# Get the clod directories
clod_source_directories=`cat ../../cfg/directories.cfg | grep "clod_source_directory" | sed -e 's/clod_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- >> log.log
echo --- Export clod >> log.log
echo ------- >> log.log
echo -------
echo --- Export clod
echo -------
date >> log.log
date
# For each directoy
for i in $clod_source_directories ; do
# Copy the script. TAKE IT FROM clodbank process. But write it here.
cat ../clodbank/maxscript/clod_export.ms | sed -e "s&shape_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_clod&$build_gamedata_directory/processes/shape/clod&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/shape/tag&g" > $max_directory/scripts/clod_export.ms
# Start max
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Concat log.log files
echo Try 1 >> log.log
cat $max_directory/log.log >> log.log
# Idle
../../idle.bat
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Concat log.log files
echo Try 2 >> log.log
cat $max_directory/log.log >> log.log
# Idle
../../idle.bat
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Concat log.log files
echo Try 3 >> log.log
cat $max_directory/log.log >> log.log
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *********************************************
# *********************************************
# *** Export shape files (.shape) from Max
# *********************************************
# *********************************************
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "shape_export_timeout" | sed -e 's/shape_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the shape directories
shape_source_directories=`cat ../../cfg/directories.cfg | grep "shape_source_directory" | sed -e 's/shape_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the quality option to choose the goor properties.cfg file
quality_flag=`cat ../../cfg/site.cfg | grep "build_quality" | grep "1"`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Get the options
if ( test "$quality_flag" )
then
# We are in BEST mode
seoel=`cat ../../cfg/config.cfg | grep "shape_export_opt_export_lighting" | sed -e 's/shape_export_opt_export_lighting//' | sed -e 's/ //g' | sed -e 's/=//g'`
seos=`cat ../../cfg/config.cfg | grep "shape_export_opt_shadow" | sed -e 's/shape_export_opt_shadow//' | sed -e 's/ //g' | sed -e 's/=//g'`
seoll=`cat ../../cfg/config.cfg | grep "shape_export_opt_lighting_limit" | sed -e 's/shape_export_opt_lighting_limit//' | sed -e 's/ //g' | sed -e 's/=//g'`
seols=`cat ../../cfg/config.cfg | grep "shape_export_opt_lumel_size" | sed -e 's/shape_export_opt_lumel_size//' | sed -e 's/ //g' | sed -e 's/=//g'`
seoo=`cat ../../cfg/config.cfg | grep "shape_export_opt_oversampling" | sed -e 's/shape_export_opt_oversampling//' | sed -e 's/ //g' | sed -e 's/=//g'`
else
# We are in DRAFT mode
seoel='false'
seos='false'
seoll='0'
seols='0.25'
seoo='1'
fi
seolog=`cat ../../cfg/config.cfg | grep "shape_export_opt_lightmap_log" | sed -e 's/shape_export_opt_lightmap_log//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export shape >> log.log
echo ------- >> log.log
echo -------
echo --- Export shape
echo -------
date >> log.log
date
# For each directoy
for i in $shape_source_directories ; do
# Copy the script
cat maxscript/shape_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/shape/log.log&g" | sed -e "s&shape_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/shape/tag&g" | sed -e "s&output_directory_without_coarse_mesh&$build_gamedata_directory/processes/shape/shape_not_optimized&g" | sed -e "s&output_directory_with_coarse_mesh&$build_gamedata_directory/processes/shape/shape_with_coarse_mesh&g" | sed -e "s&shape_export_opt_export_lighting&$seoel&g" | sed -e "s&shape_export_opt_shadow&$seos&g" | sed -e "s&shape_export_opt_lighting_limit&$seoll&g" | sed -e "s&shape_export_opt_lumel_size&$seols&g" | sed -e "s&shape_export_opt_oversampling&$seoo&g"| sed -e "s&shape_export_opt_lightmap_log&$seolog&g" | sed -e "s&shape_lightmap_path&$build_gamedata_directory/processes/shape/lightmap_not_optimized&g" | sed -e "s&output_directory_anim&$build_gamedata_directory/processes/shape/anim&g" > $max_directory/scripts/shape_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript shape_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript shape_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript shape_export.ms -q -mi -vn
# Idle
../../idle.bat
done
# *********************************************
# *********************************************
# *** Export character lod shape files (.clod) from Max
# *********************************************
# *********************************************
# Get the clod directories
clod_source_directories=`cat ../../cfg/directories.cfg | grep "clod_source_directory" | sed -e 's/clod_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- >> log.log
echo --- Export clod >> log.log
echo ------- >> log.log
echo -------
echo --- Export clod
echo -------
date >> log.log
date
# For each directoy
for i in $clod_source_directories ; do
# Copy the script. TAKE IT FROM clodbank process. But write it here.
cat ../clodbank/maxscript/clod_export.ms | sed -e "s&shape_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_clod&$build_gamedata_directory/processes/shape/clod&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/shape/tag&g" > $max_directory/scripts/clod_export.ms
# Start max
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Concat log.log files
echo Try 1 >> log.log
cat $max_directory/log.log >> log.log
# Idle
../../idle.bat
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Concat log.log files
echo Try 2 >> log.log
cat $max_directory/log.log >> log.log
# Idle
../../idle.bat
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript clod_export.ms -q -mi -vn
# Concat log.log files
echo Try 3 >> log.log
cat $max_directory/log.log >> log.log
# Idle
../../idle.bat
done

@ -1,36 +1,36 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install shapes in the client data
# Get the shape install directory
shape_install_directory=`cat ../../cfg/directories.cfg | grep "shape_install_directory" | sed -e 's/shape_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the lightmaps install directory
lightmap_install_directory=`cat ../../cfg/directories.cfg | grep "lightmap_install_directory" | sed -e 's/lightmap_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install Shape >> log.log
echo ------- >> log.log
echo -------
echo --- Install Shape
echo -------
date >> log.log
date
cp -u -p -R shape/. $client_directory/$shape_install_directory 2>> log.log
cp -u -p -R shape_with_coarse_mesh_builded/. $client_directory/$shape_install_directory 2>> log.log
if test "$lightmap_install_directory"; then
mkdir $client_directory/$lightmap_install_directory 2>> log.log 2> /dev/null
cp -u -p -R lightmap_16_bits/. $client_directory/$lightmap_install_directory 2>> log.log
fi
cp -u -p -R anim/. $client_directory/$shape_install_directory 2>> log.log
ls anim | grep ".anim" >> $client_directory/auto_animations_list.txt
#!/bin/bash
rm log.log 2> /dev/null
# Install shapes in the client data
# Get the shape install directory
shape_install_directory=`cat ../../cfg/directories.cfg | grep "shape_install_directory" | sed -e 's/shape_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the lightmaps install directory
lightmap_install_directory=`cat ../../cfg/directories.cfg | grep "lightmap_install_directory" | sed -e 's/lightmap_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install Shape >> log.log
echo ------- >> log.log
echo -------
echo --- Install Shape
echo -------
date >> log.log
date
cp -u -p -R shape/. $client_directory/$shape_install_directory 2>> log.log
cp -u -p -R shape_with_coarse_mesh_builded/. $client_directory/$shape_install_directory 2>> log.log
if test "$lightmap_install_directory"; then
mkdir $client_directory/$lightmap_install_directory 2>> log.log 2> /dev/null
cp -u -p -R lightmap_16_bits/. $client_directory/$lightmap_install_directory 2>> log.log
fi
cp -u -p -R anim/. $client_directory/$shape_install_directory 2>> log.log
ls anim | grep ".anim" >> $client_directory/auto_animations_list.txt

@ -1,80 +1,80 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export skeleton files (.skel) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "skel_export_timeout" | sed -e 's/skel_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the skel directories
skel_source_directories=`cat ../../cfg/directories.cfg | grep "skel_source_directory" | sed -e 's/skel_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export skeleton from MAX>> log.log
echo ------- >> log.log
echo -------
echo --- Export skeleton from MAX
echo -------
date >> log.log
date
# For each directoy
for i in $skel_source_directories ; do
# Copy the script
cat maxscript/skel_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/skel/log.log&g" | sed -e "s&skel_source_directory&$database_directory/$i&g" | sed -e "s&output_directory&$build_gamedata_directory/processes/skel/skel&g" > $max_directory/scripts/skel_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript skel_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript skel_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript skel_export.ms -q -mi -vn
# Idle
../../idle.bat
done
# *** Export skeleton files (.skel) directly from .skel version
# Log error
echo ------- >> log.log
echo --- Copy skeleton from .skel>> log.log
echo ------- >> log.log
echo -------
echo --- Copy skeleton from .skel
echo -------
date >> log.log
date
# For each directoy
for i in $skel_source_directories ; do
# copy
cp -u -p $database_directory/$i/*.[sS][kK][eE][lL] skel 2>> log.log
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export skeleton files (.skel) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "skel_export_timeout" | sed -e 's/skel_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the skel directories
skel_source_directories=`cat ../../cfg/directories.cfg | grep "skel_source_directory" | sed -e 's/skel_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export skeleton from MAX>> log.log
echo ------- >> log.log
echo -------
echo --- Export skeleton from MAX
echo -------
date >> log.log
date
# For each directoy
for i in $skel_source_directories ; do
# Copy the script
cat maxscript/skel_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/skel/log.log&g" | sed -e "s&skel_source_directory&$database_directory/$i&g" | sed -e "s&output_directory&$build_gamedata_directory/processes/skel/skel&g" > $max_directory/scripts/skel_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript skel_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript skel_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript skel_export.ms -q -mi -vn
# Idle
../../idle.bat
done
# *** Export skeleton files (.skel) directly from .skel version
# Log error
echo ------- >> log.log
echo --- Copy skeleton from .skel>> log.log
echo ------- >> log.log
echo -------
echo --- Copy skeleton from .skel
echo -------
date >> log.log
date
# For each directoy
for i in $skel_source_directories ; do
# copy
cp -u -p $database_directory/$i/*.[sS][kK][eE][lL] skel 2>> log.log
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install skel in the client data
# Get the skel install directory
skel_install_directory=`cat ../../cfg/directories.cfg | grep "skel_install_directory" | sed -e 's/skel_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install skeleton >> log.log
echo ------- >> log.log
echo -------
echo --- Install skeleton
echo -------
date >> log.log
date
cp -u -p -R skel/. $client_directory/$skel_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install skel in the client data
# Get the skel install directory
skel_install_directory=`cat ../../cfg/directories.cfg | grep "skel_install_directory" | sed -e 's/skel_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install skeleton >> log.log
echo ------- >> log.log
echo -------
echo --- Install skeleton
echo -------
date >> log.log
date
cp -u -p -R skel/. $client_directory/$skel_install_directory 2>> log.log

@ -1,72 +1,72 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export bank file (.bank) from Max
# Some exe
build_smallbank='build_smallbank.exe'
exec_timeout='exec_timeout.exe'
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the swt directories
bank_source_directory=`cat ../../cfg/directories.cfg | grep "bank_source_directory" | sed -e 's/bank_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "smallbank_build_timeout" | sed -e 's/smallbank_build_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the tiles root directories
tile_root_source_directory=`cat ../../cfg/directories.cfg | grep "tile_root_source_directory" | sed -e 's/tile_root_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export bank >> log.log
echo ------- >> log.log
echo -------
echo --- Export bank
echo -------
date >> log.log
date
# Copy the bank
cp -u -p $database_directory/$bank_source_directory/*.[bB][aA][nN][kK] bank 2>> log.log
# Build the small bank
# Log error
echo ------- > log.log
echo --- Build bank >> log.log
echo ------- >> log.log
echo -------
echo --- Build bank
echo -------
date >> log.log
date
# list all the bank
bank_list=`ls -1 bank/*.[bB][aA][nN][kK]`
# For each bank
for i in $bank_list ; do
# Destination the name
dest=`echo $i | sed -e 's&bank&smallbank&g'`
# Make the dependencies
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
$exec_timeout $timeout $build_smallbank $i $dest $database_directory/$tile_root_source_directory/
if ( test -e $dest )
then
echo OK $dest >> log.log
else
echo ERROR building $dest >> log.log
fi
else
echo SKIPPED $dest >> log.log
fi
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export bank file (.bank) from Max
# Some exe
build_smallbank='build_smallbank.exe'
exec_timeout='exec_timeout.exe'
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the swt directories
bank_source_directory=`cat ../../cfg/directories.cfg | grep "bank_source_directory" | sed -e 's/bank_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "smallbank_build_timeout" | sed -e 's/smallbank_build_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the tiles root directories
tile_root_source_directory=`cat ../../cfg/directories.cfg | grep "tile_root_source_directory" | sed -e 's/tile_root_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export bank >> log.log
echo ------- >> log.log
echo -------
echo --- Export bank
echo -------
date >> log.log
date
# Copy the bank
cp -u -p $database_directory/$bank_source_directory/*.[bB][aA][nN][kK] bank 2>> log.log
# Build the small bank
# Log error
echo ------- > log.log
echo --- Build bank >> log.log
echo ------- >> log.log
echo -------
echo --- Build bank
echo -------
date >> log.log
date
# list all the bank
bank_list=`ls -1 bank/*.[bB][aA][nN][kK]`
# For each bank
for i in $bank_list ; do
# Destination the name
dest=`echo $i | sed -e 's&bank&smallbank&g'`
# Make the dependencies
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
$exec_timeout $timeout $build_smallbank $i $dest $database_directory/$tile_root_source_directory/
if ( test -e $dest )
then
echo OK $dest >> log.log
else
echo ERROR building $dest >> log.log
fi
else
echo SKIPPED $dest >> log.log
fi
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install the bank in the client data
# Get the bank install directory
bank_install_directory=`cat ../../cfg/directories.cfg | grep "bank_install_directory" | sed -e 's/bank_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install smallbank >> log.log
echo ------- >> log.log
echo -------
echo --- Install smallbank
echo -------
date >> log.log
date
cp -u -p -R smallbank/. $client_directory/$bank_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install the bank in the client data
# Get the bank install directory
bank_install_directory=`cat ../../cfg/directories.cfg | grep "bank_install_directory" | sed -e 's/bank_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install smallbank >> log.log
echo ------- >> log.log
echo -------
echo --- Install smallbank
echo -------
date >> log.log
date
cp -u -p -R smallbank/. $client_directory/$bank_install_directory 2>> log.log

@ -1,57 +1,57 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export skeleton weight files (.swt) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "swt_export_timeout" | sed -e 's/swt_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the swt directories
swt_source_directories=`cat ../../cfg/directories.cfg | grep "swt_source_directory" | sed -e 's/swt_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export skeleton weight >> log.log
echo ------- >> log.log
echo -------
echo --- Export skeleton weight
echo -------
date >> log.log
date
# For each directoy
for i in $swt_source_directories ; do
# Copy the script
cat maxscript/swt_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/swt/log.log&g" | sed -e "s&swt_source_directory&$database_directory/$i&g" | sed -e "s&output_directory&$build_gamedata_directory/processes/swt/swt&g" > $max_directory/scripts/swt_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript swt_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript swt_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript swt_export.ms -q -mi -vn
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export skeleton weight files (.swt) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "swt_export_timeout" | sed -e 's/swt_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the swt directories
swt_source_directories=`cat ../../cfg/directories.cfg | grep "swt_source_directory" | sed -e 's/swt_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export skeleton weight >> log.log
echo ------- >> log.log
echo -------
echo --- Export skeleton weight
echo -------
date >> log.log
date
# For each directoy
for i in $swt_source_directories ; do
# Copy the script
cat maxscript/swt_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/swt/log.log&g" | sed -e "s&swt_source_directory&$database_directory/$i&g" | sed -e "s&output_directory&$build_gamedata_directory/processes/swt/swt&g" > $max_directory/scripts/swt_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript swt_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript swt_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript swt_export.ms -q -mi -vn
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install swt in the client data
# Get the swt install directory
swt_install_directory=`cat ../../cfg/directories.cfg | grep "swt_install_directory" | sed -e 's/swt_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install skeleton weight >> log.log
echo ------- >> log.log
echo -------
echo --- Install skeleton weight
echo -------
date >> log.log
date
cp -u -p -R swt/. $client_directory/$swt_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install swt in the client data
# Get the swt install directory
swt_install_directory=`cat ../../cfg/directories.cfg | grep "swt_install_directory" | sed -e 's/swt_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install skeleton weight >> log.log
echo ------- >> log.log
echo -------
echo --- Install skeleton weight
echo -------
date >> log.log
date
cp -u -p -R swt/. $client_directory/$swt_install_directory 2>> log.log

@ -1,43 +1,43 @@
#!/bin/bash
rm log.log 2> /dev/null
tga_2_dds='tga2dds.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "maps_build_timeout" | sed -e 's/maps_build_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Build the tile textures
# Log error
echo ------- > log.log
echo --- Build tiles >> log.log
echo ------- >> log.log
echo -------
echo --- Build tiles
echo -------
date >> log.log
date
# For each texture
for i in maps_tga/*.[tT][gG][aA] ; do
if ( test -e $i )
then
dest=`echo $i | sed -e 's/maps_tga/maps_final/g' | sed -e 's/.tga/.dds/g'`
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
$exec_timeout $timeout $tga_2_dds $i -o $dest -a 5 -m
if ( test -e $dest )
then
echo OK $dest >> log.log
else
echo ERROR building $dest >> log.log
fi
else
echo SKIPPED $dest >> log.log
fi
fi
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
tga_2_dds='tga2dds.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "maps_build_timeout" | sed -e 's/maps_build_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Build the tile textures
# Log error
echo ------- > log.log
echo --- Build tiles >> log.log
echo ------- >> log.log
echo -------
echo --- Build tiles
echo -------
date >> log.log
date
# For each texture
for i in maps_tga/*.[tT][gG][aA] ; do
if ( test -e $i )
then
dest=`echo $i | sed -e 's/maps_tga/maps_final/g' | sed -e 's/.tga/.dds/g'`
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
$exec_timeout $timeout $tga_2_dds $i -o $dest -a 5 -m
if ( test -e $dest )
then
echo OK $dest >> log.log
else
echo ERROR building $dest >> log.log
fi
else
echo SKIPPED $dest >> log.log
fi
fi
# Idle
../../idle.bat
done

@ -1,33 +1,33 @@
#!/bin/bash
rm log.log 2> /dev/null
# Export the tile textures
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the tile directories
tile_source_directories=`cat ../../cfg/directories.cfg | grep "tile_source_directories" | sed -e 's/tile_source_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export tiles >> log.log
echo ------- >> log.log
echo -------
echo --- Export tiles
echo -------
date >> log.log
date
# For each directoy
for i in $tile_source_directories ; do
list_textures=`find $database_directory/$i -type f -name '*.[tT][gG][aA]'`
# For each textures
for j in $list_textures ; do
cp -u -p $j maps_tga/ 2>> log.log
done
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# Export the tile textures
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the tile directories
tile_source_directories=`cat ../../cfg/directories.cfg | grep "tile_source_directories" | sed -e 's/tile_source_directories//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export tiles >> log.log
echo ------- >> log.log
echo -------
echo --- Export tiles
echo -------
date >> log.log
date
# For each directoy
for i in $tile_source_directories ; do
list_textures=`find $database_directory/$i -type f -name '*.[tT][gG][aA]'`
# For each textures
for j in $list_textures ; do
cp -u -p $j maps_tga/ 2>> log.log
done
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install tiles in the client data
# Get the tile install directory
tile_install_directory=`cat ../../cfg/directories.cfg | grep "tile_install_directory" | sed -e 's/tile_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install Tiles >> log.log
echo ------- >> log.log
echo -------
echo --- Install Tiles
echo -------
date >> log.log
date
cp -u -p -R maps_final/. $client_directory/$tile_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install tiles in the client data
# Get the tile install directory
tile_install_directory=`cat ../../cfg/directories.cfg | grep "tile_install_directory" | sed -e 's/tile_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install Tiles >> log.log
echo ------- >> log.log
echo -------
echo --- Install Tiles
echo -------
date >> log.log
date
cp -u -p -R maps_final/. $client_directory/$tile_install_directory 2>> log.log

@ -1,52 +1,52 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export veget files (.veget) from Max
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the veget directories
veget_source_directories=`cat ../../cfg/directories.cfg | grep "veget_source_directory" | sed -e 's/veget_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export veget >> log.log
echo ------- >> log.log
echo -------
echo --- Export veget
echo -------
date >> log.log
date
# For each directoy
for i in $veget_source_directories ; do
# Copy the script
cat maxscript/veget_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/veget/log.log&g" | sed -e "s&veget_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_veget&$build_gamedata_directory/processes/veget/veget&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/veget/tag&g" > $max_directory/scripts/veget_export.ms
# Start max
echo Try 1 >> log.log
$max_directory/3dsmax.exe -U MAXScript veget_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$max_directory/3dsmax.exe -U MAXScript veget_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$max_directory/3dsmax.exe -U MAXScript veget_export.ms -q -mi -vn
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export veget files (.veget) from Max
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the veget directories
veget_source_directories=`cat ../../cfg/directories.cfg | grep "veget_source_directory" | sed -e 's/veget_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
# Log error
echo ------- > log.log
echo --- Export veget >> log.log
echo ------- >> log.log
echo -------
echo --- Export veget
echo -------
date >> log.log
date
# For each directoy
for i in $veget_source_directories ; do
# Copy the script
cat maxscript/veget_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/veget/log.log&g" | sed -e "s&veget_source_directory&$database_directory/$i&g" | sed -e "s&output_directory_veget&$build_gamedata_directory/processes/veget/veget&g" | sed -e "s&output_directory_tag&$build_gamedata_directory/processes/veget/tag&g" > $max_directory/scripts/veget_export.ms
# Start max
echo Try 1 >> log.log
$max_directory/3dsmax.exe -U MAXScript veget_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 2 >> log.log
$max_directory/3dsmax.exe -U MAXScript veget_export.ms -q -mi -vn
# Idle
../../idle.bat
echo Try 3 >> log.log
$max_directory/3dsmax.exe -U MAXScript veget_export.ms -q -mi -vn
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install vegets in the client data
# Get the veget install directory
veget_install_directory=`cat ../../cfg/directories.cfg | grep "veget_install_directory" | sed -e 's/veget_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install veget >> log.log
echo ------- >> log.log
echo -------
echo --- Install veget
echo -------
date >> log.log
date
cp -u -p -R veget/. $client_directory/$veget_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install vegets in the client data
# Get the veget install directory
veget_install_directory=`cat ../../cfg/directories.cfg | grep "veget_install_directory" | sed -e 's/veget_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install veget >> log.log
echo ------- >> log.log
echo -------
echo --- Install veget
echo -------
date >> log.log
date
cp -u -p -R veget/. $client_directory/$veget_install_directory 2>> log.log

@ -1,29 +1,29 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export vegetset file (.vegetset)
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the vegetset directories
vegetset_source_directories=`cat ../../cfg/directories.cfg | grep "vegetset_source_directory" | sed -e 's/vegetset_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export vegetset >> log.log
echo ------- >> log.log
echo -------
echo --- Export vegetset
echo -------
date >> log.log
date
# For each vegetset directory
for i in $vegetset_source_directories ; do
# Copy
cp -u -p $database_directory/$i/*.[vV][eE][gG][eE][tT][sS][eE][tT] vegetset 2>> log.log
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export vegetset file (.vegetset)
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the vegetset directories
vegetset_source_directories=`cat ../../cfg/directories.cfg | grep "vegetset_source_directory" | sed -e 's/vegetset_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export vegetset >> log.log
echo ------- >> log.log
echo -------
echo --- Export vegetset
echo -------
date >> log.log
date
# For each vegetset directory
for i in $vegetset_source_directories ; do
# Copy
cp -u -p $database_directory/$i/*.[vV][eE][gG][eE][tT][sS][eE][tT] vegetset 2>> log.log
# Idle
../../idle.bat
done

@ -1,22 +1,22 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install the vegetable set in the client data
# Get the vegetset install directory
vegetset_install_directory=`cat ../../cfg/directories.cfg | grep "vegetset_install_directory" | sed -e 's/vegetset_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install vegetset >> log.log
echo ------- >> log.log
echo -------
echo --- Install vegetset
echo -------
date >> log.log
date
cp -u -p -R vegetset/. $client_directory/$vegetset_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install the vegetable set in the client data
# Get the vegetset install directory
vegetset_install_directory=`cat ../../cfg/directories.cfg | grep "vegetset_install_directory" | sed -e 's/vegetset_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install vegetset >> log.log
echo ------- >> log.log
echo -------
echo --- Install vegetset
echo -------
date >> log.log
date
cp -u -p -R vegetset/. $client_directory/$vegetset_install_directory 2>> log.log

@ -1,149 +1,149 @@
#!/bin/bash
rm log.log 2> /dev/null
# Build zone
zone_dependencies='zone_dependencies.exe'
zone_welder='zone_welder.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
depend_timeout=`cat ../../cfg/config.cfg | grep "zone_build_depend_timeout" | sed -e 's/zone_build_depend_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
weld_timeout=`cat ../../cfg/config.cfg | grep "zone_build_weld_timeout" | sed -e 's/zone_build_weld_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the quality option to choose the goor properties.cfg file
quality_flag=`cat ../../cfg/site.cfg | grep "build_quality" | grep "1"`
# **** Build dependencies
if ( test "$quality_flag" )
then
# We are in BEST mode
# Log error
echo ------- >> log.log
echo --- Build zone : dependencies >> log.log
echo ------- >> log.log
echo -------
echo --- Build zone : dependencies
echo -------
date >> log.log
date
cp ../../cfg/properties.cfg zone_depencies_properties.cfg
#append the level design directory at the end of the config file
ld_dir=`cat ../../cfg/site.cfg | grep "level_design_directory" | sed -e 's/level_design_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_world_dir=`cat ../../cfg/site.cfg | grep "level_design_world_directory" | sed -e 's/level_design_world_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_dfn_dir=`cat ../../cfg/site.cfg | grep "level_design_dfn_directory" | sed -e 's/level_design_dfn_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
continent_file_name=`cat ../../cfg/config.cfg | grep "continent_file" | sed -e 's/continent_file//g' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "level_design_directory = \"$ld_dir\";" >> zone_depencies_properties.cfg
echo "level_design_world_directory = \"$ld_world_dir\";" >> zone_depencies_properties.cfg
echo "level_design_dfn_directory = \"$ld_dfn_dir\";" >> zone_depencies_properties.cfg
echo "continent_name = \"$continent_file_name\";" >> zone_depencies_properties.cfg
# list all the dependencies regions
zone_regions=`cat ../../cfg/config.cfg | grep "zone_region" | sed -e 's/zone_region//' | sed -e 's/ //g' | sed -e 's/=//g'`
# For each dependencies region
for i in $zone_regions ; do
# Extract the name
arg=`echo zone_exported/$zone_regions | sed -e 's&,&.zone zone_exported/&g'`
# Make the dependencies
$exec_timeout $depend_timeout $zone_dependencies zone_depencies_properties.cfg $arg.zone zone_depend/doomy.depend
# Idle
../../idle.bat
done
fi
# **** Weld
# Log error
echo ------- >> log.log
echo --- Build zone : weld >> log.log
echo ------- >> log.log
echo -------
echo --- Build zone : weld
echo -------
date >> log.log
date
# List the zones to weld
list_zone=`ls -1 zone_exported/*.[zZ][oO][nN][eE]`
# Build a zones list to weld
echo -- Build a list of file to weld
rm zone_to_weld.txt 2> /dev/null
for i in $list_zone ; do
dest=`echo $i | sed -e 's/zone_exported/zone_welded/g' | sed -e 's/.zone/.zonew/g'`
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
echo $i >> zone_to_weld.txt
rm $dest
fi
# Idle
../../idle.bat
done
# Weld the zone
if (test -f zone_to_weld.txt)
then
list_zone=`cat zone_to_weld.txt`
for i in $list_zone ; do
echo -- Weld $i
echo -- Weld $i >> log.log
$exec_timeout $weld_timeout $zone_welder $i $dest
echo
# Idle
../../idle.bat
done
fi
# Log error
echo ------- >> log.log
echo --- Build zone : weld zones without heightmap >> log.log
echo ------- >> log.log
echo -------
echo --- Build zone : weld zones without heightmap
echo -------
date >> log.log
date
# List the zones to weld
list_zone=`ls -1 zone_exported/*.[zZ][oO][nN][eE][nN][hH]`
# Build a zones list to weld
echo -- Build a list of file to weld
rm zone_to_weld.txt 2> /dev/null
for i in $list_zone ; do
dest=`echo $i | sed -e 's/zone_exported/zone_welded/g' | sed -e 's/.zonenh/.zonenhw/g'`
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
echo $i >> zone_to_weld.txt
rm $dest
fi
# Idle
../../idle.bat
done
# Weld the zone
if (test -f zone_to_weld.txt)
then
list_zone=`cat zone_to_weld.txt`
for i in $list_zone ; do
echo -- Weld $i
echo -- Weld $i >> log.log
$exec_timeout $weld_timeout $zone_welder $i $dest
echo
# Idle
../../idle.bat
done
fi
# Build a zones list to weld
rm zone_to_weld.txt 2> /dev/null
#!/bin/bash
rm log.log 2> /dev/null
# Build zone
zone_dependencies='zone_dependencies.exe'
zone_welder='zone_welder.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
depend_timeout=`cat ../../cfg/config.cfg | grep "zone_build_depend_timeout" | sed -e 's/zone_build_depend_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
weld_timeout=`cat ../../cfg/config.cfg | grep "zone_build_weld_timeout" | sed -e 's/zone_build_weld_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the quality option to choose the goor properties.cfg file
quality_flag=`cat ../../cfg/site.cfg | grep "build_quality" | grep "1"`
# **** Build dependencies
if ( test "$quality_flag" )
then
# We are in BEST mode
# Log error
echo ------- >> log.log
echo --- Build zone : dependencies >> log.log
echo ------- >> log.log
echo -------
echo --- Build zone : dependencies
echo -------
date >> log.log
date
cp ../../cfg/properties.cfg zone_depencies_properties.cfg
#append the level design directory at the end of the config file
ld_dir=`cat ../../cfg/site.cfg | grep "level_design_directory" | sed -e 's/level_design_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_world_dir=`cat ../../cfg/site.cfg | grep "level_design_world_directory" | sed -e 's/level_design_world_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_dfn_dir=`cat ../../cfg/site.cfg | grep "level_design_dfn_directory" | sed -e 's/level_design_dfn_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
continent_file_name=`cat ../../cfg/config.cfg | grep "continent_file" | sed -e 's/continent_file//g' | sed -e 's/ //g' | sed -e 's/=//g'`
echo "level_design_directory = \"$ld_dir\";" >> zone_depencies_properties.cfg
echo "level_design_world_directory = \"$ld_world_dir\";" >> zone_depencies_properties.cfg
echo "level_design_dfn_directory = \"$ld_dfn_dir\";" >> zone_depencies_properties.cfg
echo "continent_name = \"$continent_file_name\";" >> zone_depencies_properties.cfg
# list all the dependencies regions
zone_regions=`cat ../../cfg/config.cfg | grep "zone_region" | sed -e 's/zone_region//' | sed -e 's/ //g' | sed -e 's/=//g'`
# For each dependencies region
for i in $zone_regions ; do
# Extract the name
arg=`echo zone_exported/$zone_regions | sed -e 's&,&.zone zone_exported/&g'`
# Make the dependencies
$exec_timeout $depend_timeout $zone_dependencies zone_depencies_properties.cfg $arg.zone zone_depend/doomy.depend
# Idle
../../idle.bat
done
fi
# **** Weld
# Log error
echo ------- >> log.log
echo --- Build zone : weld >> log.log
echo ------- >> log.log
echo -------
echo --- Build zone : weld
echo -------
date >> log.log
date
# List the zones to weld
list_zone=`ls -1 zone_exported/*.[zZ][oO][nN][eE]`
# Build a zones list to weld
echo -- Build a list of file to weld
rm zone_to_weld.txt 2> /dev/null
for i in $list_zone ; do
dest=`echo $i | sed -e 's/zone_exported/zone_welded/g' | sed -e 's/.zone/.zonew/g'`
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
echo $i >> zone_to_weld.txt
rm $dest
fi
# Idle
../../idle.bat
done
# Weld the zone
if (test -f zone_to_weld.txt)
then
list_zone=`cat zone_to_weld.txt`
for i in $list_zone ; do
echo -- Weld $i
echo -- Weld $i >> log.log
$exec_timeout $weld_timeout $zone_welder $i $dest
echo
# Idle
../../idle.bat
done
fi
# Log error
echo ------- >> log.log
echo --- Build zone : weld zones without heightmap >> log.log
echo ------- >> log.log
echo -------
echo --- Build zone : weld zones without heightmap
echo -------
date >> log.log
date
# List the zones to weld
list_zone=`ls -1 zone_exported/*.[zZ][oO][nN][eE][nN][hH]`
# Build a zones list to weld
echo -- Build a list of file to weld
rm zone_to_weld.txt 2> /dev/null
for i in $list_zone ; do
dest=`echo $i | sed -e 's/zone_exported/zone_welded/g' | sed -e 's/.zonenh/.zonenhw/g'`
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
echo $i >> zone_to_weld.txt
rm $dest
fi
# Idle
../../idle.bat
done
# Weld the zone
if (test -f zone_to_weld.txt)
then
list_zone=`cat zone_to_weld.txt`
for i in $list_zone ; do
echo -- Weld $i
echo -- Weld $i >> log.log
$exec_timeout $weld_timeout $zone_welder $i $dest
echo
# Idle
../../idle.bat
done
fi
# Build a zones list to weld
rm zone_to_weld.txt 2> /dev/null

@ -1,109 +1,109 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export zone files (.zone) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "zone_export_timeout" | sed -e 's/zone_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the zone directories
zone_source_directories=`cat ../../cfg/directories.cfg | grep "zone_source_directory" | sed -e 's/zone_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the ligo value
ligo_flag=`cat ../../cfg/config.cfg | grep "process_to_complete" | grep "ligo"`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
if ( test "$ligo_flag" )
then
echo [Ligo] ON
echo [Ligo] ON >> log.log
else
echo [Ligo] OFF
echo [Ligo] OFF >> log.log
fi
# Log error
echo ------- > log.log
echo --- Export zone >> log.log
echo ------- >> log.log
echo -------
echo --- Export zone
echo -------
date >> log.log
date
# Try to export from Max zone if any
for i in $zone_source_directories ; do
# Copy the script
cat maxscript/zone_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/zone/log.log&g" | sed -e "s&zone_source_directory&$database_directory/$i&g" | sed -e "s&output_directory&$build_gamedata_directory/processes/zone/zone_exported&g" > $max_directory/scripts/zone_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript zone_export.ms -q -mi -vn
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript zone_export.ms -q -mi -vn
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript zone_export.ms -q -mi -vn
# Idle
../../idle.bat
done
# ****************************
# Try to copy ligo zone if any
# ****************************
dir_current=`pwd`
cd ../ligo/output
list_zone=`ls -1 *.[zZ][oO][nN][eE]`
for filename in $list_zone ; do
echo "Checking $filename for update"
if test -e ../../zone/zone_exported/$filename ; then
must_update=`diff --binary -q $filename ../../zone/zone_exported/$filename` ;
else
must_update=YES ;
fi
if test -n "$must_update" ; then
echo " Updating"
cp -u -p $filename ../../zone/zone_exported/$filename ;
fi
# Idle
../../../idle.bat
done
cd $dir_current
# delete files only present in the zone_exported directory
if ( test "$ligo_flag" )
then
cd ./zone_exported
list_zone=`ls -1 *.[zZ][oO][nN][eE]`
for filename in $list_zone ; do
if test -e ../../ligo/output/$filename ; then
must_update=NO ;
else
echo "Removing $filename"
rm $filename ;
fi
# Idle
../../../idle.bat
done
cd ..
fi
#!/bin/bash
rm log.log 2> /dev/null
# *** Export zone files (.zone) from Max
exec_timeout='exec_timeout.exe'
# Get the timeout
timeout=`cat ../../cfg/config.cfg | grep "zone_export_timeout" | sed -e 's/zone_export_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the build gamedata directory
build_gamedata_directory=`cat ../../cfg/site.cfg | grep "build_gamedata_directory" | sed -e 's/build_gamedata_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the zone directories
zone_source_directories=`cat ../../cfg/directories.cfg | grep "zone_source_directory" | sed -e 's/zone_source_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the ligo value
ligo_flag=`cat ../../cfg/config.cfg | grep "process_to_complete" | grep "ligo"`
# Maxdir
max_directory=`echo $MAX_DIR | sed -e 's&\\\&/&g'`
if ( test "$ligo_flag" )
then
echo [Ligo] ON
echo [Ligo] ON >> log.log
else
echo [Ligo] OFF
echo [Ligo] OFF >> log.log
fi
# Log error
echo ------- > log.log
echo --- Export zone >> log.log
echo ------- >> log.log
echo -------
echo --- Export zone
echo -------
date >> log.log
date
# Try to export from Max zone if any
for i in $zone_source_directories ; do
# Copy the script
cat maxscript/zone_export.ms | sed -e "s&output_logfile&$build_gamedata_directory/processes/zone/log.log&g" | sed -e "s&zone_source_directory&$database_directory/$i&g" | sed -e "s&output_directory&$build_gamedata_directory/processes/zone/zone_exported&g" > $max_directory/scripts/zone_export.ms
# Start max
echo Try 1 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript zone_export.ms -q -mi -vn
echo Try 2 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript zone_export.ms -q -mi -vn
echo Try 3 >> log.log
$exec_timeout $timeout $max_directory/3dsmax.exe -U MAXScript zone_export.ms -q -mi -vn
# Idle
../../idle.bat
done
# ****************************
# Try to copy ligo zone if any
# ****************************
dir_current=`pwd`
cd ../ligo/output
list_zone=`ls -1 *.[zZ][oO][nN][eE]`
for filename in $list_zone ; do
echo "Checking $filename for update"
if test -e ../../zone/zone_exported/$filename ; then
must_update=`diff --binary -q $filename ../../zone/zone_exported/$filename` ;
else
must_update=YES ;
fi
if test -n "$must_update" ; then
echo " Updating"
cp -u -p $filename ../../zone/zone_exported/$filename ;
fi
# Idle
../../../idle.bat
done
cd $dir_current
# delete files only present in the zone_exported directory
if ( test "$ligo_flag" )
then
cd ./zone_exported
list_zone=`ls -1 *.[zZ][oO][nN][eE]`
for filename in $list_zone ; do
if test -e ../../ligo/output/$filename ; then
must_update=NO ;
else
echo "Removing $filename"
rm $filename ;
fi
# Idle
../../../idle.bat
done
cd ..
fi

@ -1,119 +1,119 @@
#!/bin/bash
rm log.log 2> /dev/null
# Build zone
zone_lighter='zone_lighter.exe'
zone_ig_lighter='zone_ig_lighter.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
light_timeout=`cat ../../cfg/config.cfg | grep "zone_build_light_timeout" | sed -e 's/zone_build_light_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
ig_light_timeout=`cat ../../cfg/config.cfg | grep "zone_build_ig_light_timeout" | sed -e 's/zone_build_ig_light_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# **** Light
# Log error
echo ------- >> log.log
echo --- Zone lighting >> log.log
echo ------- >> log.log
echo -------
echo --- Zone lighting
echo -------
date >> log.log
date
#append the level design directory at the end of the config file
ld_dir=`cat ../../cfg/site.cfg | grep "level_design_directory" | sed -e 's/level_design_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_world_dir=`cat ../../cfg/site.cfg | grep "level_design_world_directory" | sed -e 's/level_design_world_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_dfn_dir=`cat ../../cfg/site.cfg | grep "level_design_dfn_directory" | sed -e 's/level_design_dfn_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
continent_file_name=`cat ../../cfg/config.cfg | grep "continent_file" | sed -e 's/continent_file//g' | sed -e 's/ //g' | sed -e 's/=//g'`
cp ../../cfg/properties.cfg zone_lighter_properties.cfg
echo "level_design_directory = \"$ld_dir\";" >> zone_lighter_properties.cfg
echo "level_design_world_directory = \"$ld_world_dir\";" >> zone_lighter_properties.cfg
echo "level_design_dfn_directory = \"$ld_dfn_dir\";" >> zone_lighter_properties.cfg
echo "continent_name = \"$continent_file_name\";" >> zone_lighter_properties.cfg
# List the zones to light
list_zone_welded=`ls -1 ../zone/zone_welded/*.[zZ][oO][nN][eE][wW]`
# Light zones
for i in $list_zone_welded ; do
dest=`echo $i | sed -e 's&../zone/zone_welded&zone_lighted&g' | sed -e 's/.zonew/.zonel/g'`
depend=`echo $i | sed -e 's&../zone/zone_welded&../zone/zone_depend&g' | sed -e 's/.zonew/.depend/g'`
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
echo LIGHT $i
echo LIGHT $i >> log.log
$exec_timeout $light_timeout $zone_lighter $i $dest zone_lighter_properties.cfg $depend
echo
echo
else
echo SKIP $dest
echo SKIP $dest >> log.log
fi
# Idle
../../idle.bat
done
# List the zones lighted
list_zone_lighted_remove=`ls -1 zone_lighted/*.[zZ][oO][nN][eE][lL]`
# Remove old lighted zones
for i in $list_zone_lighted_remove ; do
source=`echo $i | sed -e 's&zone_lighted&../zone/zone_welded&g' | sed -e 's/.zonel/.zonew/g'`
if ( ! test -e $source )
then
echo REMOVE $i
echo REMOVE $i >> log.log
rm $i
fi
# Idle
../../idle.bat
done
# **** IgLight
# Log error
echo ------- >> log.log
echo --- Build zone : IgLight >> log.log
echo ------- >> log.log
echo -------
echo --- Build zone : IgLight
echo -------
date >> log.log
date
# List the zones lighted
list_zone_lighted=`ls -1 zone_lighted/*.[zZ][oO][nN][eE][lL]`
# Light zones
for i in $list_zone_lighted ; do
dest=`echo $i | sed -e 's/zone_lighted/ig_land_lighted/g' | sed -e 's/.zonel/.ig/g'`
depend=`echo $i | sed -e 's&zone_lighted&../zone/zone_depend&g' | sed -e 's/.zonel/.depend/g'`
igsrc=`echo $i | sed -e 's&zone_lighted&../ig/ig_land&g' | sed -e 's/.zonel/.ig/g'`
if ( test -f $igsrc )
then
if ( ! test -e $dest ) || ( test $i -nt $dest ) || ( test $igsrc -nt $dest )
then
echo -- IgLight $i
echo -- IgLight $i >> log.log
$exec_timeout $ig_light_timeout $zone_ig_lighter $i $dest ../../cfg/properties.cfg $depend
echo
echo
fi
else
if ( test -f $dest )
then
echo "-- Remove" $dest
rm $dest
fi
fi
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# Build zone
zone_lighter='zone_lighter.exe'
zone_ig_lighter='zone_ig_lighter.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
light_timeout=`cat ../../cfg/config.cfg | grep "zone_build_light_timeout" | sed -e 's/zone_build_light_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
ig_light_timeout=`cat ../../cfg/config.cfg | grep "zone_build_ig_light_timeout" | sed -e 's/zone_build_ig_light_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# **** Light
# Log error
echo ------- >> log.log
echo --- Zone lighting >> log.log
echo ------- >> log.log
echo -------
echo --- Zone lighting
echo -------
date >> log.log
date
#append the level design directory at the end of the config file
ld_dir=`cat ../../cfg/site.cfg | grep "level_design_directory" | sed -e 's/level_design_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_world_dir=`cat ../../cfg/site.cfg | grep "level_design_world_directory" | sed -e 's/level_design_world_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_dfn_dir=`cat ../../cfg/site.cfg | grep "level_design_dfn_directory" | sed -e 's/level_design_dfn_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
continent_file_name=`cat ../../cfg/config.cfg | grep "continent_file" | sed -e 's/continent_file//g' | sed -e 's/ //g' | sed -e 's/=//g'`
cp ../../cfg/properties.cfg zone_lighter_properties.cfg
echo "level_design_directory = \"$ld_dir\";" >> zone_lighter_properties.cfg
echo "level_design_world_directory = \"$ld_world_dir\";" >> zone_lighter_properties.cfg
echo "level_design_dfn_directory = \"$ld_dfn_dir\";" >> zone_lighter_properties.cfg
echo "continent_name = \"$continent_file_name\";" >> zone_lighter_properties.cfg
# List the zones to light
list_zone_welded=`ls -1 ../zone/zone_welded/*.[zZ][oO][nN][eE][wW]`
# Light zones
for i in $list_zone_welded ; do
dest=`echo $i | sed -e 's&../zone/zone_welded&zone_lighted&g' | sed -e 's/.zonew/.zonel/g'`
depend=`echo $i | sed -e 's&../zone/zone_welded&../zone/zone_depend&g' | sed -e 's/.zonew/.depend/g'`
if ( ! test -e $dest ) || ( test $i -nt $dest )
then
echo LIGHT $i
echo LIGHT $i >> log.log
$exec_timeout $light_timeout $zone_lighter $i $dest zone_lighter_properties.cfg $depend
echo
echo
else
echo SKIP $dest
echo SKIP $dest >> log.log
fi
# Idle
../../idle.bat
done
# List the zones lighted
list_zone_lighted_remove=`ls -1 zone_lighted/*.[zZ][oO][nN][eE][lL]`
# Remove old lighted zones
for i in $list_zone_lighted_remove ; do
source=`echo $i | sed -e 's&zone_lighted&../zone/zone_welded&g' | sed -e 's/.zonel/.zonew/g'`
if ( ! test -e $source )
then
echo REMOVE $i
echo REMOVE $i >> log.log
rm $i
fi
# Idle
../../idle.bat
done
# **** IgLight
# Log error
echo ------- >> log.log
echo --- Build zone : IgLight >> log.log
echo ------- >> log.log
echo -------
echo --- Build zone : IgLight
echo -------
date >> log.log
date
# List the zones lighted
list_zone_lighted=`ls -1 zone_lighted/*.[zZ][oO][nN][eE][lL]`
# Light zones
for i in $list_zone_lighted ; do
dest=`echo $i | sed -e 's/zone_lighted/ig_land_lighted/g' | sed -e 's/.zonel/.ig/g'`
depend=`echo $i | sed -e 's&zone_lighted&../zone/zone_depend&g' | sed -e 's/.zonel/.depend/g'`
igsrc=`echo $i | sed -e 's&zone_lighted&../ig/ig_land&g' | sed -e 's/.zonel/.ig/g'`
if ( test -f $igsrc )
then
if ( ! test -e $dest ) || ( test $i -nt $dest ) || ( test $igsrc -nt $dest )
then
echo -- IgLight $i
echo -- IgLight $i >> log.log
$exec_timeout $ig_light_timeout $zone_ig_lighter $i $dest ../../cfg/properties.cfg $depend
echo
echo
fi
else
if ( test -f $dest )
then
echo "-- Remove" $dest
rm $dest
fi
fi
# Idle
../../idle.bat
done

@ -1,28 +1,28 @@
#!/bin/bash
rm log.log 2> /dev/null
# *** Export zone files (.zone) from Max
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the water maps directories
water_map_directories=`cat ../../cfg/directories.cfg | grep "water_map_directory" | sed -e 's/water_map_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export water shape >> log.log
echo ------- >> log.log
echo -------
echo --- Export water shape
echo -------
date >> log.log
date
#copy each water map before lightmapping
for i in $water_map_directories ; do
cp -u -p $database_directory/$i/*.[tT][gG][aA] water_shapes_lighted 2>> log.log
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# *** Export zone files (.zone) from Max
# Get the database directory
database_directory=`cat ../../cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the water maps directories
water_map_directories=`cat ../../cfg/directories.cfg | grep "water_map_directory" | sed -e 's/water_map_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Export water shape >> log.log
echo ------- >> log.log
echo -------
echo --- Export water shape
echo -------
date >> log.log
date
#copy each water map before lightmapping
for i in $water_map_directories ; do
cp -u -p $database_directory/$i/*.[tT][gG][aA] water_shapes_lighted 2>> log.log
# Idle
../../idle.bat
done

@ -1,44 +1,44 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install the zonels in the client data
# Get the zone install directory
zone_install_directory=`cat ../../cfg/directories.cfg | grep "zone_install_directory" | sed -e 's/zone_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install zone >> log.log
echo ------- >> log.log
echo -------
echo --- Install zone
echo -------
date >> log.log
date
cp -u -p -R zone_lighted/. $client_directory/$zone_install_directory 2>> log.log
# copy the water maps once they have been lighted
cp -u -p -R water_shapes_lighted/. $client_directory/$water_maps_directories
# Install zone ig lighted in the client data
# Get the ig install directory
ig_install_directory=`cat ../../cfg/directories.cfg | grep "ig_install_directory" | sed -e 's/ig_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install Zone Ig >> log.log
echo ------- >> log.log
echo -------
echo --- Install Zone Ig
echo -------
date >> log.log
date
cp -u -p -R ig_land_lighted/. $client_directory/$ig_install_directory 2>> log.log
#!/bin/bash
rm log.log 2> /dev/null
# Install the zonels in the client data
# Get the zone install directory
zone_install_directory=`cat ../../cfg/directories.cfg | grep "zone_install_directory" | sed -e 's/zone_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client directory
client_directory=`cat ../../cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install zone >> log.log
echo ------- >> log.log
echo -------
echo --- Install zone
echo -------
date >> log.log
date
cp -u -p -R zone_lighted/. $client_directory/$zone_install_directory 2>> log.log
# copy the water maps once they have been lighted
cp -u -p -R water_shapes_lighted/. $client_directory/$water_maps_directories
# Install zone ig lighted in the client data
# Get the ig install directory
ig_install_directory=`cat ../../cfg/directories.cfg | grep "ig_install_directory" | sed -e 's/ig_install_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo ------- > log.log
echo --- Install Zone Ig >> log.log
echo ------- >> log.log
echo -------
echo --- Install Zone Ig
echo -------
date >> log.log
date
cp -u -p -R ig_land_lighted/. $client_directory/$ig_install_directory 2>> log.log

@ -1,63 +1,63 @@
#!/bin/bash
rm log.log 2> /dev/null
# Build zone
zone_lighter='zone_lighter.exe'
zone_ig_lighter='zone_ig_lighter.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
light_timeout=`cat ../../cfg/config.cfg | grep "zone_build_light_timeout" | sed -e 's/zone_build_light_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
ig_light_timeout=`cat ../../cfg/config.cfg | grep "zone_build_ig_light_timeout" | sed -e 's/zone_build_ig_light_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# **** Light
# Log error
echo ------- >> log.log
echo --- Zone lighting >> log.log
echo ------- >> log.log
echo -------
echo --- Zone lighting
echo -------
date >> log.log
date
#append the level design directory at the end of the config file
ld_dir=`cat ../../cfg/site.cfg | grep "level_design_directory" | sed -e 's/level_design_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_world_dir=`cat ../../cfg/site.cfg | grep "level_design_world_directory" | sed -e 's/level_design_world_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_dfn_dir=`cat ../../cfg/site.cfg | grep "level_design_dfn_directory" | sed -e 's/level_design_dfn_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
continent_file_name=`cat ../../cfg/config.cfg | grep "continent_file" | sed -e 's/continent_file//g' | sed -e 's/ //g' | sed -e 's/=//g'`
cp ../../cfg/properties.cfg zone_lighter_properties.cfg
echo "level_design_directory = \"$ld_dir\";" >> zone_lighter_properties.cfg
echo "level_design_world_directory = \"$ld_world_dir\";" >> zone_lighter_properties.cfg
echo "level_design_dfn_directory = \"$ld_dfn_dir\";" >> zone_lighter_properties.cfg
echo "continent_name = \"$continent_file_name\";" >> zone_lighter_properties.cfg
# List the zones to light
list_zone_welded=`ls -1 ../zone/zone_welded/*.[zZ][oO][nN][eE][wW]`
# create a bkup directory
mkdir bkup_tile_water
# Light zones
for i in $list_zone_welded ; do
dest=`echo $i | sed -e 's&../zone/zone_welded&zone_lighted&g' | sed -e 's/.zonew/.zonel/g'`
depend=`echo $i | sed -e 's&../zone/zone_welded&../zone/zone_depend&g' | sed -e 's/.zonew/.depend/g'`
if ( test -e $dest )
then
echo PATCH $dest
echo PATCH $dest >> log.log
# patch, and bkup if necessary
$exec_timeout $light_timeout $zone_lighter $i $dest zone_lighter_properties.cfg $depend -waterpatch bkup_tile_water
echo
echo
else
echo SKIP $dest cause not found
echo SKIP $dest cause not found >> log.log
fi
# Idle
../../idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# Build zone
zone_lighter='zone_lighter.exe'
zone_ig_lighter='zone_ig_lighter.exe'
exec_timeout='exec_timeout.exe'
# Get the timeout
light_timeout=`cat ../../cfg/config.cfg | grep "zone_build_light_timeout" | sed -e 's/zone_build_light_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
ig_light_timeout=`cat ../../cfg/config.cfg | grep "zone_build_ig_light_timeout" | sed -e 's/zone_build_ig_light_timeout//' | sed -e 's/ //g' | sed -e 's/=//g'`
# **** Light
# Log error
echo ------- >> log.log
echo --- Zone lighting >> log.log
echo ------- >> log.log
echo -------
echo --- Zone lighting
echo -------
date >> log.log
date
#append the level design directory at the end of the config file
ld_dir=`cat ../../cfg/site.cfg | grep "level_design_directory" | sed -e 's/level_design_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_world_dir=`cat ../../cfg/site.cfg | grep "level_design_world_directory" | sed -e 's/level_design_world_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
ld_dfn_dir=`cat ../../cfg/site.cfg | grep "level_design_dfn_directory" | sed -e 's/level_design_dfn_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
continent_file_name=`cat ../../cfg/config.cfg | grep "continent_file" | sed -e 's/continent_file//g' | sed -e 's/ //g' | sed -e 's/=//g'`
cp ../../cfg/properties.cfg zone_lighter_properties.cfg
echo "level_design_directory = \"$ld_dir\";" >> zone_lighter_properties.cfg
echo "level_design_world_directory = \"$ld_world_dir\";" >> zone_lighter_properties.cfg
echo "level_design_dfn_directory = \"$ld_dfn_dir\";" >> zone_lighter_properties.cfg
echo "continent_name = \"$continent_file_name\";" >> zone_lighter_properties.cfg
# List the zones to light
list_zone_welded=`ls -1 ../zone/zone_welded/*.[zZ][oO][nN][eE][wW]`
# create a bkup directory
mkdir bkup_tile_water
# Light zones
for i in $list_zone_welded ; do
dest=`echo $i | sed -e 's&../zone/zone_welded&zone_lighted&g' | sed -e 's/.zonew/.zonel/g'`
depend=`echo $i | sed -e 's&../zone/zone_welded&../zone/zone_depend&g' | sed -e 's/.zonew/.depend/g'`
if ( test -e $dest )
then
echo PATCH $dest
echo PATCH $dest >> log.log
# patch, and bkup if necessary
$exec_timeout $light_timeout $zone_lighter $i $dest zone_lighter_properties.cfg $depend -waterpatch bkup_tile_water
echo
echo
else
echo SKIP $dest cause not found
echo SKIP $dest cause not found >> log.log
fi
# Idle
../../idle.bat
done

@ -1,33 +1,33 @@
#!/bin/bash
rm log.log 2> /dev/null
# Build the processes
# Get the process list
process_to_complete=`cat cfg/config.cfg | grep "process_to_complete" | sed -e 's/process_to_complete//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Log error
echo > log.log
date >> log.log
date
# For each process
for i in $process_to_complete ; do
# Open the directory
cd processes/$i
# Excecute the command
./3_build.bat
# Get back
cd ../..
# Concat log.log files
cat processes/$i/log.log >> log.log
# Idle
./idle.bat
done
# Copy the log file
cp log.log build.log
#!/bin/bash
rm log.log 2> /dev/null
# Build the processes
# Get the process list
process_to_complete=`cat cfg/config.cfg | grep "process_to_complete" | sed -e 's/process_to_complete//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Log error
echo > log.log
date >> log.log
date
# For each process
for i in $process_to_complete ; do
# Open the directory
cd processes/$i
# Excecute the command
./3_build.bat
# Get back
cd ../..
# Concat log.log files
cat processes/$i/log.log >> log.log
# Idle
./idle.bat
done
# Copy the log file
cp log.log build.log

@ -1,29 +1,29 @@
#!/bin/bash
rm log.log 2> /dev/null
# Clean the processes
# Get the process list
process_to_complete=`cat cfg/config.cfg | grep "process_to_complete" | sed -e 's/process_to_complete//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Log error
echo > log.log
# For each process
for i in $process_to_complete ; do
# Open the directory
cd processes/$i
# Excecute the command
./1_clean.bat
# Get back
cd ../..
# Concat log.log files
# cat processes/$i/log.log >> log.log
# Idle
./idle.bat
done
#!/bin/bash
rm log.log 2> /dev/null
# Clean the processes
# Get the process list
process_to_complete=`cat cfg/config.cfg | grep "process_to_complete" | sed -e 's/process_to_complete//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Log error
echo > log.log
# For each process
for i in $process_to_complete ; do
# Open the directory
cd processes/$i
# Excecute the command
./1_clean.bat
# Get back
cd ../..
# Concat log.log files
# cat processes/$i/log.log >> log.log
# Idle
./idle.bat
done

@ -1,27 +1,27 @@
#!/bin/bash
rm log.log 2> /dev/null
# Clean the client
# Get the client directory
client_directory=`cat cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client setup directories
client_setup_directories=`cat cfg/directories.cfg | grep "client_setup_directory" | sed -e 's/client_setup_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* > log.log
echo \*\*\*\*\*\*\* CLIENT CLEAN>> log.log
echo \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* >> log.log
echo \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
echo \*\*\*\*\*\*\* CLIENT CLEAN
echo \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
# For each directory
for i in $client_setup_directories ; do
# Create the directory
rm $client_directory/$i/*
# Idle
./idle.bat
#!/bin/bash
rm log.log 2> /dev/null
# Clean the client
# Get the client directory
client_directory=`cat cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client setup directories
client_setup_directories=`cat cfg/directories.cfg | grep "client_setup_directory" | sed -e 's/client_setup_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* > log.log
echo \*\*\*\*\*\*\* CLIENT CLEAN>> log.log
echo \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* >> log.log
echo \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
echo \*\*\*\*\*\*\* CLIENT CLEAN
echo \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
# For each directory
for i in $client_setup_directories ; do
# Create the directory
rm $client_directory/$i/*
# Idle
./idle.bat
done

@ -1,24 +1,24 @@
#!/bin/bash
rm log.log 2> /dev/null
# Setup the client
# Get the client directory
client_directory=`cat cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client setup directories
client_setup_directories=`cat cfg/directories.cfg | grep "client_setup_directory" | sed -e 's/client_setup_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo > log.log
# Create the file
# For each directory
for i in $client_setup_directories ; do
# Create the directory
mkdir $client_directory/$i 2> /dev/null
# Idle
./idle.bat
#!/bin/bash
rm log.log 2> /dev/null
# Setup the client
# Get the client directory
client_directory=`cat cfg/site.cfg | grep "client_directory" | sed -e 's/client_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the client setup directories
client_setup_directories=`cat cfg/directories.cfg | grep "client_setup_directory" | sed -e 's/client_setup_directory//' | sed -e 's/ //g' | sed -e 's/=//g'`
# Log error
echo > log.log
# Create the file
# For each directory
for i in $client_setup_directories ; do
# Create the directory
mkdir $client_directory/$i 2> /dev/null
# Idle
./idle.bat
done

@ -1,33 +1,33 @@
#!/bin/bash
rm log.log 2> /dev/null
# Export the processes
# Get the process list
process_to_complete=`cat cfg/config.cfg | grep "process_to_complete" | sed -e 's/process_to_complete//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Log error
echo > log.log
date >> log.log
date
# For each process
for i in $process_to_complete ; do
# Open the directory
cd processes/$i
# Excecute the command
./2_export.bat
# Get back
cd ../..
# Concat log.log files
cat processes/$i/log.log >> log.log
# Idle
./idle.bat
done
# Copy the log file
cp log.log export.log
#!/bin/bash
rm log.log 2> /dev/null
# Export the processes
# Get the process list
process_to_complete=`cat cfg/config.cfg | grep "process_to_complete" | sed -e 's/process_to_complete//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Log error
echo > log.log
date >> log.log
date
# For each process
for i in $process_to_complete ; do
# Open the directory
cd processes/$i
# Excecute the command
./2_export.bat
# Get back
cd ../..
# Concat log.log files
cat processes/$i/log.log >> log.log
# Idle
./idle.bat
done
# Copy the log file
cp log.log export.log

@ -1,33 +1,33 @@
#!/bin/bash
rm log.log 2> /dev/null
# Install the processes
# Get the process list
process_to_complete=`cat cfg/config.cfg | grep "process_to_complete" | sed -e 's/process_to_complete//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Log error
echo > log.log
date >> log.log
date
# For each process
for i in $process_to_complete ; do
# Open the directory
cd processes/$i
# Excecute the command
./4_install.bat
# Get back
cd ../..
# Concat log.log files
cat processes/$i/log.log >> log.log
# Idle
./idle.bat
done
# Copy the log file
cp log.log install.log
#!/bin/bash
rm log.log 2> /dev/null
# Install the processes
# Get the process list
process_to_complete=`cat cfg/config.cfg | grep "process_to_complete" | sed -e 's/process_to_complete//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Log error
echo > log.log
date >> log.log
date
# For each process
for i in $process_to_complete ; do
# Open the directory
cd processes/$i
# Excecute the command
./4_install.bat
# Get back
cd ../..
# Concat log.log files
cat processes/$i/log.log >> log.log
# Idle
./idle.bat
done
# Copy the log file
cp log.log install.log

@ -1,62 +1,62 @@
#!/bin/bash
rm log.log 2> /dev/null
# Setup the processes
# Get the process list
process_to_complete=`cat cfg/config.cfg | grep "process_to_complete" | sed -e 's/process_to_complete//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Get the update directory
update_directory=`cat cfg/config.cfg | grep "update_directory" | sed -e 's/update_directory//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Get the database directory
database_directory=`cat cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database letter
database_letter=`cat cfg/site.cfg | grep "database_letter" | sed -e 's/database_letter//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database server
database_server=`cat cfg/site.cfg | grep "database_server" | sed -e 's/database_server//g' | sed -e 's/ //g' | sed -e 's/=//g'`
`cat _idle.bat | sed -e "s&database_directory&$database_directory&g" | sed -e "s&database_letter&$database_letter&g" | sed -e "s&database_server&$database_server&g" > idle.bat`
# Log error
echo > log.log
date >> log.log
date
# Create a bin dir
mkdir bin 2> /dev/null
# For each process
for i in $process_to_complete ; do
# Open the directory
cd processes/$i
# Excecute the command
./0_setup.bat
# Get back
cd ../..
# Concat log.log files
# cat processes/$i/log.log >> log.log
# Idle
./idle.bat
done
# Get the quality option to choose the goor properties.cfg file
quality_flag=`cat cfg/site.cfg | grep "build_quality" | grep "1"`
# Copy the good properties.cfg file
if ( test "$quality_flag" )
then
# We are in BEST mode
echo [Quality] BEST
cp cfg/properties_final.cfg cfg/properties.cfg
else
# We are not DRAFT mode
echo [Quality] DRAFT
cp cfg/properties_draft.cfg cfg/properties.cfg
fi
#!/bin/bash
rm log.log 2> /dev/null
# Setup the processes
# Get the process list
process_to_complete=`cat cfg/config.cfg | grep "process_to_complete" | sed -e 's/process_to_complete//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Get the update directory
update_directory=`cat cfg/config.cfg | grep "update_directory" | sed -e 's/update_directory//' | sed -e 's/ //g' | sed -e 's/=//g' | sed -e 's/,/ /g'`
# Get the database directory
database_directory=`cat cfg/site.cfg | grep "database_directory" | sed -e 's/database_directory//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database letter
database_letter=`cat cfg/site.cfg | grep "database_letter" | sed -e 's/database_letter//g' | sed -e 's/ //g' | sed -e 's/=//g'`
# Get the database server
database_server=`cat cfg/site.cfg | grep "database_server" | sed -e 's/database_server//g' | sed -e 's/ //g' | sed -e 's/=//g'`
`cat _idle.bat | sed -e "s&database_directory&$database_directory&g" | sed -e "s&database_letter&$database_letter&g" | sed -e "s&database_server&$database_server&g" > idle.bat`
# Log error
echo > log.log
date >> log.log
date
# Create a bin dir
mkdir bin 2> /dev/null
# For each process
for i in $process_to_complete ; do
# Open the directory
cd processes/$i
# Excecute the command
./0_setup.bat
# Get back
cd ../..
# Concat log.log files
# cat processes/$i/log.log >> log.log
# Idle
./idle.bat
done
# Get the quality option to choose the goor properties.cfg file
quality_flag=`cat cfg/site.cfg | grep "build_quality" | grep "1"`
# Copy the good properties.cfg file
if ( test "$quality_flag" )
then
# We are in BEST mode
echo [Quality] BEST
cp cfg/properties_final.cfg cfg/properties.cfg
else
# We are not DRAFT mode
echo [Quality] DRAFT
cp cfg/properties_draft.cfg cfg/properties.cfg
fi

@ -1,147 +1,147 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
#include "../ide2/DebuggerMessages.h"
static HWND g_hWnd;
using namespace std;
// maximum mumber of lines the output console should have
static const WORD MAX_CONSOLE_LINES = 500;
BOOL isWindowsNT(void)
{
static BOOL once = FALSE;
static BOOL isNT = FALSE;
if (!once)
{
OSVERSIONINFO osver;
osver.dwOSVersionInfoSize = sizeof(osver);
if (GetVersionEx(&osver))
if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT)
isNT = TRUE;
once = TRUE;
}
return isNT;
}
static BOOL CALLBACK EnumttyWindow(HWND wnd, LPARAM retwnd)
{
char tmp[20], *tty;
if (isWindowsNT())
tty = "ConsoleWindowClass";
else
tty = "tty";
if (GetClassName(wnd, tmp, sizeof(tmp)) && !strcmp(tmp, tty))
{
DWORD wndproc, thisproc = GetCurrentProcessId();
GetWindowThreadProcessId(wnd, &wndproc);
if (wndproc == thisproc) {
*((HWND*)retwnd) = wnd;
return FALSE;
}
}
return TRUE;
}
static BOOL CtrlHandler(DWORD fdwCtrlType)
{
switch (fdwCtrlType)
{
// Handle the CTRL+C signal.
case CTRL_C_EVENT:
case CTRL_BREAK_EVENT:
return TRUE;
// CTRL+CLOSE: confirm that the user wants to exit.
case CTRL_CLOSE_EVENT:
case CTRL_LOGOFF_EVENT:
case CTRL_SHUTDOWN_EVENT:
default:
return FALSE;
}
}
void AttachConsole()
{
int hConHandle;
long lStdHandle;
CONSOLE_SCREEN_BUFFER_INFO coninfo;
FILE *fp;
HWND hWndConsole;
HMENU hSysMenu;
// allocate a console for this app
FreeConsole();
AllocConsole();
//disable system menu -> close box
EnumWindows(EnumttyWindow, (long)(&hWndConsole));
hSysMenu = GetSystemMenu(hWndConsole, FALSE);
ModifyMenu(hSysMenu, SC_CLOSE, MF_BYCOMMAND | MF_GRAYED, 0, 0);
ShowWindow(hWndConsole, SW_SHOW);
// set the screen buffer to be big enough to let us scroll text
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo);
coninfo.dwSize.Y = MAX_CONSOLE_LINES;
SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize);
// redirect unbuffered STDOUT to the console
lStdHandle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
fp = _fdopen( hConHandle, "w" );
*stdout = *fp;
setvbuf( stdout, NULL, _IONBF, 0 );
// redirect unbuffered STDIN to the console
lStdHandle = (long)GetStdHandle(STD_INPUT_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
::SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), ENABLE_LINE_INPUT|ENABLE_ECHO_INPUT|ENABLE_MOUSE_INPUT);
fp = _fdopen( hConHandle, "r" );
*stdin = *fp;
setvbuf( stdin, NULL, _IONBF, 0 );
// redirect unbuffered STDERR to the console
lStdHandle = (long)GetStdHandle(STD_ERROR_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
fp = _fdopen( hConHandle, "w" );
*stderr = *fp;
setvbuf( stderr, NULL, _IONBF, 0 );
// make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog
// point to console as well
ios::sync_with_stdio();
SetConsoleCtrlHandler(
(PHANDLER_ROUTINE) CtrlHandler, // handler function
TRUE); // add to list
}
BOOL InitLibAPI(HWND hWnd)
{
g_hWnd = hWnd;
}
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
#include "../ide2/DebuggerMessages.h"
static HWND g_hWnd;
using namespace std;
// maximum mumber of lines the output console should have
static const WORD MAX_CONSOLE_LINES = 500;
BOOL isWindowsNT(void)
{
static BOOL once = FALSE;
static BOOL isNT = FALSE;
if (!once)
{
OSVERSIONINFO osver;
osver.dwOSVersionInfoSize = sizeof(osver);
if (GetVersionEx(&osver))
if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT)
isNT = TRUE;
once = TRUE;
}
return isNT;
}
static BOOL CALLBACK EnumttyWindow(HWND wnd, LPARAM retwnd)
{
char tmp[20], *tty;
if (isWindowsNT())
tty = "ConsoleWindowClass";
else
tty = "tty";
if (GetClassName(wnd, tmp, sizeof(tmp)) && !strcmp(tmp, tty))
{
DWORD wndproc, thisproc = GetCurrentProcessId();
GetWindowThreadProcessId(wnd, &wndproc);
if (wndproc == thisproc) {
*((HWND*)retwnd) = wnd;
return FALSE;
}
}
return TRUE;
}
static BOOL CtrlHandler(DWORD fdwCtrlType)
{
switch (fdwCtrlType)
{
// Handle the CTRL+C signal.
case CTRL_C_EVENT:
case CTRL_BREAK_EVENT:
return TRUE;
// CTRL+CLOSE: confirm that the user wants to exit.
case CTRL_CLOSE_EVENT:
case CTRL_LOGOFF_EVENT:
case CTRL_SHUTDOWN_EVENT:
default:
return FALSE;
}
}
void AttachConsole()
{
int hConHandle;
long lStdHandle;
CONSOLE_SCREEN_BUFFER_INFO coninfo;
FILE *fp;
HWND hWndConsole;
HMENU hSysMenu;
// allocate a console for this app
FreeConsole();
AllocConsole();
//disable system menu -> close box
EnumWindows(EnumttyWindow, (long)(&hWndConsole));
hSysMenu = GetSystemMenu(hWndConsole, FALSE);
ModifyMenu(hSysMenu, SC_CLOSE, MF_BYCOMMAND | MF_GRAYED, 0, 0);
ShowWindow(hWndConsole, SW_SHOW);
// set the screen buffer to be big enough to let us scroll text
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo);
coninfo.dwSize.Y = MAX_CONSOLE_LINES;
SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize);
// redirect unbuffered STDOUT to the console
lStdHandle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
fp = _fdopen( hConHandle, "w" );
*stdout = *fp;
setvbuf( stdout, NULL, _IONBF, 0 );
// redirect unbuffered STDIN to the console
lStdHandle = (long)GetStdHandle(STD_INPUT_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
::SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), ENABLE_LINE_INPUT|ENABLE_ECHO_INPUT|ENABLE_MOUSE_INPUT);
fp = _fdopen( hConHandle, "r" );
*stdin = *fp;
setvbuf( stdin, NULL, _IONBF, 0 );
// redirect unbuffered STDERR to the console
lStdHandle = (long)GetStdHandle(STD_ERROR_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
fp = _fdopen( hConHandle, "w" );
*stderr = *fp;
setvbuf( stderr, NULL, _IONBF, 0 );
// make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog
// point to console as well
ios::sync_with_stdio();
SetConsoleCtrlHandler(
(PHANDLER_ROUTINE) CtrlHandler, // handler function
TRUE); // add to list
}
BOOL InitLibAPI(HWND hWnd)
{
g_hWnd = hWnd;
}

@ -1,309 +1,309 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ldblib_c
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
static void settabss (lua_State *L, const char *i, const char *v) {
lua_pushstring(L, i);
lua_pushstring(L, v);
lua_rawset(L, -3);
}
static void settabsi (lua_State *L, const char *i, int v) {
lua_pushstring(L, i);
lua_pushnumber(L, (lua_Number)v);
lua_rawset(L, -3);
}
static int getinfo (lua_State *L) {
lua_Debug ar;
const char *options = luaL_optstring(L, 2, "flnSu");
if (lua_isnumber(L, 1)) {
if (!lua_getstack(L, (int)(lua_tonumber(L, 1)), &ar)) {
lua_pushnil(L); /* level out of range */
return 1;
}
}
else if (lua_isfunction(L, 1)) {
lua_pushfstring(L, ">%s", options);
options = lua_tostring(L, -1);
lua_pushvalue(L, 1);
}
else
return luaL_argerror(L, 1, "function or level expected");
if (!lua_getinfo(L, options, &ar))
return luaL_argerror(L, 2, "invalid option");
lua_newtable(L);
for (; *options; options++) {
switch (*options) {
case 'S':
settabss(L, "source", ar.source);
settabss(L, "short_src", ar.short_src);
settabsi(L, "linedefined", ar.linedefined);
settabss(L, "what", ar.what);
break;
case 'l':
settabsi(L, "currentline", ar.currentline);
break;
case 'u':
settabsi(L, "nups", ar.nups);
break;
case 'n':
settabss(L, "name", ar.name);
settabss(L, "namewhat", ar.namewhat);
break;
case 'f':
lua_pushliteral(L, "func");
lua_pushvalue(L, -3);
lua_rawset(L, -3);
break;
}
}
return 1; /* return table */
}
static int getlocal (lua_State *L) {
lua_Debug ar;
const char *name;
if (!lua_getstack(L, luaL_checkint(L, 1), &ar)) /* level out of range? */
return luaL_argerror(L, 1, "level out of range");
name = lua_getlocal(L, &ar, luaL_checkint(L, 2));
if (name) {
lua_pushstring(L, name);
lua_pushvalue(L, -2);
return 2;
}
else {
lua_pushnil(L);
return 1;
}
}
static int setlocal (lua_State *L) {
lua_Debug ar;
if (!lua_getstack(L, luaL_checkint(L, 1), &ar)) /* level out of range? */
return luaL_argerror(L, 1, "level out of range");
luaL_checkany(L, 3);
lua_pushstring(L, lua_setlocal(L, &ar, luaL_checkint(L, 2)));
return 1;
}
static int auxupvalue (lua_State *L, int get) {
const char *name;
int n = luaL_checkint(L, 2);
luaL_checktype(L, 1, LUA_TFUNCTION);
if (lua_iscfunction(L, 1)) return 0; /* cannot touch C upvalues from Lua */
name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n);
if (name == NULL) return 0;
lua_pushstring(L, name);
lua_insert(L, -(get+1));
return get + 1;
}
static int getupvalue (lua_State *L) {
return auxupvalue(L, 1);
}
static int setupvalue (lua_State *L) {
luaL_checkany(L, 3);
return auxupvalue(L, 0);
}
static const char KEY_HOOK = 'h';
static void hookf (lua_State *L, lua_Debug *ar) {
static const char *const hooknames[] =
{"call", "return", "line", "count", "tail return"};
lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_rawget(L, LUA_REGISTRYINDEX);
if (lua_isfunction(L, -1)) {
lua_pushstring(L, hooknames[(int)ar->event]);
if (ar->currentline >= 0)
lua_pushnumber(L, (lua_Number)ar->currentline);
else lua_pushnil(L);
lua_assert(lua_getinfo(L, "lS", ar));
lua_call(L, 2, 0);
}
else
lua_pop(L, 1); /* pop result from gettable */
}
static int makemask (const char *smask, int count) {
int mask = 0;
if (strchr(smask, 'c')) mask |= LUA_MASKCALL;
if (strchr(smask, 'r')) mask |= LUA_MASKRET;
if (strchr(smask, 'l')) mask |= LUA_MASKLINE;
if (count > 0) mask |= LUA_MASKCOUNT;
return mask;
}
static char *unmakemask (int mask, char *smask) {
int i = 0;
if (mask & LUA_MASKCALL) smask[i++] = 'c';
if (mask & LUA_MASKRET) smask[i++] = 'r';
if (mask & LUA_MASKLINE) smask[i++] = 'l';
smask[i] = '\0';
return smask;
}
static int sethook (lua_State *L) {
if (lua_isnoneornil(L, 1)) {
lua_settop(L, 1);
lua_sethook(L, NULL, 0, 0); /* turn off hooks */
}
else {
const char *smask = luaL_checkstring(L, 2);
int count = luaL_optint(L, 3, 0);
luaL_checktype(L, 1, LUA_TFUNCTION);
lua_sethook(L, hookf, makemask(smask, count), count);
}
lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_pushvalue(L, 1);
lua_rawset(L, LUA_REGISTRYINDEX); /* set new hook */
return 0;
}
static int gethook (lua_State *L) {
char buff[5];
int mask = lua_gethookmask(L);
lua_Hook hook = lua_gethook(L);
if (hook != NULL && hook != hookf) /* external hook? */
lua_pushliteral(L, "external hook");
else {
lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_rawget(L, LUA_REGISTRYINDEX); /* get hook */
}
lua_pushstring(L, unmakemask(mask, buff));
lua_pushnumber(L, (lua_Number)lua_gethookcount(L));
return 3;
}
static int debug (lua_State *L) {
for (;;) {
char buffer[250];
fputs("lua_debug> ", stderr);
if (fgets(buffer, sizeof(buffer), stdin) == 0 ||
strcmp(buffer, "cont\n") == 0)
return 0;
lua_dostring(L, buffer);
lua_settop(L, 0); /* remove eventual returns */
}
}
#define LEVELS1 12 /* size of the first part of the stack */
#define LEVELS2 10 /* size of the second part of the stack */
static int errorfb (lua_State *L) {
int level = 1; /* skip level 0 (it's this function) */
int firstpart = 1; /* still before eventual `...' */
lua_Debug ar;
if (lua_gettop(L) == 0)
lua_pushliteral(L, "");
else if (!lua_isstring(L, 1)) return 1; /* no string message */
else lua_pushliteral(L, "\n");
lua_pushliteral(L, "stack traceback:");
while (lua_getstack(L, level++, &ar)) {
if (level > LEVELS1 && firstpart) {
/* no more than `LEVELS2' more levels? */
if (!lua_getstack(L, level+LEVELS2, &ar))
level--; /* keep going */
else {
lua_pushliteral(L, "\n\t..."); /* too many levels */
while (lua_getstack(L, level+LEVELS2, &ar)) /* find last levels */
level++;
}
firstpart = 0;
continue;
}
lua_pushliteral(L, "\n\t");
lua_getinfo(L, "Snl", &ar);
lua_pushfstring(L, "%s:", ar.short_src);
if (ar.currentline > 0)
lua_pushfstring(L, "%d:", ar.currentline);
switch (*ar.namewhat) {
case 'g': /* global */
case 'l': /* local */
case 'f': /* field */
case 'm': /* method */
lua_pushfstring(L, " in function `%s'", ar.name);
break;
default: {
if (*ar.what == 'm') /* main? */
lua_pushfstring(L, " in main chunk");
else if (*ar.what == 'C' || *ar.what == 't')
lua_pushliteral(L, " ?"); /* C function or tail call */
else
lua_pushfstring(L, " in function <%s:%d>",
ar.short_src, ar.linedefined);
}
}
lua_concat(L, lua_gettop(L));
}
lua_concat(L, lua_gettop(L));
return 1;
}
static const luaL_reg dblib[] = {
{"getlocal", getlocal},
{"getinfo", getinfo},
{"gethook", gethook},
{"getupvalue", getupvalue},
{"sethook", sethook},
{"setlocal", setlocal},
{"setupvalue", setupvalue},
{"debug", debug},
{"traceback", errorfb},
{NULL, NULL}
};
LUALIB_API int luaopen_debug (lua_State *L) {
luaL_openlib(L, LUA_DBLIBNAME, dblib, 0);
lua_pushliteral(L, "_TRACEBACK");
lua_pushcfunction(L, errorfb);
lua_settable(L, LUA_GLOBALSINDEX);
return 1;
}
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ldblib_c
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
static void settabss (lua_State *L, const char *i, const char *v) {
lua_pushstring(L, i);
lua_pushstring(L, v);
lua_rawset(L, -3);
}
static void settabsi (lua_State *L, const char *i, int v) {
lua_pushstring(L, i);
lua_pushnumber(L, (lua_Number)v);
lua_rawset(L, -3);
}
static int getinfo (lua_State *L) {
lua_Debug ar;
const char *options = luaL_optstring(L, 2, "flnSu");
if (lua_isnumber(L, 1)) {
if (!lua_getstack(L, (int)(lua_tonumber(L, 1)), &ar)) {
lua_pushnil(L); /* level out of range */
return 1;
}
}
else if (lua_isfunction(L, 1)) {
lua_pushfstring(L, ">%s", options);
options = lua_tostring(L, -1);
lua_pushvalue(L, 1);
}
else
return luaL_argerror(L, 1, "function or level expected");
if (!lua_getinfo(L, options, &ar))
return luaL_argerror(L, 2, "invalid option");
lua_newtable(L);
for (; *options; options++) {
switch (*options) {
case 'S':
settabss(L, "source", ar.source);
settabss(L, "short_src", ar.short_src);
settabsi(L, "linedefined", ar.linedefined);
settabss(L, "what", ar.what);
break;
case 'l':
settabsi(L, "currentline", ar.currentline);
break;
case 'u':
settabsi(L, "nups", ar.nups);
break;
case 'n':
settabss(L, "name", ar.name);
settabss(L, "namewhat", ar.namewhat);
break;
case 'f':
lua_pushliteral(L, "func");
lua_pushvalue(L, -3);
lua_rawset(L, -3);
break;
}
}
return 1; /* return table */
}
static int getlocal (lua_State *L) {
lua_Debug ar;
const char *name;
if (!lua_getstack(L, luaL_checkint(L, 1), &ar)) /* level out of range? */
return luaL_argerror(L, 1, "level out of range");
name = lua_getlocal(L, &ar, luaL_checkint(L, 2));
if (name) {
lua_pushstring(L, name);
lua_pushvalue(L, -2);
return 2;
}
else {
lua_pushnil(L);
return 1;
}
}
static int setlocal (lua_State *L) {
lua_Debug ar;
if (!lua_getstack(L, luaL_checkint(L, 1), &ar)) /* level out of range? */
return luaL_argerror(L, 1, "level out of range");
luaL_checkany(L, 3);
lua_pushstring(L, lua_setlocal(L, &ar, luaL_checkint(L, 2)));
return 1;
}
static int auxupvalue (lua_State *L, int get) {
const char *name;
int n = luaL_checkint(L, 2);
luaL_checktype(L, 1, LUA_TFUNCTION);
if (lua_iscfunction(L, 1)) return 0; /* cannot touch C upvalues from Lua */
name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n);
if (name == NULL) return 0;
lua_pushstring(L, name);
lua_insert(L, -(get+1));
return get + 1;
}
static int getupvalue (lua_State *L) {
return auxupvalue(L, 1);
}
static int setupvalue (lua_State *L) {
luaL_checkany(L, 3);
return auxupvalue(L, 0);
}
static const char KEY_HOOK = 'h';
static void hookf (lua_State *L, lua_Debug *ar) {
static const char *const hooknames[] =
{"call", "return", "line", "count", "tail return"};
lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_rawget(L, LUA_REGISTRYINDEX);
if (lua_isfunction(L, -1)) {
lua_pushstring(L, hooknames[(int)ar->event]);
if (ar->currentline >= 0)
lua_pushnumber(L, (lua_Number)ar->currentline);
else lua_pushnil(L);
lua_assert(lua_getinfo(L, "lS", ar));
lua_call(L, 2, 0);
}
else
lua_pop(L, 1); /* pop result from gettable */
}
static int makemask (const char *smask, int count) {
int mask = 0;
if (strchr(smask, 'c')) mask |= LUA_MASKCALL;
if (strchr(smask, 'r')) mask |= LUA_MASKRET;
if (strchr(smask, 'l')) mask |= LUA_MASKLINE;
if (count > 0) mask |= LUA_MASKCOUNT;
return mask;
}
static char *unmakemask (int mask, char *smask) {
int i = 0;
if (mask & LUA_MASKCALL) smask[i++] = 'c';
if (mask & LUA_MASKRET) smask[i++] = 'r';
if (mask & LUA_MASKLINE) smask[i++] = 'l';
smask[i] = '\0';
return smask;
}
static int sethook (lua_State *L) {
if (lua_isnoneornil(L, 1)) {
lua_settop(L, 1);
lua_sethook(L, NULL, 0, 0); /* turn off hooks */
}
else {
const char *smask = luaL_checkstring(L, 2);
int count = luaL_optint(L, 3, 0);
luaL_checktype(L, 1, LUA_TFUNCTION);
lua_sethook(L, hookf, makemask(smask, count), count);
}
lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_pushvalue(L, 1);
lua_rawset(L, LUA_REGISTRYINDEX); /* set new hook */
return 0;
}
static int gethook (lua_State *L) {
char buff[5];
int mask = lua_gethookmask(L);
lua_Hook hook = lua_gethook(L);
if (hook != NULL && hook != hookf) /* external hook? */
lua_pushliteral(L, "external hook");
else {
lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_rawget(L, LUA_REGISTRYINDEX); /* get hook */
}
lua_pushstring(L, unmakemask(mask, buff));
lua_pushnumber(L, (lua_Number)lua_gethookcount(L));
return 3;
}
static int debug (lua_State *L) {
for (;;) {
char buffer[250];
fputs("lua_debug> ", stderr);
if (fgets(buffer, sizeof(buffer), stdin) == 0 ||
strcmp(buffer, "cont\n") == 0)
return 0;
lua_dostring(L, buffer);
lua_settop(L, 0); /* remove eventual returns */
}
}
#define LEVELS1 12 /* size of the first part of the stack */
#define LEVELS2 10 /* size of the second part of the stack */
static int errorfb (lua_State *L) {
int level = 1; /* skip level 0 (it's this function) */
int firstpart = 1; /* still before eventual `...' */
lua_Debug ar;
if (lua_gettop(L) == 0)
lua_pushliteral(L, "");
else if (!lua_isstring(L, 1)) return 1; /* no string message */
else lua_pushliteral(L, "\n");
lua_pushliteral(L, "stack traceback:");
while (lua_getstack(L, level++, &ar)) {
if (level > LEVELS1 && firstpart) {
/* no more than `LEVELS2' more levels? */
if (!lua_getstack(L, level+LEVELS2, &ar))
level--; /* keep going */
else {
lua_pushliteral(L, "\n\t..."); /* too many levels */
while (lua_getstack(L, level+LEVELS2, &ar)) /* find last levels */
level++;
}
firstpart = 0;
continue;
}
lua_pushliteral(L, "\n\t");
lua_getinfo(L, "Snl", &ar);
lua_pushfstring(L, "%s:", ar.short_src);
if (ar.currentline > 0)
lua_pushfstring(L, "%d:", ar.currentline);
switch (*ar.namewhat) {
case 'g': /* global */
case 'l': /* local */
case 'f': /* field */
case 'm': /* method */
lua_pushfstring(L, " in function `%s'", ar.name);
break;
default: {
if (*ar.what == 'm') /* main? */
lua_pushfstring(L, " in main chunk");
else if (*ar.what == 'C' || *ar.what == 't')
lua_pushliteral(L, " ?"); /* C function or tail call */
else
lua_pushfstring(L, " in function <%s:%d>",
ar.short_src, ar.linedefined);
}
}
lua_concat(L, lua_gettop(L));
}
lua_concat(L, lua_gettop(L));
return 1;
}
static const luaL_reg dblib[] = {
{"getlocal", getlocal},
{"getinfo", getinfo},
{"gethook", gethook},
{"getupvalue", getupvalue},
{"sethook", sethook},
{"setlocal", setlocal},
{"setupvalue", setupvalue},
{"debug", debug},
{"traceback", errorfb},
{NULL, NULL}
};
LUALIB_API int luaopen_debug (lua_State *L) {
luaL_openlib(L, LUA_DBLIBNAME, dblib, 0);
lua_pushliteral(L, "_TRACEBACK");
lua_pushcfunction(L, errorfb);
lua_settable(L, LUA_GLOBALSINDEX);
return 1;
}

File diff suppressed because it is too large Load Diff

@ -1,256 +1,256 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdlib.h>
#include <math.h>
#define lmathlib_c
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#undef PI
#define PI (3.14159265358979323846)
#define RADIANS_PER_DEGREE (PI/180.0)
/*
** If you want Lua to operate in degrees (instead of radians),
** define USE_DEGREES
*/
#ifdef USE_DEGREES
#define FROMRAD(a) ((a)/RADIANS_PER_DEGREE)
#define TORAD(a) ((a)*RADIANS_PER_DEGREE)
#else
#define FROMRAD(a) (a)
#define TORAD(a) (a)
#endif
static int math_abs (lua_State *L) {
lua_pushnumber(L, fabs(luaL_checknumber(L, 1)));
return 1;
}
static int math_sin (lua_State *L) {
lua_pushnumber(L, sin(TORAD(luaL_checknumber(L, 1))));
return 1;
}
static int math_cos (lua_State *L) {
lua_pushnumber(L, cos(TORAD(luaL_checknumber(L, 1))));
return 1;
}
static int math_tan (lua_State *L) {
lua_pushnumber(L, tan(TORAD(luaL_checknumber(L, 1))));
return 1;
}
static int math_asin (lua_State *L) {
lua_pushnumber(L, FROMRAD(asin(luaL_checknumber(L, 1))));
return 1;
}
static int math_acos (lua_State *L) {
lua_pushnumber(L, FROMRAD(acos(luaL_checknumber(L, 1))));
return 1;
}
static int math_atan (lua_State *L) {
lua_pushnumber(L, FROMRAD(atan(luaL_checknumber(L, 1))));
return 1;
}
static int math_atan2 (lua_State *L) {
lua_pushnumber(L, FROMRAD(atan2(luaL_checknumber(L, 1), luaL_checknumber(L, 2))));
return 1;
}
static int math_ceil (lua_State *L) {
lua_pushnumber(L, ceil(luaL_checknumber(L, 1)));
return 1;
}
static int math_floor (lua_State *L) {
lua_pushnumber(L, floor(luaL_checknumber(L, 1)));
return 1;
}
static int math_mod (lua_State *L) {
lua_pushnumber(L, fmod(luaL_checknumber(L, 1), luaL_checknumber(L, 2)));
return 1;
}
static int math_sqrt (lua_State *L) {
lua_pushnumber(L, sqrt(luaL_checknumber(L, 1)));
return 1;
}
static int math_pow (lua_State *L) {
lua_pushnumber(L, pow(luaL_checknumber(L, 1), luaL_checknumber(L, 2)));
return 1;
}
static int math_log (lua_State *L) {
lua_pushnumber(L, log(luaL_checknumber(L, 1)));
return 1;
}
static int math_log10 (lua_State *L) {
lua_pushnumber(L, log10(luaL_checknumber(L, 1)));
return 1;
}
static int math_exp (lua_State *L) {
lua_pushnumber(L, exp(luaL_checknumber(L, 1)));
return 1;
}
static int math_deg (lua_State *L) {
lua_pushnumber(L, luaL_checknumber(L, 1)/RADIANS_PER_DEGREE);
return 1;
}
static int math_rad (lua_State *L) {
lua_pushnumber(L, luaL_checknumber(L, 1)*RADIANS_PER_DEGREE);
return 1;
}
static int math_frexp (lua_State *L) {
int e;
lua_pushnumber(L, frexp(luaL_checknumber(L, 1), &e));
lua_pushnumber(L, e);
return 2;
}
static int math_ldexp (lua_State *L) {
lua_pushnumber(L, ldexp(luaL_checknumber(L, 1), luaL_checkint(L, 2)));
return 1;
}
static int math_min (lua_State *L) {
int n = lua_gettop(L); /* number of arguments */
lua_Number dmin = luaL_checknumber(L, 1);
int i;
for (i=2; i<=n; i++) {
lua_Number d = luaL_checknumber(L, i);
if (d < dmin)
dmin = d;
}
lua_pushnumber(L, dmin);
return 1;
}
static int math_max (lua_State *L) {
int n = lua_gettop(L); /* number of arguments */
lua_Number dmax = luaL_checknumber(L, 1);
int i;
for (i=2; i<=n; i++) {
lua_Number d = luaL_checknumber(L, i);
if (d > dmax)
dmax = d;
}
lua_pushnumber(L, dmax);
return 1;
}
static int math_random (lua_State *L) {
/* the `%' avoids the (rare) case of r==1, and is needed also because on
some systems (SunOS!) `rand()' may return a value larger than RAND_MAX */
lua_Number r = (lua_Number)(rand()%RAND_MAX) / (lua_Number)RAND_MAX;
switch (lua_gettop(L)) { /* check number of arguments */
case 0: { /* no arguments */
lua_pushnumber(L, r); /* Number between 0 and 1 */
break;
}
case 1: { /* only upper limit */
int u = luaL_checkint(L, 1);
luaL_argcheck(L, 1<=u, 1, "interval is empty");
lua_pushnumber(L, (int)floor(r*u)+1); /* int between 1 and `u' */
break;
}
case 2: { /* lower and upper limits */
int l = luaL_checkint(L, 1);
int u = luaL_checkint(L, 2);
luaL_argcheck(L, l<=u, 2, "interval is empty");
lua_pushnumber(L, (int)floor(r*(u-l+1))+l); /* int between `l' and `u' */
break;
}
default: return luaL_error(L, "wrong number of arguments");
}
return 1;
}
static int math_randomseed (lua_State *L) {
srand(luaL_checkint(L, 1));
return 0;
}
static const luaL_reg mathlib[] = {
{"abs", math_abs},
{"sin", math_sin},
{"cos", math_cos},
{"tan", math_tan},
{"asin", math_asin},
{"acos", math_acos},
{"atan", math_atan},
{"atan2", math_atan2},
{"ceil", math_ceil},
{"floor", math_floor},
{"mod", math_mod},
{"frexp", math_frexp},
{"ldexp", math_ldexp},
{"sqrt", math_sqrt},
{"min", math_min},
{"max", math_max},
{"log", math_log},
{"log10", math_log10},
{"exp", math_exp},
{"deg", math_deg},
{"pow", math_pow},
{"rad", math_rad},
{"random", math_random},
{"randomseed", math_randomseed},
{NULL, NULL}
};
/*
** Open math library
*/
LUALIB_API int luaopen_math (lua_State *L) {
luaL_openlib(L, LUA_MATHLIBNAME, mathlib, 0);
lua_pushliteral(L, "pi");
lua_pushnumber(L, PI);
lua_settable(L, -3);
lua_pushliteral(L, "__pow");
lua_pushcfunction(L, math_pow);
lua_settable(L, LUA_GLOBALSINDEX);
return 1;
}
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdlib.h>
#include <math.h>
#define lmathlib_c
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#undef PI
#define PI (3.14159265358979323846)
#define RADIANS_PER_DEGREE (PI/180.0)
/*
** If you want Lua to operate in degrees (instead of radians),
** define USE_DEGREES
*/
#ifdef USE_DEGREES
#define FROMRAD(a) ((a)/RADIANS_PER_DEGREE)
#define TORAD(a) ((a)*RADIANS_PER_DEGREE)
#else
#define FROMRAD(a) (a)
#define TORAD(a) (a)
#endif
static int math_abs (lua_State *L) {
lua_pushnumber(L, fabs(luaL_checknumber(L, 1)));
return 1;
}
static int math_sin (lua_State *L) {
lua_pushnumber(L, sin(TORAD(luaL_checknumber(L, 1))));
return 1;
}
static int math_cos (lua_State *L) {
lua_pushnumber(L, cos(TORAD(luaL_checknumber(L, 1))));
return 1;
}
static int math_tan (lua_State *L) {
lua_pushnumber(L, tan(TORAD(luaL_checknumber(L, 1))));
return 1;
}
static int math_asin (lua_State *L) {
lua_pushnumber(L, FROMRAD(asin(luaL_checknumber(L, 1))));
return 1;
}
static int math_acos (lua_State *L) {
lua_pushnumber(L, FROMRAD(acos(luaL_checknumber(L, 1))));
return 1;
}
static int math_atan (lua_State *L) {
lua_pushnumber(L, FROMRAD(atan(luaL_checknumber(L, 1))));
return 1;
}
static int math_atan2 (lua_State *L) {
lua_pushnumber(L, FROMRAD(atan2(luaL_checknumber(L, 1), luaL_checknumber(L, 2))));
return 1;
}
static int math_ceil (lua_State *L) {
lua_pushnumber(L, ceil(luaL_checknumber(L, 1)));
return 1;
}
static int math_floor (lua_State *L) {
lua_pushnumber(L, floor(luaL_checknumber(L, 1)));
return 1;
}
static int math_mod (lua_State *L) {
lua_pushnumber(L, fmod(luaL_checknumber(L, 1), luaL_checknumber(L, 2)));
return 1;
}
static int math_sqrt (lua_State *L) {
lua_pushnumber(L, sqrt(luaL_checknumber(L, 1)));
return 1;
}
static int math_pow (lua_State *L) {
lua_pushnumber(L, pow(luaL_checknumber(L, 1), luaL_checknumber(L, 2)));
return 1;
}
static int math_log (lua_State *L) {
lua_pushnumber(L, log(luaL_checknumber(L, 1)));
return 1;
}
static int math_log10 (lua_State *L) {
lua_pushnumber(L, log10(luaL_checknumber(L, 1)));
return 1;
}
static int math_exp (lua_State *L) {
lua_pushnumber(L, exp(luaL_checknumber(L, 1)));
return 1;
}
static int math_deg (lua_State *L) {
lua_pushnumber(L, luaL_checknumber(L, 1)/RADIANS_PER_DEGREE);
return 1;
}
static int math_rad (lua_State *L) {
lua_pushnumber(L, luaL_checknumber(L, 1)*RADIANS_PER_DEGREE);
return 1;
}
static int math_frexp (lua_State *L) {
int e;
lua_pushnumber(L, frexp(luaL_checknumber(L, 1), &e));
lua_pushnumber(L, e);
return 2;
}
static int math_ldexp (lua_State *L) {
lua_pushnumber(L, ldexp(luaL_checknumber(L, 1), luaL_checkint(L, 2)));
return 1;
}
static int math_min (lua_State *L) {
int n = lua_gettop(L); /* number of arguments */
lua_Number dmin = luaL_checknumber(L, 1);
int i;
for (i=2; i<=n; i++) {
lua_Number d = luaL_checknumber(L, i);
if (d < dmin)
dmin = d;
}
lua_pushnumber(L, dmin);
return 1;
}
static int math_max (lua_State *L) {
int n = lua_gettop(L); /* number of arguments */
lua_Number dmax = luaL_checknumber(L, 1);
int i;
for (i=2; i<=n; i++) {
lua_Number d = luaL_checknumber(L, i);
if (d > dmax)
dmax = d;
}
lua_pushnumber(L, dmax);
return 1;
}
static int math_random (lua_State *L) {
/* the `%' avoids the (rare) case of r==1, and is needed also because on
some systems (SunOS!) `rand()' may return a value larger than RAND_MAX */
lua_Number r = (lua_Number)(rand()%RAND_MAX) / (lua_Number)RAND_MAX;
switch (lua_gettop(L)) { /* check number of arguments */
case 0: { /* no arguments */
lua_pushnumber(L, r); /* Number between 0 and 1 */
break;
}
case 1: { /* only upper limit */
int u = luaL_checkint(L, 1);
luaL_argcheck(L, 1<=u, 1, "interval is empty");
lua_pushnumber(L, (int)floor(r*u)+1); /* int between 1 and `u' */
break;
}
case 2: { /* lower and upper limits */
int l = luaL_checkint(L, 1);
int u = luaL_checkint(L, 2);
luaL_argcheck(L, l<=u, 2, "interval is empty");
lua_pushnumber(L, (int)floor(r*(u-l+1))+l); /* int between `l' and `u' */
break;
}
default: return luaL_error(L, "wrong number of arguments");
}
return 1;
}
static int math_randomseed (lua_State *L) {
srand(luaL_checkint(L, 1));
return 0;
}
static const luaL_reg mathlib[] = {
{"abs", math_abs},
{"sin", math_sin},
{"cos", math_cos},
{"tan", math_tan},
{"asin", math_asin},
{"acos", math_acos},
{"atan", math_atan},
{"atan2", math_atan2},
{"ceil", math_ceil},
{"floor", math_floor},
{"mod", math_mod},
{"frexp", math_frexp},
{"ldexp", math_ldexp},
{"sqrt", math_sqrt},
{"min", math_min},
{"max", math_max},
{"log", math_log},
{"log10", math_log10},
{"exp", math_exp},
{"deg", math_deg},
{"pow", math_pow},
{"rad", math_rad},
{"random", math_random},
{"randomseed", math_randomseed},
{NULL, NULL}
};
/*
** Open math library
*/
LUALIB_API int luaopen_math (lua_State *L) {
luaL_openlib(L, LUA_MATHLIBNAME, mathlib, 0);
lua_pushliteral(L, "pi");
lua_pushnumber(L, PI);
lua_settable(L, -3);
lua_pushliteral(L, "__pow");
lua_pushcfunction(L, math_pow);
lua_settable(L, LUA_GLOBALSINDEX);
return 1;
}

@ -1,205 +1,205 @@
/*
** $Id: loadlib.c,v 1.1 2005/10/25 09:41:32 vizerie Exp $
** Dynamic library loader for Lua
** See Copyright Notice in lua.h
*
* This Lua library exports a single function, called loadlib, which is
* called from Lua as loadlib(lib,init), where lib is the full name of the
* library to be loaded (including the complete path) and init is the name
* of a function to be called after the library is loaded. Typically, this
* function will register other functions, thus making the complete library
* available to Lua. The init function is *not* automatically called by
* loadlib. Instead, loadlib returns the init function as a Lua function
* that the client can call when it thinks is appropriate. In the case of
* errors, loadlib returns nil and two strings describing the error.
* The first string is supplied by the operating system; it should be
* informative and useful for error messages. The second string is "open",
* "init", or "absent" to identify the error and is meant to be used for
* making decisions without having to look into the first string (whose
* format is system-dependent).
*
* This module contains an implementation of loadlib for Unix systems that
* have dlfcn, an implementation for Windows, and a stub for other systems.
* See the list at the end of this file for some links to available
* implementations of dlfcn and interfaces to other native dynamic loaders
* on top of which loadlib could be implemented.
*
*/
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#undef LOADLIB
#ifdef USE_DLOPEN
#define LOADLIB
/*
* This is an implementation of loadlib based on the dlfcn interface.
* The dlfcn interface is available in Linux, SunOS, Solaris, IRIX, FreeBSD,
* NetBSD, AIX 4.2, HPUX 11, and probably most other Unix flavors, at least
* as an emulation layer on top of native functions.
*/
#include <dlfcn.h>
static int loadlib(lua_State *L)
{
const char *path=luaL_checkstring(L,1);
const char *init=luaL_checkstring(L,2);
void *lib=dlopen(path,RTLD_NOW);
if (lib!=NULL)
{
lua_CFunction f=(lua_CFunction) dlsym(lib,init);
if (f!=NULL)
{
lua_pushlightuserdata(L,lib);
lua_pushcclosure(L,f,1);
return 1;
}
}
/* else return appropriate error messages */
lua_pushnil(L);
lua_pushstring(L,dlerror());
lua_pushstring(L,(lib!=NULL) ? "init" : "open");
if (lib!=NULL) dlclose(lib);
return 3;
}
#endif
/*
** In Windows, default is to use dll; otherwise, default is not to use dll
*/
#ifndef USE_DLL
#ifdef _WIN32
#define USE_DLL 1
#else
#define USE_DLL 0
#endif
#endif
#if USE_DLL
#define LOADLIB
/*
* This is an implementation of loadlib for Windows using native functions.
*/
#include <windows.h>
static void pusherror(lua_State *L)
{
int error=GetLastError();
char buffer[128];
if (FormatMessage(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM,
0, error, 0, buffer, sizeof(buffer), 0))
lua_pushstring(L,buffer);
else
lua_pushfstring(L,"system error %d\n",error);
}
static int loadlib(lua_State *L)
{
const char *path=luaL_checkstring(L,1);
const char *init=luaL_checkstring(L,2);
HINSTANCE lib=LoadLibrary(path);
if (lib!=NULL)
{
lua_CFunction f=(lua_CFunction) GetProcAddress(lib,init);
if (f!=NULL)
{
lua_pushlightuserdata(L,lib);
lua_pushcclosure(L,f,1);
return 1;
}
}
lua_pushnil(L);
pusherror(L);
lua_pushstring(L,(lib!=NULL) ? "init" : "open");
if (lib!=NULL) FreeLibrary(lib);
return 3;
}
#endif
#ifndef LOADLIB
/* Fallback for other systems */
/*
** Those systems support dlopen, so they should have defined USE_DLOPEN.
** The default (no)implementation gives them a special error message.
*/
#ifdef linux
#define LOADLIB
#endif
#ifdef sun
#define LOADLIB
#endif
#ifdef sgi
#define LOADLIB
#endif
#ifdef BSD
#define LOADLIB
#endif
#ifdef _WIN32
#define LOADLIB
#endif
#ifdef LOADLIB
#undef LOADLIB
#define LOADLIB "`loadlib' not installed (check your Lua configuration)"
#else
#define LOADLIB "`loadlib' not supported"
#endif
static int loadlib(lua_State *L)
{
lua_pushnil(L);
lua_pushliteral(L,LOADLIB);
lua_pushliteral(L,"absent");
return 3;
}
#endif
LUALIB_API int luaopen_loadlib (lua_State *L)
{
lua_register(L,"loadlib",loadlib);
return 0;
}
/*
* Here are some links to available implementations of dlfcn and
* interfaces to other native dynamic loaders on top of which loadlib
* could be implemented. Please send contributions and corrections to us.
*
* AIX
* Starting with AIX 4.2, dlfcn is included in the base OS.
* There is also an emulation package available.
* http://www.faqs.org/faqs/aix-faq/part4/section-21.html
*
* HPUX
* HPUX 11 has dlfcn. For HPUX 10 use shl_*.
* http://www.geda.seul.org/mailinglist/geda-dev37/msg00094.html
* http://www.stat.umn.edu/~luke/xls/projects/dlbasics/dlbasics.html
*
* Macintosh, Windows
* http://www.stat.umn.edu/~luke/xls/projects/dlbasics/dlbasics.html
*
* Mac OS X/Darwin
* http://www.opendarwin.org/projects/dlcompat/
*
* GLIB has wrapper code for BeOS, OS2, Unix and Windows
* http://cvs.gnome.org/lxr/source/glib/gmodule/
*
*/
/*
** $Id: loadlib.c,v 1.1 2005/10/25 09:41:32 vizerie Exp $
** Dynamic library loader for Lua
** See Copyright Notice in lua.h
*
* This Lua library exports a single function, called loadlib, which is
* called from Lua as loadlib(lib,init), where lib is the full name of the
* library to be loaded (including the complete path) and init is the name
* of a function to be called after the library is loaded. Typically, this
* function will register other functions, thus making the complete library
* available to Lua. The init function is *not* automatically called by
* loadlib. Instead, loadlib returns the init function as a Lua function
* that the client can call when it thinks is appropriate. In the case of
* errors, loadlib returns nil and two strings describing the error.
* The first string is supplied by the operating system; it should be
* informative and useful for error messages. The second string is "open",
* "init", or "absent" to identify the error and is meant to be used for
* making decisions without having to look into the first string (whose
* format is system-dependent).
*
* This module contains an implementation of loadlib for Unix systems that
* have dlfcn, an implementation for Windows, and a stub for other systems.
* See the list at the end of this file for some links to available
* implementations of dlfcn and interfaces to other native dynamic loaders
* on top of which loadlib could be implemented.
*
*/
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#undef LOADLIB
#ifdef USE_DLOPEN
#define LOADLIB
/*
* This is an implementation of loadlib based on the dlfcn interface.
* The dlfcn interface is available in Linux, SunOS, Solaris, IRIX, FreeBSD,
* NetBSD, AIX 4.2, HPUX 11, and probably most other Unix flavors, at least
* as an emulation layer on top of native functions.
*/
#include <dlfcn.h>
static int loadlib(lua_State *L)
{
const char *path=luaL_checkstring(L,1);
const char *init=luaL_checkstring(L,2);
void *lib=dlopen(path,RTLD_NOW);
if (lib!=NULL)
{
lua_CFunction f=(lua_CFunction) dlsym(lib,init);
if (f!=NULL)
{
lua_pushlightuserdata(L,lib);
lua_pushcclosure(L,f,1);
return 1;
}
}
/* else return appropriate error messages */
lua_pushnil(L);
lua_pushstring(L,dlerror());
lua_pushstring(L,(lib!=NULL) ? "init" : "open");
if (lib!=NULL) dlclose(lib);
return 3;
}
#endif
/*
** In Windows, default is to use dll; otherwise, default is not to use dll
*/
#ifndef USE_DLL
#ifdef _WIN32
#define USE_DLL 1
#else
#define USE_DLL 0
#endif
#endif
#if USE_DLL
#define LOADLIB
/*
* This is an implementation of loadlib for Windows using native functions.
*/
#include <windows.h>
static void pusherror(lua_State *L)
{
int error=GetLastError();
char buffer[128];
if (FormatMessage(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM,
0, error, 0, buffer, sizeof(buffer), 0))
lua_pushstring(L,buffer);
else
lua_pushfstring(L,"system error %d\n",error);
}
static int loadlib(lua_State *L)
{
const char *path=luaL_checkstring(L,1);
const char *init=luaL_checkstring(L,2);
HINSTANCE lib=LoadLibrary(path);
if (lib!=NULL)
{
lua_CFunction f=(lua_CFunction) GetProcAddress(lib,init);
if (f!=NULL)
{
lua_pushlightuserdata(L,lib);
lua_pushcclosure(L,f,1);
return 1;
}
}
lua_pushnil(L);
pusherror(L);
lua_pushstring(L,(lib!=NULL) ? "init" : "open");
if (lib!=NULL) FreeLibrary(lib);
return 3;
}
#endif
#ifndef LOADLIB
/* Fallback for other systems */
/*
** Those systems support dlopen, so they should have defined USE_DLOPEN.
** The default (no)implementation gives them a special error message.
*/
#ifdef linux
#define LOADLIB
#endif
#ifdef sun
#define LOADLIB
#endif
#ifdef sgi
#define LOADLIB
#endif
#ifdef BSD
#define LOADLIB
#endif
#ifdef _WIN32
#define LOADLIB
#endif
#ifdef LOADLIB
#undef LOADLIB
#define LOADLIB "`loadlib' not installed (check your Lua configuration)"
#else
#define LOADLIB "`loadlib' not supported"
#endif
static int loadlib(lua_State *L)
{
lua_pushnil(L);
lua_pushliteral(L,LOADLIB);
lua_pushliteral(L,"absent");
return 3;
}
#endif
LUALIB_API int luaopen_loadlib (lua_State *L)
{
lua_register(L,"loadlib",loadlib);
return 0;
}
/*
* Here are some links to available implementations of dlfcn and
* interfaces to other native dynamic loaders on top of which loadlib
* could be implemented. Please send contributions and corrections to us.
*
* AIX
* Starting with AIX 4.2, dlfcn is included in the base OS.
* There is also an emulation package available.
* http://www.faqs.org/faqs/aix-faq/part4/section-21.html
*
* HPUX
* HPUX 11 has dlfcn. For HPUX 10 use shl_*.
* http://www.geda.seul.org/mailinglist/geda-dev37/msg00094.html
* http://www.stat.umn.edu/~luke/xls/projects/dlbasics/dlbasics.html
*
* Macintosh, Windows
* http://www.stat.umn.edu/~luke/xls/projects/dlbasics/dlbasics.html
*
* Mac OS X/Darwin
* http://www.opendarwin.org/projects/dlcompat/
*
* GLIB has wrapper code for BeOS, OS2, Unix and Windows
* http://cvs.gnome.org/lxr/source/glib/gmodule/
*
*/

@ -1,260 +1,260 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stddef.h>
#define ltablib_c
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#define aux_getn(L,n) (luaL_checktype(L, n, LUA_TTABLE), luaL_getn(L, n))
static int luaB_foreachi (lua_State *L) {
int i;
int n = aux_getn(L, 1);
luaL_checktype(L, 2, LUA_TFUNCTION);
for (i=1; i<=n; i++) {
lua_pushvalue(L, 2); /* function */
lua_pushnumber(L, (lua_Number)i); /* 1st argument */
lua_rawgeti(L, 1, i); /* 2nd argument */
lua_call(L, 2, 1);
if (!lua_isnil(L, -1))
return 1;
lua_pop(L, 1); /* remove nil result */
}
return 0;
}
static int luaB_foreach (lua_State *L) {
luaL_checktype(L, 1, LUA_TTABLE);
luaL_checktype(L, 2, LUA_TFUNCTION);
lua_pushnil(L); /* first key */
for (;;) {
if (lua_next(L, 1) == 0)
return 0;
lua_pushvalue(L, 2); /* function */
lua_pushvalue(L, -3); /* key */
lua_pushvalue(L, -3); /* value */
lua_call(L, 2, 1);
if (!lua_isnil(L, -1))
return 1;
lua_pop(L, 2); /* remove value and result */
}
}
static int luaB_getn (lua_State *L) {
lua_pushnumber(L, (lua_Number)aux_getn(L, 1));
return 1;
}
static int luaB_setn (lua_State *L) {
luaL_checktype(L, 1, LUA_TTABLE);
luaL_setn(L, 1, luaL_checkint(L, 2));
return 0;
}
static int luaB_tinsert (lua_State *L) {
int v = lua_gettop(L); /* number of arguments */
int n = aux_getn(L, 1) + 1;
int pos; /* where to insert new element */
if (v == 2) /* called with only 2 arguments */
pos = n; /* insert new element at the end */
else {
pos = luaL_checkint(L, 2); /* 2nd argument is the position */
if (pos > n) n = pos; /* `grow' array if necessary */
v = 3; /* function may be called with more than 3 args */
}
luaL_setn(L, 1, n); /* new size */
while (--n >= pos) { /* move up elements */
lua_rawgeti(L, 1, n);
lua_rawseti(L, 1, n+1); /* t[n+1] = t[n] */
}
lua_pushvalue(L, v);
lua_rawseti(L, 1, pos); /* t[pos] = v */
return 0;
}
static int luaB_tremove (lua_State *L) {
int n = aux_getn(L, 1);
int pos = luaL_optint(L, 2, n);
if (n <= 0) return 0; /* table is `empty' */
luaL_setn(L, 1, n-1); /* t.n = n-1 */
lua_rawgeti(L, 1, pos); /* result = t[pos] */
for ( ;pos<n; pos++) {
lua_rawgeti(L, 1, pos+1);
lua_rawseti(L, 1, pos); /* t[pos] = t[pos+1] */
}
lua_pushnil(L);
lua_rawseti(L, 1, n); /* t[n] = nil */
return 1;
}
static int str_concat (lua_State *L) {
luaL_Buffer b;
size_t lsep;
const char *sep = luaL_optlstring(L, 2, "", &lsep);
int i = luaL_optint(L, 3, 1);
int n = luaL_optint(L, 4, 0);
luaL_checktype(L, 1, LUA_TTABLE);
if (n == 0) n = luaL_getn(L, 1);
luaL_buffinit(L, &b);
for (; i <= n; i++) {
lua_rawgeti(L, 1, i);
luaL_argcheck(L, lua_isstring(L, -1), 1, "table contains non-strings");
luaL_addvalue(&b);
if (i != n)
luaL_addlstring(&b, sep, lsep);
}
luaL_pushresult(&b);
return 1;
}
/*
** {======================================================
** Quicksort
** (based on `Algorithms in MODULA-3', Robert Sedgewick;
** Addison-Wesley, 1993.)
*/
static void set2 (lua_State *L, int i, int j) {
lua_rawseti(L, 1, i);
lua_rawseti(L, 1, j);
}
static int sort_comp (lua_State *L, int a, int b) {
if (!lua_isnil(L, 2)) { /* function? */
int res;
lua_pushvalue(L, 2);
lua_pushvalue(L, a-1); /* -1 to compensate function */
lua_pushvalue(L, b-2); /* -2 to compensate function and `a' */
lua_call(L, 2, 1);
res = lua_toboolean(L, -1);
lua_pop(L, 1);
return res;
}
else /* a < b? */
return lua_lessthan(L, a, b);
}
static void auxsort (lua_State *L, int l, int u) {
while (l < u) { /* for tail recursion */
int i, j;
/* sort elements a[l], a[(l+u)/2] and a[u] */
lua_rawgeti(L, 1, l);
lua_rawgeti(L, 1, u);
if (sort_comp(L, -1, -2)) /* a[u] < a[l]? */
set2(L, l, u); /* swap a[l] - a[u] */
else
lua_pop(L, 2);
if (u-l == 1) break; /* only 2 elements */
i = (l+u)/2;
lua_rawgeti(L, 1, i);
lua_rawgeti(L, 1, l);
if (sort_comp(L, -2, -1)) /* a[i]<a[l]? */
set2(L, i, l);
else {
lua_pop(L, 1); /* remove a[l] */
lua_rawgeti(L, 1, u);
if (sort_comp(L, -1, -2)) /* a[u]<a[i]? */
set2(L, i, u);
else
lua_pop(L, 2);
}
if (u-l == 2) break; /* only 3 elements */
lua_rawgeti(L, 1, i); /* Pivot */
lua_pushvalue(L, -1);
lua_rawgeti(L, 1, u-1);
set2(L, i, u-1);
/* a[l] <= P == a[u-1] <= a[u], only need to sort from l+1 to u-2 */
i = l; j = u-1;
for (;;) { /* invariant: a[l..i] <= P <= a[j..u] */
/* repeat ++i until a[i] >= P */
while (lua_rawgeti(L, 1, ++i), sort_comp(L, -1, -2)) {
if (i>u) luaL_error(L, "invalid order function for sorting");
lua_pop(L, 1); /* remove a[i] */
}
/* repeat --j until a[j] <= P */
while (lua_rawgeti(L, 1, --j), sort_comp(L, -3, -1)) {
if (j<l) luaL_error(L, "invalid order function for sorting");
lua_pop(L, 1); /* remove a[j] */
}
if (j<i) {
lua_pop(L, 3); /* pop pivot, a[i], a[j] */
break;
}
set2(L, i, j);
}
lua_rawgeti(L, 1, u-1);
lua_rawgeti(L, 1, i);
set2(L, u-1, i); /* swap pivot (a[u-1]) with a[i] */
/* a[l..i-1] <= a[i] == P <= a[i+1..u] */
/* adjust so that smaller half is in [j..i] and larger one in [l..u] */
if (i-l < u-i) {
j=l; i=i-1; l=i+2;
}
else {
j=i+1; i=u; u=j-2;
}
auxsort(L, j, i); /* call recursively the smaller one */
} /* repeat the routine for the larger one */
}
static int luaB_sort (lua_State *L) {
int n = aux_getn(L, 1);
luaL_checkstack(L, 40, ""); /* assume array is smaller than 2^40 */
if (!lua_isnoneornil(L, 2)) /* is there a 2nd argument? */
luaL_checktype(L, 2, LUA_TFUNCTION);
lua_settop(L, 2); /* make sure there is two arguments */
auxsort(L, 1, n);
return 0;
}
/* }====================================================== */
static const luaL_reg tab_funcs[] = {
{"concat", str_concat},
{"foreach", luaB_foreach},
{"foreachi", luaB_foreachi},
{"getn", luaB_getn},
{"setn", luaB_setn},
{"sort", luaB_sort},
{"insert", luaB_tinsert},
{"remove", luaB_tremove},
{NULL, NULL}
};
LUALIB_API int luaopen_table (lua_State *L) {
luaL_openlib(L, LUA_TABLIBNAME, tab_funcs, 0);
return 1;
}
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stddef.h>
#define ltablib_c
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#define aux_getn(L,n) (luaL_checktype(L, n, LUA_TTABLE), luaL_getn(L, n))
static int luaB_foreachi (lua_State *L) {
int i;
int n = aux_getn(L, 1);
luaL_checktype(L, 2, LUA_TFUNCTION);
for (i=1; i<=n; i++) {
lua_pushvalue(L, 2); /* function */
lua_pushnumber(L, (lua_Number)i); /* 1st argument */
lua_rawgeti(L, 1, i); /* 2nd argument */
lua_call(L, 2, 1);
if (!lua_isnil(L, -1))
return 1;
lua_pop(L, 1); /* remove nil result */
}
return 0;
}
static int luaB_foreach (lua_State *L) {
luaL_checktype(L, 1, LUA_TTABLE);
luaL_checktype(L, 2, LUA_TFUNCTION);
lua_pushnil(L); /* first key */
for (;;) {
if (lua_next(L, 1) == 0)
return 0;
lua_pushvalue(L, 2); /* function */
lua_pushvalue(L, -3); /* key */
lua_pushvalue(L, -3); /* value */
lua_call(L, 2, 1);
if (!lua_isnil(L, -1))
return 1;
lua_pop(L, 2); /* remove value and result */
}
}
static int luaB_getn (lua_State *L) {
lua_pushnumber(L, (lua_Number)aux_getn(L, 1));
return 1;
}
static int luaB_setn (lua_State *L) {
luaL_checktype(L, 1, LUA_TTABLE);
luaL_setn(L, 1, luaL_checkint(L, 2));
return 0;
}
static int luaB_tinsert (lua_State *L) {
int v = lua_gettop(L); /* number of arguments */
int n = aux_getn(L, 1) + 1;
int pos; /* where to insert new element */
if (v == 2) /* called with only 2 arguments */
pos = n; /* insert new element at the end */
else {
pos = luaL_checkint(L, 2); /* 2nd argument is the position */
if (pos > n) n = pos; /* `grow' array if necessary */
v = 3; /* function may be called with more than 3 args */
}
luaL_setn(L, 1, n); /* new size */
while (--n >= pos) { /* move up elements */
lua_rawgeti(L, 1, n);
lua_rawseti(L, 1, n+1); /* t[n+1] = t[n] */
}
lua_pushvalue(L, v);
lua_rawseti(L, 1, pos); /* t[pos] = v */
return 0;
}
static int luaB_tremove (lua_State *L) {
int n = aux_getn(L, 1);
int pos = luaL_optint(L, 2, n);
if (n <= 0) return 0; /* table is `empty' */
luaL_setn(L, 1, n-1); /* t.n = n-1 */
lua_rawgeti(L, 1, pos); /* result = t[pos] */
for ( ;pos<n; pos++) {
lua_rawgeti(L, 1, pos+1);
lua_rawseti(L, 1, pos); /* t[pos] = t[pos+1] */
}
lua_pushnil(L);
lua_rawseti(L, 1, n); /* t[n] = nil */
return 1;
}
static int str_concat (lua_State *L) {
luaL_Buffer b;
size_t lsep;
const char *sep = luaL_optlstring(L, 2, "", &lsep);
int i = luaL_optint(L, 3, 1);
int n = luaL_optint(L, 4, 0);
luaL_checktype(L, 1, LUA_TTABLE);
if (n == 0) n = luaL_getn(L, 1);
luaL_buffinit(L, &b);
for (; i <= n; i++) {
lua_rawgeti(L, 1, i);
luaL_argcheck(L, lua_isstring(L, -1), 1, "table contains non-strings");
luaL_addvalue(&b);
if (i != n)
luaL_addlstring(&b, sep, lsep);
}
luaL_pushresult(&b);
return 1;
}
/*
** {======================================================
** Quicksort
** (based on `Algorithms in MODULA-3', Robert Sedgewick;
** Addison-Wesley, 1993.)
*/
static void set2 (lua_State *L, int i, int j) {
lua_rawseti(L, 1, i);
lua_rawseti(L, 1, j);
}
static int sort_comp (lua_State *L, int a, int b) {
if (!lua_isnil(L, 2)) { /* function? */
int res;
lua_pushvalue(L, 2);
lua_pushvalue(L, a-1); /* -1 to compensate function */
lua_pushvalue(L, b-2); /* -2 to compensate function and `a' */
lua_call(L, 2, 1);
res = lua_toboolean(L, -1);
lua_pop(L, 1);
return res;
}
else /* a < b? */
return lua_lessthan(L, a, b);
}
static void auxsort (lua_State *L, int l, int u) {
while (l < u) { /* for tail recursion */
int i, j;
/* sort elements a[l], a[(l+u)/2] and a[u] */
lua_rawgeti(L, 1, l);
lua_rawgeti(L, 1, u);
if (sort_comp(L, -1, -2)) /* a[u] < a[l]? */
set2(L, l, u); /* swap a[l] - a[u] */
else
lua_pop(L, 2);
if (u-l == 1) break; /* only 2 elements */
i = (l+u)/2;
lua_rawgeti(L, 1, i);
lua_rawgeti(L, 1, l);
if (sort_comp(L, -2, -1)) /* a[i]<a[l]? */
set2(L, i, l);
else {
lua_pop(L, 1); /* remove a[l] */
lua_rawgeti(L, 1, u);
if (sort_comp(L, -1, -2)) /* a[u]<a[i]? */
set2(L, i, u);
else
lua_pop(L, 2);
}
if (u-l == 2) break; /* only 3 elements */
lua_rawgeti(L, 1, i); /* Pivot */
lua_pushvalue(L, -1);
lua_rawgeti(L, 1, u-1);
set2(L, i, u-1);
/* a[l] <= P == a[u-1] <= a[u], only need to sort from l+1 to u-2 */
i = l; j = u-1;
for (;;) { /* invariant: a[l..i] <= P <= a[j..u] */
/* repeat ++i until a[i] >= P */
while (lua_rawgeti(L, 1, ++i), sort_comp(L, -1, -2)) {
if (i>u) luaL_error(L, "invalid order function for sorting");
lua_pop(L, 1); /* remove a[i] */
}
/* repeat --j until a[j] <= P */
while (lua_rawgeti(L, 1, --j), sort_comp(L, -3, -1)) {
if (j<l) luaL_error(L, "invalid order function for sorting");
lua_pop(L, 1); /* remove a[j] */
}
if (j<i) {
lua_pop(L, 3); /* pop pivot, a[i], a[j] */
break;
}
set2(L, i, j);
}
lua_rawgeti(L, 1, u-1);
lua_rawgeti(L, 1, i);
set2(L, u-1, i); /* swap pivot (a[u-1]) with a[i] */
/* a[l..i-1] <= a[i] == P <= a[i+1..u] */
/* adjust so that smaller half is in [j..i] and larger one in [l..u] */
if (i-l < u-i) {
j=l; i=i-1; l=i+2;
}
else {
j=i+1; i=u; u=j-2;
}
auxsort(L, j, i); /* call recursively the smaller one */
} /* repeat the routine for the larger one */
}
static int luaB_sort (lua_State *L) {
int n = aux_getn(L, 1);
luaL_checkstack(L, 40, ""); /* assume array is smaller than 2^40 */
if (!lua_isnoneornil(L, 2)) /* is there a 2nd argument? */
luaL_checktype(L, 2, LUA_TFUNCTION);
lua_settop(L, 2); /* make sure there is two arguments */
auxsort(L, 1, n);
return 0;
}
/* }====================================================== */
static const luaL_reg tab_funcs[] = {
{"concat", str_concat},
{"foreach", luaB_foreach},
{"foreachi", luaB_foreachi},
{"getn", luaB_getn},
{"setn", luaB_setn},
{"sort", luaB_sort},
{"insert", luaB_tinsert},
{"remove", luaB_tremove},
{NULL, NULL}
};
LUALIB_API int luaopen_table (lua_State *L) {
luaL_openlib(L, LUA_TABLIBNAME, tab_funcs, 0);
return 1;
}

@ -1,62 +1,62 @@
a.code { color: #4444EE; font-weight: normal; text-decoration: none; }
a.coderef { color: #4444EE; font-weight: normal; }
a:link { color: #0066CC; text-decoration: none; }
a:visited { color: #436976; text-decoration: none; }
a.code{ color: #436976; font-weight: normal; text-decoration: none; }
a.coderef{ color: #436976; font-weight: normal; }
a.qindex{ font-weight: normal; white-space: nowrap; }
a.qindex:hover, a.qindexref:hover { background-color: #DDDDFF; text-decoration: none; }
a.qindexhl, a.qindexrefhl { background-color: #6666CC; color: #FFFFFF; font-weight: bold; text-decoration: none; }
a.qindexhl:hover, a.qindexrefhl:hover { background-color: #6666CC; text-decoration: none; }
a.qindexref{ }
a:hover { color: #B52010; color: #B52010; text-decoration: underline; text-decoration: underline; }
a.el, a.qindex, a.qindexref, a.el { font-weight: bold; text-decoration: none; }
/* this is repeated to fix a difference in browser rendering, perhaps should be set for each class of <a> */
body { background: #FFFFFF; color: #000000; margin-left: 20px; margin-right: 20px; }
body { background: #FFFFFF; color: #000000; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 70%; margin: 0; }
caption, a.elref, a.elref, caption { font-weight: bold; }
div.ah { background-color: #000000; color: #FFFFFF; font-weight: bold; margin-bottom: 3px; margin-top: 3px; }
div.ah{ background: #000000; color: #FFFFFF; font-weight: bold; margin-bottom: 3px; margin-top: 3px; }
div.footer{ background: #B0C2D7; border: 1px solid #436976; color: #000000; font-style: normal; margin-top: 5em; padding-bottom: 3px; text-align: center; }
div.fragment { background-color: #F5F5F5; border: 1px solid #CCCCCC; margin: 4px; padding-left: 4px; width: 98%; }
div.fragment{ background: #FFFFCC; border: 1px solid #CCCCCC; margin-left: 2em; margin-right: 2em; }
pre { font-size: 120%; margin:2px 1px 3px 1px; }
div.groupheader { font-weight: bold; margin-bottom: 6px; margin-left: 16px; margin-top: 12px; }
div.groupheader{ border-bottom: 1px solid #557E8C; font-weight: bold; margin-bottom: 6px; margin-left: 16px; margin-top: 12px; }
div.grouptext{ font-style: italic; margin-left: 16px; }
div.header{ background: #B0C2D7; border: 1px solid #436976; color: #000000; font-style: normal; margin-bottom: 1em; padding-bottom: 3px; padding-left: 10px; text-align: left; text-transform: lowercase; }
div.header a, div.footer a{ color: #436976; font-weight: bold; white-space: nowrap; }
div.header a {margin-right: 1em; }
div.header a:visited, div.footer a:visited { color: #436976; font-weight: bold; }
div.header a:hover, div.footer a:hover { color: #B52010; font-weight: bold; text-decoration: none; }
div.index { padding-right: 10px; text-align: right; }
div.maindox { margin: 2%; width: 96%; }
div.nav { float: left; }
div.qindex { background-color: #EEEEFF; border: 4px solid #EEEEFF; margin-bottom: 2px; text-align: center; width: 100%; }
dl.el { margin-left: -1cm; }
font.charliteral, span.charliteral { color: #008080; }
font.comment, span.comment { color: #800000; }
font.keyword, span.keyword { color: #008000; }
font.keywordflow, span.keywordflow { color: #E08000; }
font.keywordtype, span.keywordtype { color: #604020; }
font.preprocessor, span.preprocessor { color: #806020; }
font.stringliteral, span.stringliteral { color: #002080; }
h1{ font-size: 220%; text-align: center; }
h2{ border-bottom: 2px solid #557E8C; font-size: 170%; }
hr { border: 1px solid #000000; }
img.formuladsp { }
img.formulainl { vertical-align: middle; }
p.formuladsp { text-align: center; }
td { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 70%; }
td.indexkey{ background: #EEEEFF; font-weight: bold; margin: 2px 0px; padding: 2px 10px; }
td.indexvalue{ background: #EEEEFF; font-style: italic; margin: 2px 0px; padding: 2px 10px; }
td.md{ font-weight: bold; }
td.mdname, td.mdname1 { color: #FF9900; font-weight: bold; }
tr.memlist { background-color: #F0F0F0; }
ul { list-style-type: square; }
.mdescleft { background-color: #FAFAFA; border-bottom: 1px none #E0E0E0; border-left: 1px none #E0E0E0; border-right: 1px none #E0E0E0; border-top: 1px none #E0E0E0; margin: 0px; padding-left: 8px; }
.mdescright { background-color: #FAFAFA; border-bottom: 1px none #E0E0E0; border-left: 1px none #E0E0E0; border-right: 1px none #E0E0E0; border-top: 1px none #E0E0E0; font-style: italic; margin: 0px; padding-bottom: 0px; padding-left: 4px; padding-right: 8px; }
.mdrow { padding: 8px 20px; }
.mdtable { background: #EEEEEE; border: 1px solid #CCCCCC; }
.memitemleft { background-color: #FAFAFA; border-top-color: #FFFFFF; border-top-style: solid; border-top-width: 2px; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; margin: 4px; padding: 1px 0px 0px 8px; }
.memitemright { background-color: #FAFAFA; border-top-color: #FFFFFF; border-top-style: solid; border-top-width: 2px; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 13px; margin: 4px; padding: 1px 0px 0px 8px; }
a.code { color: #4444EE; font-weight: normal; text-decoration: none; }
a.coderef { color: #4444EE; font-weight: normal; }
a:link { color: #0066CC; text-decoration: none; }
a:visited { color: #436976; text-decoration: none; }
a.code{ color: #436976; font-weight: normal; text-decoration: none; }
a.coderef{ color: #436976; font-weight: normal; }
a.qindex{ font-weight: normal; white-space: nowrap; }
a.qindex:hover, a.qindexref:hover { background-color: #DDDDFF; text-decoration: none; }
a.qindexhl, a.qindexrefhl { background-color: #6666CC; color: #FFFFFF; font-weight: bold; text-decoration: none; }
a.qindexhl:hover, a.qindexrefhl:hover { background-color: #6666CC; text-decoration: none; }
a.qindexref{ }
a:hover { color: #B52010; color: #B52010; text-decoration: underline; text-decoration: underline; }
a.el, a.qindex, a.qindexref, a.el { font-weight: bold; text-decoration: none; }
/* this is repeated to fix a difference in browser rendering, perhaps should be set for each class of <a> */
body { background: #FFFFFF; color: #000000; margin-left: 20px; margin-right: 20px; }
body { background: #FFFFFF; color: #000000; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 70%; margin: 0; }
caption, a.elref, a.elref, caption { font-weight: bold; }
div.ah { background-color: #000000; color: #FFFFFF; font-weight: bold; margin-bottom: 3px; margin-top: 3px; }
div.ah{ background: #000000; color: #FFFFFF; font-weight: bold; margin-bottom: 3px; margin-top: 3px; }
div.footer{ background: #B0C2D7; border: 1px solid #436976; color: #000000; font-style: normal; margin-top: 5em; padding-bottom: 3px; text-align: center; }
div.fragment { background-color: #F5F5F5; border: 1px solid #CCCCCC; margin: 4px; padding-left: 4px; width: 98%; }
div.fragment{ background: #FFFFCC; border: 1px solid #CCCCCC; margin-left: 2em; margin-right: 2em; }
pre { font-size: 120%; margin:2px 1px 3px 1px; }
div.groupheader { font-weight: bold; margin-bottom: 6px; margin-left: 16px; margin-top: 12px; }
div.groupheader{ border-bottom: 1px solid #557E8C; font-weight: bold; margin-bottom: 6px; margin-left: 16px; margin-top: 12px; }
div.grouptext{ font-style: italic; margin-left: 16px; }
div.header{ background: #B0C2D7; border: 1px solid #436976; color: #000000; font-style: normal; margin-bottom: 1em; padding-bottom: 3px; padding-left: 10px; text-align: left; text-transform: lowercase; }
div.header a, div.footer a{ color: #436976; font-weight: bold; white-space: nowrap; }
div.header a {margin-right: 1em; }
div.header a:visited, div.footer a:visited { color: #436976; font-weight: bold; }
div.header a:hover, div.footer a:hover { color: #B52010; font-weight: bold; text-decoration: none; }
div.index { padding-right: 10px; text-align: right; }
div.maindox { margin: 2%; width: 96%; }
div.nav { float: left; }
div.qindex { background-color: #EEEEFF; border: 4px solid #EEEEFF; margin-bottom: 2px; text-align: center; width: 100%; }
dl.el { margin-left: -1cm; }
font.charliteral, span.charliteral { color: #008080; }
font.comment, span.comment { color: #800000; }
font.keyword, span.keyword { color: #008000; }
font.keywordflow, span.keywordflow { color: #E08000; }
font.keywordtype, span.keywordtype { color: #604020; }
font.preprocessor, span.preprocessor { color: #806020; }
font.stringliteral, span.stringliteral { color: #002080; }
h1{ font-size: 220%; text-align: center; }
h2{ border-bottom: 2px solid #557E8C; font-size: 170%; }
hr { border: 1px solid #000000; }
img.formuladsp { }
img.formulainl { vertical-align: middle; }
p.formuladsp { text-align: center; }
td { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 70%; }
td.indexkey{ background: #EEEEFF; font-weight: bold; margin: 2px 0px; padding: 2px 10px; }
td.indexvalue{ background: #EEEEFF; font-style: italic; margin: 2px 0px; padding: 2px 10px; }
td.md{ font-weight: bold; }
td.mdname, td.mdname1 { color: #FF9900; font-weight: bold; }
tr.memlist { background-color: #F0F0F0; }
ul { list-style-type: square; }
.mdescleft { background-color: #FAFAFA; border-bottom: 1px none #E0E0E0; border-left: 1px none #E0E0E0; border-right: 1px none #E0E0E0; border-top: 1px none #E0E0E0; margin: 0px; padding-left: 8px; }
.mdescright { background-color: #FAFAFA; border-bottom: 1px none #E0E0E0; border-left: 1px none #E0E0E0; border-right: 1px none #E0E0E0; border-top: 1px none #E0E0E0; font-style: italic; margin: 0px; padding-bottom: 0px; padding-left: 4px; padding-right: 8px; }
.mdrow { padding: 8px 20px; }
.mdtable { background: #EEEEEE; border: 1px solid #CCCCCC; }
.memitemleft { background-color: #FAFAFA; border-top-color: #FFFFFF; border-top-style: solid; border-top-width: 2px; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; margin: 4px; padding: 1px 0px 0px 8px; }
.memitemright { background-color: #FAFAFA; border-top-color: #FFFFFF; border-top-style: solid; border-top-width: 2px; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 13px; margin: 4px; padding: 1px 0px 0px 8px; }

@ -17,7 +17,7 @@
//-------------------------------------------------------------------------------------------------
// project: sadge lib
// file: text_input.h
// version: $Id: text_input.h,v 1.2 2004/06/15 17:33:37 boucher Exp $
// version: $Id$
//
//-------------------------------------------------------------------------------------------------

@ -20,7 +20,7 @@
//-------------------------------------------------------------------------------------------------
// project: sadge lib
// file: text_output.h
// version: $Id: text_output.h,v 1.1 2004/02/10 17:54:46 boucher Exp $
// version: $Id$
//
// This file contains a string class derived from the STL string
// The string compare functions od the class are case insensitive

@ -422,7 +422,7 @@ public:
if (!description.empty())
*this << description << "\n";
*this << "\n";
*this << "$Id: cpp_output.h,v 1.15 2004/12/13 17:19:01 legros Exp $\n";
*this << "$Id$\n";
*this << "*/\n\n";
}
}

@ -1,106 +1,106 @@
BODY {background:#FFFFFF}
.menuItem {
font-family:sans-serif; font-size:small;
width:220;padding-left:20;
background-color:menu;
color:black
}
.highlightItem {
font-family:sans-serif; font-size:small;
width:220; padding-left:20;
background-Color:highlight; color:white;
}
.navBar {
background-Color:buttonface;
}
.oldNavBar {
background-Color:black;
}
.pageView {
background-Color:white;
}
.propViewer {
background-Color:white;
color: black;
font-family: Verdana;
font-style: italic;
font-weight: bold;
font-size: medium;
text-align: center;
}
.propViewerTABLE {
background-Color: black;
font-weight: medium;
border-width: 1pt;
border-color: black;
}
.propViewerTHEAD {
background-Color: rgb(230,230,230);
color: black;
font-family: Verdana;
font-style: italic;
font-weight: medium;
font-size: small;
}
.propViewerHeaderSep {
background-Color: black;
height: 0pt;
}
.propViewerLines {
background-Color: black;
height: 2pt;
}
.propViewerTD {
font-family: Verdana;
color: black;
font-size: x-small;
font-style: normal;
align: center;
}
.propViewerEvenRow {
background-Color: rgb(253,254,238);
}
.propViewerOddRow {
background-Color: rgb(254,254,247);
}
.clTab {
cursor:hand;
background:buttonface;
font: 0.7em Arial;
padding-left:3px;
padding-right:3px;
text-align:center;
}
.clBorder {
background:windowframe;
font:1pt;
}
.clScroll {
font:8pt Courier New;
color:threeddarkshadow;
cursor:default;
line-height:10pt;
}
.clScroll2 {
font:10pt Arial;
color:threeddarkshadow;
cursor:default;
line-height:11pt;
}
BODY {background:#FFFFFF}
.menuItem {
font-family:sans-serif; font-size:small;
width:220;padding-left:20;
background-color:menu;
color:black
}
.highlightItem {
font-family:sans-serif; font-size:small;
width:220; padding-left:20;
background-Color:highlight; color:white;
}
.navBar {
background-Color:buttonface;
}
.oldNavBar {
background-Color:black;
}
.pageView {
background-Color:white;
}
.propViewer {
background-Color:white;
color: black;
font-family: Verdana;
font-style: italic;
font-weight: bold;
font-size: medium;
text-align: center;
}
.propViewerTABLE {
background-Color: black;
font-weight: medium;
border-width: 1pt;
border-color: black;
}
.propViewerTHEAD {
background-Color: rgb(230,230,230);
color: black;
font-family: Verdana;
font-style: italic;
font-weight: medium;
font-size: small;
}
.propViewerHeaderSep {
background-Color: black;
height: 0pt;
}
.propViewerLines {
background-Color: black;
height: 2pt;
}
.propViewerTD {
font-family: Verdana;
color: black;
font-size: x-small;
font-style: normal;
align: center;
}
.propViewerEvenRow {
background-Color: rgb(253,254,238);
}
.propViewerOddRow {
background-Color: rgb(254,254,247);
}
.clTab {
cursor:hand;
background:buttonface;
font: 0.7em Arial;
padding-left:3px;
padding-right:3px;
text-align:center;
}
.clBorder {
background:windowframe;
font:1pt;
}
.clScroll {
font:8pt Courier New;
color:threeddarkshadow;
cursor:default;
line-height:10pt;
}
.clScroll2 {
font:10pt Arial;
color:threeddarkshadow;
cursor:default;
line-height:11pt;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,333 +1,333 @@
//\/////
//\ overLIB Anchor Plugin
//\ This file requires overLIB 4.10 or later.
//\
//\ overLIB 4.10 - You may not remove or change this notice.
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
//\ Contributors are listed on the homepage.
//\ See http://www.bosrup.com/web/overlib/ for details.
// $Revision: 1.1 $ $Date: 2006/05/29 16:38:21 $
//\/////
//\mini
////////
// PRE-INIT
// Ignore these lines, configuration is below.
////////
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Anchor Plugin.');
else {
registerCommands('anchor,anchorx,anchory,noanchorwarn,anchoralign');
////////
// DEFAULT CONFIGURATION
// Settings you want everywhere are set here. All of this can also be
// changed on your html page or through an overLIB call.
////////
if (typeof ol_anchor == 'undefined') var ol_anchor = '';
if (typeof ol_anchorx == 'undefined') var ol_anchorx = 0;
if (typeof ol_anchory == 'undefined') var ol_anchory = 0;
if (typeof ol_noanchorwarn == 'undefined') var ol_noanchorwarn = 1;
if (typeof ol_anchoralign == 'undefined') var ol_anchoralign = 'UL';
////////
// END OF CONFIGURATION
// Don't change anything below this line, all configuration is above.
////////
////////
// INIT
////////
// Runtime variables init. Don't change for config!
var o3_anchor = "";
var o3_anchorx = 0;
var o3_anchory = 0;
var o3_noanchorwarn = 1;
var o3_anchoralign = 'UL';
var mrkObj, rmrkPosition; //reference mark object, reference mark position, an array;
////////
// PLUGIN FUNCTIONS
////////
function setAnchorVariables() {
o3_anchor = ol_anchor;
o3_anchorx = ol_anchorx;
o3_anchory = ol_anchory;
o3_noanchorwarn = ol_noanchorwarn;
o3_anchoralign = ol_anchoralign;
mrkObj = null; // initialize this variable
}
// Parses Reference Mark commands
function parseAnchorExtras(pf,i,ar) {
var v, k=i;
if (k < ar.length) {
if (ar[k] == ANCHOR) { eval(pf + "anchor = '" + escSglQuote(ar[++k]) + "'"); return k; }
if (ar[k] == ANCHORX) { eval(pf + 'anchorx = ' + ar[++k]); return k; }
if (ar[k] == ANCHORY) { eval(pf + 'anchory = ' + ar[++k]); return k; }
if (ar[k] == NOANCHORWARN) { eval(pf + 'noanchorwarn = (' + pf + 'noanchorwarn==1) ? 0 : 1'); return k; }
if (ar[k] == ANCHORALIGN) { k = opt_MULTIPLEARGS(++k, ar, (pf + 'anchoralign')); return k; }
}
return -1;
}
///////
// FUNCTION WHICH CHECKS FOR THE EXISTENCE OF A REFERENCE MARKER
///////
function checkAnchorObject() {
var w = o3_anchor;
if (w) {
if (!(mrkObj = getAnchorObjectRef(w))) {
if (o3_noanchorwarn) {
alert('WARNING! Reference mark "' + w + '" not found.');
return false;
} else w = '';
}
}
return true;
}
///////
// EXTERNAL SUPPORT FUNCTIONS TO HANDLE ANCHOR PROPERTIES
///////
// Horizontal placement routine with anchors
function anchorHorizontal(browserWidth, horizontalScrollAmount, widthFix) {
var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
if (!hasAnchor) return void(0);
// set o3_relx for follow scroll if defined
if (typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_relx = rmrkPosition[0];
return rmrkPosition[0];
}
// Vertical placement routine with anchors
function anchorVertical(browserHeight,verticalScrollAmount) {
var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
if (!hasAnchor) return void(0);
// set o3_rely for follow scroll if defined
if (typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_rely = rmrkPosition[1];
return rmrkPosition[1];
}
// Stub function for the runHook routine
function anchorPreface() {
if (!mrkObj) return;
rmrkPosition = getAnchorLocation(mrkObj);
}
// Get Reference Mark object
function getAnchorObjectRef(aObj) {
return getRefById(aObj, o3_frame.document) || getRefByName(aObj, o3_frame.document)
}
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
function getAnchorLocation(objRef){
var mkObj, of, offsets, mlyr
mkObj = mlyr = objRef
offsets = [o3_anchorx, o3_anchory]
if (document.layers){
if (typeof mlyr.length != 'undefined' && mlyr.length > 1) {
mkObj = mlyr[0]
offsets[0] += mlyr[0].x + mlyr[1].pageX
offsets[1] += mlyr[0].y + mlyr[1].pageY
} else {
if(mlyr.toString().indexOf('Image') != -1 || mlyr.toString().indexOf('Anchor') != -1){
offsets[0] += mlyr.x
offsets[1] += mlyr.y
} else {
offsets[0] += mlyr.pageX
offsets[1] += mlyr.pageY
}
}
} else {
offsets[0] += pageLocation(mlyr, 'Left')
offsets[1] += pageLocation(mlyr, 'Top')
}
of = getAnchorOffsets(mkObj)
if (typeof o3_dragimg != 'undefined' && o3_dragimg) {
olImgLeft = offsets[0];
olImgTop = offsets[1];
}
offsets[0] += of[0]
offsets[1] += of[1]
if (typeof o3_dragimg != 'undefined' && o3_dragimg) {
olImgRight = offsets[0];
olImgBottom = offsets[1];
return;
}
return offsets;
}
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
function getAnchorOffsets(mkObj){
var fx = fy = 0, mp, puc, mkAry, sx = sy = 0, w = o3_anchoralign
var mW = mH = pW = pH = 0
var off = [0, 0]
mkAry = w.split(',');
if (mkAry.length < 3) {
mp = mkAry[0].toUpperCase();
puc = (mkAry.length == 1) ? mp : mkAry[1].toUpperCase();
} else if (mkAry.length == 3) {
if (!isNaN(mkAry[0])) {
mp = mkAry.slice(0, 2);
puc = mkAry[2].toUpperCase();
} else {
mp = mkAry[0].toUpperCase();
puc = mkAry.slice(1);
}
} else {
mp = mkAry.slice(0, 2);
puc = mkAry.slice(2);
}
var shdwPresent = typeof o3_shadow != 'undefined' && o3_shadow
if (shdwPresent) {
sx = Math.abs(o3_shadowx);
sy = Math.abs(o3_shadowy);
}
pW = (shdwPresent ? parseInt(o3_width) : (olNs4 ? over.clip.width : over.offsetWidth))
pH = (shdwPresent ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight))
if (olOp && o3_wrap) {
pW = (shdwPresent ? parseInt(o3_width) : (olNs4 ? over.clip.width : over.offsetWidth))
pH = (shdwPresent ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight))
}
if (!olOp && mkObj.toString().indexOf('Image') != -1){
mW = mkObj.width
mH = mkObj.height
} else if (!olOp && mkObj.toString().indexOf('Anchor') != -1) { // enforced only for NS4
mp = 'UL'
} else {
mW = (olNs4) ? mkObj.clip.width : mkObj.offsetWidth
mH = (olNs4) ? mkObj.clip.height : mkObj.offsetHeight
}
if (!isNaN(mp) || typeof mp == 'object') {
if (typeof mp == 'object') {
fx = parseFloat(mp[0]);
fy = parseFloat(mp[1]);
} else
fx = fy = parseFloat(mp);
off = [Math.round(fx*mW), Math.round(fy*mH)];
} else {
if (mp == 'UR') off = [mW, 0]
else if (mp == 'LL') off = [0, mH]
else if (mp == 'LR') off = [mW, mH]
}
if (typeof o3_dragimg != 'undefined' && o3_dragimg) return off;
else {
if (!isNaN(puc) || typeof puc == 'object' ) {
if (typeof puc == 'object') {
fx = parseFloat(puc[0]);
fy = parseFloat(puc[1]);
} else
fx = fy = parseFloat(puc);
off[0] -= Math.round(fx*(pW - sx));
off[1] -= Math.round(fy*(pH - sy));
} else {
if (puc == 'UR') {
off[0] -= (pW - sx);
off[1] -= sy
} else if (puc == 'LL') {
off[0] -= sx;
off[1] -= (pH - sy)
} else if (puc == 'LR') {
off[0] -= (pW-sx);
off[1] -= (pH - sy)
}
}
return off
}
}
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
function pageLocation(o, t){
var x = 0
while(o.offsetParent){
x += o['offset' + t]
o = o.offsetParent
}
x += o['offset' + t]
return x
}
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
function getRefById(l, d){
var r = "", j
d = (d || document)
if (d.all) return d.all[l]
else if (d.getElementById) return d.getElementById(l)
else if (d.layers && d.layers.length > 0) {
if (d.layers[l]) return d.layers[l]
for (j=0; j < d.layers.length; j++) {
r = getRefById(l, d.layers[j].document)
if(r) return r
}
}
return false
}
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
function getRefByName(l, d) {
var r = null, j
d = (d || document)
if (d.images[l]) return d.images[l]
else if (d.anchors[l]) return d.anchors[l];
else if (d.layers && d.layers.length > 0) {
for (j=0; j < d.layers.length; j++) {
r = getRefByName(l, d.layers[j].document)
if (r && r.length > 0) return r
else if (r) return [r, d.layers[j]]
}
}
return null
}
////////
// PLUGIN REGISTRATIONS
////////
registerRunTimeFunction(setAnchorVariables);
registerCmdLineFunction(parseAnchorExtras);
registerPostParseFunction(checkAnchorObject);
registerHook("createPopup", anchorPreface, FAFTER);
registerHook("horizontalPlacement", anchorHorizontal, FCHAIN);
registerHook("verticalPlacement", anchorVertical, FCHAIN);
if(olInfo.meets(4.10)) registerNoParameterCommands('noanchorwarn');
//\/////
//\ overLIB Anchor Plugin
//\ This file requires overLIB 4.10 or later.
//\
//\ overLIB 4.10 - You may not remove or change this notice.
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
//\ Contributors are listed on the homepage.
//\ See http://www.bosrup.com/web/overlib/ for details.
// $Revision: 1.1 $ $Date: 2006/05/29 16:38:21 $
//\/////
//\mini
////////
// PRE-INIT
// Ignore these lines, configuration is below.
////////
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Anchor Plugin.');
else {
registerCommands('anchor,anchorx,anchory,noanchorwarn,anchoralign');
////////
// DEFAULT CONFIGURATION
// Settings you want everywhere are set here. All of this can also be
// changed on your html page or through an overLIB call.
////////
if (typeof ol_anchor == 'undefined') var ol_anchor = '';
if (typeof ol_anchorx == 'undefined') var ol_anchorx = 0;
if (typeof ol_anchory == 'undefined') var ol_anchory = 0;
if (typeof ol_noanchorwarn == 'undefined') var ol_noanchorwarn = 1;
if (typeof ol_anchoralign == 'undefined') var ol_anchoralign = 'UL';
////////
// END OF CONFIGURATION
// Don't change anything below this line, all configuration is above.
////////
////////
// INIT
////////
// Runtime variables init. Don't change for config!
var o3_anchor = "";
var o3_anchorx = 0;
var o3_anchory = 0;
var o3_noanchorwarn = 1;
var o3_anchoralign = 'UL';
var mrkObj, rmrkPosition; //reference mark object, reference mark position, an array;
////////
// PLUGIN FUNCTIONS
////////
function setAnchorVariables() {
o3_anchor = ol_anchor;
o3_anchorx = ol_anchorx;
o3_anchory = ol_anchory;
o3_noanchorwarn = ol_noanchorwarn;
o3_anchoralign = ol_anchoralign;
mrkObj = null; // initialize this variable
}
// Parses Reference Mark commands
function parseAnchorExtras(pf,i,ar) {
var v, k=i;
if (k < ar.length) {
if (ar[k] == ANCHOR) { eval(pf + "anchor = '" + escSglQuote(ar[++k]) + "'"); return k; }
if (ar[k] == ANCHORX) { eval(pf + 'anchorx = ' + ar[++k]); return k; }
if (ar[k] == ANCHORY) { eval(pf + 'anchory = ' + ar[++k]); return k; }
if (ar[k] == NOANCHORWARN) { eval(pf + 'noanchorwarn = (' + pf + 'noanchorwarn==1) ? 0 : 1'); return k; }
if (ar[k] == ANCHORALIGN) { k = opt_MULTIPLEARGS(++k, ar, (pf + 'anchoralign')); return k; }
}
return -1;
}
///////
// FUNCTION WHICH CHECKS FOR THE EXISTENCE OF A REFERENCE MARKER
///////
function checkAnchorObject() {
var w = o3_anchor;
if (w) {
if (!(mrkObj = getAnchorObjectRef(w))) {
if (o3_noanchorwarn) {
alert('WARNING! Reference mark "' + w + '" not found.');
return false;
} else w = '';
}
}
return true;
}
///////
// EXTERNAL SUPPORT FUNCTIONS TO HANDLE ANCHOR PROPERTIES
///////
// Horizontal placement routine with anchors
function anchorHorizontal(browserWidth, horizontalScrollAmount, widthFix) {
var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
if (!hasAnchor) return void(0);
// set o3_relx for follow scroll if defined
if (typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_relx = rmrkPosition[0];
return rmrkPosition[0];
}
// Vertical placement routine with anchors
function anchorVertical(browserHeight,verticalScrollAmount) {
var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
if (!hasAnchor) return void(0);
// set o3_rely for follow scroll if defined
if (typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_rely = rmrkPosition[1];
return rmrkPosition[1];
}
// Stub function for the runHook routine
function anchorPreface() {
if (!mrkObj) return;
rmrkPosition = getAnchorLocation(mrkObj);
}
// Get Reference Mark object
function getAnchorObjectRef(aObj) {
return getRefById(aObj, o3_frame.document) || getRefByName(aObj, o3_frame.document)
}
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
function getAnchorLocation(objRef){
var mkObj, of, offsets, mlyr
mkObj = mlyr = objRef
offsets = [o3_anchorx, o3_anchory]
if (document.layers){
if (typeof mlyr.length != 'undefined' && mlyr.length > 1) {
mkObj = mlyr[0]
offsets[0] += mlyr[0].x + mlyr[1].pageX
offsets[1] += mlyr[0].y + mlyr[1].pageY
} else {
if(mlyr.toString().indexOf('Image') != -1 || mlyr.toString().indexOf('Anchor') != -1){
offsets[0] += mlyr.x
offsets[1] += mlyr.y
} else {
offsets[0] += mlyr.pageX
offsets[1] += mlyr.pageY
}
}
} else {
offsets[0] += pageLocation(mlyr, 'Left')
offsets[1] += pageLocation(mlyr, 'Top')
}
of = getAnchorOffsets(mkObj)
if (typeof o3_dragimg != 'undefined' && o3_dragimg) {
olImgLeft = offsets[0];
olImgTop = offsets[1];
}
offsets[0] += of[0]
offsets[1] += of[1]
if (typeof o3_dragimg != 'undefined' && o3_dragimg) {
olImgRight = offsets[0];
olImgBottom = offsets[1];
return;
}
return offsets;
}
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
function getAnchorOffsets(mkObj){
var fx = fy = 0, mp, puc, mkAry, sx = sy = 0, w = o3_anchoralign
var mW = mH = pW = pH = 0
var off = [0, 0]
mkAry = w.split(',');
if (mkAry.length < 3) {
mp = mkAry[0].toUpperCase();
puc = (mkAry.length == 1) ? mp : mkAry[1].toUpperCase();
} else if (mkAry.length == 3) {
if (!isNaN(mkAry[0])) {
mp = mkAry.slice(0, 2);
puc = mkAry[2].toUpperCase();
} else {
mp = mkAry[0].toUpperCase();
puc = mkAry.slice(1);
}
} else {
mp = mkAry.slice(0, 2);
puc = mkAry.slice(2);
}
var shdwPresent = typeof o3_shadow != 'undefined' && o3_shadow
if (shdwPresent) {
sx = Math.abs(o3_shadowx);
sy = Math.abs(o3_shadowy);
}
pW = (shdwPresent ? parseInt(o3_width) : (olNs4 ? over.clip.width : over.offsetWidth))
pH = (shdwPresent ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight))
if (olOp && o3_wrap) {
pW = (shdwPresent ? parseInt(o3_width) : (olNs4 ? over.clip.width : over.offsetWidth))
pH = (shdwPresent ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight))
}
if (!olOp && mkObj.toString().indexOf('Image') != -1){
mW = mkObj.width
mH = mkObj.height
} else if (!olOp && mkObj.toString().indexOf('Anchor') != -1) { // enforced only for NS4
mp = 'UL'
} else {
mW = (olNs4) ? mkObj.clip.width : mkObj.offsetWidth
mH = (olNs4) ? mkObj.clip.height : mkObj.offsetHeight
}
if (!isNaN(mp) || typeof mp == 'object') {
if (typeof mp == 'object') {
fx = parseFloat(mp[0]);
fy = parseFloat(mp[1]);
} else
fx = fy = parseFloat(mp);
off = [Math.round(fx*mW), Math.round(fy*mH)];
} else {
if (mp == 'UR') off = [mW, 0]
else if (mp == 'LL') off = [0, mH]
else if (mp == 'LR') off = [mW, mH]
}
if (typeof o3_dragimg != 'undefined' && o3_dragimg) return off;
else {
if (!isNaN(puc) || typeof puc == 'object' ) {
if (typeof puc == 'object') {
fx = parseFloat(puc[0]);
fy = parseFloat(puc[1]);
} else
fx = fy = parseFloat(puc);
off[0] -= Math.round(fx*(pW - sx));
off[1] -= Math.round(fy*(pH - sy));
} else {
if (puc == 'UR') {
off[0] -= (pW - sx);
off[1] -= sy
} else if (puc == 'LL') {
off[0] -= sx;
off[1] -= (pH - sy)
} else if (puc == 'LR') {
off[0] -= (pW-sx);
off[1] -= (pH - sy)
}
}
return off
}
}
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
function pageLocation(o, t){
var x = 0
while(o.offsetParent){
x += o['offset' + t]
o = o.offsetParent
}
x += o['offset' + t]
return x
}
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
function getRefById(l, d){
var r = "", j
d = (d || document)
if (d.all) return d.all[l]
else if (d.getElementById) return d.getElementById(l)
else if (d.layers && d.layers.length > 0) {
if (d.layers[l]) return d.layers[l]
for (j=0; j < d.layers.length; j++) {
r = getRefById(l, d.layers[j].document)
if(r) return r
}
}
return false
}
// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
function getRefByName(l, d) {
var r = null, j
d = (d || document)
if (d.images[l]) return d.images[l]
else if (d.anchors[l]) return d.anchors[l];
else if (d.layers && d.layers.length > 0) {
for (j=0; j < d.layers.length; j++) {
r = getRefByName(l, d.layers[j].document)
if (r && r.length > 0) return r
else if (r) return [r, d.layers[j]]
}
}
return null
}
////////
// PLUGIN REGISTRATIONS
////////
registerRunTimeFunction(setAnchorVariables);
registerCmdLineFunction(parseAnchorExtras);
registerPostParseFunction(checkAnchorObject);
registerHook("createPopup", anchorPreface, FAFTER);
registerHook("horizontalPlacement", anchorHorizontal, FCHAIN);
registerHook("verticalPlacement", anchorVertical, FCHAIN);
if(olInfo.meets(4.10)) registerNoParameterCommands('noanchorwarn');
}

@ -1,98 +1,98 @@
//\/////
//\ overLIB Anchor Plugin
//\ This file requires overLIB 4.10 or later.
//\
//\ overLIB 4.10 - You may not remove or change this notice.
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
//\ Contributors are listed on the homepage.
//\ See http://www.bosrup.com/web/overlib/ for details.
//\/////
//\ THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
if(typeof olInfo=='undefined'||typeof olInfo.meets=='undefined'||!olInfo.meets(4.10))alert('overLIB 4.10 or later is required for the Anchor Plugin.');else{registerCommands('anchor,anchorx,anchory,noanchorwarn,anchoralign');
if(typeof ol_anchor=='undefined')var ol_anchor='';if(typeof ol_anchorx=='undefined')var ol_anchorx=0;if(typeof ol_anchory=='undefined')var ol_anchory=0;if(typeof ol_noanchorwarn=='undefined')var ol_noanchorwarn=1;if(typeof ol_anchoralign=='undefined')var ol_anchoralign='UL';
var o3_anchor="",o3_anchorx=0,o3_anchory=0,o3_noanchorwarn=1,o3_anchoralign='UL',mrkObj,rmrkPosition;
function setAnchorVariables(){o3_anchor=ol_anchor;o3_anchorx=ol_anchorx;o3_anchory=ol_anchory;o3_noanchorwarn=ol_noanchorwarn;o3_anchoralign=ol_anchoralign;mrkObj=null;}
function parseAnchorExtras(pf,i,ar){var v,k=i;
if(k<ar.length){if(ar[k]==ANCHOR){eval(pf+"anchor='"+escSglQuote(ar[++k])+"'");return k;}
if(ar[k]==ANCHORX){eval(pf+'anchorx='+ar[++k]);return k;}
if(ar[k]==ANCHORY){eval(pf+'anchory='+ar[++k]);return k;}
if(ar[k]==NOANCHORWARN){eval(pf+'noanchorwarn=('+pf+'noanchorwarn==1)?0:1');return k;}
if(ar[k]==ANCHORALIGN){k=opt_MULTIPLEARGS(++k,ar,(pf+'anchoralign')); return k;}}
return-1;}
function checkAnchorObject(){var w=o3_anchor;
if(w){if(!(mrkObj=getAnchorObjectRef(w))){if(o3_noanchorwarn){alert('WARNING! Reference mark "'+w+'" not found.');return false;}else w='';}}
return true;}
function anchorHorizontal(browserWidth,horizontalScrollAmount,widthFix){var hasAnchor=(typeof o3_anchor!='undefined'&&o3_anchor);if(!hasAnchor)return void(0);
if(typeof o3_followscroll!='undefined'&&o3_followscroll&&o3_sticky)o3_relx=rmrkPosition[0];
return rmrkPosition[0];}
function anchorVertical(browserHeight,verticalScrollAmount){var hasAnchor=(typeof o3_anchor!='undefined'&&o3_anchor);if(!hasAnchor)return void(0);
if(typeof o3_followscroll!='undefined'&&o3_followscroll&&o3_sticky)o3_rely=rmrkPosition[1];
return rmrkPosition[1];}
function anchorPreface(){if(!mrkObj)return;rmrkPosition=getAnchorLocation(mrkObj);}
function getAnchorObjectRef(aObj){return getRefById(aObj,o3_frame.document)||getRefByName(aObj,o3_frame.document)}
function getAnchorLocation(objRef){var mkObj,of,offsets,mlyr
mkObj=mlyr=objRef
offsets=[o3_anchorx,o3_anchory]
if(document.layers){if(typeof mlyr.length!='undefined'&& mlyr.length>1){mkObj=mlyr[0]
offsets[0]+=mlyr[0].x+mlyr[1].pageX
offsets[1]+=mlyr[0].y+mlyr[1].pageY
}else{if(mlyr.toString().indexOf('Image')!=-1||mlyr.toString().indexOf('Anchor')!=-1){offsets[0]+=mlyr.x
offsets[1]+=mlyr.y
}else{offsets[0]+=mlyr.pageX
offsets[1]+=mlyr.pageY}}
}else{offsets[0]+=pageLocation(mlyr,'Left')
offsets[1]+=pageLocation(mlyr,'Top')}
of=getAnchorOffsets(mkObj)
if(typeof o3_dragimg!='undefined'&& o3_dragimg){olImgLeft=offsets[0];olImgTop=offsets[1];}
offsets[0]+=of[0]
offsets[1]+=of[1]
if(typeof o3_dragimg!='undefined'&& o3_dragimg){olImgRight=offsets[0];olImgBottom=offsets[1];return;}
return offsets;}
function getAnchorOffsets(mkObj){var fx=fy=0, mp,puc,mkAry,sx=sy=0,w=o3_anchoralign
var mW=mH=pW=pH=0
var off=[0,0]
mkAry=w.split(',');
if(mkAry.length<3){mp=mkAry[0].toUpperCase();puc=(mkAry.length==1)?mp:mkAry[1].toUpperCase();}else if(mkAry.length==3){if(!isNaN(mkAry[0])){mp=mkAry.slice(0,2);puc=mkAry[2].toUpperCase();}else{mp=mkAry[0].toUpperCase();puc=mkAry.slice(1);}
}else{mp=mkAry.slice(0,2);puc=mkAry.slice(2);}
var shdwPresent=typeof o3_shadow!='undefined'&& o3_shadow
if(shdwPresent){sx=Math.abs(o3_shadowx);sy=Math.abs(o3_shadowy);}
pW=(shdwPresent?parseInt(o3_width):(olNs4?over.clip.width:over.offsetWidth))
pH=(shdwPresent?parseInt(o3_aboveheight):(olNs4?over.clip.height:over.offsetHeight))
if(olOp&& o3_wrap){pW=(shdwPresent?parseInt(o3_width):(olNs4?over.clip.width:over.offsetWidth))
pH=(shdwPresent?parseInt(o3_aboveheight):(olNs4?over.clip.height:over.offsetHeight))}
if(!olOp&& mkObj.toString().indexOf('Image')!=-1){mW=mkObj.width
mH=mkObj.height
}else if(!olOp&& mkObj.toString().indexOf('Anchor')!=-1){mp='UL'
}else{mW=(olNs4)?mkObj.clip.width:mkObj.offsetWidth
mH=(olNs4)?mkObj.clip.height:mkObj.offsetHeight}
if(!isNaN(mp)||typeof mp=='object'){if(typeof mp=='object'){fx=parseFloat(mp[0]);fy=parseFloat(mp[1]);}else
fx=fy=parseFloat(mp);off=[Math.round(fx*mW),Math.round(fy*mH)];}else{if(mp=='UR')off=[mW,0]
else if(mp=='LL')off=[0,mH]
else if(mp=='LR')off=[mW,mH]}
if(typeof o3_dragimg!='undefined'&& o3_dragimg)return off;else{if(!isNaN(puc)||typeof puc=='object' ){if(typeof puc=='object'){fx=parseFloat(puc[0]);fy=parseFloat(puc[1]);}else
fx=fy=parseFloat(puc);off[0]-=Math.round(fx*(pW-sx));off[1]-=Math.round(fy*(pH-sy));}else{if(puc=='UR'){off[0]-=(pW-sx);off[1]-=sy
}else if(puc=='LL'){off[0]-=sx;off[1]-=(pH-sy)
}else if(puc=='LR'){off[0]-=(pW-sx);off[1]-=(pH-sy)}}
return off}}
function pageLocation(o,t){var x=0
while(o.offsetParent){x+=o['offset'+t]
o=o.offsetParent}
x+=o['offset'+t]
return x}
function getRefById(l,d){var r="",j
d=(d||document)
if(d.all)return d.all[l]
else if(d.getElementById)return d.getElementById(l)
else if(d.layers&& d.layers.length>0){if(d.layers[l])return d.layers[l]
for(j=0;j<d.layers.length;j++){r=getRefById(l,d.layers[j].document)
if(r)return r}}
return false}
function getRefByName(l,d){var r=null,j
d=(d||document)
if(d.images[l])return d.images[l]
else if(d.anchors[l])return d.anchors[l];else if(d.layers&& d.layers.length>0){for(j=0;j<d.layers.length;j++){r=getRefByName(l,d.layers[j].document)
if(r&& r.length>0)return r
else if(r)return [r,d.layers[j]]}}
return null}
registerRunTimeFunction(setAnchorVariables);registerCmdLineFunction(parseAnchorExtras);registerPostParseFunction(checkAnchorObject);registerHook("createPopup",anchorPreface,FAFTER);registerHook("horizontalPlacement",anchorHorizontal,FCHAIN);registerHook("verticalPlacement",anchorVertical,FCHAIN);if(olInfo.meets(4.10))registerNoParameterCommands('noanchorwarn');
}
//\/////
//\ overLIB Anchor Plugin
//\ This file requires overLIB 4.10 or later.
//\
//\ overLIB 4.10 - You may not remove or change this notice.
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
//\ Contributors are listed on the homepage.
//\ See http://www.bosrup.com/web/overlib/ for details.
//\/////
//\ THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
if(typeof olInfo=='undefined'||typeof olInfo.meets=='undefined'||!olInfo.meets(4.10))alert('overLIB 4.10 or later is required for the Anchor Plugin.');else{registerCommands('anchor,anchorx,anchory,noanchorwarn,anchoralign');
if(typeof ol_anchor=='undefined')var ol_anchor='';if(typeof ol_anchorx=='undefined')var ol_anchorx=0;if(typeof ol_anchory=='undefined')var ol_anchory=0;if(typeof ol_noanchorwarn=='undefined')var ol_noanchorwarn=1;if(typeof ol_anchoralign=='undefined')var ol_anchoralign='UL';
var o3_anchor="",o3_anchorx=0,o3_anchory=0,o3_noanchorwarn=1,o3_anchoralign='UL',mrkObj,rmrkPosition;
function setAnchorVariables(){o3_anchor=ol_anchor;o3_anchorx=ol_anchorx;o3_anchory=ol_anchory;o3_noanchorwarn=ol_noanchorwarn;o3_anchoralign=ol_anchoralign;mrkObj=null;}
function parseAnchorExtras(pf,i,ar){var v,k=i;
if(k<ar.length){if(ar[k]==ANCHOR){eval(pf+"anchor='"+escSglQuote(ar[++k])+"'");return k;}
if(ar[k]==ANCHORX){eval(pf+'anchorx='+ar[++k]);return k;}
if(ar[k]==ANCHORY){eval(pf+'anchory='+ar[++k]);return k;}
if(ar[k]==NOANCHORWARN){eval(pf+'noanchorwarn=('+pf+'noanchorwarn==1)?0:1');return k;}
if(ar[k]==ANCHORALIGN){k=opt_MULTIPLEARGS(++k,ar,(pf+'anchoralign')); return k;}}
return-1;}
function checkAnchorObject(){var w=o3_anchor;
if(w){if(!(mrkObj=getAnchorObjectRef(w))){if(o3_noanchorwarn){alert('WARNING! Reference mark "'+w+'" not found.');return false;}else w='';}}
return true;}
function anchorHorizontal(browserWidth,horizontalScrollAmount,widthFix){var hasAnchor=(typeof o3_anchor!='undefined'&&o3_anchor);if(!hasAnchor)return void(0);
if(typeof o3_followscroll!='undefined'&&o3_followscroll&&o3_sticky)o3_relx=rmrkPosition[0];
return rmrkPosition[0];}
function anchorVertical(browserHeight,verticalScrollAmount){var hasAnchor=(typeof o3_anchor!='undefined'&&o3_anchor);if(!hasAnchor)return void(0);
if(typeof o3_followscroll!='undefined'&&o3_followscroll&&o3_sticky)o3_rely=rmrkPosition[1];
return rmrkPosition[1];}
function anchorPreface(){if(!mrkObj)return;rmrkPosition=getAnchorLocation(mrkObj);}
function getAnchorObjectRef(aObj){return getRefById(aObj,o3_frame.document)||getRefByName(aObj,o3_frame.document)}
function getAnchorLocation(objRef){var mkObj,of,offsets,mlyr
mkObj=mlyr=objRef
offsets=[o3_anchorx,o3_anchory]
if(document.layers){if(typeof mlyr.length!='undefined'&& mlyr.length>1){mkObj=mlyr[0]
offsets[0]+=mlyr[0].x+mlyr[1].pageX
offsets[1]+=mlyr[0].y+mlyr[1].pageY
}else{if(mlyr.toString().indexOf('Image')!=-1||mlyr.toString().indexOf('Anchor')!=-1){offsets[0]+=mlyr.x
offsets[1]+=mlyr.y
}else{offsets[0]+=mlyr.pageX
offsets[1]+=mlyr.pageY}}
}else{offsets[0]+=pageLocation(mlyr,'Left')
offsets[1]+=pageLocation(mlyr,'Top')}
of=getAnchorOffsets(mkObj)
if(typeof o3_dragimg!='undefined'&& o3_dragimg){olImgLeft=offsets[0];olImgTop=offsets[1];}
offsets[0]+=of[0]
offsets[1]+=of[1]
if(typeof o3_dragimg!='undefined'&& o3_dragimg){olImgRight=offsets[0];olImgBottom=offsets[1];return;}
return offsets;}
function getAnchorOffsets(mkObj){var fx=fy=0, mp,puc,mkAry,sx=sy=0,w=o3_anchoralign
var mW=mH=pW=pH=0
var off=[0,0]
mkAry=w.split(',');
if(mkAry.length<3){mp=mkAry[0].toUpperCase();puc=(mkAry.length==1)?mp:mkAry[1].toUpperCase();}else if(mkAry.length==3){if(!isNaN(mkAry[0])){mp=mkAry.slice(0,2);puc=mkAry[2].toUpperCase();}else{mp=mkAry[0].toUpperCase();puc=mkAry.slice(1);}
}else{mp=mkAry.slice(0,2);puc=mkAry.slice(2);}
var shdwPresent=typeof o3_shadow!='undefined'&& o3_shadow
if(shdwPresent){sx=Math.abs(o3_shadowx);sy=Math.abs(o3_shadowy);}
pW=(shdwPresent?parseInt(o3_width):(olNs4?over.clip.width:over.offsetWidth))
pH=(shdwPresent?parseInt(o3_aboveheight):(olNs4?over.clip.height:over.offsetHeight))
if(olOp&& o3_wrap){pW=(shdwPresent?parseInt(o3_width):(olNs4?over.clip.width:over.offsetWidth))
pH=(shdwPresent?parseInt(o3_aboveheight):(olNs4?over.clip.height:over.offsetHeight))}
if(!olOp&& mkObj.toString().indexOf('Image')!=-1){mW=mkObj.width
mH=mkObj.height
}else if(!olOp&& mkObj.toString().indexOf('Anchor')!=-1){mp='UL'
}else{mW=(olNs4)?mkObj.clip.width:mkObj.offsetWidth
mH=(olNs4)?mkObj.clip.height:mkObj.offsetHeight}
if(!isNaN(mp)||typeof mp=='object'){if(typeof mp=='object'){fx=parseFloat(mp[0]);fy=parseFloat(mp[1]);}else
fx=fy=parseFloat(mp);off=[Math.round(fx*mW),Math.round(fy*mH)];}else{if(mp=='UR')off=[mW,0]
else if(mp=='LL')off=[0,mH]
else if(mp=='LR')off=[mW,mH]}
if(typeof o3_dragimg!='undefined'&& o3_dragimg)return off;else{if(!isNaN(puc)||typeof puc=='object' ){if(typeof puc=='object'){fx=parseFloat(puc[0]);fy=parseFloat(puc[1]);}else
fx=fy=parseFloat(puc);off[0]-=Math.round(fx*(pW-sx));off[1]-=Math.round(fy*(pH-sy));}else{if(puc=='UR'){off[0]-=(pW-sx);off[1]-=sy
}else if(puc=='LL'){off[0]-=sx;off[1]-=(pH-sy)
}else if(puc=='LR'){off[0]-=(pW-sx);off[1]-=(pH-sy)}}
return off}}
function pageLocation(o,t){var x=0
while(o.offsetParent){x+=o['offset'+t]
o=o.offsetParent}
x+=o['offset'+t]
return x}
function getRefById(l,d){var r="",j
d=(d||document)
if(d.all)return d.all[l]
else if(d.getElementById)return d.getElementById(l)
else if(d.layers&& d.layers.length>0){if(d.layers[l])return d.layers[l]
for(j=0;j<d.layers.length;j++){r=getRefById(l,d.layers[j].document)
if(r)return r}}
return false}
function getRefByName(l,d){var r=null,j
d=(d||document)
if(d.images[l])return d.images[l]
else if(d.anchors[l])return d.anchors[l];else if(d.layers&& d.layers.length>0){for(j=0;j<d.layers.length;j++){r=getRefByName(l,d.layers[j].document)
if(r&& r.length>0)return r
else if(r)return [r,d.layers[j]]}}
return null}
registerRunTimeFunction(setAnchorVariables);registerCmdLineFunction(parseAnchorExtras);registerPostParseFunction(checkAnchorObject);registerHook("createPopup",anchorPreface,FAFTER);registerHook("horizontalPlacement",anchorHorizontal,FCHAIN);registerHook("verticalPlacement",anchorVertical,FCHAIN);if(olInfo.meets(4.10))registerNoParameterCommands('noanchorwarn');
}

@ -1,174 +1,174 @@
//\/////
//\ overLIB Draggable Plugin
//\
//\ You may not remove or change this notice.
//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
//\ Contributors are listed on the homepage.
//\ See http://www.bosrup.com/web/overlib/ for details.
//\/////
////////
// PRE-INIT
// Ignore these lines, configuration is below.
////////
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.14)) alert('overLIB 4.14 or later is required for the Draggable Plugin.');
else {
registerCommands('draggable,altcut,dragimg');
////////
// DEFAULT CONFIGURATION
// Settings you want everywhere are set here. All of this can also be
// changed on your html page or through an overLIB call.
////////
if (typeof ol_draggable=='undefined') var ol_draggable=0;
if (typeof ol_altcut=='undefined') var ol_altcut=0;
if (typeof ol_dragimg=='undefined') var ol_dragimg='';
////////
// END OF CONFIGURATION
// Don't change anything below this line, all configuration is above.
////////
////////
// INIT
////////
// Runtime variables init. Don't change for config!
var o3_draggable=0;
var o3_altcut=0;
var o3_dragimg='';
var olImgLeft,olImgTop;
var olImgObj;
var olMseMv; // hold old mouseMove routine
////////
// PLUGIN FUNCTIONS
////////
function setDragVariables() {
o3_draggable=ol_draggable;
o3_altcut=ol_altcut;
o3_dragimg=ol_dragimg;
olImgObj=null;
}
// Parses Draggable commands
function parseDragExtras(pf,i,ar) {
var k=i;
if (k < ar.length) {
if (ar[k]==DRAGGABLE) { eval(pf+'draggable=('+pf+'draggable==0) ? 1 : 0'); return k; }
if (ar[k]==ALTCUT) { eval(pf+'altcut=('+pf+'altcut==0) ? 1 : 0'); return k; }
if (ar[k]==DRAGIMG) { eval(pf+'dragimg="'+ar[++k]+'"'); return k; }
}
return -1;
}
//////
// PRESHOW PROCESSING FOR DRAGGABLE POPUPS
//////
function startDrag() {
// Initiate dragging if in same frame and its a sticky
if (o3_draggable) {
if (o3_sticky&&(o3_frame==ol_frame)) initDrag();
else o3_draggable=0;
}
}
//////
// POSTHIDE PROCESSING FOR DRAGGABLE POPUPS
//////
function stopDrag() {
if (o3_draggable) endDrag();
}
//////
// DRAGGABLE FUNCTIONS
//////
function initDrag() {
olMseMv=capExtent.onmousemove;
if(olNs4) {
document.captureEvents(Event.MOUSEDOWN | Event.CLICK);
document.onmousedown=grabEl;
document.onclick=function(e) {return routeEvent(e);}
} else {
over.onmousedown=grabEl;
}
if (o3_dragimg) chkForImgSupport(o3_dragimg);
return true;
}
// Checks for image for dragging
function chkForImgSupport(dragImg) {
if (dragImg) {
if (typeof getAnchorObjRef!='undefined') olImgObj=getAnchorObjRef(dragImg);
if (olImgObj==null) o3_dragimg='';
}
}
// Sets cursor symbol
function setCursor(on) {
if (olNs4) return;
over.style.cursor=(on ? 'move' : 'auto');
}
// Checks cursor position relative to image
function chkCursorPosition(Obj,XPos,YPos) {
if (Obj) {
o3_anchorx=o3_anchory=0;
o3_anchoralign='UL';
getAnchorLocation(Obj);
if (XPos < olImgLeft||XPos > (olImgLeft+Obj.width)||YPos < olImgTop||YPos > (olImgTop+Obj.height)) return false;
}
return true;
}
// Sets up mouse grab for moving
function grabEl(e) {
var e=(e) ? e : event;
var X,Y;
var cKy=(olNs4 ? e.modifiers & Event.ALT_MASK : (!olOp ? e.altKey : e.ctrlKey));
if ((o3_altcut ? !cKy : cKy)) {
// get mouse's current x,y location
X=(e.pageX || eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft'));
Y=(e.pageY || eval('e.clientY+o3_frame.'+docRoot+'.scrollTop'));
if (chkCursorPosition(olImgObj,X,Y)) {
if (olNs4) document.captureEvents(Event.MOUSEUP);
capExtent.onmousemove=moveEl;
document.onmouseup=function() {setCursor(0); if (olIe4) over.onselectstart=null; capExtent.onmousemove=olMseMv;}
setCursor(1);
if (olIe4) over.onselectstart=function() {return false;}
if (olNs4) {
cX=X
cY=Y
} else {
// get offsets from upper left hand corner of popup to keep popup from jummping
// when first starting to drag
cX=X-(olNs4 ? over.left : parseInt(over.style.left));
cY=Y-(olNs4 ? over.top : parseInt(over.style.top));
}
return (olNs4 ? routeEvent(e) : false);
}
} else setCursor(0);
}
// Moves popup to follow mouse
function moveEl(e) {
var e=(e) ? e : event;
var dX,dY,X,Y;
// get new mouse location
X=(e.pageX || eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft'));
Y=(e.pageY || eval('e.clientY+o3_frame.'+docRoot+'.scrollTop'));
if (chkCursorPosition(olImgObj,X,Y)){
if (olNs4) {
dX=X-cX; cX=X;
dY=Y-cY; cY=Y;
over.moveBy(dX,dY);
} else
repositionTo(over,X-cX,Y-cY); // move popup to that position
}
}
// Cleanup for Drag end
function endDrag(obj) {
if (olNs4) {
document.releaseEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK);
document.onmousedown=document.onclick=null;
} else {
if(!obj) obj=over;
obj.onmousedown=null;
}
document.onmouseup= null;
}
////////
// PLUGIN REGISTRATIONS
////////
registerRunTimeFunction(setDragVariables);
registerCmdLineFunction(parseDragExtras);
registerHook("disp",startDrag,FBEFORE);
registerHook("hideObject",stopDrag,FAFTER);
if (olInfo.meets(4.14)) registerNoParameterCommands('draggable,altcut');
}
//end
//\/////
//\ overLIB Draggable Plugin
//\
//\ You may not remove or change this notice.
//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
//\ Contributors are listed on the homepage.
//\ See http://www.bosrup.com/web/overlib/ for details.
//\/////
////////
// PRE-INIT
// Ignore these lines, configuration is below.
////////
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.14)) alert('overLIB 4.14 or later is required for the Draggable Plugin.');
else {
registerCommands('draggable,altcut,dragimg');
////////
// DEFAULT CONFIGURATION
// Settings you want everywhere are set here. All of this can also be
// changed on your html page or through an overLIB call.
////////
if (typeof ol_draggable=='undefined') var ol_draggable=0;
if (typeof ol_altcut=='undefined') var ol_altcut=0;
if (typeof ol_dragimg=='undefined') var ol_dragimg='';
////////
// END OF CONFIGURATION
// Don't change anything below this line, all configuration is above.
////////
////////
// INIT
////////
// Runtime variables init. Don't change for config!
var o3_draggable=0;
var o3_altcut=0;
var o3_dragimg='';
var olImgLeft,olImgTop;
var olImgObj;
var olMseMv; // hold old mouseMove routine
////////
// PLUGIN FUNCTIONS
////////
function setDragVariables() {
o3_draggable=ol_draggable;
o3_altcut=ol_altcut;
o3_dragimg=ol_dragimg;
olImgObj=null;
}
// Parses Draggable commands
function parseDragExtras(pf,i,ar) {
var k=i;
if (k < ar.length) {
if (ar[k]==DRAGGABLE) { eval(pf+'draggable=('+pf+'draggable==0) ? 1 : 0'); return k; }
if (ar[k]==ALTCUT) { eval(pf+'altcut=('+pf+'altcut==0) ? 1 : 0'); return k; }
if (ar[k]==DRAGIMG) { eval(pf+'dragimg="'+ar[++k]+'"'); return k; }
}
return -1;
}
//////
// PRESHOW PROCESSING FOR DRAGGABLE POPUPS
//////
function startDrag() {
// Initiate dragging if in same frame and its a sticky
if (o3_draggable) {
if (o3_sticky&&(o3_frame==ol_frame)) initDrag();
else o3_draggable=0;
}
}
//////
// POSTHIDE PROCESSING FOR DRAGGABLE POPUPS
//////
function stopDrag() {
if (o3_draggable) endDrag();
}
//////
// DRAGGABLE FUNCTIONS
//////
function initDrag() {
olMseMv=capExtent.onmousemove;
if(olNs4) {
document.captureEvents(Event.MOUSEDOWN | Event.CLICK);
document.onmousedown=grabEl;
document.onclick=function(e) {return routeEvent(e);}
} else {
over.onmousedown=grabEl;
}
if (o3_dragimg) chkForImgSupport(o3_dragimg);
return true;
}
// Checks for image for dragging
function chkForImgSupport(dragImg) {
if (dragImg) {
if (typeof getAnchorObjRef!='undefined') olImgObj=getAnchorObjRef(dragImg);
if (olImgObj==null) o3_dragimg='';
}
}
// Sets cursor symbol
function setCursor(on) {
if (olNs4) return;
over.style.cursor=(on ? 'move' : 'auto');
}
// Checks cursor position relative to image
function chkCursorPosition(Obj,XPos,YPos) {
if (Obj) {
o3_anchorx=o3_anchory=0;
o3_anchoralign='UL';
getAnchorLocation(Obj);
if (XPos < olImgLeft||XPos > (olImgLeft+Obj.width)||YPos < olImgTop||YPos > (olImgTop+Obj.height)) return false;
}
return true;
}
// Sets up mouse grab for moving
function grabEl(e) {
var e=(e) ? e : event;
var X,Y;
var cKy=(olNs4 ? e.modifiers & Event.ALT_MASK : (!olOp ? e.altKey : e.ctrlKey));
if ((o3_altcut ? !cKy : cKy)) {
// get mouse's current x,y location
X=(e.pageX || eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft'));
Y=(e.pageY || eval('e.clientY+o3_frame.'+docRoot+'.scrollTop'));
if (chkCursorPosition(olImgObj,X,Y)) {
if (olNs4) document.captureEvents(Event.MOUSEUP);
capExtent.onmousemove=moveEl;
document.onmouseup=function() {setCursor(0); if (olIe4) over.onselectstart=null; capExtent.onmousemove=olMseMv;}
setCursor(1);
if (olIe4) over.onselectstart=function() {return false;}
if (olNs4) {
cX=X
cY=Y
} else {
// get offsets from upper left hand corner of popup to keep popup from jummping
// when first starting to drag
cX=X-(olNs4 ? over.left : parseInt(over.style.left));
cY=Y-(olNs4 ? over.top : parseInt(over.style.top));
}
return (olNs4 ? routeEvent(e) : false);
}
} else setCursor(0);
}
// Moves popup to follow mouse
function moveEl(e) {
var e=(e) ? e : event;
var dX,dY,X,Y;
// get new mouse location
X=(e.pageX || eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft'));
Y=(e.pageY || eval('e.clientY+o3_frame.'+docRoot+'.scrollTop'));
if (chkCursorPosition(olImgObj,X,Y)){
if (olNs4) {
dX=X-cX; cX=X;
dY=Y-cY; cY=Y;
over.moveBy(dX,dY);
} else
repositionTo(over,X-cX,Y-cY); // move popup to that position
}
}
// Cleanup for Drag end
function endDrag(obj) {
if (olNs4) {
document.releaseEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK);
document.onmousedown=document.onclick=null;
} else {
if(!obj) obj=over;
obj.onmousedown=null;
}
document.onmouseup= null;
}
////////
// PLUGIN REGISTRATIONS
////////
registerRunTimeFunction(setDragVariables);
registerCmdLineFunction(parseDragExtras);
registerHook("disp",startDrag,FBEFORE);
registerHook("hideObject",stopDrag,FAFTER);
if (olInfo.meets(4.14)) registerNoParameterCommands('draggable,altcut');
}
//end

@ -1,11 +1,11 @@
//\/////
//\ overLIB Draggable Plugin
//\
//\ You may not remove or change this notice.
//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
//\ Contributors are listed on the homepage.
//\ See http://www.bosrup.com/web/overlib/ for details.
//\/////
//\/////
//\ overLIB Draggable Plugin
//\
//\ You may not remove or change this notice.
//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
//\ Contributors are listed on the homepage.
//\ See http://www.bosrup.com/web/overlib/ for details.
//\/////
if(typeof olInfo=='undefined'||typeof olInfo.meets=='undefined'||!olInfo.meets(4.14))alert('overLIB 4.14 or later is required for the Draggable Plugin.');else{registerCommands('draggable,altcut,dragimg');
if(typeof ol_draggable=='undefined')var ol_draggable=0;if(typeof ol_altcut=='undefined')var ol_altcut=0;if(typeof ol_dragimg=='undefined')var ol_dragimg='';
var o3_draggable=0,o3_altcut=0,o3_dragimg='',olImgLeft,olImgTop,olImgObj,olMseMv;

@ -1,20 +1,20 @@
//\/////
//\ overLIB 4.21 - You may not remove or change this notice.
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
//\
//\ Contributors are listed on the homepage.
//\ This file might be old, always check for the latest version at:
//\ http://www.bosrup.com/web/overlib/
//\
//\ Please read the license agreement (available through the link above)
//\ before using overLIB. Direct any licensing questions to erik@bosrup.com.
//\
//\ Do not sell this as your own work or remove this copyright notice.
//\ For full details on copying or changing this script please read the
//\ license agreement at the link above. Please give credit on sites that
//\ use overLIB and submit changes of the script so other people can use
//\ them as well.
//\/////
//\/////
//\ overLIB 4.21 - You may not remove or change this notice.
//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
//\
//\ Contributors are listed on the homepage.
//\ This file might be old, always check for the latest version at:
//\ http://www.bosrup.com/web/overlib/
//\
//\ Please read the license agreement (available through the link above)
//\ before using overLIB. Direct any licensing questions to erik@bosrup.com.
//\
//\ Do not sell this as your own work or remove this copyright notice.
//\ For full details on copying or changing this script please read the
//\ license agreement at the link above. Please give credit on sites that
//\ use overLIB and submit changes of the script so other people can use
//\ them as well.
//\/////
//\ THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
var olLoaded=0,pmStart=10000000,pmUpper=10001000,pmCount=pmStart+1,pmt='',pms=new Array(),olInfo=new Info('4.21',1),FREPLACE=0,FBEFORE=1,FAFTER=2,FALTERNATE=3,FCHAIN=4,olHideForm=0,olHautoFlag=0,olVautoFlag=0,hookPts=new Array(),postParse=new Array(),cmdLine=new Array(),runTime=new Array();
registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass');

@ -1,139 +1,139 @@
.box-content {
background: white;
}
.box-header {
background-color: white;
}
.top-block {
background-color: white;
border-radius: 5px;
}
.row-fluid [class*="span"] {
min-height: 28px;
}
.login-header
{
height:190px;
}
.brand img
{
height:100%;
margin-bottom:-18px;
margin-top:-15px;
width:auto;
}
#for-is-ajax
{
display:none;
}
.navbar {
border-bottom: 0px;
}
.flags {
display: block;
position:relative;
left:290px;
top:28px;
}
.flags_no_visible_elements{
display: block;
position:relative;
left:67%;
top:210px;
}
.input-prepend .add-on,
.input-append .add-on {
height: auto;
}
select,
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"],
.uneditable-input {
height: auto;
}
.btn .caret {
margin: 10px;
}
.btn .caret {
border-top-color: #333;
}
.table-bordered {
border-collapse: collapse;
}
.table {
margin-top: 10px;
}
.nav {
margin-bottom: 22px;
}
.radio, .checkbox {
display: table-row-group;
}
.gender-list {
margin-left: 22px;
}
.lg-icon {
font-size: 20px;
margin: 5px;
}
.sidebar-nav {
padding-top: 5px;
}
.sidebar-nav .nav-header{
color:#666;
}
.flags_logged_in{
display: inline;
position:absolute;
margin:7px;
}
.setup-width {
width:75%;
}
.js-masonry {
padding-left: -1;
padding-right: -1;
margin-left: -1;
margin-right: -1;
}
.col-sm-4 {
width: 33.333%;
.box-content {
background: white;
}
.box-header {
background-color: white;
}
.top-block {
background-color: white;
border-radius: 5px;
}
.row-fluid [class*="span"] {
min-height: 28px;
}
.login-header
{
height:190px;
}
.brand img
{
height:100%;
margin-bottom:-18px;
margin-top:-15px;
width:auto;
}
#for-is-ajax
{
display:none;
}
.navbar {
border-bottom: 0px;
}
.flags {
display: block;
position:relative;
left:290px;
top:28px;
}
.flags_no_visible_elements{
display: block;
position:relative;
left:67%;
top:210px;
}
.input-prepend .add-on,
.input-append .add-on {
height: auto;
}
select,
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"],
.uneditable-input {
height: auto;
}
.btn .caret {
margin: 10px;
}
.btn .caret {
border-top-color: #333;
}
.table-bordered {
border-collapse: collapse;
}
.table {
margin-top: 10px;
}
.nav {
margin-bottom: 22px;
}
.radio, .checkbox {
display: table-row-group;
}
.gender-list {
margin-left: 22px;
}
.lg-icon {
font-size: 20px;
margin: 5px;
}
.sidebar-nav {
padding-top: 5px;
}
.sidebar-nav .nav-header{
color:#666;
}
.flags_logged_in{
display: inline;
position:absolute;
margin:7px;
}
.setup-width {
width:75%;
}
.js-masonry {
padding-left: -1;
padding-right: -1;
margin-left: -1;
margin-right: -1;
}
.col-sm-4 {
width: 33.333%;
}

@ -1,92 +1,92 @@
/*
Uploadify
Copyright (c) 2012 Reactive Apps, Ronnie Garcia
Released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
.uploadify {
position: relative;
margin-bottom: 1em;
}
.uploadify-button {
background-color: #505050;
background-image: linear-gradient(bottom, #505050 0%, #707070 100%);
background-image: -o-linear-gradient(bottom, #505050 0%, #707070 100%);
background-image: -moz-linear-gradient(bottom, #505050 0%, #707070 100%);
background-image: -webkit-linear-gradient(bottom, #505050 0%, #707070 100%);
background-image: -ms-linear-gradient(bottom, #505050 0%, #707070 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, #505050),
color-stop(1, #707070)
);
background-position: center top;
background-repeat: no-repeat;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
border: 2px solid #808080;
color: #FFF;
font: bold 12px Arial, Helvetica, sans-serif;
text-align: center;
text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
width: 100%;
}
.uploadify:hover .uploadify-button {
background-color: #606060;
background-image: linear-gradient(top, #606060 0%, #808080 100%);
background-image: -o-linear-gradient(top, #606060 0%, #808080 100%);
background-image: -moz-linear-gradient(top, #606060 0%, #808080 100%);
background-image: -webkit-linear-gradient(top, #606060 0%, #808080 100%);
background-image: -ms-linear-gradient(top, #606060 0%, #808080 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, #606060),
color-stop(1, #808080)
);
background-position: center bottom;
}
.uploadify-button.disabled {
background-color: #D0D0D0;
color: #808080;
}
.uploadify-queue {
margin-bottom: 1em;
}
.uploadify-queue-item {
background-color: #F5F5F5;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
font: 11px Verdana, Geneva, sans-serif;
margin-top: 5px;
max-width: 350px;
padding: 10px;
}
.uploadify-error {
background-color: #FDE5DD !important;
}
.uploadify-queue-item .cancel a {
background: url('../img/uploadify-cancel.png') 0 0 no-repeat;
float: right;
height: 16px;
text-indent: -9999px;
width: 16px;
}
.uploadify-queue-item.completed {
background-color: #E5E5E5;
}
.uploadify-progress {
background-color: #E5E5E5;
margin-top: 10px;
width: 100%;
}
.uploadify-progress-bar {
background-color: #0099FF;
height: 3px;
width: 1px;
/*
Uploadify
Copyright (c) 2012 Reactive Apps, Ronnie Garcia
Released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
.uploadify {
position: relative;
margin-bottom: 1em;
}
.uploadify-button {
background-color: #505050;
background-image: linear-gradient(bottom, #505050 0%, #707070 100%);
background-image: -o-linear-gradient(bottom, #505050 0%, #707070 100%);
background-image: -moz-linear-gradient(bottom, #505050 0%, #707070 100%);
background-image: -webkit-linear-gradient(bottom, #505050 0%, #707070 100%);
background-image: -ms-linear-gradient(bottom, #505050 0%, #707070 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, #505050),
color-stop(1, #707070)
);
background-position: center top;
background-repeat: no-repeat;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
border: 2px solid #808080;
color: #FFF;
font: bold 12px Arial, Helvetica, sans-serif;
text-align: center;
text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
width: 100%;
}
.uploadify:hover .uploadify-button {
background-color: #606060;
background-image: linear-gradient(top, #606060 0%, #808080 100%);
background-image: -o-linear-gradient(top, #606060 0%, #808080 100%);
background-image: -moz-linear-gradient(top, #606060 0%, #808080 100%);
background-image: -webkit-linear-gradient(top, #606060 0%, #808080 100%);
background-image: -ms-linear-gradient(top, #606060 0%, #808080 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, #606060),
color-stop(1, #808080)
);
background-position: center bottom;
}
.uploadify-button.disabled {
background-color: #D0D0D0;
color: #808080;
}
.uploadify-queue {
margin-bottom: 1em;
}
.uploadify-queue-item {
background-color: #F5F5F5;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
font: 11px Verdana, Geneva, sans-serif;
margin-top: 5px;
max-width: 350px;
padding: 10px;
}
.uploadify-error {
background-color: #FDE5DD !important;
}
.uploadify-queue-item .cancel a {
background: url('../img/uploadify-cancel.png') 0 0 no-repeat;
float: right;
height: 16px;
text-indent: -9999px;
width: 16px;
}
.uploadify-queue-item.completed {
background-color: #E5E5E5;
}
.uploadify-progress {
background-color: #E5E5E5;
margin-top: 10px;
width: 100%;
}
.uploadify-progress-bar {
background-color: #0099FF;
height: 3px;
width: 1px;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save