Merge branch 'master' into heavy-resources

heavy-resources
Clonkonaut 2014-03-30 22:24:00 +02:00
commit a6bb804350
165 changed files with 1992 additions and 1441 deletions

View File

@ -1,6 +1,6 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2009-2013, The OpenClonk Team and contributors
# Copyright (c) 2009-2014, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
@ -99,6 +99,12 @@ set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
CHECK_CXX_SOURCE_COMPILES("#include <regex>\nint main() { std::cregex_iterator ri; }" HAVE_WORKING_REGEX)
CMAKE_DEPENDENT_OPTION(USE_BOOST_REGEX "Use Boost.Regex even if the C++ runtime has a working implementation of <regex>" OFF "HAVE_WORKING_REGEX" ON)
# We link Boost statically because that makes it easier for us to distribute
# the resulting binary. Distributions have the ability to guarantee a certain
# version of the library exists on the system though, so they may prefer
# dynamic linking.
option(USE_STATIC_BOOST "Link Boost libraries statically" ON)
if(MSVC_VERSION GREATER 1499)
list(APPEND OC_CXX_FLAGS /MP)
list(REMOVE_ITEM OC_CXX_FLAGS_DEBUG /Gm)
@ -780,11 +786,12 @@ if(HAVE_ICONV)
SET(ICONV_CONST ON)
endif()
include(CheckFunctionExists)
CHECK_FUNCTION_EXISTS(vasprintf HAVE_VASPRINTF)
include(CheckSymbolExists)
CHECK_SYMBOL_EXISTS(vasprintf stdio.h HAVE_VASPRINTF)
CHECK_SYMBOL_EXISTS(__mingw_vasprintf stdio.h HAVE___MINGW_VASPRINTF)
if(HAVE_ICONV)
CHECK_FUNCTION_EXISTS(iconv HAVE_ICONV_WO_LINK)
CHECK_SYMBOL_EXISTS(iconv iconv.h HAVE_ICONV_WO_LINK)
mark_as_advanced(HAVE_ICONV_WO_LINK)
if(NOT HAVE_ICONV_WO_LINK)
@ -843,8 +850,13 @@ if(NOT WIN32)
endif()
if(NOT USE_CONSOLE)
find_package(Freetype REQUIRED)
include_directories(${FREETYPE_INCLUDE_DIRS})
if(APPLE)
include(LegacyFindFreetype)
include_directories(${FREETYPE_INCLUDE_DIRS})
else()
find_package(Freetype REQUIRED)
include_directories(${FREETYPE_INCLUDE_DIRS})
endif()
endif()
# FINDLIB works the same as find_library, but also marks the resulting var as
@ -922,14 +934,9 @@ endif()
if(APPLE)
list(APPEND OC_BUNDLE_RESOURCES
src/res/Clonk.icns
src/res/oc.icns
src/res/ocd.icns src/res/ocf.icns src/res/ocg.icns
src/res/C4P.icns src/res/ocs.icns src/res/ocu.icns
src/res/MainMenu.xib
src/res/FullScreen.xib
src/res/EditorGUIWindow.xib
src/res/EditorViewport.xib
src/res/Editor.xib
src/res/Mouse_Trans.png
src/res/Cursor_Trans.png
src/res/Brush_Trans.png
@ -945,6 +952,24 @@ if(APPLE)
src/res/Ift_Trans.png
src/res/NoIft_Trans.png
)
if (CMAKE_GENERATOR STREQUAL Xcode)
list(APPEND OC_BUNDLE_RESOURCES
src/res/MainMenu.xib
src/res/FullScreen.xib
src/res/EditorGUIWindow.xib
src/res/EditorViewport.xib
src/res/Editor.xib
)
else()
list(APPEND OC_BUNDLE_RESOURCES
src/res/nib/MainMenu.nib
src/res/nib/FullScreen.nib
src/res/nib/EditorGUIWindow.nib
src/res/nib/EditorViewport.nib
src/res/nib/Editor.nib
)
endif()
# Add icon resources
set_source_files_properties(
@ -1222,54 +1247,41 @@ foreach(FLAG ${OC_EXE_LINKER_FLAGS_DEBUG})
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${FLAG}" CACHE STRING "Flags used by the linker during debug builds." FORCE)
endforeach()
############################################################################
# Precompiled header support, gcc part (it needs the cxx flags)
############################################################################
if(CMAKE_COMPILER_IS_GNUCXX)
include(GccPchSupport)
option(USE_GCC_PCH "Use GCC precompiled headers" ON)
endif()
if(USE_GCC_PCH)
add_precompiled_header(libmisc src/C4Include.h)
add_precompiled_header(libc4script src/C4Include.h)
add_precompiled_header(openclonk src/C4Include.h)
endif()
############################################################################
# Some Xcode/OSX specific settings involving building with clang, precompiled headers...
############################################################################
if (APPLE)
add_custom_command(TARGET openclonk
POST_BUILD COMMAND "/usr/bin/ruby" "${CMAKE_CURRENT_SOURCE_DIR}/tools/osx_bundle_libs"
)
set(CMAKE_XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES)
set(CMAKE_XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/C4Include.h")
SET_TARGET_PROPERTIES(openclonk PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES)
SET_TARGET_PROPERTIES(openclonk PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++ objective-c++")
SET_TARGET_PROPERTIES(openclonk PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/C4Include.h")
SET_TARGET_PROPERTIES(c4group PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES)
SET_TARGET_PROPERTIES(c4group PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++ objective-c++")
SET_TARGET_PROPERTIES(c4group PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/C4Include.h")
SET_TARGET_PROPERTIES(libmisc PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES)
SET_TARGET_PROPERTIES(libmisc PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++ objective-c++")
SET_TARGET_PROPERTIES(libmisc PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/C4Include.h")
SET_TARGET_PROPERTIES(openclonk PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
if (USE_APPLE_CLANG)
# for good measure - seems to be part of default OSX installation
# linking with static freetype library requires it
target_link_libraries(openclonk "/usr/lib/libbz2.dylib")
set(HAVE_RVALUE_REF ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++0x -g -Wall -fobjc-arc")
if(CMAKE_GENERATOR STREQUAL Xcode)
add_custom_command(TARGET openclonk
POST_BUILD COMMAND "/usr/bin/ruby" "${CMAKE_CURRENT_SOURCE_DIR}/tools/osx_bundle_libs"
)
set(CMAKE_XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES)
set(CMAKE_XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/C4Include.h")
set_target_properties(openclonk PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES)
set_target_properties(openclonk PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++ objective-c++")
set_target_properties(openclonk PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/C4Include.h")
set_target_properties(c4group PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES)
set_target_properties(c4group PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++ objective-c++")
set_target_properties(c4group PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/C4Include.h")
set_target_properties(libmisc PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES)
set_target_properties(libmisc PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++ objective-c++")
set_target_properties(libmisc PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/C4Include.h")
set_target_properties(openclonk PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++0x")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++0x -stdlib=libc++ -g -Wall")
SET_TARGET_PROPERTIES(c4group PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++0x objective-c++0x")
SET_TARGET_PROPERTIES(openclonk PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++0x objective-c++0x")
set(HAVE_RVALUE_REF ON)
else()
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
set_target_properties(c4group PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++0x objective-c++0x")
set_target_properties(openclonk PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++0x objective-c++0x")
endif()
endif()
@ -1400,7 +1412,7 @@ if(HAVE_UPNP)
endif()
if(USE_BOOST_REGEX)
SET(Boost_USE_STATIC_LIBS ON)
SET(Boost_USE_STATIC_LIBS ${USE_STATIC_BOOST})
find_package(Boost 1.40.0 REQUIRED COMPONENTS regex)
# Disable automatic linking, we'll do it ourselves
add_definitions(-DBOOST_REGEX_NO_LIB)
@ -1420,6 +1432,20 @@ if(MSVC_VERSION EQUAL 1600)
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln" "\n# reload me\n")
endif()
############################################################################
# Precompiled header support, gcc part (it needs the cxx flags)
############################################################################
if(CMAKE_COMPILER_IS_GNUCXX)
include(GccPchSupport)
option(USE_GCC_PCH "Use GCC precompiled headers" ON)
endif()
if(USE_GCC_PCH)
add_precompiled_header(libmisc src/C4Include.h)
add_precompiled_header(libc4script src/C4Include.h)
add_precompiled_header(openclonk src/C4Include.h)
endif()
############################################################################
# installation
############################################################################
@ -1439,38 +1465,44 @@ install(
)"
)
add_custom_target(icon32 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc32.png)
add_custom_target(icon64 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc64.png)
add_custom_target(icon128 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc128.png)
add_custom_target(icon256 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc256.png)
add_custom_target(icon512 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc512.png)
add_dependencies(data icon32 icon64 icon128 icon256 icon512)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc32.png
DESTINATION share/icons/hicolor/32x32/apps
RENAME openclonk.png
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc64.png
DESTINATION share/icons/hicolor/64x64/apps
RENAME openclonk.png
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc128.png
DESTINATION share/icons/hicolor/128x128/apps
RENAME openclonk.png
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc256.png
DESTINATION share/icons/hicolor/256x256/apps
RENAME openclonk.png
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc512.png
DESTINATION share/icons/hicolor/512x512/apps
RENAME openclonk.png
)
if (NOT APPLE)
add_custom_target(icon32 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc32.png)
add_custom_target(icon64 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc64.png)
add_custom_target(icon128 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc128.png)
add_custom_target(icon256 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc256.png)
add_custom_target(icon512 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc512.png)
add_dependencies(data icon32 icon64 icon128 icon256 icon512)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc32.png
DESTINATION share/icons/hicolor/32x32/apps
RENAME openclonk.png
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc64.png
DESTINATION share/icons/hicolor/64x64/apps
RENAME openclonk.png
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc128.png
DESTINATION share/icons/hicolor/128x128/apps
RENAME openclonk.png
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc256.png
DESTINATION share/icons/hicolor/256x256/apps
RENAME openclonk.png
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc512.png
DESTINATION share/icons/hicolor/512x512/apps
RENAME openclonk.png
)
endif()
# NOTE: The scripts that does the autobuilds and ultimately the automated
# releases as well do keep their own list of group files around currently.
# So if you change anything here, change it in the release scripts as well.
# See openclonk-release-scripts.git/groupcontent.py
set(OC_C4GROUPS
Graphics.ocg
Material.ocg
@ -1489,12 +1521,23 @@ get_target_property(C4GROUP_LOCATION c4group LOCATION)
get_target_property(CLONK_LOCATION openclonk LOCATION)
foreach(group ${OC_C4GROUPS})
if (APPLE)
add_custom_command(TARGET openclonk
POST_BUILD COMMAND "/bin/sh" "${CMAKE_CURRENT_SOURCE_DIR}/tools/osx_pack_gamedata.sh"
"${C4GROUP_LOCATION}"
"${CMAKE_CURRENT_SOURCE_DIR}/planet/${group}"
DEPENDS c4group
if (CMAKE_GENERATOR STREQUAL Xcode)
add_custom_command(TARGET openclonk
POST_BUILD COMMAND "/bin/sh" "${CMAKE_CURRENT_SOURCE_DIR}/tools/osx_pack_gamedata.sh"
"${C4GROUP_LOCATION}"
"${CMAKE_CURRENT_SOURCE_DIR}/planet/${group}"
# leave out third parameter here so the script can figure out Xcode-ish paths as usual
DEPENDS c4group
)
else()
add_custom_command(TARGET openclonk
POST_BUILD COMMAND "/bin/sh" "${CMAKE_CURRENT_SOURCE_DIR}/tools/osx_pack_gamedata.sh"
"${C4GROUP_LOCATION}"
"${CMAKE_CURRENT_SOURCE_DIR}/planet/${group}"
"${CMAKE_CURRENT_BINARY_DIR}/openclonk.app/Contents/Resources"
DEPENDS c4group
)
endif()
else()
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${group}
@ -1502,22 +1545,30 @@ foreach(group ${OC_C4GROUPS})
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/planet/${group}
DEPENDS c4group
VERBATIM
)
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${group} DESTINATION share/games/openclonk)
endif()
endforeach()
if (NOT APPLE)
add_custom_target(groups DEPENDS ${OC_C4GROUPS})
add_dependencies(data groups)
# Install new files
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/openclonk.desktop DESTINATION share/applications)
# Install binaries
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/openclonk DESTINATION games/)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/c4group DESTINATION bin/)
else()
install(TARGETS openclonk
BUNDLE DESTINATION .
)
install(TARGETS c4group c4script
RUNTIME DESTINATION .
)
endif()
# Install new files
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/openclonk.desktop DESTINATION share/applications)
# Install binaries
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/openclonk DESTINATION games/)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/c4group DESTINATION bin/)
############################################################################
# setup_openclonk.exe
############################################################################

View File

@ -11,8 +11,8 @@ SET(C4ENGINENAME "OpenClonk")
SET(C4ENGINENICK "openclonk")
SET(C4ENGINEID "${C4PROJECT_TLD}.${C4PROJECT_DOMAIN}.${C4ENGINENICK}")
SET(C4XVER1 4)
SET(C4XVER2 0)
SET(C4XVER1 5)
SET(C4XVER2 4)
SET(C4XVER3 0)
# C4VERSIONBUILDNAME should be witty and somewhat frequently changing

View File

@ -1,143 +1,42 @@
# - Locate FreeType library
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2014, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
# This module defines
# FREETYPE_LIBRARIES, the library to link against
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
# FREETYPE_INCLUDE_DIRS, where to find headers.
# FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8)
# This is the concatenation of the paths:
# FREETYPE_INCLUDE_DIR_ft2build
# FREETYPE_INCLUDE_DIR_freetype2
#
# $FREETYPE_DIR is an environment variable that would
# correspond to the ./configure --prefix=$FREETYPE_DIR
# used in building FREETYPE.
# FREETYPE_VERSION_STRING, the version of freetype found
#=============================================================================
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
# Created by Eric Wing.
# Modifications by Alexander Neundorf.
# This file has been renamed to "FindFreetype.cmake" instead of the correct
# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex.
# Modified by Nicolas Hake for the OpenClonk Project to make FindFreetype also
# look for the versioned libraries the freetype MSVC project generates.
# Ugh, FreeType seems to use some #include trickery which
# makes this harder than it should be. It looks like they
# put ft2build.h in a common/easier-to-find location which
# then contains a #include to a more specific header in a
# more specific location (#include <freetype/config/ftheader.h>).
# Then from there, they need to set a bunch of #define's
# so you can do something like:
# #include FT_FREETYPE_H
# Unfortunately, using CMake's mechanisms like include_directories()
# wants explicit full paths and this trickery doesn't work too well.
# I'm going to attempt to cut out the middleman and hope
# everything still works.
find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
HINTS
ENV FREETYPE_DIR
PATHS
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
PATH_SUFFIXES include/freetype2 include
)
find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
HINTS
ENV FREETYPE_DIR
PATHS
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
PATH_SUFFIXES include/freetype2 include
)
if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h" freetype_version_str
REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$")
unset(FREETYPE_VERSION_STRING)
foreach(VPART MAJOR MINOR PATCH)
foreach(VLINE ${freetype_version_str})
if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}")
string(REGEX REPLACE "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$" "\\1"
FREETYPE_VERSION_PART "${VLINE}")
if(FREETYPE_VERSION_STRING)
set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}")
else()
set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}")
endif()
unset(FREETYPE_VERSION_PART)
endif()
endforeach()
endforeach()
if(FREETYPE_VERSION_STRING)
string(REPLACE "." "" FREETYPE_VERSIONED_LIBRARY "${FREETYPE_VERSION_STRING}")
set(FREETYPE_VERSIONED_LIBRARY "freetype${FREETYPE_VERSIONED_LIBRARY}")
endif()
# Use pkg-config if possible instead of doing guesswork like the default CMake module does
find_package(PkgConfig QUIET)
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()
set(_ft_pkgconfig_args "${_ft_pkgconfig_args}freetype2")
if(FREETYPE_FIND_VERSION)
if(NOT FREETYPE_FIND_VERSION_EXACT)
set(_ft_pkgconfig_args "${_ft_pkgconfig_args}>")
endif()
set(_ft_pkgconfig_args "${_ft_pkgconfig_args}=${FREETYPE_FIND_VERSION} ")
endif()
pkg_check_modules(FREETYPE ${_ft_pkgconfig_args})
endif()
find_library(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219 ${FREETYPE_VERSIONED_LIBRARY}
HINTS
ENV FREETYPE_DIR
PATH_SUFFIXES lib
PATHS
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
)
unset(FREETYPE_VERSIONED_LIBRARY)
# set the user variables
if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
if(NOT FREETYPE_FOUND)
include(LegacyFindFreetype)
endif()
set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype
REQUIRED_VARS FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS
VERSION_VAR FREETYPE_VERSION_STRING)
mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build)

View File

@ -0,0 +1,143 @@
# - Locate FreeType library
# This module defines
# FREETYPE_LIBRARIES, the library to link against
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
# FREETYPE_INCLUDE_DIRS, where to find headers.
# FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8)
# This is the concatenation of the paths:
# FREETYPE_INCLUDE_DIR_ft2build
# FREETYPE_INCLUDE_DIR_freetype2
#
# $FREETYPE_DIR is an environment variable that would
# correspond to the ./configure --prefix=$FREETYPE_DIR
# used in building FREETYPE.
#=============================================================================
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
# Created by Eric Wing.
# Modifications by Alexander Neundorf.
# This file has been renamed to "FindFreetype.cmake" instead of the correct
# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex.
# Modified by Nicolas Hake for the OpenClonk Project to make FindFreetype also
# look for the versioned libraries the freetype MSVC project generates.
# Ugh, FreeType seems to use some #include trickery which
# makes this harder than it should be. It looks like they
# put ft2build.h in a common/easier-to-find location which
# then contains a #include to a more specific header in a
# more specific location (#include <freetype/config/ftheader.h>).
# Then from there, they need to set a bunch of #define's
# so you can do something like:
# #include FT_FREETYPE_H
# Unfortunately, using CMake's mechanisms like include_directories()
# wants explicit full paths and this trickery doesn't work too well.
# I'm going to attempt to cut out the middleman and hope
# everything still works.
find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
HINTS
ENV FREETYPE_DIR
PATHS
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
PATH_SUFFIXES include/freetype2 include
)
find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
HINTS
ENV FREETYPE_DIR
PATHS
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
PATH_SUFFIXES include/freetype2 include
)
if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h" freetype_version_str
REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$")
unset(FREETYPE_VERSION_STRING)
foreach(VPART MAJOR MINOR PATCH)
foreach(VLINE ${freetype_version_str})
if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}")
string(REGEX REPLACE "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$" "\\1"
FREETYPE_VERSION_PART "${VLINE}")
if(FREETYPE_VERSION_STRING)
set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}")
else()
set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}")
endif()
unset(FREETYPE_VERSION_PART)
endif()
endforeach()
endforeach()
if(FREETYPE_VERSION_STRING)
string(REPLACE "." "" FREETYPE_VERSIONED_LIBRARY "${FREETYPE_VERSION_STRING}")
set(FREETYPE_VERSIONED_LIBRARY "freetype${FREETYPE_VERSIONED_LIBRARY}")
endif()
endif()
find_library(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219 ${FREETYPE_VERSIONED_LIBRARY}
HINTS
ENV FREETYPE_DIR
PATH_SUFFIXES lib
PATHS
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
)
unset(FREETYPE_VERSIONED_LIBRARY)
# set the user variables
if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
endif()
set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype
REQUIRED_VARS FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS
VERSION_VAR FREETYPE_VERSION_STRING)
mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build)

