Merge branch 'master' into qteditor

qteditor
Sven Eberhardt 2016-06-24 18:23:34 -04:00
commit 62d3817d6a
29 changed files with 224 additions and 31 deletions

3
.gitignore vendored
View File

@ -29,6 +29,7 @@ CPackSourceConfig.cmake
editor-icons.h
oc-icon.h
NativeToolsExport.cmake
engine-resource.c
# Documentation
*.pyc
@ -137,4 +138,4 @@ tests/openclonk_unittest.sln
moc_*.cpp
qrc_resource.cpp
ui_C4ConsoleQt*.h
resource.qrc.depends
resource.qrc.depends

View File

@ -1347,10 +1347,11 @@ if (APPLE)
endif()
add_custom_command(TARGET openclonk
POST_BUILD COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tools/osx_bundle_libs"
POST_BUILD COMMAND
"${CMAKE_CURRENT_SOURCE_DIR}/tools/osx_bundle_libs"
"$<$<BOOL:${CMAKE_SYSROOT}>:--sysroot=${CMAKE_SYSROOT}>"
"$<TARGET_FILE:openclonk>"
)
endif()
############################################################################

View File

@ -19,11 +19,8 @@
# Use pkg-config if possible instead of doing guesswork like the default CMake module does
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND AND NOT APPLE)
if(PKG_CONFIG_FOUND)
set(_ft_pkgconfig_args "")
if(FREETYPE_FIND_REQUIRED)
set(_ft_pkgconfig_args "${_ft_pkgconfig_args}REQUIRED ")
endif()
if(FREETYPE_FIND_QUIET)
set(_ft_pkgconfig_args "${_ft_pkgconfig_args}QUIET ")
endif()

View File

@ -0,0 +1,7 @@
[DefCore]
id=EnvPack_Guidepost2
Category=C4D_StaticBack
Width=10
Height=30
Offset=-5,-15
StretchGrowth=1

View File

@ -0,0 +1,28 @@
material EnvPack_Guidepost2: NormalMap
{
receive_shadows on
technique
{
pass
{
scene_blend alpha_blend
ambient 1.000000 1.000000 1.000000 1.000000
diffuse 0.800000 0.799920 0.799920 1.000000
specular 0.000000 0.000000 0.000000 1.000000 2.250000
emissive 0.000000 0.000000 0.000000 1.000000
texture_unit base
{
texture guidepost2.png
tex_address_mode wrap
filtering trilinear
}
texture_unit normal
{
texture guidepost_normal.png
tex_address_mode wrap
filtering trilinear
}
}
}
}

View File

