OK, merge default

Tobias Zwick 2011-10-05 22:54:37 +02:00
commit 603af91211
421 changed files with 2068 additions and 2266 deletions

View File

@ -24,7 +24,8 @@
# See clonk_trademark_license.txt for full license. # See clonk_trademark_license.txt for full license.
cmake_minimum_required (VERSION 2.6.0) cmake_minimum_required (VERSION 2.6.0)
project (clonk CXX C) project (openclonk CXX C)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(Version.txt) include(Version.txt)
@ -45,7 +46,7 @@ option(USE_GL "Enable OpenGL support" ON)
SET(INITIAL_USE_SDL_MAINLOOP_VALUE OFF) SET(INITIAL_USE_SDL_MAINLOOP_VALUE OFF)
SET(INITIAL_USE_OPEN_AL OFF) SET(INITIAL_USE_OPEN_AL OFF)
option(USE_SDL_MAINLOOP "Use SDL to create windows etc." ${INITIAL_USE_SDL_MAINLOOP_VALUE}) option(USE_SDL_MAINLOOP "Use SDL to create windows etc." ${INITIAL_USE_SDL_MAINLOOP_VALUE})
if(WIN32) if(WIN32 AND FALSE) # disable DX option while it doesn't work anyway
option(USE_DIRECTX "Enable DirectX support" ON) option(USE_DIRECTX "Enable DirectX support" ON)
if(EXISTS $ENV{DXSDK_DIR}) if(EXISTS $ENV{DXSDK_DIR})
list(APPEND CMAKE_INCLUDE_PATH $ENV{DXSDK_DIR}/Include) list(APPEND CMAKE_INCLUDE_PATH $ENV{DXSDK_DIR}/Include)
@ -57,12 +58,9 @@ if(WIN32)
else() else()
endif() endif()
option(GENERATE_MINI_DUMP "Generate a minidump on crash" ON)
else() else()
SET(USE_DIRECTX OFF) SET(USE_DIRECTX OFF)
SET(HAVE_FMOD OFF) SET(HAVE_FMOD OFF)
SET(GENERATE_MINI_DUMP OFF)
endif() endif()
if(NOT USE_GL AND NOT USE_DIRECTX) if(NOT USE_GL AND NOT USE_DIRECTX)
message(STATUS "No graphics display enabled; building dedicated server") message(STATUS "No graphics display enabled; building dedicated server")
@ -143,6 +141,9 @@ if(MSVC_VERSION)
list(APPEND OC_CXX_FLAGS "/wd4267") list(APPEND OC_CXX_FLAGS "/wd4267")
endif() endif()
if(CMAKE_COMPILER_IS_GNUCXX)
list(APPEND OC_CXX_FLAGS "-Wall -Wextra -Wredundant-decls -Wendif-labels -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wsign-promo -Wno-reorder -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo")
endif()
############################################################################ ############################################################################
# List target source files. Don't directly create a target since we condi- # List target source files. Don't directly create a target since we condi-
# tionally add more sources depending on configuration options later. # tionally add more sources depending on configuration options later.
@ -160,9 +161,9 @@ set(OC_CLONK_SOURCES
src/C4Globals.cpp src/C4Globals.cpp
src/C4GraphicsSystem.cpp src/C4GraphicsSystem.cpp
src/C4GraphicsSystem.h src/C4GraphicsSystem.h
src/c4group/C4Components.h
src/c4group/C4ComponentHost.cpp src/c4group/C4ComponentHost.cpp
src/c4group/C4ComponentHost.h src/c4group/C4ComponentHost.h
src/c4group/C4Components.h
src/c4group/C4Extra.cpp src/c4group/C4Extra.cpp
src/c4group/C4Extra.h src/c4group/C4Extra.h
src/c4group/C4Group.cpp src/c4group/C4Group.cpp
@ -209,9 +210,9 @@ set(OC_CLONK_SOURCES
src/control/C4Teams.cpp src/control/C4Teams.cpp
src/control/C4Teams.h src/control/C4Teams.h
src/editor/C4Console.cpp src/editor/C4Console.cpp
src/editor/C4Console.h
src/editor/C4ConsoleGUI.h
src/editor/C4ConsoleGUICommon.h src/editor/C4ConsoleGUICommon.h
src/editor/C4ConsoleGUI.h
src/editor/C4Console.h
src/editor/C4DevmodeDlg.cpp src/editor/C4DevmodeDlg.cpp
src/editor/C4DevmodeDlg.h src/editor/C4DevmodeDlg.h
src/editor/C4EditCursor.cpp src/editor/C4EditCursor.cpp
@ -224,8 +225,8 @@ set(OC_CLONK_SOURCES
src/game/C4Physics.h src/game/C4Physics.h
src/game/landscape/C4Landscape.cpp src/game/landscape/C4Landscape.cpp
src/game/landscape/C4Landscape.h src/game/landscape/C4Landscape.h
src/game/landscape/C4LandscapeRender.cpp
src/game/landscape/C4LandscapeRenderClassic.cpp src/game/landscape/C4LandscapeRenderClassic.cpp
src/game/landscape/C4LandscapeRender.cpp
src/game/landscape/C4LandscapeRender.h src/game/landscape/C4LandscapeRender.h
src/game/landscape/C4Map.cpp src/game/landscape/C4Map.cpp
src/game/landscape/C4MapCreatorS2.cpp src/game/landscape/C4MapCreatorS2.cpp
@ -261,9 +262,9 @@ set(OC_CLONK_SOURCES
src/game/object/C4Def.cpp src/game/object/C4Def.cpp
src/game/object/C4DefGraphics.cpp src/game/object/C4DefGraphics.cpp
src/game/object/C4DefGraphics.h src/game/object/C4DefGraphics.h
src/game/object/C4Def.h
src/game/object/C4DefList.cpp src/game/object/C4DefList.cpp
src/game/object/C4DefList.h src/game/object/C4DefList.h
src/game/object/C4Def.h
src/game/object/C4GameObjects.cpp src/game/object/C4GameObjects.cpp
src/game/object/C4GameObjects.h src/game/object/C4GameObjects.h
src/game/object/C4Id.cpp src/game/object/C4Id.cpp
@ -287,9 +288,9 @@ set(OC_CLONK_SOURCES
src/game/object/C4ObjectList.h src/game/object/C4ObjectList.h
src/game/object/C4ObjectMenu.cpp src/game/object/C4ObjectMenu.cpp
src/game/object/C4ObjectMenu.h src/game/object/C4ObjectMenu.h
src/game/object/C4ObjectScript.cpp
src/game/object/C4ObjectPtr.cpp src/game/object/C4ObjectPtr.cpp
src/game/object/C4ObjectPtr.h src/game/object/C4ObjectPtr.h
src/game/object/C4ObjectScript.cpp
src/game/object/C4Sector.cpp src/game/object/C4Sector.cpp
src/game/object/C4Sector.h src/game/object/C4Sector.h
src/game/object/C4Shape.cpp src/game/object/C4Shape.cpp
@ -383,6 +384,8 @@ set(OC_CLONK_SOURCES
src/lib/C4LogBuf.h src/lib/C4LogBuf.h
src/lib/C4Log.cpp src/lib/C4Log.cpp
src/lib/C4Log.h src/lib/C4Log.h
src/lib/C4Markup.cpp
src/lib/C4Markup.h
src/lib/C4NameList.cpp src/lib/C4NameList.cpp
src/lib/C4NameList.h src/lib/C4NameList.h
src/lib/C4Random.cpp src/lib/C4Random.cpp
@ -407,15 +410,13 @@ set(OC_CLONK_SOURCES
src/lib/StdColors.h src/lib/StdColors.h
src/lib/StdCompiler.cpp src/lib/StdCompiler.cpp
src/lib/StdCompiler.h src/lib/StdCompiler.h
src/lib/StdMarkup.cpp
src/lib/StdMarkup.h
src/lib/StdMesh.cpp src/lib/StdMesh.cpp
src/lib/StdMesh.h src/lib/StdMesh.h
src/lib/StdMeshLoader.h
src/lib/StdMeshLoaderBinary.cpp
src/lib/StdMeshLoaderBinaryChunks.cpp src/lib/StdMeshLoaderBinaryChunks.cpp
src/lib/StdMeshLoaderBinaryChunks.h src/lib/StdMeshLoaderBinaryChunks.h
src/lib/StdMeshLoaderBinary.cpp
src/lib/StdMeshLoaderDataStream.h src/lib/StdMeshLoaderDataStream.h
src/lib/StdMeshLoader.h
src/lib/StdMeshLoaderXml.cpp src/lib/StdMeshLoaderXml.cpp
src/lib/StdMeshMaterial.cpp src/lib/StdMeshMaterial.cpp
src/lib/StdMeshMaterial.h src/lib/StdMeshMaterial.h
@ -430,8 +431,7 @@ set(OC_CLONK_SOURCES
src/lib/texture/C4Facet.h src/lib/texture/C4Facet.h
src/lib/texture/C4GraphicsResource.cpp src/lib/texture/C4GraphicsResource.cpp
src/lib/texture/C4GraphicsResource.h src/lib/texture/C4GraphicsResource.h
src/lib/texture/C4Surface.cpp src/lib/texture/C4SurfaceLoaders.cpp
src/lib/texture/C4Surface.h
src/lib/texture/StdPNG.cpp src/lib/texture/StdPNG.cpp
src/lib/texture/StdPNG.h src/lib/texture/StdPNG.h
src/network/C4Client.cpp src/network/C4Client.cpp
@ -469,6 +469,9 @@ set(OC_CLONK_SOURCES
src/network/C4PacketBase.h src/network/C4PacketBase.h
src/platform/Bitmap256.cpp src/platform/Bitmap256.cpp
src/platform/Bitmap256.h src/platform/Bitmap256.h
src/platform/C4App.cpp
src/platform/C4App.h
src/platform/C4AppT.cpp
src/platform/C4FileMonitor.cpp src/platform/C4FileMonitor.cpp
src/platform/C4FileMonitor.h src/platform/C4FileMonitor.h
src/platform/C4Fonts.cpp src/platform/C4Fonts.cpp
@ -479,29 +482,28 @@ set(OC_CLONK_SOURCES
src/platform/C4MusicFile.h src/platform/C4MusicFile.h
src/platform/C4MusicSystem.cpp src/platform/C4MusicSystem.cpp
src/platform/C4MusicSystem.h src/platform/C4MusicSystem.h
src/platform/C4SoundLoaders.cpp
src/platform/C4SoundLoaders.h
src/platform/C4SoundSystem.cpp src/platform/C4SoundSystem.cpp
src/platform/C4SoundSystem.h src/platform/C4SoundSystem.h
src/platform/C4SoundLoaders.h src/platform/C4Surface.cpp
src/platform/C4SoundLoaders.cpp src/platform/C4Surface.h
src/platform/StdTApp.cpp
src/platform/C4Video.cpp src/platform/C4Video.cpp
src/platform/C4Video.h src/platform/C4Video.h
src/platform/C4VideoPlayback.cpp src/platform/C4VideoPlayback.cpp
src/platform/C4VideoPlayback.h src/platform/C4VideoPlayback.h
src/platform/C4ViewportWindow.cpp src/platform/C4ViewportWindow.cpp
src/platform/C4ViewportWindow.h src/platform/C4ViewportWindow.h
src/platform/C4Window.h
src/platform/C4windowswrapper.h src/platform/C4windowswrapper.h
src/platform/GetTime.cpp src/platform/GetTime.cpp
src/platform/PlatformAbstraction.h src/platform/PlatformAbstraction.h
src/platform/StdApp.h
src/platform/StdAppCommon.cpp
src/platform/StdD3D.cpp src/platform/StdD3D.cpp
src/platform/StdD3D.h src/platform/StdD3D.h
src/platform/StdD3DShader.cpp src/platform/StdD3DShader.cpp
src/platform/StdD3DShader.h src/platform/StdD3DShader.h
src/platform/StdDDraw2.cpp src/platform/StdDDraw2.cpp
src/platform/StdDDraw2.h src/platform/StdDDraw2.h
src/platform/StdFacet.h
src/platform/StdFile.cpp src/platform/StdFile.cpp
src/platform/StdFile.h src/platform/StdFile.h
src/platform/StdFont.cpp src/platform/StdFont.cpp
@ -515,20 +517,17 @@ set(OC_CLONK_SOURCES
src/platform/StdRegistry.h src/platform/StdRegistry.h
src/platform/StdScheduler.cpp src/platform/StdScheduler.cpp
src/platform/StdScheduler.h src/platform/StdScheduler.h
src/platform/StdSurface2.cpp
src/platform/StdSurface2.h
src/platform/StdSurface8.cpp src/platform/StdSurface8.cpp
src/platform/StdSurface8.h src/platform/StdSurface8.h
src/platform/StdSync.h src/platform/StdSync.h
src/platform/StdVideo.cpp src/platform/StdVideo.cpp
src/platform/StdVideo.h src/platform/StdVideo.h
src/platform/StdWindow.h
src/script/C4Aul.cpp src/script/C4Aul.cpp
src/script/C4AulExec.h
src/script/C4AulExec.cpp
src/script/C4AulDebug.h
src/script/C4AulDebug.cpp src/script/C4AulDebug.cpp
src/script/C4AulDebug.h
src/script/C4AulDefFunc.h src/script/C4AulDefFunc.h
src/script/C4AulExec.cpp
src/script/C4AulExec.h
src/script/C4Aul.h src/script/C4Aul.h
src/script/C4AulLink.cpp src/script/C4AulLink.cpp
src/script/C4AulParse.cpp src/script/C4AulParse.cpp
@ -539,21 +538,22 @@ set(OC_CLONK_SOURCES
src/script/C4ScriptHost.h src/script/C4ScriptHost.h
src/script/C4StringTable.cpp src/script/C4StringTable.cpp
src/script/C4StringTable.h src/script/C4StringTable.h
src/script/C4Value.cpp
src/script/C4Value.h
src/script/C4ValueArray.cpp src/script/C4ValueArray.cpp
src/script/C4ValueArray.h src/script/C4ValueArray.h
src/script/C4Value.cpp
src/script/C4Value.h
src/script/C4ValueMap.cpp src/script/C4ValueMap.cpp
src/script/C4ValueMap.h src/script/C4ValueMap.h
src/zlib/gzio.c src/zlib/gzio.c
src/zlib/zutil.h src/zlib/zutil.h
) )
mark_as_advanced(OC_CLONK_SOURCES) mark_as_advanced(OC_CLONK_SOURCES)
mark_as_advanced(OC_SYSTEM_SOURCES) mark_as_advanced(OC_SYSTEM_SOURCES)
if(WIN32) if(WIN32)
list(APPEND OC_SYSTEM_SOURCES list(APPEND OC_SYSTEM_SOURCES
src/platform/StdWindow.cpp src/platform/C4WindowWin32.cpp
src/platform/StdJoystick.cpp src/platform/StdJoystick.cpp
src/platform/StdJoystick.h src/platform/StdJoystick.h
src/platform/C4CrashHandlerWin32.cpp src/platform/C4CrashHandlerWin32.cpp
@ -585,14 +585,14 @@ if(WIN32)
endif(MINGW) endif(MINGW)
elseif(USE_SDL_MAINLOOP) elseif(USE_SDL_MAINLOOP)
list(APPEND OC_SYSTEM_SOURCES list(APPEND OC_SYSTEM_SOURCES
src/platform/StdSDLApp.cpp src/platform/C4AppSDL.cpp
src/platform/StdSDLWindow.cpp src/platform/C4WindowSDL.cpp
) )
elseif(USE_X11) elseif(USE_X11)
list(APPEND OC_SYSTEM_SOURCES list(APPEND OC_SYSTEM_SOURCES
src/platform/StdXApp.cpp src/platform/C4AppX.cpp
src/platform/StdXWindow.cpp src/platform/C4WindowX.cpp
src/platform/StdXPrivate.h src/platform/C4AppXImpl.h
) )
endif() endif()
@ -602,9 +602,9 @@ endif()
if(APPLE) if(APPLE)
list(APPEND OC_SYSTEM_SOURCES list(APPEND OC_SYSTEM_SOURCES
src/platform/StdMacApp.mm src/platform/C4AppMac.mm
src/platform/C4FileMonitorMac.mm src/platform/C4FileMonitorMac.mm
src/platform/StdMacWindow.mm src/platform/C4WindowMac.mm
src/platform/ClonkAppDelegate.h src/platform/ClonkAppDelegate.h
src/platform/ClonkAppDelegate.mm src/platform/ClonkAppDelegate.mm
) )
@ -642,8 +642,8 @@ if(USE_GTK)
) )
list(APPEND OC_SYSTEM_SOURCES list(APPEND OC_SYSTEM_SOURCES
src/platform/StdGtkWindow.cpp src/platform/C4WindowGTK.cpp
src/platform/StdGtkWindow.h src/platform/C4WindowGTK.h
src/editor/C4ConsoleGTK.cpp src/editor/C4ConsoleGTK.cpp
) )
endif() endif()
@ -793,7 +793,7 @@ FIND_PATH(OPENSSL_INCLUDE_DIR NAMES openssl/sha.h)
include_directories(${OPENSSL_INCLUDE_DIR}) include_directories(${OPENSSL_INCLUDE_DIR})
if(USE_CONSOLE) if(USE_CONSOLE)
include(./FindReadline.cmake) find_package(Readline)
include_directories(${READLINE_INCLUDE_DIRS}) include_directories(${READLINE_INCLUDE_DIRS})
SET(HAVE_LIBREADLINE ${READLINE_FOUND} CACHE INTERNAL "libreadline available") SET(HAVE_LIBREADLINE ${READLINE_FOUND} CACHE INTERNAL "libreadline available")
endif() endif()
@ -886,7 +886,7 @@ add_executable(c4group
src/c4group/C4Update.cpp src/c4group/C4Update.cpp
src/lib/Standard.cpp src/lib/Standard.cpp
src/c4group/CStdFile.cpp src/c4group/CStdFile.cpp
src/lib/StdMarkup.cpp src/lib/C4Markup.cpp
src/lib/StdBuf.cpp src/lib/StdBuf.cpp
src/lib/StdCompiler.cpp src/lib/StdCompiler.cpp
src/platform/StdFile.cpp src/platform/StdFile.cpp
@ -920,8 +920,8 @@ add_executable(c4script
src/lib/StdBuf.h src/lib/StdBuf.h
src/lib/StdCompiler.cpp src/lib/StdCompiler.cpp
src/lib/StdCompiler.h src/lib/StdCompiler.h
src/lib/StdMarkup.cpp src/lib/C4Markup.cpp
src/lib/StdMarkup.h src/lib/C4Markup.h
src/lib/StdResStr2.cpp src/lib/StdResStr2.cpp
src/lib/StdResStr2.h src/lib/StdResStr2.h
src/platform/GetTime.cpp src/platform/GetTime.cpp
@ -1073,7 +1073,7 @@ endforeach()
# Precompiled header support, gcc part (it needs the cxx flags) # Precompiled header support, gcc part (it needs the cxx flags)
############################################################################ ############################################################################
include(GccPchSupport.cmake) include(GccPchSupport)
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
if(NOT DEFINED USE_GCC_PCH) if(NOT DEFINED USE_GCC_PCH)
message("Using GCC precompiled headers! USE_GCC_PCH=Off to disable.") message("Using GCC precompiled headers! USE_GCC_PCH=Off to disable.")
@ -1107,11 +1107,13 @@ CHECK_INCLUDE_FILE_CXX(getopt.h HAVE_GETOPT_H)
add_subdirectory(thirdparty/tinyxml) add_subdirectory(thirdparty/tinyxml)
target_link_libraries(clonk tinyxml) target_link_libraries(clonk tinyxml)
if(GENERATE_MINI_DUMP) if(WIN32)
FIND_PATH(DBGHELP_INCLUDE_DIR NAMES dbghelp.h) find_package(DbgHelp)
FINDLIB(DBGHELP_LIBRARIES NAMES dbghelp) if(DBGHELP_FOUND)
target_link_libraries(clonk ${DBGHELP_LIBRARIES}) target_link_libraries(clonk ${DBGHELP_LIBRARIES})
include_directories(${DBGHELP_INCLUDE_DIR}) include_directories(${DBGHELP_INCLUDE_DIR})
endif()
set(HAVE_DBGHELP ${DBGHELP_FOUND})
endif() endif()
if(USE_GL) if(USE_GL)

View File

@ -25,20 +25,18 @@ noinst_LIBRARIES = lib.a
# Some defines and warning options # Some defines and warning options
if RECENT_GCC if RECENT_GCC
GCC_FLAGS = -pipe
WARNING_FLAGS = -Wall -Wextra -Wredundant-decls -Wendif-labels -Wpointer-arith \ WARNING_FLAGS = -Wall -Wextra -Wredundant-decls -Wendif-labels -Wpointer-arith \
-Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wsign-promo \ -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wsign-promo \
-Wno-reorder -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-reorder -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo
##-Wmissing-format-attribute -Wdisabled-optimization -Wlogical-op ##-Wmissing-format-attribute -Wdisabled-optimization -Wlogical-op
##-Weffc++ -Wold-style-cast -Woverloaded-virtual -Wunsafe-loop-optimizations ##-Weffc++ -Wold-style-cast -Woverloaded-virtual -Wunsafe-loop-optimizations
else else
GCC_FLAGS =
WARNING_FLAGS = -Wall WARNING_FLAGS = -Wall
endif endif
AM_CXXFLAGS = $(PTHREAD_CFLAGS) $(WINDOWS_CFLAGS) $(WARNING_FLAGS) $(GCC_FLAGS) AM_CXXFLAGS = $(PTHREAD_CFLAGS) $(WINDOWS_CFLAGS) $(WARNING_FLAGS)
AM_CFLAGS = -Wall $(GCC_FLAGS) AM_CFLAGS = -Wall
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-I$(builddir) \ -I$(builddir) \
@ -128,8 +126,8 @@ src/lib/StdBuf.cpp \
src/lib/StdBuf.h \ src/lib/StdBuf.h \
src/lib/StdCompiler.cpp \ src/lib/StdCompiler.cpp \
src/lib/StdCompiler.h \ src/lib/StdCompiler.h \
src/lib/StdMarkup.cpp \ src/lib/C4Markup.cpp \
src/lib/StdMarkup.h \ src/lib/C4Markup.h \
src/lib/StdResStr2.cpp \ src/lib/StdResStr2.cpp \
src/lib/StdResStr2.h \ src/lib/StdResStr2.h \
src/network/C4NetIO.cpp \ src/network/C4NetIO.cpp \
@ -404,8 +402,7 @@ src/lib/texture/C4FacetEx.h \
src/lib/texture/C4Facet.h \ src/lib/texture/C4Facet.h \
src/lib/texture/C4GraphicsResource.cpp \ src/lib/texture/C4GraphicsResource.cpp \
src/lib/texture/C4GraphicsResource.h \ src/lib/texture/C4GraphicsResource.h \
src/lib/texture/C4Surface.cpp \ src/lib/texture/C4SurfaceLoaders.cpp \
src/lib/texture/C4Surface.h \
src/lib/texture/StdPNG.cpp \ src/lib/texture/StdPNG.cpp \
src/lib/texture/StdPNG.h \ src/lib/texture/StdPNG.h \
src/network/C4Client.cpp \ src/network/C4Client.cpp \
@ -464,15 +461,14 @@ src/platform/C4ViewportWindow.cpp \
src/platform/C4ViewportWindow.h \ src/platform/C4ViewportWindow.h \
src/platform/C4windowswrapper.h \ src/platform/C4windowswrapper.h \
src/platform/PlatformAbstraction.h \ src/platform/PlatformAbstraction.h \
src/platform/StdApp.h \ src/platform/C4App.h \
src/platform/StdAppCommon.cpp \ src/platform/C4App.cpp \
src/platform/StdD3D.cpp \ src/platform/StdD3D.cpp \
src/platform/StdD3D.h \ src/platform/StdD3D.h \
src/platform/StdD3DShader.cpp \ src/platform/StdD3DShader.cpp \
src/platform/StdD3DShader.h \ src/platform/StdD3DShader.h \
src/platform/StdDDraw2.cpp \ src/platform/StdDDraw2.cpp \
src/platform/StdDDraw2.h \ src/platform/StdDDraw2.h \
src/platform/StdFacet.h \
src/platform/StdFont.cpp \ src/platform/StdFont.cpp \
src/platform/StdFont.h \ src/platform/StdFont.h \
src/platform/StdGL.cpp \ src/platform/StdGL.cpp \
@ -480,15 +476,15 @@ src/platform/StdGLCtx.cpp \
src/platform/StdGL.h \ src/platform/StdGL.h \
src/platform/StdNoGfx.cpp \ src/platform/StdNoGfx.cpp \
src/platform/StdNoGfx.h \ src/platform/StdNoGfx.h \
src/platform/StdSurface2.cpp \ src/platform/C4Surface.cpp \
src/platform/StdSurface2.h \ src/platform/C4Surface.h \
src/platform/StdSurface8.cpp \ src/platform/StdSurface8.cpp \
src/platform/StdSurface8.h \ src/platform/StdSurface8.h \
src/platform/StdSync.h \ src/platform/StdSync.h \
src/platform/StdTApp.cpp \ src/platform/C4AppT.cpp \
src/platform/StdVideo.cpp \ src/platform/StdVideo.cpp \
src/platform/StdVideo.h \ src/platform/StdVideo.h \
src/platform/StdWindow.h \ src/platform/C4Window.h \
src/res/Brush.h \ src/res/Brush.h \
src/res/Cursor.h \ src/res/Cursor.h \
src/res/Dynamic.h \ src/res/Dynamic.h \
@ -544,9 +540,9 @@ src/platform/StdJoystick.h
endif endif
if MACOSX if MACOSX
clonk_SOURCES += \ clonk_SOURCES += \
src/platform/StdMacApp.mm \ src/platform/C4AppMac.mm \
src/platform/C4FileMonitorMac.mm \ src/platform/C4FileMonitorMac.mm \
src/platform/StdMacWindow.mm \ src/platform/C4WindowMac.mm \
src/platform/ClonkAppDelegate.h \ src/platform/ClonkAppDelegate.h \
src/platform/ClonkAppDelegate.mm \ src/platform/ClonkAppDelegate.mm \
src/platform/ConsoleWindowController.h \ src/platform/ConsoleWindowController.h \
@ -561,16 +557,16 @@ src/platform/ClonkMainMenuActions.h \
src/platform/ClonkMainMenuActions.mm src/platform/ClonkMainMenuActions.mm
endif endif
if SDL_MAIN_LOOP if SDL_MAIN_LOOP
clonk_SOURCES += src/platform/StdSDLApp.cpp src/platform/StdSDLWindow.cpp clonk_SOURCES += src/platform/C4AppSDL.cpp src/platform/C4WindowSDL.cpp
else else
if WIN32 if WIN32
clonk_SOURCES += src/platform/StdWindow.cpp clonk_SOURCES += src/platform/C4WindowWin32.cpp
else else
clonk_SOURCES += src/platform/StdXApp.cpp src/platform/StdXWindow.cpp src/platform/StdXPrivate.h clonk_SOURCES += src/platform/C4AppX.cpp src/platform/C4WindowX.cpp src/platform/C4AppXImpl.h
endif endif
endif endif
if DEVELOPER_MODE if DEVELOPER_MODE
clonk_SOURCES += src/platform/StdGtkWindow.cpp src/platform/StdGtkWindow.h src/editor/C4ConsoleGTK.cpp clonk_SOURCES += src/platform/C4WindowGTK.cpp src/platform/C4WindowGTK.h src/editor/C4ConsoleGTK.cpp
endif endif
clonk_LDADD = \ clonk_LDADD = \

View File

@ -0,0 +1,33 @@
# - Find DbgHelp
# Find the DbgHelp library
# This module defines
# DBGHELP_INCLUDE_DIR, where to find dbghelp.h, etc.
# DBGHELP_LIBRARIES, the libraries needed to use DbgHelp.
# DBGHELP_FOUND, If false, do not try to use DbgHelp.
#=============================================================================
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2011 Nicolas Hake
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# See isc_license.txt for full license and disclaimer.
#
# "Clonk" is a registered trademark of Matthes Bender.
# See clonk_trademark_license.txt for full license.
#=============================================================================
find_path(DBGHELP_INCLUDE_DIR NAMES dbghelp.h)
set(DBGHELP_NAMES ${DBGHELP_NAMES} dbghelp)
find_library(DBGHELP_LIBRARY NAMES ${DBGHELP_NAMES})
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBGHELP DEFAULT_MSG DBGHELP_LIBRARY DBGHELP_INCLUDE_DIR)
if(DBGHELP_FOUND)
set(DBGHELP_LIBRARIES ${DBGHELP_LIBRARY})
endif()
mark_as_advanced(DBGHELP_LIBRARY DBGHELP_INCLUDE_DIR)

View File

@ -209,4 +209,4 @@
#cmakedefine HAVE_STATIC_ASSERT 1 #cmakedefine HAVE_STATIC_ASSERT 1
/* Generate minidumps on crash */ /* Generate minidumps on crash */
#cmakedefine GENERATE_MINI_DUMP 1 #cmakedefine HAVE_DBGHELP 1

View File

@ -35,6 +35,12 @@
<name>on_ending</name> <name>on_ending</name>
<desc> <desc>
Specifies what happens once end is reached. There are the following possibilities: Specifies what happens once end is reached. There are the following possibilities:
<table>
<rowh><col>Constant</col><col>Value</col><col>Description</col></rowh>
<row><col>ANIM_Loop</col><col>0</col><col>Once end is reached the value is reset to begin so the cycle restarts.</col></row>
<row><col>ANIM_Hold</col><col>1</col><col>Once end is reached the value remains constant.</col></row>
<row><col>ANIM_Remove</col><col>2</col><col>Once end is reached the corresponding animation is removed the same way as if <funclink>AnimationStop</funclink> were called to the exact point in time. For combination nodes the child node with the smaller weight is removed.</col></row>
</table>
</desc> </desc>
</param> </param>
</params> </params>

View File

@ -23,7 +23,8 @@
</param> </param>
</params> </params>
</syntax> </syntax>
<desc>Adds or removes an object (usually a clonk) to or from the crew of a player. The object must have the CrewMember property set in the DefCore.</desc> <desc>Adds or removes an object (usually a clonk) to or from the crew of a player. The object must have the CrewMember property set in the DefCore.
This does not add the object to the permanent crew of the player, use <funclink>MakeCrewMember</funclink> for that.</desc>
<examples> <examples>
<example> <example>
<code>var nClonk = <funclink>CreateObject</funclink>(Clonk); <code>var nClonk = <funclink>CreateObject</funclink>(Clonk);

View File

@ -1,7 +1,7 @@
[Head] [Head]
Icon=39 Icon=39
Title=Boomrace Title=Boomrace
Version=4,10,0,0 Version=5,2,0,1
MaxPlayer=8 MaxPlayer=8
[Definitions] [Definitions]

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=ArrowWheel id=ArrowWheel
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Structure Category=C4D_Structure
Width=16 Width=16
Height=16 Height=16

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=BrickEdge id=BrickEdge
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_MouseIgnore Category=C4D_StaticBack|C4D_MouseIgnore
Width=10 Width=10
Height=10 Height=10

View File

@ -30,7 +30,7 @@ func Initialize()
var c=goal->AddCheckpoint(1000, 100, mode); var c=goal->AddCheckpoint(1000, 100, mode);
c->SetCPSize(40); c->SetCPSize(40);
var door=CreateObject(StoneDoor, 135, 60, NO_OWNER); var door=CreateObject(StoneDoor, 135, 60, NO_OWNER);
door->CloseGateDoor(); door->CloseDoor();
AddEffect("AutoOpen",door,100,100); AddEffect("AutoOpen",door,100,100);
goal->SetFinishpoint(100, 150, true); goal->SetFinishpoint(100, 150, true);
@ -83,7 +83,7 @@ global func FxAutoOpenTimer(object pTarget, effect, int timer)
{ {
if(FindObject(Find_ID(Plane),Find_InRect(0,0,2000,500))) if(FindObject(Find_ID(Plane),Find_InRect(0,0,2000,500)))
{ {
pTarget->OpenGateDoor(); pTarget->OpenDoor();
return -1; return -1;
} }
else return 1; else return 1;
@ -149,7 +149,7 @@ protected func Doors()
var gate = CreateObject(StoneDoor, 865, 1195, NO_OWNER); var gate = CreateObject(StoneDoor, 865, 1195, NO_OWNER);
var wheel = CreateObject(SpinWheel, 1045, 1165, NO_OWNER); var wheel = CreateObject(SpinWheel, 1045, 1165, NO_OWNER);
wheel->SetStoneDoor(gate); wheel->SetStoneDoor(gate);
gate->CloseGateDoor(); gate->CloseDoor();
AddEffect("SparklingAttention",wheel,100,100); AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(StoneDoor, 1155, 1026, NO_OWNER); var gate = CreateObject(StoneDoor, 1155, 1026, NO_OWNER);
@ -157,54 +157,54 @@ protected func Doors()
var straw = CreateObject(DoorTarget,1850,820,NO_OWNER); var straw = CreateObject(DoorTarget,1850,820,NO_OWNER);
straw->SetGate(gate); straw->SetGate(gate);
straw->SetAction("Float"); straw->SetAction("Float");
gate->CloseGateDoor(); gate->CloseDoor();
AddEffect("SparklingAttention",wheel,100,100); AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(StoneDoor, 1875, 761, NO_OWNER); var gate = CreateObject(StoneDoor, 1875, 761, NO_OWNER);
var wheel = CreateObject(SpinWheel, 1752, 1148, NO_OWNER); var wheel = CreateObject(SpinWheel, 1752, 1148, NO_OWNER);
wheel->SetStoneDoor(gate); wheel->SetStoneDoor(gate);
gate->CloseGateDoor(); gate->CloseDoor();
AddEffect("SparklingAttention",wheel,100,100); AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(StoneDoor, 1875, 864, NO_OWNER); var gate = CreateObject(StoneDoor, 1875, 864, NO_OWNER);
var wheel = CreateObject(SpinWheel, 1116, 1038, NO_OWNER); var wheel = CreateObject(SpinWheel, 1116, 1038, NO_OWNER);
wheel->SetStoneDoor(gate); wheel->SetStoneDoor(gate);
gate->CloseGateDoor(); gate->CloseDoor();
AddEffect("SparklingAttention",wheel,100,100); AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(StoneDoor, 3115, 685, NO_OWNER); var gate = CreateObject(StoneDoor, 3115, 685, NO_OWNER);
var wheel = CreateObject(SpinWheel, 3140, 588, NO_OWNER); var wheel = CreateObject(SpinWheel, 3140, 588, NO_OWNER);
wheel->SetStoneDoor(gate); wheel->SetStoneDoor(gate);
gate->CloseGateDoor(); gate->CloseDoor();
AddEffect("SparklingAttention",wheel,100,100); AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(StoneDoor, 585, 915, NO_OWNER); var gate = CreateObject(StoneDoor, 585, 915, NO_OWNER);
var wheel = CreateObject(SpinWheel, 853, 681, NO_OWNER); var wheel = CreateObject(SpinWheel, 853, 681, NO_OWNER);
wheel->SetStoneDoor(gate); wheel->SetStoneDoor(gate);
gate->CloseGateDoor(); gate->CloseDoor();
AddEffect("SparklingAttention",wheel,100,100); AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(StoneDoor, 345, 740, NO_OWNER); var gate = CreateObject(StoneDoor, 345, 740, NO_OWNER);
var wheel = CreateObject(SpinWheel, 60, 644, NO_OWNER); var wheel = CreateObject(SpinWheel, 60, 644, NO_OWNER);
wheel->SetStoneDoor(gate); wheel->SetStoneDoor(gate);
gate->CloseGateDoor(); gate->CloseDoor();
AddEffect("SparklingAttention",wheel,100,100); AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(StoneDoor, 1935, 550, NO_OWNER); var gate = CreateObject(StoneDoor, 1935, 550, NO_OWNER);
var wheel = CreateObject(SpinWheel, 1900, 565, NO_OWNER); var wheel = CreateObject(SpinWheel, 1900, 565, NO_OWNER);
wheel->SetStoneDoor(gate); wheel->SetStoneDoor(gate);
gate->CloseGateDoor(); gate->CloseDoor();
AddEffect("SparklingAttention",wheel,100,100); AddEffect("SparklingAttention",wheel,100,100);
var gate = CreateObject(StoneDoor, 2965, 310, NO_OWNER); var gate = CreateObject(StoneDoor, 2965, 310, NO_OWNER);
var wheel = CreateObject(SpinWheel, 3260, 328, NO_OWNER); var wheel = CreateObject(SpinWheel, 3260, 328, NO_OWNER);
wheel->SetStoneDoor(gate); wheel->SetStoneDoor(gate);
gate->CloseGateDoor(); gate->CloseDoor();
var gate = CreateObject(StoneDoor, 3285, 1150, NO_OWNER); var gate = CreateObject(StoneDoor, 3285, 1150, NO_OWNER);
var wheel = CreateObject(SpinWheel, 3220, 1200, NO_OWNER); var wheel = CreateObject(SpinWheel, 3220, 1200, NO_OWNER);
wheel->SetStoneDoor(gate); wheel->SetStoneDoor(gate);
gate->CloseGateDoor(); gate->CloseDoor();
} }

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=StoneDoor id=StoneDoor
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Structure Category=C4D_Structure
Width=10 Width=10
Height=40 Height=40

View File

@ -7,14 +7,14 @@ protected func Initialize()
return; return;
} }
public func OpenGateDoor() public func OpenDoor()
{ {
AddEffect("IntMoveGateUp", this, 100, 1, this); AddEffect("IntMoveGateUp", this, 100, 1, this);
Sound("GateMove"); Sound("GateMove");
return; return;
} }
public func CloseGateDoor() public func CloseDoor()
{ {
AddEffect("IntMoveGateDown", this, 100, 1, this); AddEffect("IntMoveGateDown", this, 100, 1, this);
Sound("GateMove"); Sound("GateMove");

View File

@ -8,7 +8,7 @@ public func ControlUp(object clonk)
if(GetEffect("SparklingAttention",this)) RemoveEffect("SparklingAttention",this); if(GetEffect("SparklingAttention",this)) RemoveEffect("SparklingAttention",this);
if (GetAction() == "Still" && targetdoor) if (GetAction() == "Still" && targetdoor)
{ {
targetdoor->OpenGateDoor(); targetdoor->OpenDoor();
SetAction("SpinLeft"); SetAction("SpinLeft");
Sound("Chain.ogg"); Sound("Chain.ogg");
} }

View File

@ -36,7 +36,7 @@ public func Burst()
{ {
DrawParticleLine("Straw",0,0,AbsX(gate->GetX()),AbsY(gate->GetY()),6,80,RGB(255,255,255),RGB(255,150,200)); DrawParticleLine("Straw",0,0,AbsX(gate->GetX()),AbsY(gate->GetY()),6,80,RGB(255,255,255),RGB(255,150,200));
RemoveObject(); RemoveObject();
gate->OpenGateDoor(); gate->OpenDoor();
CastParticles("Straw",130,30,0,-3,30,40,RGB(255,255,255),RGB(255,120,200)); CastParticles("Straw",130,30,0,-3,30,40,RGB(255,255,255),RGB(255,120,200));
} }

View File

@ -1,7 +1,7 @@
[Head] [Head]
Icon=34 Icon=34
Title=Cavern Title=Cavern
Version=4,10,0,0 Version=5,2,0,1
MaxPlayer=12 MaxPlayer=12
[Definitions] [Definitions]

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Goal_FlagMeshes id=Goal_FlagMeshes
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=30 Width=30
Height=40 Height=40

View File

@ -1,7 +1,7 @@
[Head] [Head]
Icon=13 Icon=13
Title=FrozenFortress Title=FrozenFortress
Version=4,10,0,0 Version=5,2,0,1
MinPlayer=2 MinPlayer=2
MaxPlayer=8 MaxPlayer=8

View File

@ -24,12 +24,12 @@ protected func Initialize()
goal->SetFlagBase(2, LandscapeWidth() - 135, 264); goal->SetFlagBase(2, LandscapeWidth() - 135, 264);
CreateObject(Rule_KillLogs); CreateObject(Rule_KillLogs);
var gate = CreateObject(StoneDoor, 345, 273, NO_OWNER); var gate = CreateObject(StoneDoor, 345, 272, NO_OWNER);
gate->SetClrModulation(RGB(180,205,255)); gate->SetClrModulation(RGB(140,185,255));
AddEffect("AutoControl", gate, 100, 3, gate, nil, 1); gate->SetAutoControl(1);
var gate = CreateObject(StoneDoor, LandscapeWidth()-344, 273, NO_OWNER); var gate = CreateObject(StoneDoor, LandscapeWidth()-344, 272, NO_OWNER);
gate->SetClrModulation(RGB(180,205,255)); gate->SetClrModulation(RGB(140,185,255));
AddEffect("AutoControl", gate, 100, 3, gate, nil, 2); gate->SetAutoControl(2);
// Chests with weapons. // Chests with weapons.
var chest; var chest;

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=FrostboltScroll id=FrostboltScroll
Version=4,9,10,10 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=HardeningScroll id=HardeningScroll
Version=4,9,10,10 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=WindScroll id=WindScroll
Version=4,9,10,10 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -2,85 +2,17 @@
#appendto StoneDoor #appendto StoneDoor
private func GetStrength() { return 300; }
protected func Damage() protected func Damage()
{ {
if (GetDamage() > 300) // Destroy if damage above strength.
if (GetDamage() > GetStrength())
{ {
if (!this) CastObjects(Ice, 5, 20);
return false; return RemoveObject();
var ctr = Contained();
// Transfer all contents to container.
while (Contents())
if (!ctr || !Contents()->Enter(ctr))
Contents()->Exit();
// Split components.
for (var i = 0, compid; compid = GetComponent(nil, i); ++i)
for (var j = 0; j < GetComponent(compid); ++j)
{
var comp = CreateObject(compid, nil, nil, GetOwner());
if (OnFire()) comp->Incinerate();
if (!ctr || !comp->Enter(ctr))
{
comp->SetR(Random(360));
comp->SetXDir(Random(3) - 1);
comp->SetYDir(Random(3) - 1);
comp->SetRDir(Random(3) - 1);
comp->SetClrModulation(RGB(130,190,255));//give rocks the color of brick
}
}
RemoveObject();
} }
// Change appearance.
DoGraphics();
return; return;
} }
private func IsOpen()
{
if (GBackSolid(0, -20))
return true;
return false;
}
private func IsClosed()
{
if (GBackSolid(0, 19))
return true;
return false;
}
// Automatically open for team stored in effect var 0.
protected func FxAutoControlStart(object target, effect, int temporary, int team)
{
if (temporary == 0)
effect.team = team;
return 1;
}
protected func FxAutoControlTimer(object target, effect, int time)
{
var d = 0;
if (IsOpen())
d = 30;
var team = effect.team;
var open_door = false;
DigFreeRect(target->GetX()-5,target->GetY()-22,10,44);
for (var clonk in FindObjects(Find_OCF(OCF_CrewMember), Find_InRect(-50, d - 30, 100, 60)))
{
var plr = clonk->GetOwner();
var plr_team = GetPlayerTeam(plr);
if (plr_team == team)
open_door = true;
else
{
open_door = false;
break;
}
}
if (open_door && IsClosed())
OpenGateDoor();
if (!open_door && IsOpen())
CloseGateDoor();
return 1;
}

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Goal_FlagMeshes id=Goal_FlagMeshes
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=30 Width=30
Height=40 Height=40

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=LifeGem id=LifeGem
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=PyreGem id=PyreGem
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,7 +1,7 @@
[Head] [Head]
Icon=13 Icon=13
Title=Hideout Title=Hideout
Version=4,10,0,0 Version=5,2,0,1
MinPlayer=2 MinPlayer=2
MaxPlayer=8 MaxPlayer=8

View File

@ -24,21 +24,21 @@ protected func Initialize()
// Doors and spinwheels. // Doors and spinwheels.
var gate, wheel; var gate, wheel;
gate = CreateObject(StoneDoor, 365, 449, NO_OWNER); gate = CreateObject(StoneDoor, 365, 448, NO_OWNER);
gate->DoDamage(50); // Upper doors are easier to destroy gate->DoDamage(50); // Upper doors are easier to destroy
AddEffect("AutoControl", gate, 100, 3, gate, nil, 1); gate->SetAutoControl(1);
gate = CreateObject(StoneDoor, 341, 585, NO_OWNER); gate = CreateObject(StoneDoor, 341, 584, NO_OWNER);
AddEffect("AutoControl", gate, 100, 3, gate, nil, 1); gate->SetAutoControl(1);
gate = CreateObject(StoneDoor, 693, 544, NO_OWNER); gate = CreateObject(StoneDoor, 693, 544, NO_OWNER);
gate->DoDamage(80); // Middle doors even easier gate->DoDamage(80); // Middle doors even easier
wheel = CreateObject(SpinWheel, 660, 552, NO_OWNER); wheel = CreateObject(SpinWheel, 660, 552, NO_OWNER);
wheel->SetStoneDoor(gate); wheel->SetStoneDoor(gate);
gate = CreateObject(StoneDoor, LandscapeWidth() - 364, 449, NO_OWNER); gate = CreateObject(StoneDoor, LandscapeWidth() - 364, 448, NO_OWNER);
gate->DoDamage(50); // Upper doors are easier to destroy gate->DoDamage(50); // Upper doors are easier to destroy
AddEffect("AutoControl", gate, 100, 3, gate, nil, 2); gate->SetAutoControl(2);
gate = CreateObject(StoneDoor, LandscapeWidth() - 340, 585, NO_OWNER); gate = CreateObject(StoneDoor, LandscapeWidth() - 340, 584, NO_OWNER);
AddEffect("AutoControl", gate, 100, 3, gate, nil, 2); gate->SetAutoControl(2);
gate = CreateObject(StoneDoor, LandscapeWidth() - 692, 544, NO_OWNER); gate = CreateObject(StoneDoor, LandscapeWidth() - 692, 544, NO_OWNER);
gate->DoDamage(80); // Middle doors even easier gate->DoDamage(80); // Middle doors even easier
wheel = CreateObject(SpinWheel, LandscapeWidth() - 660, 552, NO_OWNER); wheel = CreateObject(SpinWheel, LandscapeWidth() - 660, 552, NO_OWNER);

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=ShieldGem id=ShieldGem
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=CrystalShield id=CrystalShield
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack
Width=8 Width=8
Height=7 Height=7

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=SlowGem id=SlowGem
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,84 +0,0 @@
// Stone door destructible, and auto control for the base.
#appendto StoneDoor
protected func Damage()
{
if (GetDamage() > 180)
{
if (!this)
return false;
var ctr = Contained();
// Transfer all contents to container.
while (Contents())
if (!ctr || !Contents()->Enter(ctr))
Contents()->Exit();
// Split components.
for (var i = 0, compid; compid = GetComponent(nil, i); ++i)
for (var j = 0; j < GetComponent(compid); ++j)
{
var comp = CreateObject(compid, nil, nil, GetOwner());
if (OnFire()) comp->Incinerate();
if (!ctr || !comp->Enter(ctr))
{
comp->SetR(Random(360));
comp->SetXDir(Random(3) - 1);
comp->SetYDir(Random(3) - 1);
comp->SetRDir(Random(3) - 1);
comp->SetClrModulation(RGB(240,210,200)); //give rocks the color of brick
}
}
RemoveObject();
}
return;
}
private func IsOpen()
{
if (GBackSolid(0, -20))
return true;
return false;
}
private func IsClosed()
{
if (GBackSolid(0, 19))
return true;
return false;
}
// Automatically open for team stored in effect var 0.
protected func FxAutoControlStart(object target, effect, int temporary, int team)
{
if (temporary == 0)
effect.team = team;
return 1;
}
protected func FxAutoControlTimer(object target, effect, int time)
{
var d = 0;
if (IsOpen())
d = 30;
var team = effect.team;
var open_door = false;
for (var clonk in FindObjects(Find_OCF(OCF_CrewMember), Find_InRect(-50, d - 30, 100, 60)))
{
var plr = clonk->GetOwner();
var plr_team = GetPlayerTeam(plr);
if (plr_team == team)
open_door = true;
else
{
open_door = false;
break;
}
}
if (open_door && IsClosed())
OpenGateDoor();
if (!open_door && IsOpen())
CloseGateDoor();
return 1;
}

View File

@ -1,4 +1,4 @@
[DefCore] [DefCore]
id=KingWeapons id=KingWeapons
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack

View File

@ -1,6 +1,6 @@
[Head] [Head]
Title=MoltenMonarch Title=MoltenMonarch
Version=4,10,0,0 Version=5,2,0,1
Icon=23 Icon=23
MinPlayer=2 MinPlayer=2
MaxPlayer=8 MaxPlayer=8

View File

@ -1,6 +1,6 @@
[Head] [Head]
Title=Overcast Title=Overcast
Version=4,10,0,0 Version=5,2,0,1
MinPlayer=2 MinPlayer=2
[Definitions] [Definitions]

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=FireballScroll id=FireballScroll
Version=4,9,10,10 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=TeleportScroll id=TeleportScroll
Version=4,9,10,10 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=WindScroll id=WindScroll
Version=4,9,10,10 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[Head] [Head]
Title=Bottom Title=Bottom
Version=4,10,0,0 Version=5,2,0,1
MinPlayer=2 MinPlayer=2
MaxPlayer=4 MaxPlayer=4

View File

@ -1,6 +1,6 @@
[Head] [Head]
Title=Ruins Title=Ruins
Version=4,10,0,0 Version=5,2,0,1
MinPlayer=2 MinPlayer=2
MaxPlayer=6 MaxPlayer=6

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Grass id=Grass
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Background Category=C4D_StaticBack|C4D_Background
Width=12 Width=12
Height=7 Height=7

View File

@ -1,6 +1,6 @@
[Head] [Head]
Title=Overcast Title=Overcast
Version=4,10,0,0 Version=5,2,0,1
MinPlayer=2 MinPlayer=2
[Definitions] [Definitions]

View File

@ -1,6 +1,6 @@
[Head] [Head]
Title=Overcast Title=Overcast
Version=4,10,0,0 Version=5,2,0,1
MinPlayer=2 MinPlayer=2
[Definitions] [Definitions]

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=FireballScroll id=FireballScroll
Version=4,9,10,10 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=ThunderScroll id=ThunderScroll
Version=4,9,10,10 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=WindScroll id=WindScroll
Version=4,9,10,10 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=8 Width=8
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=BigBoomattack id=BigBoomattack
Version=4,9,10,0 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
ContactCalls=1 ContactCalls=1
Width=60 Width=60

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Boomattack id=Boomattack
Version=4,9,10,10 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
ContactCalls=1 ContactCalls=1
Width=15 Width=15

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Goal_SaveTheWindmills id=Goal_SaveTheWindmills
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Goal Category=C4D_StaticBack|C4D_Goal
Width=1 Width=1
Height=1 Height=1

View File

@ -1,7 +1,7 @@
[Head] [Head]
Icon=39 Icon=39
Title=Windmill Title=Windmill
Version=4,10,0,0 Version=5,2,0,1
MaxPlayer=8 MaxPlayer=8
[Definitions] [Definitions]

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Butterfly id=Butterfly
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Living Category=C4D_Living
TimerCall=Activity TimerCall=Activity
ContactCalls=1 ContactCalls=1

View File

@ -1,4 +1,4 @@
[DefCore] [DefCore]
id=Skin_Alchemist id=Skin_Alchemist
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack

View File

@ -1,4 +1,4 @@
[DefCore] [DefCore]
id=BackpackGraphic id=BackpackGraphic
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Clonk id=Clonk
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Living Category=C4D_Living
Width=8 Width=8
Height=20 Height=20

View File

@ -844,7 +844,7 @@ func FxIntWalkTimer(pTarget, effect)
{ {
// Test Waterlevel // Test Waterlevel
if(GBackLiquid(0, -5)) if(GBackLiquid(0, -5) && !Contained())
{ {
SetAction("Swim"); SetAction("Swim");
if(GetComDir() == COMD_Left) if(GetComDir() == COMD_Left)

View File

@ -1,4 +1,4 @@
[DefCore] [DefCore]
id=Skin_Steampunk id=Skin_Steampunk
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Fx_Bubble id=Fx_Bubble
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Vehicle Category=C4D_Vehicle
Width=2 Width=2
Height=2 Height=2

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=CloudEffect id=CloudEffect
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Vehicle|C4D_Parallax Category=C4D_Vehicle|C4D_Parallax
Width=10 Width=10
Height=10 Height=10

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Flame id=Flame
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=15 Width=15
Height=20 Height=20

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=BrickEdge id=BrickEdge
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_MouseIgnore Category=C4D_StaticBack|C4D_MouseIgnore
Width=8 Width=8
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=MovingBrick id=MovingBrick
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Structure Category=C4D_Structure
Width=40 Width=40
Height=8 Height=8

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Environment_AcidRain id=Environment_AcidRain
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Environment Category=C4D_StaticBack|C4D_Environment
Width=1 Width=1
Height=1 Height=1

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Cloud id=Cloud
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Vehicle|C4D_Background Category=C4D_Vehicle|C4D_Background
Timer=25 Timer=25
TimerCall=TimedEvents TimerCall=TimedEvents

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Environment_Clouds id=Environment_Clouds
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Environment Category=C4D_StaticBack|C4D_Environment
Width=1 Width=1
Height=1 Height=1

View File

@ -1,4 +1,4 @@
[DefCore] [DefCore]
id=Lightning id=Lightning
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Column id=Column
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Structure Category=C4D_Structure
Width=20 Width=20
Height=50 Height=50

View File

@ -1,4 +1,4 @@
[DefCore] [DefCore]
id=Earthquake id=Earthquake
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Environment Category=C4D_StaticBack|C4D_Environment

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=BigRock id=BigRock
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack
Width=40 Width=40
Height=40 Height=40

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Environment_Celestial id=Environment_Celestial
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Environment|C4D_StaticBack Category=C4D_Environment|C4D_StaticBack
Width=1 Width=1
Height=1 Height=1

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Environment_Time id=Environment_Time
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Environment Category=C4D_StaticBack|C4D_Environment
Width=1 Width=1
Height=1 Height=1

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Moon id=Moon
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Background|C4D_Parallax Category=C4D_StaticBack|C4D_Background|C4D_Parallax
Width=64 Width=64
Height=64 Height=64

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Star id=Star
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Background Category=C4D_StaticBack|C4D_Background
Width=2 Width=2
Height=2 Height=2

View File

@ -7,7 +7,7 @@ protected func Initialize()
var alpha=0; var alpha=0;
if(GetTime()<300 || GetTime()>1140) alpha=255; if(GetTime()<300 || GetTime()>1140) alpha=255;
SetClrModulation(RGBa(255,255,255,alpha)); SetClrModulation(RGBa(255,255,255,alpha));
this["Parallaxity"] = [10+Random(30),100]; this["Parallaxity"] = [10,10];
SetCategory(GetCategory() | C4D_Parallax | C4D_Background); SetCategory(GetCategory() | C4D_Parallax | C4D_Background);
} }

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Fern id=Fern
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack
Timer=350 Timer=350
TimerCall=Seed TimerCall=Seed

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Grass id=Grass
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Background Category=C4D_StaticBack|C4D_Background
Width=12 Width=12
Height=7 Height=7

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Mushroom id=Mushroom
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Timer=350 Timer=350
TimerCall=Seed TimerCall=Seed

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Rank id=Rank
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack
Width=28 Width=28
Height=10 Height=10

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Seaweed id=Seaweed
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Object Category=C4D_Object
Width=6 Width=6
Height=16 Height=16

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Tree_Coniferous id=Tree_Coniferous
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack
Timer=350 Timer=350
TimerCall=Seed TimerCall=Seed

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Trunk id=Trunk
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack
Width=20 Width=20
Height=60 Height=60

View File

@ -1,5 +1,5 @@
[DefCore] [DefCore]
id=Goal_CaptureTheFlag id=Goal_CaptureTheFlag
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Goal Category=C4D_StaticBack|C4D_Goal
Picture=0,0,128,128 Picture=0,0,128,128

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Goal_Flag id=Goal_Flag
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_Vehicle Category=C4D_Vehicle
Width=16 Width=16
Height=26 Height=26

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=Goal_FlagBase id=Goal_FlagBase
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack
Width=10 Width=10
Height=5 Height=5

View File

@ -1,5 +1,5 @@
[DefCore] [DefCore]
id=Goal_DeathMatch id=Goal_DeathMatch
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Goal Category=C4D_StaticBack|C4D_Goal
Picture=0,0,128,128 Picture=0,0,128,128

View File

@ -1,5 +1,5 @@
[DefCore] [DefCore]
id=Goal_KingOfTheHill id=Goal_KingOfTheHill
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Goal Category=C4D_StaticBack|C4D_Goal
Picture=0,0,64,64 Picture=0,0,64,64

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=KingOfTheHill_Location id=KingOfTheHill_Location
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack
Width=10 Width=10
Height=10 Height=10

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=KingOfTheHill_Marker id=KingOfTheHill_Marker
Version=4,10,0,0 Version=5,2,0,1
#Category=C4D_StaticBack | C4D_Foreground | C4D_IgnoreFoW #Category=C4D_StaticBack | C4D_Foreground | C4D_IgnoreFoW
Category=C4D_StaticBack | C4D_IgnoreFoW Category=C4D_StaticBack | C4D_IgnoreFoW
Width=15 Width=15

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=KingOfTheHill_Star id=KingOfTheHill_Star
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack | C4D_IgnoreFoW Category=C4D_StaticBack | C4D_IgnoreFoW
Width=30 Width=30
Height=30 Height=30

View File

@ -1,5 +1,5 @@
[DefCore] [DefCore]
id=Goal_LastManStanding id=Goal_LastManStanding
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Goal Category=C4D_StaticBack|C4D_Goal
Picture=0,0,128,128 Picture=0,0,128,128

View File

@ -1,5 +1,5 @@
[DefCore] [DefCore]
id=RelaunchContainer id=RelaunchContainer
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack
ClosedContainer=2 ClosedContainer=2

View File

@ -1,5 +1,5 @@
[DefCore] [DefCore]
id=Goal_Melee id=Goal_Melee
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Goal Category=C4D_StaticBack|C4D_Goal
Picture=0,0,128,128 Picture=0,0,128,128

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=GUI_GoalArrow id=GUI_GoalArrow
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack
Width=16 Width=16
Height=36 Height=36

View File

@ -1,4 +1,4 @@
[DefCore] [DefCore]
id=ParkourCheckpoint id=ParkourCheckpoint
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack

View File

@ -1,6 +1,6 @@
[DefCore] [DefCore]
id=ParkourFlag id=ParkourFlag
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack Category=C4D_StaticBack
Width=64 Width=64
Height=64 Height=64

View File

@ -1,5 +1,5 @@
[DefCore] [DefCore]
id=Goal_Parkour id=Goal_Parkour
Version=4,10,0,0 Version=5,2,0,1
Category=C4D_StaticBack|C4D_Goal Category=C4D_StaticBack|C4D_Goal
Picture=0,0,128,128 Picture=0,0,128,128

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