View File

@ -115,6 +115,9 @@
/* Define to 1 if you have the `vasprintf' function. */
#cmakedefine HAVE_VASPRINTF 1
/* Define to 1 if you have the `__mingw_vasprintf' function. */
#cmakedefine HAVE___MINGW_VASPRINTF 1
#cmakedefine HAVE_VFW32
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */

View File

@ -16,7 +16,7 @@
</dd>
<dt id="fullscreen">--fullscreen</dt>
<dd>
<text>Starts in fullscreen mode (also called player mode). If no scenario and no direct join adress is given, the startup menu is shown.</text>
<text>Starts in fullscreen mode (also called player mode). If no scenario and no direct join address is given, the startup menu is shown.</text>
</dd>
<dt id="config">--config=Filename</dt>
<dd>

View File

@ -18,12 +18,12 @@
<param>
<type>int</type>
<name>x</name>
<desc>X-coordinate of the new particle (relative to object for local calls)</desc>
<desc>X-coordinate of the new particle (relative to object for local calls).</desc>
</param>
<param>
<type>int</type>
<name>y</name>
<desc>Y-coordinate of the new particle (relative to object for local calls)</desc>
<desc>Y-coordinate of the new particle (relative to object for local calls).</desc>
</param>
<param>
<type>int</type>
@ -38,7 +38,7 @@
<param>
<type>int</type>
<name>lifetime</name>
<desc>Time in frames that the particle will be alive before it is removed. Can also be a value provider function.</desc>
<desc>Time in frames that the particle will be alive before it is removed. Can also be a value provider function. If set to 0, the particle will not be removed automatically.</desc>
</param>
<param>
<type>proplist</type>
@ -72,7 +72,7 @@ var particles =
ForceX = <funclink>PV_Random</funclink>(-5, 5, 15),
Phase = <funclink>PV_Step</funclink>(1, 0, 10)
};
<funclink>CreateParticle</funclink>("Fire", 0, 0, <funclink>PV_Random(-200, 200)</funclink>, <funclink>PV_Random</funclink>(-200, 200), <funclink>PV_Random</funclink>(18, 38 * 5), particles, 100);
<funclink>CreateParticle</funclink>("Fire", 0, 0, <funclink>PV_Random</funclink>(-200, 200), <funclink>PV_Random</funclink>(-200, 200), <funclink>PV_Random</funclink>(18, 38 * 5), particles, 100);
</code>
<text>Casts 100 particles with a previously defined behavior.</text>
</example>

View File

@ -19,7 +19,7 @@
</params>
</syntax>
<desc>Returns the object which is followed by a player's view. If the player view does not currently follow an object, the function returns <code>nil</code> (also see <funclink>GetPlrViewMode</funclink>).</desc>
<remark>If player view has been set using (<funclink>SetPlrView</funclink>), the view will follow the selected clonk (unless in view mode "Scroll", see <funclink>GetViewMode</funclink>). This can be determined using <funclink>GetCursor</funclink>.</remark>
<remark>If player view has been set using (<funclink>SetPlrView</funclink>), the view will follow the selected clonk (unless in view mode "Scroll", see <funclink>GetPlrViewMode</funclink>). This can be determined using <funclink>GetCursor</funclink>.</remark>
<related><funclink>SetPlrView</funclink></related>
</func>
<author>PeterW</author><date>2003-06</date>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>PV_Gravity</title>
<category>Particles</category>
<version>5.3.3 OC</version>
<syntax>
<rtype>array</rtype>
<params>
<param>
<type>int</type>
<name>factor</name>
<desc>Factor for the speed. 1000 is a factor of 1.0.</desc>
</param>
<param>
<type>int</type>
<name>constant_value</name>
<desc>Value that is added to the result.</desc>
</param>
</params>
</syntax>
<desc>The value will depend on the gravity.</desc>
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
<related>
<funclink>CreateParticle</funclink>
<funclink>PV_Direction</funclink>
<funclink>PV_Random</funclink>
<funclink>PV_Step</funclink>
<funclink>PV_Speed</funclink>
<funclink>PV_KeyFrames</funclink>
<funclink>PV_Wind</funclink>
<funclink>PC_Die</funclink>
<funclink>PC_Bounce</funclink>
<funclink>PC_Stop</funclink>
</related>
</func>
<author>Zapper</author><date>2013-10</date>
</funcs>

View File

@ -18,7 +18,7 @@
<param>
<type>int</type>
<name>position1</name>
<desc>Position relative to the particle age of value1 (0 to 1000).</desc>
<desc>Age of the particle in per-mille (0 to 1000) where value1 will be returned.</desc>
</param>
<param>
<type>int</type>
@ -28,12 +28,32 @@
<param>
<type>int</type>
<name>position2</name>
<desc>Position relative to the particle age of value2 (0 to 1000).</desc>
<desc>Age of the particle in per-mille (0 to 1000) where value2 will be returned.</desc>
</param>
<param>
<type>int</type>
<name>value2</name>
<desc>Value at position2.</desc>
</param>
<param>
<type>int</type>
<name>position3</name>
<desc>Age of the particle in per-mille (0 to 1000) where value3 will be returned.</desc>
</param>
<param>
<type>int</type>
<name>value3</name>
<desc>Value at position3.</desc>
</param>
<param>
<type>int</type>
<name>position4</name>
<desc>Age of the particle in per-mille (0 to 1000) where value4 will be returned.</desc>
</param>
<param>
<type>int</type>
<name>value4</name>
<desc>Value at position4.</desc>
</param>
</params>
</syntax>

View File

@ -26,6 +26,12 @@
<name>delay</name>
<desc>Delay in frames for every step (defaults to 1).</desc>
<optional />
</param>
<param>
<type>int</type>
<name>maximumValue</name>
<desc>If not 0, the returned value will be capped at this value and not increase further.</desc>
<optional />
</param>
</params>
</syntax>

View File