@ -0,0 +1,8 @@
/**
@author Nachtfalter
*/
protected func Construction()
{
SetProperty("MeshTransformation", Trans_Mul(Trans_Rotate(RandomX(-180,180),0,10), Trans_Scale(130)));
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

View File

@ -362,8 +362,17 @@ private func TryToCollect(object item)
var x = item->GetX();
var y = item->GetY();
var name = item->GetName();
// Try to collect the item.
Collect(item);
// When pushing a lorry, try to directly collect it into the lorry first.
var vehicle = GetActionTarget();
if (vehicle && vehicle->~IsContainer() && GetProcedure() == "PUSH")
{
vehicle->Collect(item);
}
// Otherwise, try to collect the item myself.
if (item && !item->Contained())
Collect(item);
// If anything happened, assume collection.
if (!item || item->Contained())

View File

@ -1,14 +1,21 @@
material FernGreen
material Sprout
{
receive_shadows on
technique
{
pass
{
ambient 0.500000 0.500000 0.500000 1.000000
diffuse 0.000000 0.400000 0.000000 1.000000
specular 0.100000 0.100000 0.100000 1.000000 12.500000
emissive 0.000000 0.000000 0.000000 1.000000
}
}
receive_shadows on
technique
{
pass
{
ambient 1.0 1.0 1.0 1.0
diffuse 0.800000011920929 0.800000011920929 0.800000011920929 1.0
specular 0.5 0.5 0.5 1.0 12.5
emissive 0.0 0.0 0.0 1.0
texture_unit
{
texture Sprout.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -2,12 +2,12 @@
id=Tree_Coniferous3_Burned
Version=6,0
Category=C4D_StaticBack
Width=38
Height=100
Offset=-19,-50
Width=27
Height=73
Offset=-14,-37
Vertices=9
VertexX=0,0,0,0,0,0,0,0,0
VertexY=53,30,20,10,0,-10,-20,-30,-49
VertexY=40,25,20,10,0,-10,-20,-25,-36
VertexCNAT=8,16,16,16,16,16,16,16,4
VertexFriction=50,50,25,25,25,25,50,50,50
Mass=80

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,17 @@
[DefCore]
id=Tree_Coniferous4_Burned
Version=8,0
Category=C4D_StaticBack
Width=34
Height=80
Offset=-17,-40
Vertices=9
VertexX=0,0,0,0,0,0,0,0,0
VertexY=40,25,20,10,0,-10,-20,-25,-36
VertexCNAT=8,16,16,16,16,16,16,16,4
VertexFriction=50,50,25,25,25,25,50,50,50
Mass=80
StretchGrowth=1
Oversize=1
Float=1
Rotate=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,15 @@
/*-- Yet Another Additional Burned Coniferous Tree --*/
#include Library_Plant
#include Library_Tree
public func IsBurnedTree()
{
return true;
}
local Name = "$Name$";
local Touchable = 0;
local BlastIncinerate = 1;
local ContactIncinerate = 3;
local Components = {Wood = 3};

View File

@ -0,0 +1,17 @@
[DefCore]
id=Tree_Coniferous4
Version=8,0
Category=C4D_StaticBack
Width=34
Height=80
Offset=-17,-40
Vertices=9
VertexX=0,0,0,0,0,0,0,0,0
VertexY=40,25,20,10,0,-10,-20,-25,-36
VertexCNAT=8,16,16,16,16,16,16,16,4
VertexFriction=50,50,25,25,25,25,50,50,50
Mass=100
StretchGrowth=1
Oversize=1
Float=1
Rotate=1

View File

@ -0,0 +1,26 @@
material Coniferous4
{
receive_shadows on
technique
{
pass
{
cull_hardware none
scene_blend alpha_blend
depth_check on
alpha_rejection greater_equal 128
ambient 1.0 1.0 1.0 1.0
diffuse 1.0 1.0 1.0 1.0
specular 0.0 0.0 0.0 1.0 12.500000
emissive 0.0 0.0 0.0 1.0
texture_unit
{
texture coniferous4.png
tex_address_mode wrap
filtering trilinear
}
}
}
}

View File

@ -0,0 +1,27 @@
/*-- Yet Another Additional Coniferous Tree --*/
#include Library_Plant
#include Library_Tree
private func SeedChance() { return 500; }
private func SeedArea() { return 400; }
private func SeedAmount() { return 10; }
local lib_tree_burned = Tree_Coniferous4_Burned;
public func GetTreetopPosition(pos)
{
return Shape->Rectangle(-10,-8, 20,10)->GetRandomPoint(pos);
}
private func Definition(def)
{
SetProperty("PictureTransformation", Trans_Mul(Trans_Translate(-25000, -8000, 22000), Trans_Rotate(40,0,0,1), Trans_Rotate(-10,1), Trans_Rotate(50,0,1)), def);
}
local Name = "$Name$";
local Touchable = 0;
local BlastIncinerate = 2;
local ContactIncinerate = 6;
local NoBurnDecay = 1;
local Components = {Wood = 3};

View File

@ -0,0 +1 @@
Name=Nadelbaum

View File

@ -0,0 +1 @@
Name=Cone tree

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

View File

@ -2,6 +2,29 @@
set -e
_sysroot="${SYSROOT}"
# Collect options from the command line
for i in "$@"; do
case "$i" in
--sysroot=*)
_sysroot="${i#*=}"
shift
;;
--)
shift
break
;;
--*)
echo "$0: Unknown option: $i" >&2
exit 1
;;
*)
break
;;
esac
done
# Grab information about the bundle from the environment (if XCode) or make
# assumptions about the bundle layout (everywhere else)
_executable_path="${EXECUTABLE_PATH:-$1}"
@ -22,9 +45,6 @@ _frameworks_folder_path="${FRAMEWORKS_FOLDER_PATH:-${_contents_folder}/Framework
_otool="${OTOOL:-otool}"
_install_name_tool="${INSTALL_NAME_TOOL:-install_name_tool}"
# This regexp should match every lib we want to bundle.
_libs_to_bundle=".*?/lib(jpeg|GLEW|llvm|SDL|SDL_mixer|freetype|ogg|vorbis|vorbisfile|z\.|png[0-9]*|alut)\.[^ ]+\.dylib"
if [ -n "${TARGET_BUILD_DIR}" ]; then
cd "${TARGET_BUILD_DIR}"
fi
@ -34,15 +54,24 @@ echo "Bundling libraries..."
bundle_dependencies() {
_object_path="$1"
"${_otool}" -L "${_object_path}" | \
grep -Eo -- "${_libs_to_bundle}" | \
awk '/^\t+\// { print $1 }' | \
grep -v '@executable_path.*' | \
while read _library_name; do
_library_path="${_library_name}"
# If the library isn't available at the stored path, it may be
# stored inside the sysroot (when cross-compiling for example)
if [ ! -e "${_library_path}" -a -n "${SYSROOT}" ]; then
_library_path="${SYSROOT}${_library_path}"
if [ ! -e "${_library_path}" -a -n "${_sysroot}" ]; then
_library_path="${_sysroot}${_library_path}"
fi
# If the library still isn't available there, there might be a YAML
# stub instead in more recent SDKs; if we find one of those, the
# library is part of the base install and doesn't need to be bundled
_stub_path="${_library_path%.dylib}.tbd"
if [ ! -e "${_library_path}" -a -e "${_stub_path}" ]; then
continue
fi
# Stop bundling if a lib doesn't exist
if [ ! -e "${_library_path}" ]; then
echo "Cannot find ${_library_name}." >&2