@ -41,38 +41,11 @@ if ($link && $db) {
$server->cleanUp(true); //Cleanup old stuff
// register new release
if (ParseINI::parseValue('oc_enable_update', $config) == 1 && isset($_REQUEST['action']) && $_REQUEST['action'] == 'release-file' && isset($_REQUEST['file']) && isset($_REQUEST['hash']) && isset($_REQUEST['new_version']) && isset($_REQUEST['platform'])) {
$absolutefile = ParseINI::parseValue('oc_update_path', $config) . $_REQUEST['file'];
if (file_exists($absolutefile)) {
if(hash_hmac_file('sha256', $absolutefile, ParseINI::parseValue('oc_update_secret', $config)) == $_REQUEST['hash']) {
$old_version = isset($_REQUEST['old_version']) && !empty($_REQUEST['old_version']) ? explode(',', mysql_real_escape_string($_REQUEST['old_version'], $link)) : array();
$new_version = mysql_real_escape_string($_REQUEST['new_version'], $link);
$platform = mysql_real_escape_string($_REQUEST['platform'], $link);
$file = mysql_real_escape_string($_REQUEST['file'], $link);
if (!empty($old_version)) {
if (isset($_REQUEST['delete_old_files']) && $_REQUEST['delete_old_files'] == 'yes') {
$result = mysql_query('SELECT `file` FROM `' . $prefix . 'update` WHERE `new_version` != \'' . $new_version . '\' AND `old_version` != \'\' AND `platform` = \'' . $platform . '\'');
while (($row = mysql_fetch_assoc($result)) != false) {
unlink(ParseINI::parseValue('oc_update_path', $config) . $row['file']);
}
}
mysql_query('DELETE FROM `' . $prefix . 'update` WHERE `new_version` != \'' . $new_version . '\' AND `old_version` != \'\' AND `platform` = \'' . $platform . '\'');
foreach ($old_version as $version) {
mysql_query('INSERT INTO `' . $prefix . 'update` (`old_version`, `new_version`, `platform`, `file`) VALUES (\'' . $version . '\', \'' . $new_version . '\', \'' . $platform . '\', \'' . $file . '\')');
}
} else {
if (isset($_REQUEST['delete_old_files']) && $_REQUEST['delete_old_files'] == 'yes') {
$row = mysql_fetch_assoc(mysql_query('SELECT `file` FROM `' . $prefix . 'update` WHERE `old_version` = \'\' AND `platform` = \'' . $platform . '\''));
unlink(ParseINI::parseValue('oc_update_path', $config) . $row['file']);
}
mysql_query('DELETE FROM `' . $prefix . 'update` WHERE `old_version` = \'\' AND `platform` = \'' . $platform . '\'');
mysql_query('INSERT INTO `' . $prefix . 'update` (`old_version`, `new_version`, `platform`, `file`) VALUES (\'\', \'' . $new_version . '\', \'' . $platform . '\', \'' . $file . '\')');
}
} else {
C4Network::sendAnswer(C4Network::createError('Hash incorrect.'));
}
} else {
C4Network::sendAnswer(C4Network::createError('Specified file not found.'));
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'release-file') {
try {
registerRelease();
} catch(Exception $e) {
C4Network::sendAnswer(C4Network::createError($e->getMessage()));
}
// prepare data for the engine
} else if (isset($GLOBALS['HTTP_RAW_POST_DATA'])) {
@ -181,4 +154,76 @@ if ($link && $db) {
else {
C4Network::sendAnswer(C4Network::createError('Database error.'));
}
function registerRelease()
{
global $config, $link, $prefix;
// check request validity
if (ParseINI::parseValue('oc_enable_update', $config) != 1)
throw new Exception('Update disabled on this server.');
// mandatory parameters
if (!isset($_REQUEST['file']))
throw new Exception('Missing mandatory parameter "file"');
if (!isset($_REQUEST['hash']))
throw new Exception('Missing mandatory parameter "hash"');
if (!isset($_REQUEST['new_version']))
throw new Exception('Missing mandatory parameter "new_version"');
if (!isset($_REQUEST['platform']))
throw new Exception('Missing mandatory parameter "platform"');
if (!isset($_REQUEST['hash']))
throw new Exception('Missing mandatory parameter "hash"');
// authorization
$absolutefile = ParseINI::parseValue('oc_update_path', $config) . $_REQUEST['file'];
if (!file_exists($absolutefile))
throw new Exception('Specified file "'.$absolutefile.'" not found.');
$filehash = hash_hmac_file('sha256', $absolutefile, ParseINI::parseValue('oc_update_secret', $config));
if ($filehash != $_REQUEST['hash'])
throw new Exception('Authorization failure: Hash incorrect.');
// checks done, now update DB
$old_version = array();
if (isset($_REQUEST['old_version']) && !empty($_REQUEST['old_version']))
$old_version = explode(',', mysql_real_escape_string($_REQUEST['old_version'], $link));
$delete_old_files = false;
if (isset($_REQUEST['delete_old_files']) && $_REQUEST['delete_old_files'] == 'yes')
$delete_old_files = true;
$new_version = mysql_real_escape_string($_REQUEST['new_version'], $link);
$platform = mysql_real_escape_string($_REQUEST['platform'], $link);
$file = mysql_real_escape_string($_REQUEST['file'], $link);
if (!empty($old_version)) {
if ($delete_old_files) {
$result = mysql_query('SELECT `file` FROM `' . $prefix . 'update` WHERE `new_version` != \'' . $new_version . '\' AND `old_version` != \'\' AND `platform` = \'' . $platform . '\'');
while (($row = mysql_fetch_assoc($result)) != false) {
unlink(ParseINI::parseValue('oc_update_path', $config) . $row['file']);
}
}
mysql_query('DELETE FROM `' . $prefix . 'update` WHERE `new_version` != \'' . $new_version . '\' AND `old_version` != \'\' AND `platform` = \'' . $platform . '\'');
foreach ($old_version as $version) {
mysql_query('INSERT INTO `' . $prefix . 'update` (`old_version`, `new_version`, `platform`, `file`) VALUES (\'' . $version . '\', \'' . $new_version . '\', \'' . $platform . '\', \'' . $file . '\')');
}
} else {
if ($delete_old_files) {
$row = mysql_fetch_assoc(mysql_query('SELECT `file` FROM `' . $prefix . 'update` WHERE `old_version` = \'\' AND `platform` = \'' . $platform . '\''));
unlink(ParseINI::parseValue('oc_update_path', $config) . $row['file']);
}
mysql_query('DELETE FROM `' . $prefix . 'update` WHERE `old_version` = \'\' AND `platform` = \'' . $platform . '\'');
mysql_query('INSERT INTO `' . $prefix . 'update` (`old_version`, `new_version`, `platform`, `file`) VALUES (\'\', \'' . $new_version . '\', \'' . $platform . '\', \'' . $file . '\')');
}
}
?>

View File

@ -5,7 +5,7 @@ Category=C4D_StaticBack
Width=8
Height=7
Offset=-4,-4
SolidMask=0,9,8,3,0,1
SolidMask=0,0,8,7
Value=10
Mass=10
Rotate=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

View File

@ -27,7 +27,6 @@ Sky=Clouds1
MapWidth=100
MapHeight=75
BottomOpen=1
SkyScrollMode=1
[Animals]
Nest=Firestone=30;Loam=20;Rock=15;

View File

@ -24,7 +24,6 @@ Crew=Clonk=1
[Landscape]
Sky=Clouds1
SkyScrollMode=1
[Weather]
Climate=00,0,0,00

View File

@ -18,7 +18,8 @@ protected func Initialize()
//Enviroment.
CreateObject(Rule_ObjectFade)->DoFadeTime(10 * 36);
SetSkyAdjust(RGB(255,128,0));
SetSkyAdjust(RGB(255,128,0));
SetSkyParallax(1, 20,20, 0,0, nil, nil);
CreateObject(Column,160,304)->SetClrModulation(RGB(255,100,80));
CreateObject(Column,448,272)->SetClrModulation(RGB(255,100,80));

View File

@ -25,7 +25,6 @@ Crew=Clonk=1
[Landscape]
Sky=Clouds1
BottomOpen=1
SkyScrollMode=1
[Weather]
Climate=00,0,0,00

View File

@ -21,6 +21,7 @@ protected func Initialize()
//Enviroment.
//SetSkyAdjust(RGBa(250,250,255,128),RGB(200,200,220));
SetSkyParallax(1, 20,20, 0,0, nil, nil);
Sound("BirdsLoop",true,100,nil,+1);
CreateObject(Column,650,379);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@ -38,6 +38,11 @@ public func IsFulfilled()
return false;
}
public func GetDescription(int plr)
{
return this.Description;
}
public func Activate(int byplr)
{
MessageWindow(this.Description, byplr);

View File

@ -6,4 +6,7 @@ func Damage()
}
// No lightbulbs
func MakePowerProducer(power) { return false; }
func MakePowerProducer(power) { return false; }
//No triangles
func RedrawFlagRadius() { return; }

View File

@ -0,0 +1,2 @@
[Material]
Name=Material

View File

@ -0,0 +1 @@
1=Material

View File

@ -0,0 +1,5 @@
[Head]
Title=Test case for #1060
[Definitions]
LocalOnly=1

View File

@ -0,0 +1 @@
US:#1060: Incorrectly formatted TexMap causes nullpointer deref

View File

@ -11,6 +11,7 @@ Dig2ObjectRatio=170
Blast2ObjectRatio=210
MaxAirSpeed=100
MaxSlide=1
Corrode=50
Placement=40
TextureOverlay=coal
OverlayType=8

View File

@ -11,6 +11,7 @@ Blast2Object=Firestone
Blast2ObjectRatio=115
MaxAirSpeed=100
MaxSlide=1
Corrode=50
Placement=40
TextureOverlay=firestone
Inflammable=1

View File

@ -17,6 +17,14 @@ public func SetBasinPosition(int x, int y)
return true;
}
// Scenario saving
public func SaveScenarioObject(props)
{
if (!inherited(props, ...)) return false;
if (basin_x || basin_y) props->AddCall("Goal", this, "SetBasinPosition", basin_x, basin_y);
return true;
}
/*-- Goal interface --*/
@ -26,6 +34,16 @@ public func IsFulfilled()
return GetMaterial(basin_x, basin_y) == Material("Acid");
}
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
message = "$MsgGoalFulfilled$";
else
message = "$MsgGoalUnfulfilled$";
return message;
}
// Shows or hides a message window with information.
public func Activate(int plr)
{

View File

@ -19,15 +19,8 @@ func InitializeObjects()
CreateObject(Rule_BuyAtFlagpole, 50, 40);
CreateObject(Goal_AcidDrilling, 0, -10);
CreateObject(Rule_BuyAtFlagpole, 50, 40);
CreateObject(Goal_AcidDrilling, 0, -10);
CreateObject(Rule_BuyAtFlagpole, 50, 40);
CreateObject(Goal_AcidDrilling, 0, -10);
var Goal_AcidDrilling0036 = CreateObject(Goal_AcidDrilling, 0, -10);
Goal_AcidDrilling0036->SetBasinPosition(2338, 250);
var Chest0040 = CreateObject(Chest, 71, 222);

View File

@ -3,6 +3,7 @@ Title=AcidDrilling
Icon=30
Version=5,2,0,1
Difficulty=100
NoInitialize=true
[Definitions]
Definition1=Objects.ocd
@ -37,7 +38,6 @@ HomeBaseProduction=Clonk=50;Bread=50;Wood=50;Metal=50
[Landscape]
Sky=Clouds1
SkyScrollMode=1
TopOpen=0
BottomOpen=0
MapWidth=300

View File

@ -5,13 +5,8 @@ static g_was_player_init, g_crystal_player;
func Initialize()
{
g_crystal_player = NO_OWNER;
// Goal
var goal = FindObject(Find_ID(Goal_AcidDrilling));
if (!goal) goal = CreateObject(Goal_AcidDrilling);
goal->SetBasinPosition(2338, 250);
// Rules
if (!ObjectCount(Find_ID(Rule_TeamAccount))) CreateObject(Rule_TeamAccount);
if (!ObjectCount(Find_ID(Rule_BuyAtFlagpole))) CreateObject(Rule_BuyAtFlagpole);
// Environment
SetSkyParallax(1, 20,20, 0,0, nil, nil);
return true;
}

View File

@ -27,6 +27,16 @@ public func IsFulfilled()
return false;
}
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
message = "$MsgGoalFulfilled$";
else
message = "$MsgGoalUnFulfilled$";
return message;
}
public func Activate(int byplr)
{
if (IsFulfilled())

View File

@ -47,6 +47,7 @@ global func FxIntIntroStart(object target, proplist effect)
effect.Pilot->SetDir(DIR_Left);
effect.Pilot->SetObjectLayer(effect.Pilot);
effect.Dialog = effect.Pilot->SetDialogue("Pilot");
effect.Dialog->SetInteraction(false);
effect.Plane->FaceRight();
effect.Plane->StartInstantFlight(90, 15);
@ -106,10 +107,11 @@ global func FxIntIntroTimer(object target, proplist effect, int time)
if(effect.Time == 500)
for(var i = 0; i < GetPlayerCount(); ++i)
GetCursor(GetPlayerByIndex(i))->CloseMenu();
if(effect.Time >= 830)
{
effect.Pilot->SetCommand("MoveTo", effect.Pilot, 120 - effect.Pilot->GetX(), 860 - effect.Pilot->GetY());
effect.Dialog->SetInteraction(true);
return -1;
}
}

View File

@ -3,7 +3,7 @@ MsgIntro1=Wow, it's very turbulent here...
MsgIntro2=Have a look at that lava lake!
MsgIntro3=Come on old girl, hang in there...
MsgIntro4=Uh oh...
MsgIntro5=Quick! The ejecter seats!
MsgIntro5=Quick! The ejection seats!
# NPC Pilot
NamePilot=Pilot

View File

@ -29,6 +29,16 @@ public func IsFulfilled()
return !victim->GetAlive();
}
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
message = "$MsgGoalFulfilled$";
else
message = "$MsgGoalUnFulfilled$";
return message;
}
public func Activate(int byplr)
{
if (IsFulfilled())

View File

@ -1,10 +1,7 @@
[DefCore]
id=Dialogue
id=DialogueCastle
Version=5,2,0,1
Category=C4D_StaticBack
Picture=0,0,64,64
Width=1
Height=1

View File

@ -12,12 +12,12 @@ func GetPortraitDef(object talker)
var portrait = talker.portrait;
// Default definition has Clonk portrait
// (Can't get default from skin, because there's no function GetSkin D:)
if (!portrait || portrait == "" || portrait == "Clonk") return Dialogue;
if (!portrait || portrait == "" || portrait == "Clonk") return DialogueCastle;
// Otherwise, bind portrait to an invisible object
// (note: invisible object is leaked. can't really know when the message will be gone.)
if (!talker.portrait_obj)
{
talker.portrait_obj = CreateObject(Dialogue);
talker.portrait_obj = CreateObject(DialogueCastle);
talker.portrait_obj->SetAction("Attach", talker);
talker.portrait_obj->SetGraphics(portrait);
talker.portrait_obj.Visibility = VIS_None;

View File

@ -1,5 +1,7 @@
/* Automatically created objects file */
static g_shroom1, g_shroom2, g_shroom3, g_shroom4, g_ruin1, g_ruin2, g_ruin3, g_elev1, g_elev2, g_farmer, g_king;
func InitializeObjects()
{
var Grass0001 = CreateObject(Grass, 396, 1149);
@ -30,18 +32,22 @@ func InitializeObjects()
var Fern0011 = CreateObject(Fern, 312, 1432);
Fern0011->SetClrModulation(0xffa08060);
var LargeCaveMushroom0015 = CreateObject(LargeCaveMushroom, 1355, 1451);
LargeCaveMushroom0015->SetClrModulation(0xffcddfdf);
var LargeCaveMushroom0019 = CreateObject(LargeCaveMushroom, 1308, 1409);
LargeCaveMushroom0019->SetR(180);
LargeCaveMushroom0019->SetClrModulation(0xffdae7dc);
LargeCaveMushroom0019->SetPosition(1308, 1384);
var LargeCaveMushroom0023 = CreateObject(LargeCaveMushroom, 1411, 1447);
LargeCaveMushroom0023->SetClrModulation(0xffe9d5dd);
var LargeCaveMushroom0027 = CreateObject(LargeCaveMushroom, 1420, 1397);
LargeCaveMushroom0027->SetR(160);
LargeCaveMushroom0027->SetClrModulation(0xffeaedfb);
LargeCaveMushroom0027->SetPosition(1420, 1374);
g_shroom1 = CreateObject(LargeCaveMushroom, 1355, 1451);
g_shroom1->SetClrModulation(0xffcddfdf);
g_shroom1.StaticSaveVar = "g_shroom1";
g_shroom2 = CreateObject(LargeCaveMushroom, 1308, 1409);
g_shroom2->SetR(180);
g_shroom2->SetClrModulation(0xffdae7dc);
g_shroom2.StaticSaveVar = "g_shroom2";
g_shroom2->SetPosition(1308, 1384);
g_shroom3 = CreateObject(LargeCaveMushroom, 1411, 1447);
g_shroom3->SetClrModulation(0xffe9d5dd);
g_shroom3.StaticSaveVar = "g_shroom3";
g_shroom4 = CreateObject(LargeCaveMushroom, 1420, 1397);
g_shroom4->SetR(160);
g_shroom4->SetClrModulation(0xffeaedfb);
g_shroom4.StaticSaveVar = "g_shroom4";
g_shroom4->SetPosition(1420, 1374);
var Rank0031 = CreateObject(Rank, 1430, 1423);
Rank0031->SetR(-25);
@ -68,77 +74,96 @@ func InitializeObjects()
CreateObject(EnvPack_Candle, 1054, 672);
var EnvPack_Candle_Shine0049 = CreateObject(EnvPack_Candle_Shine, 1054, 672);
EnvPack_Candle_Shine0049->SetClrModulation(0xbfffffff);
EnvPack_Candle_Shine0049->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0049->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0050 = CreateObject(EnvPack_Candle_Shine, 1054, 672);
EnvPack_Candle_Shine0050->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0050->SetClrModulation(0xbfffffff);
EnvPack_Candle_Shine0050->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0051 = CreateObject(EnvPack_Candle_Shine, 1054, 671);
EnvPack_Candle_Shine0051->SetClrModulation(0xc9ffffff);
var EnvPack_Candle_Shine0051 = CreateObject(EnvPack_Candle_Shine, 1054, 672);
EnvPack_Candle_Shine0051->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0051->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0052 = CreateObject(EnvPack_Candle_Shine, 1054, 671);
EnvPack_Candle_Shine0052->SetClrModulation(0xc9ffffff);
EnvPack_Candle_Shine0052->SetObjectBlitMode(GFX_BLIT_Additive);
CreateObject(EnvPack_Candle, 1054, 575);
var EnvPack_Candle_Shine0053 = CreateObject(EnvPack_Candle_Shine, 1054, 575);
EnvPack_Candle_Shine0053->SetClrModulation(0xd9ffffff);
EnvPack_Candle_Shine0053->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0054 = CreateObject(EnvPack_Candle_Shine, 1054, 575);
EnvPack_Candle_Shine0054->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0054->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0055 = CreateObject(EnvPack_Candle_Shine, 1054, 575);
EnvPack_Candle_Shine0055->SetClrModulation(0xd8ffffff);
EnvPack_Candle_Shine0055->SetClrModulation(0xd9ffffff);
EnvPack_Candle_Shine0055->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0056 = CreateObject(EnvPack_Candle_Shine, 1054, 575);
EnvPack_Candle_Shine0056->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0056->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0057 = CreateObject(EnvPack_Candle_Shine, 1054, 575);
EnvPack_Candle_Shine0057->SetClrModulation(0xd8ffffff);
EnvPack_Candle_Shine0057->SetObjectBlitMode(GFX_BLIT_Additive);
CreateObject(EnvPack_Candle, 1185, 616);
var EnvPack_Candle_Shine0057 = CreateObject(EnvPack_Candle_Shine, 1185, 616);
EnvPack_Candle_Shine0057->SetClrModulation(0xc6ffffff);
EnvPack_Candle_Shine0057->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0058 = CreateObject(EnvPack_Candle_Shine, 1185, 616);
EnvPack_Candle_Shine0058->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0058->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0059 = CreateObject(EnvPack_Candle_Shine, 1185, 616);
EnvPack_Candle_Shine0059->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0059->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0060 = CreateObject(EnvPack_Candle_Shine, 1185, 616);
EnvPack_Candle_Shine0060->SetClrModulation(0xc6ffffff);
EnvPack_Candle_Shine0060->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0061 = CreateObject(EnvPack_Candle_Shine, 1185, 616);
EnvPack_Candle_Shine0061->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0061->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0062 = CreateObject(EnvPack_Candle_Shine, 1185, 616);
EnvPack_Candle_Shine0062->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0062->SetObjectBlitMode(GFX_BLIT_Additive);
CreateObject(EnvPack_Candle, 1531, 448);
var EnvPack_Candle_Shine0061 = CreateObject(EnvPack_Candle_Shine, 1531, 448);
EnvPack_Candle_Shine0061->SetClrModulation(0xd4ffffff);
EnvPack_Candle_Shine0061->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0062 = CreateObject(EnvPack_Candle_Shine, 1531, 448);
EnvPack_Candle_Shine0062->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0062->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0063 = CreateObject(EnvPack_Candle_Shine, 1531, 447);
EnvPack_Candle_Shine0063->SetClrModulation(0xddffffff);
EnvPack_Candle_Shine0063->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0064 = CreateObject(EnvPack_Candle_Shine, 1531, 448);
EnvPack_Candle_Shine0064->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0064->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0065 = CreateObject(EnvPack_Candle_Shine, 1531, 448);
EnvPack_Candle_Shine0065->SetClrModulation(0xd4ffffff);
EnvPack_Candle_Shine0065->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0066 = CreateObject(EnvPack_Candle_Shine, 1531, 448);
EnvPack_Candle_Shine0066->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0066->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0067 = CreateObject(EnvPack_Candle_Shine, 1531, 447);
EnvPack_Candle_Shine0067->SetClrModulation(0xddffffff);
EnvPack_Candle_Shine0067->SetObjectBlitMode(GFX_BLIT_Additive);
CreateObject(EnvPack_Candle, 1362, 432);
var EnvPack_Candle_Shine0065 = CreateObject(EnvPack_Candle_Shine, 1362, 432);
EnvPack_Candle_Shine0065->SetClrModulation(0xc7ffffff);
EnvPack_Candle_Shine0065->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0066 = CreateObject(EnvPack_Candle_Shine, 1362, 432);
EnvPack_Candle_Shine0066->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0066->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0067 = CreateObject(EnvPack_Candle_Shine, 1361, 430);
EnvPack_Candle_Shine0067->SetClrModulation(0xcbffffff);
EnvPack_Candle_Shine0067->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0069 = CreateObject(EnvPack_Candle_Shine, 1362, 432);
EnvPack_Candle_Shine0069->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0069->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0070 = CreateObject(EnvPack_Candle_Shine, 1362, 432);
EnvPack_Candle_Shine0070->SetClrModulation(0xc7ffffff);
EnvPack_Candle_Shine0070->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0071 = CreateObject(EnvPack_Candle_Shine, 1362, 432);
EnvPack_Candle_Shine0071->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0071->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0072 = CreateObject(EnvPack_Candle_Shine, 1361, 430);
EnvPack_Candle_Shine0072->SetClrModulation(0xcbffffff);
EnvPack_Candle_Shine0072->SetObjectBlitMode(GFX_BLIT_Additive);
CreateObject(EnvPack_CandleSmall, 1556, 432);
var EnvPack_CandleSmall_Shine0069 = CreateObject(EnvPack_CandleSmall_Shine, 1556, 423);
EnvPack_CandleSmall_Shine0069->SetCon(40);
EnvPack_CandleSmall_Shine0069->SetClrModulation(0x43ffffff);
EnvPack_CandleSmall_Shine0069->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_CandleSmall_Shine0070 = CreateObject(EnvPack_CandleSmall_Shine, 1556, 429);
EnvPack_CandleSmall_Shine0070->SetCon(40);
EnvPack_CandleSmall_Shine0070->SetClrModulation(0x46ffffff);
EnvPack_CandleSmall_Shine0070->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_CandleSmall_Shine0071 = CreateObject(EnvPack_CandleSmall_Shine, 1555, 432);
EnvPack_CandleSmall_Shine0071->SetCon(40);
EnvPack_CandleSmall_Shine0071->SetClrModulation(0x41ffffff);
EnvPack_CandleSmall_Shine0071->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_CandleSmall_Shine0074 = CreateObject(EnvPack_CandleSmall_Shine, 1556, 435);
EnvPack_CandleSmall_Shine0074->SetCon(40);
EnvPack_CandleSmall_Shine0074->SetClrModulation(0x46ffffff);
EnvPack_CandleSmall_Shine0074->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_CandleSmall_Shine0075 = CreateObject(EnvPack_CandleSmall_Shine, 1556, 423);
EnvPack_CandleSmall_Shine0075->SetCon(40);
EnvPack_CandleSmall_Shine0075->SetClrModulation(0x43ffffff);
EnvPack_CandleSmall_Shine0075->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_CandleSmall_Shine0076 = CreateObject(EnvPack_CandleSmall_Shine, 1556, 429);
EnvPack_CandleSmall_Shine0076->SetCon(40);
EnvPack_CandleSmall_Shine0076->SetClrModulation(0x46ffffff);
EnvPack_CandleSmall_Shine0076->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_CandleSmall_Shine0077 = CreateObject(EnvPack_CandleSmall_Shine, 1555, 432);
EnvPack_CandleSmall_Shine0077->SetCon(40);
EnvPack_CandleSmall_Shine0077->SetClrModulation(0x41ffffff);
EnvPack_CandleSmall_Shine0077->SetObjectBlitMode(GFX_BLIT_Additive);
CreateObject(EnvPack_Crate, 1017, 576);
@ -149,27 +174,33 @@ func InitializeObjects()
CreateObject(EnvPack_Lantern, 894, 488);
var EnvPack_Lantern_Shine0077 = CreateObject(EnvPack_Lantern_Shine, 894, 477);
EnvPack_Lantern_Shine0077->SetClrModulation(0xd3ffffff);
EnvPack_Lantern_Shine0077->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0078 = CreateObject(EnvPack_Lantern_Shine, 894, 477);
EnvPack_Lantern_Shine0078->SetClrModulation(0xe4ffffff);
EnvPack_Lantern_Shine0078->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0079 = CreateObject(EnvPack_Lantern_Shine, 894, 477);
EnvPack_Lantern_Shine0079->SetClrModulation(0xc6ffffff);
EnvPack_Lantern_Shine0079->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0083 = CreateObject(EnvPack_Lantern_Shine, 894, 477);
EnvPack_Lantern_Shine0083->SetClrModulation(0xe4ffffff);
EnvPack_Lantern_Shine0083->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0084 = CreateObject(EnvPack_Lantern_Shine, 894, 477);
EnvPack_Lantern_Shine0084->SetClrModulation(0xd3ffffff);
EnvPack_Lantern_Shine0084->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0085 = CreateObject(EnvPack_Lantern_Shine, 894, 477);
EnvPack_Lantern_Shine0085->SetClrModulation(0xe4ffffff);
EnvPack_Lantern_Shine0085->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0086 = CreateObject(EnvPack_Lantern_Shine, 894, 477);
EnvPack_Lantern_Shine0086->SetClrModulation(0xc6ffffff);
EnvPack_Lantern_Shine0086->SetObjectBlitMode(GFX_BLIT_Additive);
CreateObject(EnvPack_Lantern, 1291, 472);
var EnvPack_Lantern_Shine0081 = CreateObject(EnvPack_Lantern_Shine, 1291, 461);
EnvPack_Lantern_Shine0081->SetClrModulation(0xd5ffffff);
EnvPack_Lantern_Shine0081->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0082 = CreateObject(EnvPack_Lantern_Shine, 1291, 461);
EnvPack_Lantern_Shine0082->SetClrModulation(0xe4ffffff);
EnvPack_Lantern_Shine0082->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0083 = CreateObject(EnvPack_Lantern_Shine, 1291, 461);
EnvPack_Lantern_Shine0083->SetClrModulation(0xccffffff);
EnvPack_Lantern_Shine0083->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0088 = CreateObject(EnvPack_Lantern_Shine, 1291, 461);
EnvPack_Lantern_Shine0088->SetClrModulation(0xe4ffffff);
EnvPack_Lantern_Shine0088->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0089 = CreateObject(EnvPack_Lantern_Shine, 1291, 461);
EnvPack_Lantern_Shine0089->SetClrModulation(0xd5ffffff);
EnvPack_Lantern_Shine0089->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0090 = CreateObject(EnvPack_Lantern_Shine, 1291, 461);
EnvPack_Lantern_Shine0090->SetClrModulation(0xe4ffffff);
EnvPack_Lantern_Shine0090->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Lantern_Shine0091 = CreateObject(EnvPack_Lantern_Shine, 1291, 461);
EnvPack_Lantern_Shine0091->SetClrModulation(0xccffffff);
EnvPack_Lantern_Shine0091->SetObjectBlitMode(GFX_BLIT_Additive);
CreateObject(EnvPack_Painting, 1235, 537);
@ -184,191 +215,213 @@ func InitializeObjects()
CreateObject(EnvPack_Candle, 1471, 552);
var EnvPack_Candle_Shine0091 = CreateObject(EnvPack_Candle_Shine, 1471, 552);
EnvPack_Candle_Shine0091->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0091->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0092 = CreateObject(EnvPack_Candle_Shine, 1471, 552);
EnvPack_Candle_Shine0092->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0092->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0093 = CreateObject(EnvPack_Candle_Shine, 1472, 552);
EnvPack_Candle_Shine0093->SetClrModulation(0xddffffff);
EnvPack_Candle_Shine0093->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0099 = CreateObject(EnvPack_Candle_Shine, 1471, 552);
EnvPack_Candle_Shine0099->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0099->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0100 = CreateObject(EnvPack_Candle_Shine, 1471, 552);
EnvPack_Candle_Shine0100->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0100->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0101 = CreateObject(EnvPack_Candle_Shine, 1471, 552);
EnvPack_Candle_Shine0101->SetClrModulation(0xe4ffffff);
EnvPack_Candle_Shine0101->SetObjectBlitMode(GFX_BLIT_Additive);
var EnvPack_Candle_Shine0102 = CreateObject(EnvPack_Candle_Shine, 1472, 552);
EnvPack_Candle_Shine0102->SetClrModulation(0xddffffff);
EnvPack_Candle_Shine0102->SetObjectBlitMode(GFX_BLIT_Additive);
var Ruin10094 = CreateObject(Ruin1, 97, 1179);
Ruin10094->SetR(16);
Ruin10094->SetPosition(97, 1150);
g_ruin1 = CreateObject(Ruin1, 97, 1179);
g_ruin1->SetR(16);
g_ruin1.StaticSaveVar = "g_ruin1";
g_ruin1->SetPosition(97, 1150);
CreateObject(Ruin2, 353, 1145);
g_ruin2 = CreateObject(Ruin2, 353, 1145);
g_ruin2.StaticSaveVar = "g_ruin2";
CreateObject(Ruin3, 267, 1180);
g_ruin3 = CreateObject(Ruin3, 267, 1180);
g_ruin3.StaticSaveVar = "g_ruin3";
CreateObject(Foundry, 238, 1287);
var Chest0100 = CreateObject(Chest, 1473, 1414);
var Chest0101 = CreateObject(Chest, 1574, 583);
var Chest0102 = CreateObject(Chest, 823, 887);
var Chest0103 = CreateObject(Chest, 856, 887);
var Chest0104 = CreateObject(Chest, 1032, 575);
var Chest0105 = CreateObject(Chest, 136, 103);
var Chest0109 = CreateObject(Chest, 1473, 1414);
var Chest0110 = CreateObject(Chest, 1574, 583);
var Chest0111 = CreateObject(Chest, 823, 887);
var Chest0112 = CreateObject(Chest, 856, 887);
var Chest0113 = CreateObject(Chest, 1032, 575);
var Chest0114 = CreateObject(Chest, 136, 103);
var StoneDoor0106 = CreateObject(StoneDoor, 940, 671);
StoneDoor0106->SetComDir(COMD_Down);
var StoneDoor0107 = CreateObject(StoneDoor, 1348, 527);
StoneDoor0107->SetComDir(COMD_Down);
var StoneDoor0108 = CreateObject(StoneDoor, 1347, 431);
StoneDoor0108->SetComDir(COMD_Down);
var StoneDoor0115 = CreateObject(StoneDoor, 940, 671);
StoneDoor0115->SetComDir(COMD_Down);
var StoneDoor0116 = CreateObject(StoneDoor, 1348, 527);
StoneDoor0116->SetComDir(COMD_Down);
var StoneDoor0117 = CreateObject(StoneDoor, 1347, 431);
StoneDoor0117->SetComDir(COMD_Down);
var SpinWheel0109 = CreateObject(SpinWheel, 961, 672);
SpinWheel0109->SetStoneDoor(StoneDoor0106);
var SpinWheel0110 = CreateObject(SpinWheel, 1367, 527);
SpinWheel0110->SetStoneDoor(StoneDoor0107);
var SpinWheel0111 = CreateObject(SpinWheel, 1384, 471);
SpinWheel0111->SetStoneDoor(StoneDoor0108);
var SpinWheel0118 = CreateObject(SpinWheel, 961, 672);
SpinWheel0118->SetStoneDoor(StoneDoor0115);
var SpinWheel0119 = CreateObject(SpinWheel, 1367, 527);
SpinWheel0119->SetStoneDoor(StoneDoor0116);
var SpinWheel0120 = CreateObject(SpinWheel, 1384, 471);
SpinWheel0120->SetStoneDoor(StoneDoor0117);
CreateObject(Column, 1197, 551);
CreateObject(Column, 1218, 463);
CreateObject(Idol, 1080, 575);
var SteamEngine0115 = CreateObject(SteamEngine, 1529, 585);
SteamEngine0115->SetCategory(C4D_StaticBack);
var SteamEngine0124 = CreateObject(SteamEngine, 1529, 585);
SteamEngine0124->SetCategory(C4D_StaticBack);
CreateObject(Elevator, 1366, 615);
var Elevator0180 = CreateObject(Elevator, 167, 1184);
Elevator0180->SetClrModulation(0xffa08060);
g_elev1 = CreateObject(Elevator, 167, 1184);
g_elev1.StaticSaveVar = "g_elev1";
g_elev1->SetClrModulation(0xffa08060);
g_elev1->CreateShaft(4);
g_elev1->SetCasePosition(1176);
g_elev2 = CreateObject(Elevator, 1366, 615);
g_elev2.StaticSaveVar = "g_elev2";
g_elev2->CreateShaft(4);
g_elev2->SetCasePosition(607);
CreateObject(Airship, 931, 495);
var Catapult0202 = CreateObject(Catapult, 697, 887);
Catapult0202->SetRDir(2);
var Catapult0211 = CreateObject(Catapult, 697, 887);
Catapult0211->SetRDir(2);
var Lorry0203 = CreateObject(Lorry, 149, 1324);
Lorry0203->SetR(24);
Lorry0203->SetPosition(149, 1315);
var Lorry0205 = CreateObject(Lorry, 1428, 1253);
Lorry0205->SetR(-30);
Lorry0205->SetPosition(1428, 1243);
var Lorry0212 = CreateObject(Lorry, 149, 1324);
Lorry0212->SetR(24);
Lorry0212->SetPosition(149, 1315);
var Lorry0214 = CreateObject(Lorry, 1428, 1253);
Lorry0214->SetR(-30);
Lorry0214->SetPosition(1428, 1243);
CreateObject(Airship_Burnt, 38, 1152);
var Cannon0208 = CreateObject(Cannon, 788, 679);
Cannon0208->SetR(30);
Cannon0208->SetPosition(788, 669);
var Cannon0217 = CreateObject(Cannon, 788, 679);
Cannon0217->SetR(30);
Cannon0217->SetPosition(788, 669);
CreateObject(Cannon, 1004, 471);
CreateObject(Cannon, 1336, 336);
var Clonk0211 = CreateObject(Clonk, 673, 886);
Clonk0211->SetColor(0xff);
Clonk0211->SetName("Horst");
S2AI->AddAI(Clonk0211);
S2AI->SetHome(Clonk0211, 670, 878, DIR_Left);
S2AI->SetGuardRange(Clonk0211, 400, 800, 500, 150);
S2AI->SetAllyAlertRange(Clonk0211, 60);
S2AI->SetEncounterCB(Clonk0211, "EncounterOutpost");
var Clonk0219 = CreateObject(Clonk, 710, 887);
Clonk0219->SetColor(0xff);
Clonk0219->SetName("Hanniball");
S2AI->AddAI(Clonk0219);
S2AI->SetHome(Clonk0219, 709, 877, DIR_Left);
S2AI->SetGuardRange(Clonk0219, 300, 700, 500, 250);
S2AI->SetAllyAlertRange(Clonk0219, 60);
var Clonk0226 = CreateObject(Clonk, 781, 671);
Clonk0226->SetDir(DIR_Right);
Clonk0226->SetColor(0xff);
Clonk0226->SetName("Twonky");
S2AI->AddAI(Clonk0226);
S2AI->SetHome(Clonk0226, 781, 663, DIR_Right);
S2AI->SetGuardRange(Clonk0226, 481, 511, 600, 300);
var Clonk0234 = CreateObject(Clonk, 1010, 671);
var Clonk0220 = CreateObject(Clonk, 673, 886);
Clonk0220->SetColor(0xff);
Clonk0220->SetName("Horst");
S2AI->AddAI(Clonk0220);
S2AI->SetHome(Clonk0220, 670, 878, DIR_Left);
S2AI->SetGuardRange(Clonk0220, 400, 800, 500, 150);
S2AI->SetAllyAlertRange(Clonk0220, 60);
S2AI->SetEncounterCB(Clonk0220, "EncounterOutpost");
Clonk0220->SetDir(DIR_Left);
var Clonk0227 = CreateObject(Clonk, 710, 887);
Clonk0227->SetColor(0xff);
Clonk0227->SetName("Hanniball");
S2AI->AddAI(Clonk0227);
S2AI->SetHome(Clonk0227, 709, 877, DIR_Left);
S2AI->SetGuardRange(Clonk0227, 300, 700, 500, 250);
S2AI->SetAllyAlertRange(Clonk0227, 60);
Clonk0227->SetDir(DIR_Left);
var Clonk0234 = CreateObject(Clonk, 781, 671);
Clonk0234->SetDir(DIR_Right);
Clonk0234->SetColor(0xff);
Clonk0234->SetName("Sven");
Clonk0234->SetName("Twonky");
S2AI->AddAI(Clonk0234);
S2AI->SetHome(Clonk0234, 1010, 663, DIR_Right);
S2AI->SetGuardRange(Clonk0234, 710, 511, 600, 300);
var Clonk0242 = CreateObject(Clonk, 985, 671);
Clonk0242->SetDir(DIR_Right);
Clonk0242->SetColor(0xff);
Clonk0242->SetName("Luki");
S2AI->AddAI(Clonk0242);
S2AI->SetHome(Clonk0242, 985, 663, DIR_Right);
S2AI->SetGuardRange(Clonk0242, 685, 511, 600, 300);
var Clonk0250 = CreateObject(Clonk, 1373, 1246);
Clonk0250->SetColor(0xffff0000);
Clonk0250->SetName("Anna");
S2AI->AddAI(Clonk0250);
S2AI->SetHome(Clonk0250, 1370, 1237, DIR_Left);
S2AI->SetGuardRange(Clonk0250, 1150, 1140, 320, 150);
S2AI->SetAllyAlertRange(Clonk0250, 170);
var Clonk0258 = CreateObject(Clonk, 1449, 1246);
Clonk0258->SetColor(0xffff0000);
Clonk0258->SetName("Cindy");
S2AI->AddAI(Clonk0258);
S2AI->SetHome(Clonk0258, 1448, 1237, DIR_Left);
S2AI->SetGuardRange(Clonk0258, 1150, 1140, 320, 150);
S2AI->SetAllyAlertRange(Clonk0258, 170);
S2AI->SetEncounterCB(Clonk0258, "EncounterCave");
var Clonk0266 = CreateObject(Clonk, 307, 1166);
Clonk0266->SetDir(DIR_Right);
Clonk0266->SetColor(0xff);
Clonk0266->SetClrModulation(0xffffa020);
Clonk0266->SetName("Farmer");
var Clonk0273 = CreateObject(Clonk, 1197, 551);
Clonk0273->SetDir(DIR_Right);
Clonk0273->SetColor(0xff);
Clonk0273->SetName("Sabrina");
S2AI->AddAI(Clonk0273);
S2AI->SetHome(Clonk0273, 1196, 542, DIR_Right);
S2AI->SetGuardRange(Clonk0273, 896, 392, 600, 300);
var Clonk0281 = CreateObject(Clonk, 1266, 550);
Clonk0281->SetColor(0xff);
Clonk0281->SetName("Laura");
S2AI->AddAI(Clonk0281);
S2AI->SetGuardRange(Clonk0281, 966, 391, 600, 300);
S2AI->SetHome(Clonk0234, 781, 663, DIR_Right);
S2AI->SetGuardRange(Clonk0234, 481, 511, 600, 300);
var Clonk0241 = CreateObject(Clonk, 1010, 671);
Clonk0241->SetDir(DIR_Right);
Clonk0241->SetColor(0xff);
Clonk0241->SetName("Sven");
S2AI->AddAI(Clonk0241);
S2AI->SetHome(Clonk0241, 1010, 663, DIR_Right);
S2AI->SetGuardRange(Clonk0241, 710, 511, 600, 300);
var Clonk0248 = CreateObject(Clonk, 985, 671);
Clonk0248->SetDir(DIR_Right);
Clonk0248->SetColor(0xff);
Clonk0248->SetName("Luki");
S2AI->AddAI(Clonk0248);
S2AI->SetHome(Clonk0248, 985, 663, DIR_Right);
S2AI->SetGuardRange(Clonk0248, 685, 511, 600, 300);
var Clonk0255 = CreateObject(Clonk, 1373, 1246);
Clonk0255->SetColor(0xffff0000);
Clonk0255->SetName("Anna");
S2AI->AddAI(Clonk0255);
S2AI->SetHome(Clonk0255, 1370, 1237, DIR_Left);
S2AI->SetGuardRange(Clonk0255, 1150, 1140, 320, 150);
S2AI->SetAllyAlertRange(Clonk0255, 170);
Clonk0255->SetDir(DIR_Left);
var Clonk0262 = CreateObject(Clonk, 1449, 1246);
Clonk0262->SetColor(0xffff0000);
Clonk0262->SetName("Cindy");
S2AI->AddAI(Clonk0262);
S2AI->SetHome(Clonk0262, 1448, 1237, DIR_Left);
S2AI->SetGuardRange(Clonk0262, 1150, 1140, 320, 150);
S2AI->SetAllyAlertRange(Clonk0262, 170);
S2AI->SetEncounterCB(Clonk0262, "EncounterCave");
Clonk0262->SetDir(DIR_Left);
g_farmer = CreateObject(Clonk, 307, 1166);
g_farmer->SetDir(DIR_Left);
g_farmer->SetColor(0xff0000);
g_farmer->SetClrModulation(0xffffa020);
g_farmer->SetName("Farmer");
g_farmer.StaticSaveVar = "g_farmer";
var Clonk0275 = CreateObject(Clonk, 1197, 551);
Clonk0275->SetDir(DIR_Right);
Clonk0275->SetColor(0xff);
Clonk0275->SetName("Sabrina");
S2AI->AddAI(Clonk0275);
S2AI->SetHome(Clonk0275, 1196, 542, DIR_Right);
S2AI->SetGuardRange(Clonk0275, 896, 392, 600, 300);
var Clonk0282 = CreateObject(Clonk, 1266, 550);
Clonk0282->SetColor(0xff);
Clonk0282->SetName("Laura");
S2AI->AddAI(Clonk0282);
S2AI->SetGuardRange(Clonk0282, 966, 391, 600, 300);
Clonk0282->SetDir(DIR_Left);
var Clonk0289 = CreateObject(Clonk, 1287, 471);
Clonk0289->SetDir(DIR_Right);
Clonk0289->SetColor(0xff);
S2AI->AddAI(Clonk0289);
S2AI->SetHome(Clonk0289, 1287, 464, DIR_Right);
S2AI->SetGuardRange(Clonk0289, 987, 312, 600, 300);
var Clonk0297 = CreateObject(Clonk, 1092, 575);
Clonk0297->SetDir(DIR_Right);
Clonk0297->SetColor(0xff);
Clonk0297->SetName("Wolfgang");
S2AI->AddAI(Clonk0297);
S2AI->SetHome(Clonk0297, 1092, 567, DIR_Right);
S2AI->SetGuardRange(Clonk0297, 792, 416, 600, 300);
var Clonk0305 = CreateObject(Clonk, 1569, 431);
Clonk0305->Kill(Clonk0305, true);
Clonk0305->SetCon(200);
Clonk0305->SetColor(0xff);
Clonk0305->SetClrModulation(0xffff8000);
Clonk0305->SetObjectBlitMode(GFX_BLIT_Additive);
Clonk0305->SetName("Horax");
Clonk0305.MaxEnergy = 200000;
Clonk0305->DoEnergy(150);
S2AI->AddAI(Clonk0305);
S2AI->SetHome(Clonk0305, 1568, 413, DIR_Left);
S2AI->SetGuardRange(Clonk0305, 1268, 263, 600, 300);
S2AI->SetEncounterCB(Clonk0305, "EncounterKing");
var Clonk0312 = CreateObject(Clonk, 1070, 575);
Clonk0312->SetColor(0xff);
Clonk0312->SetName("Hans");
S2AI->AddAI(Clonk0312);
S2AI->SetHome(Clonk0312, 1069, 566, DIR_Left);
S2AI->SetGuardRange(Clonk0312, 769, 416, 600, 300);
var Clonk0320 = CreateObject(Clonk, 1019, 471);
Clonk0320->SetColor(0xff);
Clonk0320->SetName("Joki");
S2AI->AddAI(Clonk0320);
S2AI->SetGuardRange(Clonk0320, 719, 312, 600, 300);
var Clonk0328 = CreateObject(Clonk, 285, 1182);
Clonk0328->Kill(Clonk0328, true);
Clonk0328->SetColor(0xffff0000);
var Clonk0334 = CreateObject(Clonk, 208, 1183);
Clonk0334->Kill(Clonk0334, true);
Clonk0334->SetDir(DIR_Right);
Clonk0334->SetColor(0xffff0000);
var Clonk0296 = CreateObject(Clonk, 1092, 575);
Clonk0296->SetDir(DIR_Right);
Clonk0296->SetColor(0xff);
Clonk0296->SetName("Wolfgang");
S2AI->AddAI(Clonk0296);
S2AI->SetHome(Clonk0296, 1092, 567, DIR_Right);
S2AI->SetGuardRange(Clonk0296, 792, 416, 600, 300);
g_king = CreateObject(Clonk, 1569, 431);
g_king->SetDir(DIR_Left);
g_king->SetCon(200);
g_king->SetColor(0xff);
g_king->SetClrModulation(0xffff8000);
g_king->SetObjectBlitMode(GFX_BLIT_Additive);
g_king->SetName("Horax");
g_king.MaxEnergy = 200000;
g_king->DoEnergy(150);
g_king.StaticSaveVar = "g_king";
S2AI->AddAI(g_king);
S2AI->SetHome(g_king, 1568, 413, DIR_Left);
S2AI->SetGuardRange(g_king, 1268, 263, 600, 300);
S2AI->SetEncounterCB(g_king, "EncounterKing");
var Clonk0310 = CreateObject(Clonk, 1070, 575);
Clonk0310->SetDir(DIR_Right);
Clonk0310->SetColor(0xff);
Clonk0310->SetName("Hans");
S2AI->AddAI(Clonk0310);
S2AI->SetHome(Clonk0310, 1069, 566, DIR_Left);
S2AI->SetGuardRange(Clonk0310, 769, 416, 600, 300);
var Clonk0317 = CreateObject(Clonk, 1019, 471);
Clonk0317->SetColor(0xff);
Clonk0317->SetName("Joki");
S2AI->AddAI(Clonk0317);
S2AI->SetGuardRange(Clonk0317, 719, 312, 600, 300);
Clonk0317->SetDir(DIR_Left);
var Clonk0324 = CreateObject(Clonk, 285, 1182);
Clonk0324->Kill(Clonk0324, true);
Clonk0324->SetDir(DIR_Right);
Clonk0324->SetColor(0xffff0000);
var Clonk0330 = CreateObject(Clonk, 208, 1183);
Clonk0330->Kill(Clonk0330, true);
Clonk0330->SetDir(DIR_Right);
Clonk0330->SetColor(0xffff0000);
CreateObject(Rock, 879, 1003);
CreateObject(Rock, 262, 1182);
@ -395,18 +448,18 @@ func InitializeObjects()
CreateObject(Rock, 742, 1522);
CreateObject(Rock, 712, 1351);
CreateObject(Rock, 1047, 1207);
Clonk0250->CreateContents(Rock);
Clonk0250->CreateContents(Rock);
Clonk0250->CreateContents(Rock);
Clonk0255->CreateContents(Rock);
Clonk0255->CreateContents(Rock);
Clonk0255->CreateContents(Rock);
CreateObject(Coal, 59, 1346);
CreateObject(Coal, 156, 1370);
CreateObject(Coal, 243, 1555);
CreateObject(Coal, 61, 1495);
CreateObject(Coal, 140, 1380);
SteamEngine0115->CreateContents(Coal);
SteamEngine0115->CreateContents(Coal);
SteamEngine0115->CreateContents(Coal);
SteamEngine0124->CreateContents(Coal);
SteamEngine0124->CreateContents(Coal);
SteamEngine0124->CreateContents(Coal);
CreateObject(Ore, 227, 1366);
CreateObject(Ore, 64, 1421);
@ -425,65 +478,65 @@ func InitializeObjects()
CreateObject(Wood, 19, 1135);
CreateObject(Wood, 749, 1056);
CreateObject(Wood, 168, 1512);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Lorry0203->CreateContents(Wood);
Chest0103->CreateContents(Wood);
Chest0103->CreateContents(Wood);
Chest0103->CreateContents(Wood);
Chest0103->CreateContents(Wood);
Chest0103->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Lorry0212->CreateContents(Wood);
Chest0112->CreateContents(Wood);
Chest0112->CreateContents(Wood);
Chest0112->CreateContents(Wood);
Chest0112->CreateContents(Wood);
Chest0112->CreateContents(Wood);
CreateObject(Wood, 346, 1456);
CreateObject(Wood, 336, 1456);
Lorry0205->CreateContents(Wood);
Chest0100->CreateContents(Wood);
Chest0100->CreateContents(Wood);
Chest0100->CreateContents(Wood);
Chest0100->CreateContents(Wood);
Chest0100->CreateContents(Wood);
Chest0100->CreateContents(Wood);
Chest0100->CreateContents(Wood);
Lorry0205->CreateContents(Wood);
Lorry0205->CreateContents(Wood);
Lorry0205->CreateContents(Wood);
Lorry0205->CreateContents(Wood);
Chest0104->CreateContents(Wood);
Chest0104->CreateContents(Wood);
Chest0104->CreateContents(Wood);
Chest0104->CreateContents(Wood);
Chest0104->CreateContents(Wood);
Lorry0214->CreateContents(Wood);
Chest0109->CreateContents(Wood);
Chest0109->CreateContents(Wood);
Chest0109->CreateContents(Wood);
Chest0109->CreateContents(Wood);
Chest0109->CreateContents(Wood);
Chest0109->CreateContents(Wood);
Chest0109->CreateContents(Wood);
Lorry0214->CreateContents(Wood);
Lorry0214->CreateContents(Wood);
Lorry0214->CreateContents(Wood);
Lorry0214->CreateContents(Wood);
Chest0113->CreateContents(Wood);
Chest0113->CreateContents(Wood);
Chest0113->CreateContents(Wood);
Chest0113->CreateContents(Wood);
Chest0113->CreateContents(Wood);
CreateObject(Wood, 167, 1512);
CreateObject(Wood, 177, 1512);
CreateObject(Wood, 511, 1497);
Lorry0203->CreateContents(Loam);
Lorry0212->CreateContents(Loam);
CreateObject(Loam, 199, 1287);
CreateObject(Loam, 283, 1431);
CreateObject(Loam, 372, 1391);
@ -505,125 +558,125 @@ func InitializeObjects()
CreateObject(Loam, 1393, 644);
CreateObject(Loam, 1462, 1079);
CreateObject(Loam, 1501, 1415);
Chest0103->CreateContents(Loam);
Chest0103->CreateContents(Loam);
Chest0103->CreateContents(Loam);
Chest0105->CreateContents(Loam);
Chest0105->CreateContents(Loam);
Chest0105->CreateContents(Loam);
Chest0105->CreateContents(Loam);
Chest0105->CreateContents(Loam);
Chest0112->CreateContents(Loam);
Chest0112->CreateContents(Loam);
Chest0112->CreateContents(Loam);
Chest0114->CreateContents(Loam);
Chest0114->CreateContents(Loam);
Chest0114->CreateContents(Loam);
Chest0114->CreateContents(Loam);
Chest0114->CreateContents(Loam);
var GoldBar0478 = CreateObject(GoldBar, 1293, 1236);
GoldBar0478->SetR(22);
GoldBar0478->SetPosition(1293, 1235);
Lorry0205->CreateContents(GoldBar);
Lorry0205->CreateContents(GoldBar);
var GoldBar0474 = CreateObject(GoldBar, 1293, 1236);
GoldBar0474->SetR(22);
GoldBar0474->SetPosition(1293, 1235);
Lorry0214->CreateContents(GoldBar);
Lorry0214->CreateContents(GoldBar);
Clonk0211->CreateContents(Sword);
Clonk0258->CreateContents(Sword);
Clonk0234->CreateContents(Sword);
Clonk0242->CreateContents(Sword);
Clonk0312->CreateContents(Sword);
Clonk0220->CreateContents(Sword);
Clonk0262->CreateContents(Sword);
Clonk0241->CreateContents(Sword);
Clonk0248->CreateContents(Sword);
Clonk0310->CreateContents(Sword);
Clonk0289->CreateContents(Sword);
Clonk0305->CreateContents(Sword);
Clonk0219->CreateContents(Sword);
g_king->CreateContents(Sword);
Clonk0227->CreateContents(Sword);
var Arrow0489 = Clonk0211->CreateContents(Arrow);
var Arrow0485 = Clonk0220->CreateContents(Arrow);
Arrow0485->SetR(90);
var Arrow0486 = Clonk0220->CreateContents(Arrow);
Arrow0486->SetR(90);
var Arrow0487 = Chest0111->CreateContents(Arrow);
Arrow0487->SetR(90);
var Arrow0488 = Clonk0234->CreateContents(Arrow);
Arrow0488->SetR(90);
var Arrow0489 = Clonk0234->CreateContents(Arrow);
Arrow0489->SetR(90);
var Arrow0490 = Clonk0211->CreateContents(Arrow);
var Arrow0490 = Clonk0317->CreateContents(Arrow);
Arrow0490->SetR(90);
var Arrow0491 = Chest0102->CreateContents(Arrow);
var Arrow0491 = Clonk0317->CreateContents(Arrow);
Arrow0491->SetR(90);
var Arrow0492 = Clonk0226->CreateContents(Arrow);
var Arrow0492 = g_king->CreateContents(Arrow);
Arrow0492->SetR(90);
var Arrow0493 = Clonk0226->CreateContents(Arrow);
var Arrow0493 = g_king->CreateContents(Arrow);
Arrow0493->SetR(90);
var Arrow0494 = Clonk0320->CreateContents(Arrow);
Arrow0494->SetR(90);
var Arrow0495 = Clonk0320->CreateContents(Arrow);
Arrow0495->SetR(90);
var Arrow0496 = Clonk0305->CreateContents(Arrow);
Arrow0496->SetR(90);
var Arrow0497 = Clonk0305->CreateContents(Arrow);
Arrow0497->SetR(90);
Clonk0211->CreateContents(Bow);
Chest0102->CreateContents(Bow);
Clonk0226->CreateContents(Bow);
Clonk0320->CreateContents(Bow);
Clonk0305->CreateContents(Bow);
Clonk0220->CreateContents(Bow);
Chest0111->CreateContents(Bow);
Clonk0234->CreateContents(Bow);
Clonk0317->CreateContents(Bow);
g_king->CreateContents(Bow);
var Boompack0503 = CreateObject(Boompack, 135, 1324);
Boompack0503->SetColor(0xff);
var Boompack0499 = CreateObject(Boompack, 135, 1324);
Boompack0499->SetColor(0xff);
Lorry0203->CreateContents(DynamiteBox);
Lorry0205->CreateContents(DynamiteBox);
Chest0100->CreateContents(DynamiteBox);
Chest0100->CreateContents(DynamiteBox);
Chest0105->CreateContents(DynamiteBox);
Lorry0212->CreateContents(DynamiteBox);
Lorry0214->CreateContents(DynamiteBox);
Chest0109->CreateContents(DynamiteBox);
Chest0109->CreateContents(DynamiteBox);
Chest0114->CreateContents(DynamiteBox);
CreateObject(Dynamite, 1334, 1224);
Lorry0205->CreateContents(Pickaxe);
Clonk0250->CreateContents(Pickaxe);
Clonk0258->CreateContents(Pickaxe);
Lorry0214->CreateContents(Pickaxe);
Clonk0255->CreateContents(Pickaxe);
Clonk0262->CreateContents(Pickaxe);
Lorry0203->CreateContents(Shovel);
Lorry0212->CreateContents(Shovel);
var Barrel0514 = CreateObject(Barrel, 167, 1333);
Barrel0514->SetR(-13);
Barrel0514->SetPosition(167, 1327);
var Barrel0510 = CreateObject(Barrel, 167, 1333);
Barrel0510->SetR(-13);
Barrel0510->SetPosition(167, 1327);
var Seaweed0516 = CreateObject(Seaweed, 169, 1543);
Seaweed0516->SetPhase(49);
var Seaweed0519 = CreateObject(Seaweed, 815, 1342);
Seaweed0519->SetPhase(49);
var Seaweed0522 = CreateObject(Seaweed, 719, 1078);
Seaweed0522->SetPhase(68);
var Seaweed0525 = CreateObject(Seaweed, 772, 1087);
Seaweed0525->SetPhase(8);
var Seaweed0528 = CreateObject(Seaweed, 1258, 1279);
Seaweed0528->SetPhase(75);
var Seaweed0628 = CreateObject(Seaweed, 847, 1366);
Seaweed0628->SetCon(1);
var Seaweed0512 = CreateObject(Seaweed, 169, 1543);
Seaweed0512->SetPhase(49);
var Seaweed0515 = CreateObject(Seaweed, 815, 1342);
Seaweed0515->SetPhase(49);
var Seaweed0518 = CreateObject(Seaweed, 719, 1078);
Seaweed0518->SetPhase(68);
var Seaweed0521 = CreateObject(Seaweed, 772, 1087);
Seaweed0521->SetPhase(8);
var Seaweed0524 = CreateObject(Seaweed, 1258, 1279);
Seaweed0524->SetPhase(75);
var Seaweed0527 = CreateObject(Seaweed, 847, 1366);
Seaweed0527->SetCon(1);
CreateObject(Mushroom, 126, 1320);
CreateObject(Mushroom, 212, 1287);
CreateObject(Mushroom, 367, 1392);
CreateObject(Mushroom, 268, 1431);
Chest0101->CreateContents(Musket);
Chest0110->CreateContents(Musket);
Chest0101->CreateContents(LeadShot);
Chest0101->CreateContents(LeadShot);
Chest0101->CreateContents(LeadShot);
Chest0110->CreateContents(LeadShot);
Chest0110->CreateContents(LeadShot);
Chest0110->CreateContents(LeadShot);
Clonk0281->CreateContents(Javelin);
Clonk0273->CreateContents(Javelin);
Clonk0281->CreateContents(Javelin);
Clonk0273->CreateContents(Javelin);
Clonk0281->CreateContents(Javelin);
Clonk0273->CreateContents(Javelin);
Clonk0282->CreateContents(Javelin);
Clonk0275->CreateContents(Javelin);
Clonk0282->CreateContents(Javelin);
Clonk0275->CreateContents(Javelin);
Clonk0282->CreateContents(Javelin);
Clonk0275->CreateContents(Javelin);
Clonk0312->CreateContents(Shield);
Clonk0310->CreateContents(Shield);
Clonk0289->CreateContents(Shield);
Clonk0305->CreateContents(Shield);
g_king->CreateContents(Shield);
Chest0104->CreateContents(Bread);
Chest0104->CreateContents(Bread);
Chest0104->CreateContents(Bread);
Chest0105->CreateContents(Bread);
Chest0105->CreateContents(Bread);
Chest0105->CreateContents(Bread);
Chest0113->CreateContents(Bread);
Chest0113->CreateContents(Bread);
Chest0113->CreateContents(Bread);
Chest0114->CreateContents(Bread);
Chest0114->CreateContents(Bread);
Chest0114->CreateContents(Bread);
CreateObject(EnvPack_ManaAltar, 1052, 471);
Catapult0202->CreateContents(Firestone);
Catapult0202->CreateContents(Firestone);
Catapult0202->CreateContents(Firestone);
Catapult0202->CreateContents(Firestone);
Catapult0202->CreateContents(Firestone);
Catapult0211->CreateContents(Firestone);
Catapult0211->CreateContents(Firestone);
Catapult0211->CreateContents(Firestone);
Catapult0211->CreateContents(Firestone);
Catapult0211->CreateContents(Firestone);
CreateObject(Firestone, 38, 1190);
CreateObject(Firestone, 101, 1215);
CreateObject(Firestone, 369, 1282);
@ -647,22 +700,22 @@ func InitializeObjects()
CreateObject(Firestone, 781, 911);
CreateObject(Firestone, 1356, 806);
CreateObject(Firestone, 1287, 852);
Clonk0250->CreateContents(Firestone);
Clonk0250->CreateContents(Firestone);
Clonk0258->CreateContents(Firestone);
Chest0103->CreateContents(Firestone);
Chest0103->CreateContents(Firestone);
Chest0103->CreateContents(Firestone);
Clonk0297->CreateContents(Firestone);
Clonk0297->CreateContents(Firestone);
Clonk0297->CreateContents(Firestone);
Clonk0297->CreateContents(Firestone);
Chest0104->CreateContents(Firestone);
Chest0104->CreateContents(Firestone);
Chest0104->CreateContents(Firestone);
Clonk0305->CreateContents(Firestone);
Clonk0305->CreateContents(Firestone);
Clonk0305->CreateContents(Firestone);
Clonk0255->CreateContents(Firestone);
Clonk0255->CreateContents(Firestone);
Clonk0262->CreateContents(Firestone);
Chest0112->CreateContents(Firestone);
Chest0112->CreateContents(Firestone);
Chest0112->CreateContents(Firestone);
Clonk0296->CreateContents(Firestone);
Clonk0296->CreateContents(Firestone);
Clonk0296->CreateContents(Firestone);
Clonk0296->CreateContents(Firestone);
Chest0113->CreateContents(Firestone);
Chest0113->CreateContents(Firestone);
Chest0113->CreateContents(Firestone);
g_king->CreateContents(Firestone);
g_king->CreateContents(Firestone);
g_king->CreateContents(Firestone);
return true;
}

View File

@ -13,29 +13,30 @@ func DoInit(int first_player)
{
// Goal
var goal = CreateObject(Goal_Assassination);
if (goal) goal->SetVictim(Object(3816));
if (goal) goal->SetVictim(g_king);
// Elevators
// Top
Object(332)->SetNoPowerNeed(true);
Object(331)->CreateShaft(470);
g_elev2->SetNoPowerNeed(true);
g_elev2->CreateShaft(470);
// Left
Object(420)->CreateShaft(100);
g_elev1->SetNoPowerNeed(true);
g_elev1->CreateShaft(100);
// Shrooms
Object(2318)->AddPoisonEffect(0,0); // floor left
Object(2369)->AddPoisonEffect(0,0); // ceiling left
Object(2375)->AddPoisonEffect(-20,0); // floor right
Object(2398)->AddPoisonEffect(10,-10); // ceiling right
g_shroom1->AddPoisonEffect(0,0); // floor left
g_shroom2->AddPoisonEffect(0,0); // ceiling left
g_shroom3->AddPoisonEffect(-20,0); // floor right
g_shroom4->AddPoisonEffect(10,-10); // ceiling right
// Message when first player enters shroom area
ScheduleCall(nil, Scenario.ShroomCaveCheck, 21, 0xffffff);
// Scorching village
Object(343)->AddScorch(-20,-10, -45, 50, 1500);
Object(344)->AddScorch(-15,42, 90, 50, 1200);
Object(346)->AddScorch(-12,18, 130, 80, 1300);
g_ruin1->AddScorch(-20,-10, -45, 50, 1500);
g_ruin2->AddScorch(-15,42, 90, 50, 1200);
g_ruin3->AddScorch(-12,18, 130, 80, 1300);
// Rules
CreateObject(Rule_TeamAccount);
CreateObject(Rule_NoPowerNeed);
// Horax
Object(3816).JumpSpeed = 200;
g_king.JumpSpeed = 200;
// Update AI stuff
var fx;
for (var enemy in FindObjects(Find_ID(Clonk), Find_Owner(NO_OWNER)))
@ -47,8 +48,9 @@ func DoInit(int first_player)
enemy->AddEnergyBar();
}
// Intro. Message 250 frames + regular message time
Dialogue->MessageBoxAll("$MsgIntro1$", Object(2648), true);
Schedule(nil, "Dialogue->MessageBoxAll(\"$MsgIntro1$\", Object(2648))", 250, 1);
g_farmer.portrait = "Farmer2";
DialogueCastle->MessageBoxAll("$MsgIntro1$", g_farmer, true);
Schedule(nil, "DialogueCastle->MessageBoxAll(\"$MsgIntro1$\", g_farmer)", 250, 1);
return true;
}
@ -106,20 +108,20 @@ func JoinPlayer(int plr)
func EncounterCave(object enemy, object player)
{
Dialogue->MessageBoxAll("$MsgEncounterCave$", enemy);
DialogueCastle->MessageBoxAll("$MsgEncounterCave$", enemy);
return true;
}
func EncounterOutpost(object enemy, object player)
{
Dialogue->MessageBoxAll("$MsgEncounterOutpost$", enemy);
DialogueCastle->MessageBoxAll("$MsgEncounterOutpost$", enemy);
return true;
}
func EncounterKing(object enemy, object player)
{
if (!player) player = enemy; // Leads to a funny message, but better than a null pointer.
Dialogue->MessageBoxAll(Format("$MsgEncounterKing$", player->GetName()), enemy);
DialogueCastle->MessageBoxAll(Format("$MsgEncounterKing$", player->GetName()), enemy);
return true;
}
@ -130,7 +132,7 @@ func ShroomCaveCheck()
{
var intruder = FindObject(Find_InRect(1252,1342,320,138), Find_OCF(OCF_CrewMember));
if (!intruder) return true;
Dialogue->MessageBoxAll("$MsgEncounterShrooms$", intruder);
DialogueCastle->MessageBoxAll("$MsgEncounterShrooms$", intruder);
ClearScheduleCall(nil, Scenario.ShroomCaveCheck);
return true;
}

View File

@ -25,6 +25,16 @@ public func IsFulfilled()
return statue && !statue->IsBroken();
}
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
message = "$MsgGoalFulfilled$";
else
message = "$MsgGoalUnfulfilled$";
return message;
}
// Shows or hides a message window with information.
public func Activate(int plr)
{

View File

@ -37,7 +37,6 @@ HomeBaseProduction=Clonk=5;Bread=5;
[Landscape]
Sky=Clouds1
SkyScrollMode=1
TopOpen=0
BottomOpen=0
MapWidth=300

View File

@ -21,6 +21,8 @@ func Initialize()
// Misc vegetation
SproutBerryBush->Place(5, Rectangle(100,0,600,300));
Mushroom->Place(5, Rectangle(100,0,600,300));
// Sky
SetSkyParallax(1, 20,20, 0,0, nil, nil);
return true;
}

View File

@ -25,7 +25,6 @@ Crew=Clonk=1
[Landscape]
Sky=Clouds1
SkyScrollMode=1
TopOpen=1
BottomOpen=1
MapWidth=250

View File

@ -13,6 +13,7 @@ func Initialize()
for (var i=0; i<5; ++i)
if (loc = FindLocation(Loc_InRect(0,80*8,40*8,20*8), Loc_Material("Earth")))
CreateObject(Rock, loc.x, loc.y+3);
SetSkyParallax(1, 20,20, 0,0, nil, nil);
}
static g_was_player_init;

View File

@ -25,18 +25,6 @@ func InitializeObjects()
CreateObject(SproutBerryBush, 350, 206);
CreateObject(Rule_TeamAccount, 50, 50);
CreateObject(Rule_BuyAtFlagpole, 50, 50);
var Goal_SellGems0037 = CreateObject(Goal_SellGems, 50, 50);
Goal_SellGems0037->SetTargetAmount(30);
CreateObject(Rule_BuyAtFlagpole, 50, 50);
var Goal_SellGems0136 = CreateObject(Goal_SellGems, 50, 50);
Goal_SellGems0136->SetTargetAmount(30);
var Chest0039 = CreateObject(Chest, 200, 469);
var Chest0040 = CreateObject(Chest, 1192, 701);
var Chest0041 = CreateObject(Chest, 1807, 515);

View File

@ -38,7 +38,6 @@ HomeBaseProduction=Clonk=50;Bread=50;Wood=50;Metal=50;DynamiteBox=50;Dynamite=50
[Landscape]
Sky=Clouds1
SkyScrollMode=1
TopOpen=0
BottomOpen=0
MapWidth=300

View File

@ -9,6 +9,8 @@ func Initialize()
// Rules
if (!ObjectCount(Find_ID(Rule_TeamAccount))) CreateObject(Rule_TeamAccount);
if (!ObjectCount(Find_ID(Rule_BuyAtFlagpole))) CreateObject(Rule_BuyAtFlagpole);
// Environment
SetSkyParallax(1, 20,20, 0,0, nil, nil);
return true;
}

View File

@ -28,6 +28,16 @@ public func IsFulfilled()
return target->IsPowerAvailable(target->GetNeededPower());
}
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
message = "$MsgGoalFulfilled$";
else
message = "$MsgGoalUnFulfilled$";
return message;
}
// Shows or hides a message window with information.
public func Activate(int plr)
{

View File

@ -1,9 +0,0 @@
[DefCore]
id=Dialogue
Version=5,2,0,1
Category=C4D_StaticBack
Width=8
Height=20
Offset=-4,-10

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

View File

@ -1,215 +0,0 @@
/**
Dialogue
Attach to a non player charachter to provide a message interface.
*/
local dlg_target;
local dlg_name;
local dlg_info;
local dlg_progress;
local dlg_status;
static const DLG_Status_Active = 0;
static const DLG_Status_Stop = 1;
static const DLG_Status_Remove = 2;
/*-- Dialogue creation --*/
// Sets a new dialogue for a npc.
global func SetDialogue(string name)
{
if (!this)
return;
var dialogue = CreateObject(Dialogue);
dialogue->InitDialogue(name, this);
dialogue->SetObjectLayer(nil);
return dialogue;
}
// Removes the existing dialogue of an object.
global func RemoveDialogue()
{
if (!this)
return;
var dialogue = FindObject(Find_ID(Dialogue), Find_ActionTarget(this));
if (dialogue)
dialogue->RemoveObject();
return;
}
/*-- Dialogue properties --*/
protected func Initialize()
{
// Dialogue progress to one.
dlg_progress = 1;
dlg_status = DLG_Status_Active;
return;
}
public func InitDialogue(string name, object target)
{
dlg_target = target;
dlg_name = name;
// Attach dialogue object to target.
SetAction("Dialogue", target);
// Update dialogue to target.
UpdateDialogue();
return;
}
private func UpdateDialogue()
{
// Adapt size to target and its direction.
var wdt = dlg_target->GetID()->GetDefWidth();
var hgt = dlg_target->GetID()->GetDefHeight();
var dir = dlg_target->GetDir();
SetShape(-wdt/2 + 2*(dir-1)*wdt, -hgt/2, 3*wdt, hgt);
// Transfer target name.
//SetName(Format("$MsgSpeak$", dlg_target->GetName()));
return;
}
public func SetDialogueInfo()
{
return;
}
public func SetDialogueProgress(int progress)
{
dlg_progress = Max(1, progress);
return;
}
public func SetDialogueStatus(int status)
{
dlg_status = status;
return;
}
/*-- Interaction --*/
// Players can talk to NPC via the interaction bar.
public func IsInteractable() { return true; }
// Adapt appearance in the interaction bar.
public func GetInteractionMetaInfo(object clonk)
{
if (InDialogue(clonk))
return { Description = Format("$MsgSpeak$", dlg_target->GetName()) , IconName = nil, IconID = Clonk, Selected = true };
return { Description = Format("$MsgSpeak$", dlg_target->GetName()) , IconName = nil, IconID = Clonk, Selected = false };
}
// Called on player interaction.
public func Interact(object clonk)
{
// Currently in a dialogue: abort that dialogue.
if (InDialogue(clonk))
clonk->CloseMenu();
// No conversation context: abort.
if (!dlg_name)
return true;
// Stop dialogue?
if (dlg_status == DLG_Status_Stop)
{
clonk->CloseMenu();
dlg_status = DLG_Status_Active;
return true;
}
// Remove dialogue?
if (dlg_status == DLG_Status_Remove)
{
clonk->CloseMenu();
RemoveObject();
return true;
}
// Start conversation context.
// Update dialogue progress first.
var progress = dlg_progress;
dlg_progress++;
// Then call relevant functions.
Call(Format("Dlg_%s_%d", dlg_name, progress), clonk);
return true;
}
private func InDialogue(object clonk)
{
return clonk->GetMenu() == Dialogue;
}
public func MessageBoxAll(string message, object talker)
{
for(var i = 0; i < GetPlayerCount(); ++i)
MessageBox(message, GetCursor(GetPlayerByIndex(i)), talker);
}
private func MessageBox(string message, object clonk, object talker)
{
// Use current NPC as talker if unspecified.
if (!talker)
talker = dlg_target;
// Use a menu for this dialogue.
clonk->CreateMenu(Dialogue, this, C4MN_Extra_None, nil, nil, C4MN_Style_Dialog, false, Dialogue);
// Add NPC portrait.
//var portrait = Format("%i", talker->GetID()); //, Dialogue, talker->GetColor(), "1");
clonk->AddMenuItem("", "", Dialogue, nil, nil, nil, C4MN_Add_ImgObject, talker); //TextSpec);
// Add NPC message.
var msg = Format("<c %x>%s:</c> %s", talker->GetColor(), talker->GetName(), message);
clonk->AddMenuItem(msg, "", nil, nil, nil, nil, C4MN_Add_ForceNoDesc);
// Add answers.
//for (var i = 0; i < GetLength(message.Answers); i++)
//{
// var ans = message.Answers[i][0];
// var call_back = message.Answers[i][1];
// target->AddMenuItem(ans, call_back, nil, nil, target, nil, C4MN_Add_ForceNoDesc);
//}
// Set menu decoration.
clonk->SetMenuDecoration(GUI_MenuDeco);
// Set text progress to NPC name.
var name = dlg_target->GetName();
var n_length;
while (GetChar(name, n_length))
n_length++;
clonk->SetMenuTextProgress(n_length + 1);
return;
}
local ActMap = {
Dialogue = {
Prototype = Action,
Name = "Dialogue",
Procedure = DFA_ATTACH,
Delay = 0,
NextAction = "Dialogue",
}
};
local Name = "$Name$";

View File

@ -1,2 +0,0 @@
Name=Dialogue
MsgSpeak=%s ansprechen

View File

@ -1,2 +0,0 @@
Name=Dialogue
MsgSpeak=Speak to %s

View File

@ -32,6 +32,16 @@ public func IsFulfilled()
return true;
}
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
message = "$MsgGoalFulfilled$";
else
message = "$MsgGoalUnFulfilled$";
return message;
}
public func Activate(int byplr)
{
if (IsFulfilled())

View File

@ -18,6 +18,16 @@ public func IsFulfilled()
return ObjectCount(Find_ID(Plane));
}
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
message = "$MsgGoalFulfilled$";
else
message = "$MsgGoalUnFulfilled$";
return message;
}
public func Activate(int byplr)
{
if (IsFulfilled())

Binary file not shown.

Binary file not shown.

View File

@ -146,6 +146,21 @@ public func IsFulfilled()
return false;
}
public func GetDescription(int plr)
{
var flags = GetScoreGoal() - score_list[GetPlayerTeam(plr)];
if (IsFulfilled())
return "$MsgGoalFulfilled$";
else
{
var msg = "$MsgGoalCaptureTheFlag$";
if (flags == 1)
return Format("%s %s", msg, "$MsgGoalUnfulfilled1$");
else
return Format("%s %s", msg, Format("$MsgGoalUnfulfilledX$", flags));
}
}
public func Activate(int byplr)
{
var flags = GetScoreGoal() - score_list[GetPlayerTeam(byplr)];

View File

@ -105,6 +105,27 @@ public func IsFulfilled()
return true;
}
public func GetDescription(int plr)
{
if(IsFulfilled())
{
if (GetKillCount(plr) >= maxkills)
return "$MsgVictory$";
}
else
{
var score = GetRelativeScore(plr);
if (score.kills > 0)
return Format("$MsgAhead$", score.kills, GetPlayerName(score.best));
else if (score.kills < 0)
return Format("$MsgBehind$", -score.kills, GetPlayerName(score.best));
else if (score.best == plr)
return Format("$MsgYouAreBest$", score.kills);
else
return Format("$MsgEqual$", GetPlayerName(score.best));
}
}
public func Activate(int byplr)
{
if(IsFulfilled())

View File

@ -109,6 +109,17 @@ private func CoveredByFlag(int x, int y)
return false;
}
// Return the description of this goal.
public func GetDescription(int plr)
{
var message;
if (GetExpansionArea() >= GetExpansionGoal() || GetExpansionGoal() == 0)
message = Format("$MsgGoalFulfilled$");
else
message = Format("$MsgGoalUnFulfilled$", 100 * GetExpansionArea() / GetExpansionGoal());
return message;
}
// Shows or hides a message window with information.
public func Activate(int plr)
{
@ -122,7 +133,7 @@ public func Activate(int plr)
// Otherwise open a new message.
AddEffect("GoalMessage", this, 100, 0, this);
var message;
if (GetExpansionArea() >= GetExpansionGoal())
if (GetExpansionArea() >= GetExpansionGoal() || GetExpansionGoal() == 0)
message = Format("@$MsgGoalFulfilled$");
else
message = Format("@$MsgGoalUnFulfilled$", 100 * GetExpansionArea() / GetExpansionGoal());
@ -136,7 +147,9 @@ protected func FxGoalMessageStart() {}
public func GetShortDescription(int plr)
{
// Show expansion percentage.
var perc = Min(100, 100 * GetExpansionArea() / GetExpansionGoal());
var perc = 0;
if (GetExpansionGoal())
perc = Min(100, 100 * GetExpansionArea() / GetExpansionGoal());
var clr = RGB(255, 0, 0);
if (perc >= 100)
clr = RGB(0, 255, 0);

View File

@ -211,6 +211,21 @@ private func CheckForWinner()
return;
}
public func GetDescription(int plr)
{
var teams=GetTeamPoints();
var lines=[];
for(var i=0;i<GetLength(teams);++i)
{
lines[GetLength(lines)]=Format("%s: %d", teams[i]["player_names"], teams[i]["points"] );
}
var msg=Format("$MsgGoalDesc$", GetPointLimit());
for(var i=0;i<GetLength(lines);++i)
msg=Format("%s|%s", msg, lines[i]);
return msg;
}
public func Activate(int byplr)
{

View File

@ -55,6 +55,29 @@ public func IsFulfilled()
return true;
}
public func GetDescription(int plr)
{
// Count enemy players.
var hostile_count;
for (var i = 0; i < GetPlayerCount(); i++)
{
var byplr = GetPlayerByIndex(i);
if (byplr == plr)
continue;
if (Hostile(byplr, plr) )
hostile_count++;
}
var message;
// Output
if (!hostile_count)
message = "$MsgGoalFulfilled$";
else
message = Format("$MsgGoalUnfulfilled$", hostile_count);
return message;
}
public func Activate(int byplr)
{
// Count enemy players.

View File

@ -210,6 +210,33 @@ public func IsFulfilled()
return finished;
}
public func GetDescription(int plr)
{
var team = GetPlayerTeam(plr);
var msg;
if (finished)
{
if (team)
{
if (IsWinner(plr))
msg = "$MsgParkourWonTeam$";
else
msg = "$MsgParkourLostTeam$";
}
else
{
if (IsWinner(plr))
msg = "$MsgParkourWon$";
else
msg = "$MsgParkourLost$";
}
}
else
msg = Format("$MsgParkour$", cp_count);
return msg;
}
public func Activate(int plr)
{
var team = GetPlayerTeam(plr);

View File

@ -67,6 +67,32 @@ public func IsFulfilled()
return true;
}
// Shows or hides a message window with information.
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
{
message = "$MsgGoalFulfilled$";
}
else
{
message = "$MsgGoalExtraction$";
for (var i = 0; i < GetLength(resource_list); i++)
{
var mat = resource_list[i];
var tol = tolerance_list[i];
var mat_cnt = GetMaterialCount(Material(mat));
var res_id = GetMaterialVal("Blast2Object", "Material", Material(mat));
var res_cnt = ObjectCount(Find_ID(res_id));
var blast_ratio = GetMaterialVal("Blast2ObjectRatio", "Material", Material(mat));
var add_msg = Format("$MsgGoalResource$", res_id, Max(0, (mat_cnt - (2*tol+1) * blast_ratio / 2) / blast_ratio), res_cnt);
message = Format("%s%s", message, add_msg);
}
}
return message;
}
// Shows or hides a message window with information.
public func Activate(int plr)
{

View File

@ -65,6 +65,19 @@ public func IsFulfilled()
return true;
}
// Shows or hides a message window with information.
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
message = "$MsgGoalFulfilled$";
else
message = "$MsgGoalUnfulfilled$";
return message;
}
// Shows or hides a message window with information.
public func Activate(int plr)
{

View File

@ -27,6 +27,11 @@ public func Fulfill()
return;
}
public func GetDescription(int plr)
{
return this.Description;
}
/*-- Proplist --*/
local Name = "$Name$";
local Description = "$Description$";

View File

@ -1,2 +1,2 @@
Name=Scriptziel
Description=Script goal description: please change me

View File

@ -1 +1,2 @@
Name=Script goal
Description=Script goal description: please change me

View File

@ -22,14 +22,18 @@ func SetTargetAmount(int new_amount)
return true;
}
public func GetTargetAmount()
{
return gems_to_sell;
}
func OnGemSold()
{
// A gem was sold. Subtract.
gems_to_sell = Max(gems_to_sell-1);
gems_to_sell = Max(gems_to_sell - 1, 0);
return true;
}
/* Scenario saving */
func SaveScenarioObject(props)
@ -45,7 +49,23 @@ func SaveScenarioObject(props)
// The goal is fulfilled if no more gems need to be sold
public func IsFulfilled()
{
return (gems_to_sell<=0);
return gems_to_sell <= 0;
}
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
message = "$MsgGoalFulfilled$";
else
{
var gems_solid = GetMaterialCount(Material("Ruby")) / GetMaterialVal("Blast2ObjectRatio", "Material", Material("Ruby"));
gems_solid += GetMaterialCount(Material("Amethyst")) / GetMaterialVal("Blast2ObjectRatio", "Material", Material("Amethyst"));
var gems_pieces = ObjectCount(Find_Or(Find_ID(Ruby), Find_ID(Amethyst)));
message = Format("$MsgGoalUnfulfilled$", gems_to_sell, gems_solid, gems_pieces);
}
return message;
}
// Shows or hides a message window with information.
@ -64,7 +84,12 @@ public func Activate(int plr)
if (IsFulfilled())
message = "@$MsgGoalFulfilled$";
else
message = Format("@$MsgGoalUnfulfilled$", gems_to_sell);
{
var gems_solid = GetMaterialCount(Material("Ruby")) / GetMaterialVal("Blast2ObjectRatio", "Material", Material("Ruby"));
gems_solid += GetMaterialCount(Material("Amethyst")) / GetMaterialVal("Blast2ObjectRatio", "Material", Material("Amethyst"));
var gems_pieces = ObjectCount(Find_Or(Find_ID(Ruby), Find_ID(Amethyst)));
message = Format("@$MsgGoalUnfulfilled$", gems_to_sell, gems_solid, gems_pieces);
}
CustomMessage(message, nil, plr, 0, 16 + 64, 0xffffff, GUI_MenuDeco, this, MSG_HCenter);
return;

View File

@ -1,4 +1,4 @@
Name=Edelsteine verkaufen
#Goal window
MsgGoalFulfilled=Ihr habt genug Edelsteine verkauft!
MsgGoalUnfulfilled=Ihr müsst noch %d Edelsteine verkaufen.
MsgGoalUnfulfilled=Ihr müsst noch %d Edelsteine verkaufen. Im Moment sind noch %d Edelsteine abzubauen und %d Edelsteine einzusammeln.

View File

@ -2,4 +2,4 @@ Name=Sell gems
#Goal window
MsgGoalFulfilled=You've sold enough gems!
MsgGoalUnfulfilled=You need to sell %d more gems.
MsgGoalUnfulfilled=You need to sell %d more gems. Currently there are available %d gems to mine and %d gems to collect.

View File

@ -57,6 +57,17 @@ public func IsFulfilled()
return true;
}
public func GetDescription(int plr)
{
var message;
if (IsFulfilled())
message = Format("$MsgGoalFulfilled$", GetWealthGoal());
else
message = Format("$MsgGoalUnfulfilled$", GetWealth(plr), GetWealthGoal());
return message;
}
// Shows or hides a message window with information.
public func Activate(int plr)
{

View File

@ -4,6 +4,4 @@ Version=5,2,0,1
Category=C4D_StaticBack
Width=8
Height=20
Offset=-4,-10
Offset=-4,-10

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@ -10,6 +10,7 @@ local dlg_name;
local dlg_info;
local dlg_progress;
local dlg_status;
local dlg_interact;
static const DLG_Status_Active = 0;
static const DLG_Status_Stop = 1;
@ -50,9 +51,10 @@ protected func Initialize()
{
// Dialogue progress to one.
dlg_progress = 1;
// Dialogue allows interaction by default.
dlg_interact = true;
// Dialogue is active by default.
dlg_status = DLG_Status_Active;
return;
}
@ -85,8 +87,12 @@ private func UpdateDialogue()
public func SetDialogueInfo()
{
return;
}
public func SetInteraction(bool allow)
{
dlg_interact = allow;
return;
}
@ -105,7 +111,7 @@ public func SetDialogueStatus(int status)
/*-- Interaction --*/
// Players can talk to NPC via the interaction bar.
public func IsInteractable() { return true; }
public func IsInteractable() { return dlg_interact; }
// Adapt appearance in the interaction bar.
public func GetInteractionMetaInfo(object clonk)
@ -119,6 +125,10 @@ public func GetInteractionMetaInfo(object clonk)
// Called on player interaction.
public func Interact(object clonk)
{
// Should not happen: not active -> stop interaction
if (!dlg_interact)
return true;
// Currently in a dialogue: abort that dialogue.
if (InDialogue(clonk))
clonk->CloseMenu();
@ -147,9 +157,8 @@ public func Interact(object clonk)
var progress = dlg_progress;
dlg_progress++;
// Then call relevant functions.
Call(Format("Dlg_%s_%d", dlg_name, progress), clonk);
if (!Call(Format("Dlg_%s_%d", dlg_name, progress), clonk))
GameCall(Format("Dlg_%s_%d", dlg_name, progress), this, clonk, dlg_target);
return true;
}
@ -176,11 +185,11 @@ private func MessageBox(string message, object clonk, object talker)
// Add NPC portrait.
//var portrait = Format("%i", talker->GetID()); //, Dialogue, talker->GetColor(), "1");
clonk->AddMenuItem("", "MenuOk", Dialogue, nil, clonk, nil, C4MN_Add_ImgObject, talker); //TextSpec);
clonk->AddMenuItem("", "MenuOK", Dialogue, nil, clonk, nil, C4MN_Add_ImgObject, talker); //TextSpec);
// Add NPC message.
var msg = Format("<c %x>%s:</c> %s", talker->GetColor(), talker->GetName(), message);
clonk->AddMenuItem(msg, "", nil, nil, nil, nil, C4MN_Add_ForceNoDesc);
clonk->AddMenuItem(msg, "MenuOK", nil, nil, clonk, nil, C4MN_Add_ForceNoDesc);
// Add answers.
//for (var i = 0; i < GetLength(message.Answers); i++)
@ -203,11 +212,29 @@ private func MessageBox(string message, object clonk, object talker)
return;
}
public func MenuOk(unused, object clonk)
public func MenuOK(proplist menu_id, object clonk)
{
Interact(clonk);
// prevent the menu from closing when pressing MenuOK
if (dlg_interact)
Interact(clonk);
}
/* Scenario saving */
// Scenario saving
func SaveScenarioObject(props)
{
if (!inherited(props, ...)) return false;
if (!dlg_target) return false; // don't save dead dialogue object
// Dialog has its own creation procedure
props->RemoveCreation();
props->Add(SAVEOBJ_Creation, "%s->SetDialogue(%v)", dlg_target->MakeScenarioSaveName(), dlg_name);
return true;
}
/* Properties */
local ActMap = {
Dialogue = {
Prototype = Action,

View File

@ -1,3 +1,3 @@
Name=Loam
Description=With loam one can build small loam bridges.|Needs a barrel of water and a bucket of water to produce.
Description=With loam one can build small loam bridges.|Needs a barrel of water and a bucket of earth to produce.
UsageHelp=Hold down the [Use] key to build a bridge, move the mouse to control where it is created.

View File

@ -203,7 +203,7 @@ public func FxIntGrappleControlControl(object target, fxnum, ctrl, x,y,strength,
if(ctrl == CON_Up)
{
fxnum.mv_up = !release;
if(target->GetAction() == "Jump" && !release && pull)
if ((target->GetAction() == "Jump" || target->GetAction() == "WallJump") && !release && pull)
rope->ConnectPull();
}
if(ctrl == CON_Down)
@ -259,16 +259,16 @@ public func FxIntGrappleControlTimer(object target, fxnum, int time)
rope->DoSpeed(+10);
}
if(target->GetAction() == "Tumble" && target->GetActTime() > 10)
if (target->GetAction() == "Tumble" && target->GetActTime() > 10)
target->SetAction("Jump");
if(target->GetAction() != "Jump")
if (target->GetAction() != "Jump" && target->GetAction() != "WallJump")
{
if(rope->GetConnectStatus())
if (rope->GetConnectStatus())
rope->ConnectLoose();
}
if(target->GetAction() == "Jump" && rope->PullObjects() && !fxnum.var6)
if ((target->GetAction() == "Jump" || target->GetAction() == "WallJump") && rope->PullObjects() && !fxnum.var6)
{
if(!fxnum.ani_mode)
{

View File

@ -130,13 +130,21 @@ protected func DoSwing(object clonk, int ix, int iy)
Sound("Clang?");
}
//Do blastfree after landscape checks are made. Otherwise, mat always returns as "tunnel"
// Call in clonk context to ensure DigOutObject callback is done in Clonk
clonk->BlastFree(GetX()+x2,GetY()+y2,5,GetController(),MaxPickDensity);
// Do blastfree after landscape checks are made. Otherwise, mat always returns as "tunnel"
BlastFree(GetX()+x2,GetY()+y2,5,GetController(),MaxPickDensity);
}
}
// Reroute callback to clonk context to ensure DigOutObject callback is done in Clonk
public func DigOutObject(object obj)
{
// TODO: it would be nice if the method of finding the clonk does not rely on it to be the container of the pickaxe
var clonk = Contained();
if (clonk)
clonk->~DigOutObject(obj);
}
func FxIntPickaxeTimer(clonk, effect, time)
{
++swingtime;

View File

@ -122,8 +122,15 @@ public func SetMissionAccess(string str_password)
// Base implementations to be overloaded by goal objects
// Overload: return whether the goal has been fulfilled.
public func IsFulfilled() { return true; }
// Overload: return the current description for this goal.
public func GetDescription(int plr)
{
return "WARNING: GetDescription(int plr) not overloaded by goal";
}
protected func Activate(plr)
{
if (IsFulfilled())

View File

@ -4,7 +4,7 @@ Version=4,10,0,0
Category=C4D_StaticBack
Width=11
Height=19
Offset=-5,-10
Offset=-5,-20
BlitMode=1
Vertices=1
VertexX=0

View File

@ -51,7 +51,7 @@ func FxAdjustTimer()
func Set(int i)
{
SetObjDrawTransform((800 * i)/100, 0, 0, 0, 900, -150);
SetObjDrawTransform((800 * i)/100, 0, -500, 0, 900, -150);
}
func Init(to)
@ -61,7 +61,7 @@ func Init(to)
SetVertexXY(0, -x, -y);
SetAction("Turn", to);
SetPhase(Random(5));
this.Layer = to.Layer - 1;
this.Plane = to.Plane + 1;
}
public func Initialize()

View File

@ -179,6 +179,13 @@ func CheckSlavery()
}
}
// Forward config to case
func SetNoPowerNeed(bool to_val)
{
if (case) return case->SetNoPowerNeed(to_val);
return false;
}
local ActMap = {
Default = {
Prototype = Action,

View File

@ -135,10 +135,39 @@ func Damage()
{
SetClrModulation(RGB(100, 100, 100));
RemoveTimer("Growing");
if (GetDamage() > 3 * MaxDamage())
BurstIntoAshes();
return;
}
}
func BurstIntoAshes()
{
var particles =
{
Prototype = Particles_Dust(),
R = 50, G = 50, B = 50,
Size = PV_KeyFrames(0, 0, 0, 200, PV_Random(2, 10), 1000, 0),
};
var r = GetR();
var size = GetCon() * 110 / 100;
for(var cnt = 0; cnt < 10; ++cnt)
{
var distance = Random(size/2);
var x = Sin(r, distance);
var y = -Cos(r, distance);
for(var mirror = -1; mirror <= 1; mirror += 2)
{
CreateParticle("Dust", x * mirror, y * mirror, PV_Random(-3, 3), PV_Random(-3, -3), PV_Random(18, 1 * 36), particles, 2);
CastPXS("Ashes", 5, 30, x * mirror, y * mirror);
}
}
RemoveObject();
}
// called from the plant library
func Seed()
{

View File

@ -18,7 +18,7 @@ func Construction()
public func Seed()
{
// if(!IsStanding()) return false;
if(!IsStanding()) return false;
// Find number of plants in seed area.
var size = SeedArea();

View File

@ -195,13 +195,13 @@ protected func Doors()
gate->CloseDoor();
AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(StoneDoor, 1935, 550, NO_OWNER);
var gate = CreateObject(StoneDoor, 1935, 558, NO_OWNER);
var wheel = CreateObject(SpinWheel, 1900, 565, NO_OWNER);
wheel->SetStoneDoor(gate);
gate->CloseDoor();
AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(StoneDoor, 2965, 310, NO_OWNER);
var gate = CreateObject(StoneDoor, 2965, 316, NO_OWNER);
var wheel = CreateObject(SpinWheel, 3260, 328, NO_OWNER);
wheel->SetStoneDoor(gate);
gate->CloseDoor();

View File

@ -1,2 +0,0 @@
GateHit.ogg by Sergenious (http://www.freesound.org/people/Sergenious/sounds/55820/), License: CC Attribution 3.0
Chain.ogg by daveincamas (http://www.freesound.org/people/daveincamas/sounds/44076/), License: CC Attribution 3.0

View File

@ -1,11 +0,0 @@
[DefCore]
id=StoneDoor
Version=5,2,0,1
Category=C4D_Structure
Width=10
Height=40
Offset=-5,-20
SolidMask=10,0,10,40,0,0
Value=10
Mass=1000
Components=Rock=10;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,67 +0,0 @@
/*-- Stone Door --*/
protected func Initialize()
{
SetAction("Door");
SetComDir(COMD_None);
return;
}
public func OpenDoor()
{
AddEffect("IntMoveGateUp", this, 100, 1, this);
Sound("GateMove");
return;
}
public func CloseDoor()
{
AddEffect("IntMoveGateDown", this, 100, 1, this);
Sound("GateMove");
return;
}
protected func FxIntMoveGateUpTimer(object target)
{
if (GBackSolid(0, -20))
{
Sound("GateHit");
SetYDir(0);
return -1;
}
SetYDir(-5);
return 1;
}
protected func FxIntMoveGateDownTimer(object target)
{
if (GBackSolid(0, 19))
{
Sound("GateHit");
SetYDir(0);
return -1;
}
SetYDir(5);
return 1;
}
func Definition(def)
{
SetProperty("ActMap", {
Door = {
Prototype = Action,
Name = "Door",
Procedure = DFA_FLOAT,
Length = 1,
Delay = 1,
X = 0,
Y = 0,
Wdt = 10,
Hgt = 40,
NextAction = "Door",
},
}, def);
SetProperty("Name", "$Name$", def);
}

View File

@ -1 +0,0 @@
Name=Steintür

View File

@ -1 +0,0 @@
Name=Stone Door

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More