Merge branch 'master' into rope
Conflicts: planet/Experimental.ocd/LiftTower.ocd/Script.c planet/Objects.ocd/Structures.ocd/Elevator.ocd/Script.crope
|
@ -0,0 +1 @@
|
|||
node: $Format:%H$
|
|
@ -0,0 +1,3 @@
|
|||
.git_archival export-subst
|
||||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
|
@ -1,5 +1,3 @@
|
|||
syntax: glob
|
||||
|
||||
autom4te.cache
|
||||
*~
|
||||
*.bak
|
113
CMakeLists.txt
|
@ -35,6 +35,8 @@ set(OC_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
|||
separate_arguments(OC_CXX_FLAGS)
|
||||
set(OC_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
||||
separate_arguments(OC_CXX_FLAGS_DEBUG)
|
||||
set(OC_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
|
||||
separate_arguments(OC_EXE_LINKER_FLAGS)
|
||||
set(OC_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG})
|
||||
separate_arguments(OC_EXE_LINKER_FLAGS_DEBUG)
|
||||
|
||||
|
@ -65,6 +67,8 @@ endif()
|
|||
if(NOT USE_GL AND NOT USE_DIRECTX)
|
||||
message(STATUS "No graphics display enabled; building dedicated server")
|
||||
SET(USE_CONSOLE ON CACHE INTERNAL "Build dedicated server")
|
||||
else()
|
||||
SET(USE_CONSOLE OFF)
|
||||
endif()
|
||||
if(UNIX AND NOT USE_SDL_MAINLOOP AND NOT APPLE AND NOT USE_CONSOLE)
|
||||
option(USE_X11 "Use X11 to create windows etc." ON)
|
||||
|
@ -142,7 +146,12 @@ if(MSVC_VERSION)
|
|||
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")
|
||||
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")
|
||||
endif()
|
||||
|
||||
if(WIN32 AND MINGW)
|
||||
# Activate DEP and ASLR
|
||||
list(APPEND OC_EXE_LINKER_FLAGS "-Wl,--nxcompat -Wl,--dynamicbase")
|
||||
endif()
|
||||
############################################################################
|
||||
# List target source files. Don't directly create a target since we condi-
|
||||
|
@ -246,8 +255,8 @@ set(OC_CLONK_SOURCES
|
|||
src/graphics/C4FacetEx.cpp
|
||||
src/graphics/C4FacetEx.h
|
||||
src/graphics/C4Facet.h
|
||||
src/graphics/C4Fonts.cpp
|
||||
src/graphics/C4Fonts.h
|
||||
src/graphics/C4FontLoader.cpp
|
||||
src/graphics/C4FontLoader.h
|
||||
src/graphics/C4GraphicsResource.cpp
|
||||
src/graphics/C4GraphicsResource.h
|
||||
src/graphics/C4Surface.cpp
|
||||
|
@ -344,8 +353,6 @@ set(OC_CLONK_SOURCES
|
|||
src/landscape/C4PathFinder.h
|
||||
src/landscape/C4PXS.cpp
|
||||
src/landscape/C4PXS.h
|
||||
src/landscape/C4Region.cpp
|
||||
src/landscape/C4Region.h
|
||||
src/landscape/C4Scenario.cpp
|
||||
src/landscape/C4Scenario.h
|
||||
src/landscape/C4Sky.cpp
|
||||
|
@ -484,7 +491,6 @@ set(OC_CLONK_SOURCES
|
|||
src/object/C4Shape.h
|
||||
src/platform/C4App.cpp
|
||||
src/platform/C4App.h
|
||||
src/platform/C4AppT.cpp
|
||||
src/platform/C4AppWin32Impl.h
|
||||
src/platform/C4FileMonitor.cpp
|
||||
src/platform/C4FileMonitor.h
|
||||
|
@ -498,10 +504,10 @@ set(OC_CLONK_SOURCES
|
|||
src/platform/C4SoundLoaders.h
|
||||
src/platform/C4SoundSystem.cpp
|
||||
src/platform/C4SoundSystem.h
|
||||
src/platform/C4StdInProc.cpp
|
||||
src/platform/C4StdInProc.h
|
||||
src/platform/C4Video.cpp
|
||||
src/platform/C4Video.h
|
||||
src/platform/C4VideoPlayback.cpp
|
||||
src/platform/C4VideoPlayback.h
|
||||
src/platform/C4Window.h
|
||||
src/platform/C4windowswrapper.h
|
||||
src/platform/GetTime.cpp
|
||||
|
@ -509,8 +515,6 @@ set(OC_CLONK_SOURCES
|
|||
src/platform/PlatformAbstraction.h
|
||||
src/platform/StdFile.cpp
|
||||
src/platform/StdFile.h
|
||||
src/platform/StdFont.cpp
|
||||
src/platform/StdFont.h
|
||||
src/platform/StdRegistry.cpp
|
||||
src/platform/StdRegistry.h
|
||||
src/platform/StdScheduler.cpp
|
||||
|
@ -560,8 +564,8 @@ mark_as_advanced(OC_SYSTEM_SOURCES)
|
|||
if(APPLE)
|
||||
list(APPEND OC_SYSTEM_SOURCES
|
||||
src/platform/C4FileMonitorMac.mm
|
||||
src/platform/ClonkAppDelegate.h
|
||||
src/platform/ClonkAppDelegate.mm
|
||||
src/platform/C4AppDelegate.h
|
||||
src/platform/C4AppDelegate.mm
|
||||
)
|
||||
else()
|
||||
list(APPEND OC_SYSTEM_SOURCES
|
||||
|
@ -631,6 +635,10 @@ elseif(USE_SDL_MAINLOOP)
|
|||
src/platform/C4AppSDL.cpp
|
||||
src/platform/C4WindowSDL.cpp
|
||||
)
|
||||
elseif(USE_CONSOLE)
|
||||
list(APPEND OC_SYSTEM_SOURCES
|
||||
src/platform/C4AppT.cpp
|
||||
)
|
||||
elseif(WIN32)
|
||||
list(APPEND OC_SYSTEM_SOURCES
|
||||
src/editor/C4ConsoleWin32.cpp
|
||||
|
@ -643,14 +651,16 @@ elseif(USE_COCOA)
|
|||
src/editor/C4ConsoleCocoa.mm
|
||||
src/platform/C4AppMac.mm
|
||||
src/platform/C4WindowMac.mm
|
||||
src/platform/ClonkMainMenuActions.mm
|
||||
src/platform/ClonkOpenGLView.h
|
||||
src/platform/ClonkOpenGLView.mm
|
||||
src/platform/ClonkWindowController.h
|
||||
src/platform/ClonkWindowController.mm
|
||||
src/platform/C4AppDelegate+MainMenuActions.h
|
||||
src/platform/C4AppDelegate+MainMenuActions.mm
|
||||
src/graphics/C4DrawGLMac.h
|
||||
src/graphics/C4DrawGLMac.mm
|
||||
src/platform/C4WindowController.h
|
||||
src/platform/C4WindowController.mm
|
||||
src/platform/CocoaKeycodeMap.h
|
||||
src/platform/ConsoleWindowController.h
|
||||
src/platform/ConsoleWindowController.mm
|
||||
src/editor/C4EditorWindowController.h
|
||||
src/editor/C4EditorWindowController.mm
|
||||
src/platform/ObjectiveCAssociated.h
|
||||
)
|
||||
endif()
|
||||
if(WITH_AUTOMATIC_UPDATE)
|
||||
|
@ -730,10 +740,8 @@ CHECK_INCLUDE_FILE_CXX(natupnp.h HAVE_NATUPNP_H)
|
|||
# 'Bool' and 'Window' to be defined. Unfortunately, this doesn't exist
|
||||
# as a CXX version (yet?).
|
||||
include(CheckIncludeFiles)
|
||||
CHECK_INCLUDE_FILES(X11/Xlib.h X11/extensions/xf86vmode.h HAVE_X11_EXTENSIONS_XF86VMODE_H)
|
||||
CHECK_INCLUDE_FILES(X11/Xlib.h X11/extensions/Xrandr.h HAVE_X11_EXTENSIONS_XRANDR_H)
|
||||
CHECK_INCLUDE_FILES(X11/Xlib.h X11/keysym.h HAVE_X11_KEYSYM_H)
|
||||
CHECK_INCLUDE_FILES(X11/Xlib.h X11/xpm.h HAVE_X11_XPM_H)
|
||||
CHECK_INCLUDE_FILE_CXX(iconv.h HAVE_ICONV)
|
||||
|
||||
if(HAVE_ICONV)
|
||||
|
@ -839,9 +847,23 @@ if(USE_GTK)
|
|||
endif()
|
||||
|
||||
if(USE_OPEN_AL)
|
||||
FINDLIB(VORBIS_LIBRARY NAMES vorbis)
|
||||
FINDLIB(VORBISFILE_LIBRARY NAMES vorbisfile)
|
||||
FINDLIB(OGG_LIBRARY NAMES ogg)
|
||||
if(MSVC)
|
||||
if(${FIND_LIBRARY_USE_LIB64_PATHS})
|
||||
FINDLIB(OPENAL_LIBRARY NAMES OpenAL64)
|
||||
else()
|
||||
FINDLIB(OPENAL_LIBRARY NAMES OpenAL32)
|
||||
endif()
|
||||
FINDLIB(OGG_LIBRARY NAMES libogg_static)
|
||||
FINDLIB(VORBIS_LIBRARY NAMES libvorbis_static)
|
||||
FINDLIB(VORBISFILE_LIBRARY NAMES libvorbisfile_static)
|
||||
else()
|
||||
FINDLIB(VORBIS_LIBRARY NAMES vorbis)
|
||||
FINDLIB(VORBISFILE_LIBRARY NAMES vorbisfile)
|
||||
FINDLIB(OGG_LIBRARY NAMES ogg)
|
||||
endif()
|
||||
if(NOT APPLE)
|
||||
FINDLIB(ALUT_LIBRARY NAMES alut)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
############################################################################
|
||||
|
@ -864,10 +886,10 @@ if(APPLE)
|
|||
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/FullscreenWindow.xib
|
||||
src/res/ConsoleGUIWindow.xib
|
||||
src/res/ClonkWindow.xib
|
||||
src/res/ConsoleWindow.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
|
||||
|
@ -984,10 +1006,17 @@ target_link_libraries(clonk
|
|||
${PNG_LIBRARIES}
|
||||
${JPEG_LIBRARIES}
|
||||
${ICONV_LIBRARY}
|
||||
${VORBIS_LIBRARY}
|
||||
${VORBISFILE_LIBRARY}
|
||||
${OGG_LIBRARY}
|
||||
)
|
||||
|
||||
if(USE_OPEN_AL)
|
||||
target_link_libraries(clonk
|
||||
${OPENAL_LIBRARY}
|
||||
${ALUT_LIBRARY}
|
||||
${VORBIS_LIBRARY}
|
||||
${VORBISFILE_LIBRARY}
|
||||
${OGG_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
target_link_libraries(c4group
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
|
@ -1065,7 +1094,7 @@ if(UNIX)
|
|||
# Don't put this into CMAKE_CXX_FLAGS because otherwise it is cached,
|
||||
# and when the path is changed both the old and new definition appears
|
||||
# in the list of flags.
|
||||
add_definitions("-DOC_SYSTEM_DATA_DIR=\"${CMAKE_INSTALL_PREFIX}/share/openclonk\"")
|
||||
add_definitions("-DOC_SYSTEM_DATA_DIR=\"${CMAKE_INSTALL_PREFIX}/share/games/openclonk\"")
|
||||
endif()
|
||||
if(OC_CXX_FLAGS)
|
||||
list(REMOVE_DUPLICATES OC_CXX_FLAGS)
|
||||
|
@ -1081,8 +1110,15 @@ set(CMAKE_CXX_FLAGS_DEBUG "" CACHE STRING "Flags used by the compiler during deb
|
|||
foreach(FLAG ${OC_CXX_FLAGS_DEBUG})
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
|
||||
endforeach()
|
||||
if(OC_EXE_LINKER_FLAGS)
|
||||
list(REMOVE_DUPLICATES OC_EXE_LINKER_FLAGS)
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS "" CACHE STRING "Flags used by the linker." FORCE)
|
||||
foreach(FLAG ${OC_EXE_LINKER_FLAGS})
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FLAG}" CACHE STRING "Flags used by the linker." FORCE)
|
||||
endforeach()
|
||||
if(OC_EXE_LINKER_FLAGS_DEBUG)
|
||||
list(REMOVE_DUPLICATES OC_CXX_FLAGS_DEBUG)
|
||||
list(REMOVE_DUPLICATES OC_EXE_LINKER_FLAGS_DEBUG)
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "" CACHE STRING "Flags used by the linker during debug builds." FORCE)
|
||||
foreach(FLAG ${OC_EXE_LINKER_FLAGS_DEBUG})
|
||||
|
@ -1121,6 +1157,7 @@ if (APPLE)
|
|||
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(clonk PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
|
||||
|
||||
if (USE_APPLE_CLANG)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
|
||||
|
@ -1206,13 +1243,9 @@ if(USE_GTK)
|
|||
endif()
|
||||
if(USE_X11)
|
||||
FINDLIB(X11_LIBRARIES X11)
|
||||
FINDLIB(XPM_LIBRARIES Xpm)
|
||||
FINDLIB(XXF86VM_LIBRARIES Xxf86vm)
|
||||
FINDLIB(XRANDR_LIBRARIES Xrandr)
|
||||
target_link_libraries(clonk
|
||||
${X11_LIBRARIES}
|
||||
${XPM_LIBRARIES}
|
||||
${XXF86VM_LIBRARIES}
|
||||
${XRANDR_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
@ -1340,7 +1373,9 @@ set(OC_C4GROUPS
|
|||
Sound.ocg
|
||||
System.ocg
|
||||
Objects.ocd
|
||||
BackToTheRocks.ocf
|
||||
Arena.ocf
|
||||
Parkour.ocf
|
||||
Settlement.ocf
|
||||
Tutorial.ocf
|
||||
)
|
||||
|
||||
|
@ -1362,7 +1397,7 @@ foreach(group ${OC_C4GROUPS})
|
|||
DEPENDS c4group
|
||||
VERBATIM
|
||||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${group} DESTINATION share/openclonk)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${group} DESTINATION share/games/openclonk)
|
||||
endif()
|
||||
endforeach()
|
||||
if (NOT APPLE)
|
||||
|
|
|
@ -22,4 +22,4 @@ David Dormagen (Zapper)
|
|||
Tobias Zwick (Newton)
|
||||
|
||||
<Thanks to Contributors>
|
||||
Benjamin Herr (Loriel), Matthias Rottländer (Matthi), Felix Riese (Fungiform), Manuel Riecke (MrBeast), Benedict Etzel (B_E), Carl-Philip Hänsch (Carli), Alexander Semeniuk (AlteredARMOR), Florian Graier (Nachtfalter), ST-DDT, Asmageddon, Merten Ehmig (Pluto), Mark Haßelbusch (Marky), Luchs, Peewee, Lauri Niskanen (Ape), Dominik Bayerl (Kanibal), Faby, Checkmaty, Gurkenglas, Clonkine, mizipzor, mixi, RedWolf Design GmbH and all those who contributed to previous Clonk titles for the passion they put into the game and for agreeing to make Clonk open source.
|
||||
Benjamin Herr (Loriel), Matthias Rottländer (Matthi), Felix Riese (Fungiform), Manuel Riecke (MrBeast), Benedict Etzel (B_E), Carl-Philip Hänsch (Carli), Alexander Semeniuk (AlteredARMOR), Florian Graier (Nachtfalter), Daniel Theuke (ST-DDT), Asmageddon, Merten Ehmig (Pluto), Mark Haßelbusch (Marky), Luchs, Peewee, Lauri Niskanen (Ape), Dominik Bayerl (Kanibal), Faby, Checkmaty, Gurkenglas, Clonkine, mizipzor, mixi, Pyrit, grgecko, Koronis, RedWolf Design GmbH and all those who contributed to previous Clonk titles for the passion they put into the game and for agreeing to make Clonk open source.
|
70
Makefile.am
|
@ -27,9 +27,9 @@ noinst_LIBRARIES = lib.a
|
|||
if RECENT_GCC
|
||||
WARNING_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
|
||||
-Wno-reorder -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual
|
||||
##-Wmissing-format-attribute -Wdisabled-optimization -Wlogical-op
|
||||
##-Weffc++ -Wold-style-cast -Woverloaded-virtual -Wunsafe-loop-optimizations
|
||||
##-Weffc++ -Wold-style-cast -Wunsafe-loop-optimizations
|
||||
else
|
||||
WARNING_FLAGS = -Wall
|
||||
endif
|
||||
|
@ -60,11 +60,6 @@ AM_CPPFLAGS = \
|
|||
-I$(srcdir)/thirdparty \
|
||||
$(BOOST_CPPFLAGS)
|
||||
|
||||
##BUILT_SOURCES = hgrevision.h
|
||||
##hgrevision.h: $(srcdir)/.hg/dirstate
|
||||
## $(srcdir)/tools/get_hg_revision.sh > hgrevision.h
|
||||
##$(srcdir)/.hg/dirstate:
|
||||
|
||||
BUILT_SOURCES = C4Version.h
|
||||
CLEANFILES =
|
||||
DISTCLEANFILES = C4Version.h
|
||||
|
@ -208,7 +203,6 @@ src/game/C4GraphicsSystem.h \
|
|||
src/game/C4Physics.h \
|
||||
src/game/C4Viewport.cpp \
|
||||
src/game/C4Viewport.h \
|
||||
src/game/ClonkMain.cpp \
|
||||
src/gamescript/C4Effect.cpp \
|
||||
src/gamescript/C4Effects.h \
|
||||
src/gamescript/C4FindObject.cpp \
|
||||
|
@ -234,8 +228,8 @@ src/graphics/C4Facet.cpp \
|
|||
src/graphics/C4FacetEx.cpp \
|
||||
src/graphics/C4FacetEx.h \
|
||||
src/graphics/C4Facet.h \
|
||||
src/graphics/C4Fonts.cpp \
|
||||
src/graphics/C4Fonts.h \
|
||||
src/graphics/C4FontLoader.cpp \
|
||||
src/graphics/C4FontLoader.h \
|
||||
src/graphics/C4GraphicsResource.cpp \
|
||||
src/graphics/C4GraphicsResource.h \
|
||||
src/graphics/C4Surface.cpp \
|
||||
|
@ -309,8 +303,6 @@ src/gui/C4StartupPlrSelDlg.cpp \
|
|||
src/gui/C4StartupPlrSelDlg.h \
|
||||
src/gui/C4StartupScenSelDlg.cpp \
|
||||
src/gui/C4StartupScenSelDlg.h \
|
||||
src/gui/C4UpdateDlg.cpp \
|
||||
src/gui/C4UpdateDlg.h \
|
||||
src/gui/C4UpperBoard.cpp \
|
||||
src/gui/C4UpperBoard.h \
|
||||
src/landscape/C4Landscape.cpp \
|
||||
|
@ -334,8 +326,6 @@ src/landscape/C4PathFinder.cpp \
|
|||
src/landscape/C4PathFinder.h \
|
||||
src/landscape/C4PXS.cpp \
|
||||
src/landscape/C4PXS.h \
|
||||
src/landscape/C4Region.cpp \
|
||||
src/landscape/C4Region.h \
|
||||
src/landscape/C4Scenario.cpp \
|
||||
src/landscape/C4Scenario.h \
|
||||
src/landscape/C4Sky.cpp \
|
||||
|
@ -457,7 +447,6 @@ src/object/C4Shape.cpp \
|
|||
src/object/C4Shape.h \
|
||||
src/platform/C4App.cpp \
|
||||
src/platform/C4App.h \
|
||||
src/platform/C4AppT.cpp \
|
||||
src/platform/C4AppWin32Impl.h \
|
||||
src/platform/C4FileMonitor.cpp \
|
||||
src/platform/C4FileMonitor.h \
|
||||
|
@ -471,16 +460,14 @@ src/platform/C4SoundLoaders.cpp \
|
|||
src/platform/C4SoundLoaders.h \
|
||||
src/platform/C4SoundSystem.cpp \
|
||||
src/platform/C4SoundSystem.h \
|
||||
src/platform/C4StdInProc.cpp \
|
||||
src/platform/C4StdInProc.h \
|
||||
src/platform/C4Video.cpp \
|
||||
src/platform/C4Video.h \
|
||||
src/platform/C4VideoPlayback.cpp \
|
||||
src/platform/C4VideoPlayback.h \
|
||||
src/platform/C4Window.h \
|
||||
src/platform/C4windowswrapper.h \
|
||||
src/platform/PlatformAbstraction.cpp \
|
||||
src/platform/PlatformAbstraction.h \
|
||||
src/platform/StdFont.cpp \
|
||||
src/platform/StdFont.h \
|
||||
src/platform/StdSync.h \
|
||||
src/platform/StdVideo.cpp \
|
||||
src/platform/StdVideo.h \
|
||||
|
@ -544,6 +531,16 @@ src/res/engine.rc \
|
|||
src/res/resource.h
|
||||
endif
|
||||
|
||||
if MACOSX
|
||||
clonk_SOURCES += \
|
||||
src/platform/C4AppDelegate.h \
|
||||
src/platform/C4AppDelegate.mm \
|
||||
src/platform/C4FileMonitorMac.mm
|
||||
else
|
||||
clonk_SOURCES += \
|
||||
src/game/ClonkMain.cpp
|
||||
endif
|
||||
|
||||
if SDL_MAIN_LOOP
|
||||
clonk_SOURCES += \
|
||||
src/platform/C4AppSDL.cpp \
|
||||
|
@ -558,6 +555,10 @@ src/platform/C4AppGTK.cpp \
|
|||
src/platform/C4AppGTKImpl.h \
|
||||
src/platform/C4WindowGTK.cpp
|
||||
else
|
||||
if CONSOLE
|
||||
clonk_SOURCES += \
|
||||
src/platform/C4AppT.cpp
|
||||
else
|
||||
if WIN32
|
||||
clonk_SOURCES += \
|
||||
src/editor/C4ConsoleWin32.cpp \
|
||||
|
@ -568,23 +569,28 @@ endif
|
|||
if MACOSX
|
||||
clonk_SOURCES += \
|
||||
src/editor/C4ConsoleCocoa.mm \
|
||||
src/editor/C4EditorWindowController.h \
|
||||
src/editor/C4EditorWindowController.mm \
|
||||
src/graphics/C4DrawGLMac.h \
|
||||
src/graphics/C4DrawGLMac.mm \
|
||||
src/platform/C4AppDelegate+MainMenuActions.h \
|
||||
src/platform/C4AppDelegate+MainMenuActions.mm \
|
||||
src/platform/C4AppMac.mm \
|
||||
src/platform/C4FileMonitorMac.mm \
|
||||
src/platform/C4WindowController.h \
|
||||
src/platform/C4WindowController.mm \
|
||||
src/platform/C4WindowMac.mm \
|
||||
src/platform/ClonkAppDelegate.h \
|
||||
src/platform/ClonkAppDelegate.mm \
|
||||
src/platform/ConsoleWindowController.h \
|
||||
src/platform/ConsoleWindowController.mm \
|
||||
src/platform/ClonkWindowController.h \
|
||||
src/platform/ClonkWindowController.mm \
|
||||
src/platform/ClonkOpenGLView.h \
|
||||
src/platform/ClonkOpenGLView.mm \
|
||||
src/platform/CocoaKeycodeMap.h \
|
||||
src/platform/ClonkMainMenuActions.h \
|
||||
src/platform/ClonkMainMenuActions.mm
|
||||
src/platform/ObjectiveCAssociated.h
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if AUTOUPDATE
|
||||
clonk_SOURCES += \
|
||||
src/gui/C4UpdateDlg.cpp \
|
||||
src/gui/C4UpdateDlg.h
|
||||
endif
|
||||
|
||||
if LIBUPNP
|
||||
clonk_SOURCES += src/network/C4Network2UPnPLinux.cpp
|
||||
|
@ -725,7 +731,9 @@ c4groups = \
|
|||
Sound.ocg \
|
||||
System.ocg \
|
||||
Objects.ocd \
|
||||
BackToTheRocks.ocf \
|
||||
Arena.ocf \
|
||||
Parkour.ocf \
|
||||
Settlement.ocf \
|
||||
Tutorial.ocf
|
||||
|
||||
CLEANFILES += $(c4groups)
|
||||
|
|
23
Version.txt
|
@ -12,33 +12,20 @@ SET(C4ENGINENICK "openclonk")
|
|||
SET(C4ENGINEID "${C4PROJECT_TLD}.${C4PROJECT_DOMAIN}.${C4ENGINENICK}")
|
||||
|
||||
SET(C4XVER1 5)
|
||||
SET(C4XVER2 2)
|
||||
SET(C4XVER2 3)
|
||||
SET(C4XVER3 90)
|
||||
SET(C4XVER4 21)
|
||||
|
||||
# C4VERSIONBUILDNAME should be witty and somewhat frequently changing
|
||||
# for alpha and beta releases, and meaningful and stable for stable releases.
|
||||
# Both variables need to start with a space if they aren't empty.
|
||||
SET(C4VERSIONBUILDNAME " Beyond the Rocks")
|
||||
SET(C4VERSIONEXTRA " Alpha")
|
||||
SET(C4VERSIONEXTRA " Delta")
|
||||
|
||||
############################################################################
|
||||
# Get revision from Mercurial
|
||||
# Get revision from Git
|
||||
############################################################################
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.hg_archival.txt")
|
||||
# Archives generated by hg archive
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/.hg_archival.txt" C4REVISION
|
||||
LIMIT_COUNT 1
|
||||
REGEX "node: [0-9a-f]+"
|
||||
)
|
||||
string(SUBSTRING "${C4REVISION}" 6 12 C4REVISION)
|
||||
else()
|
||||
# Working copies
|
||||
execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND "hg" "id" "--id"
|
||||
OUTPUT_VARIABLE C4REVISION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
include(GitGetChangesetID)
|
||||
git_get_changeset_id(C4REVISION)
|
||||
|
||||
############################################################################
|
||||
# Get year
|
||||
|
|
|
@ -24,15 +24,17 @@
|
|||
|
||||
find_path(UPNP_INCLUDE_DIR NAMES upnp.h PATH_SUFFIXES upnp)
|
||||
set(UPNP_NAMES ${UPNP_NAMES} upnp)
|
||||
set(THREADUTIL_NAMES ${THREADUTIL_NAMES} threadutil)
|
||||
set(IXML_NAMES ${IXML_NAMES} ixml)
|
||||
find_library(UPNP_LIBRARY NAMES ${UPNP_NAMES})
|
||||
find_library(THREADUTIL_LIBRARY NAMES ${THREADUTIL_NAMES})
|
||||
find_library(IXML_LIBRARY NAMES ${IXML_NAMES})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UPNP DEFAULT_MSG UPNP_LIBRARY IXML_LIBRARY UPNP_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UPNP DEFAULT_MSG UPNP_LIBRARY THREADUTIL_LIBRARY IXML_LIBRARY UPNP_INCLUDE_DIR)
|
||||
|
||||
if(UPNP_FOUND)
|
||||
set(UPNP_LIBRARIES ${UPNP_LIBRARY} ${IXML_LIBRARY})
|
||||
set(UPNP_LIBRARIES ${UPNP_LIBRARY} ${THREADUTIL_LIBRARY} ${IXML_LIBRARY})
|
||||
set(UPNP_INCLUDE_DIR ${UPNP_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
function(git_get_changeset_id VAR)
|
||||
find_package(Git QUIET)
|
||||
if (GIT_FOUND)
|
||||
execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND "${GIT_EXECUTABLE}" "rev-parse" "HEAD"
|
||||
RESULT_VARIABLE GIT_RESULT
|
||||
OUTPUT_VARIABLE C4REVISION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
|
||||
if(GIT_RESULT EQUAL 0)
|
||||
string(SUBSTRING "${C4REVISION}" 0 12 C4REVISION)
|
||||
execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND "${GIT_EXECUTABLE}" "status" "--porcelain"
|
||||
OUTPUT_VARIABLE GIT_STATUS
|
||||
)
|
||||
string(REGEX MATCH "^[MADRC ][MD ]" WORKDIR_DIRTY "${GIT_STATUS}")
|
||||
endif()
|
||||
endif()
|
||||
if (NOT C4REVISION)
|
||||
# Git not found or not a git workdir
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/.git_archival" C4REVISION
|
||||
LIMIT_COUNT 1
|
||||
REGEX "node: [0-9a-f]+"
|
||||
)
|
||||
string(LENGTH "${C4REVISION}" revlength)
|
||||
if(revlength LESS 18)
|
||||
set(C4REVISION "unknown")
|
||||
message(WARNING "Could not retrieve git revision. Please set GIT_EXECUTABLE!")
|
||||
else()
|
||||
string(SUBSTRING "${C4REVISION}" 6 12 C4REVISION)
|
||||
endif()
|
||||
unset(revlength)
|
||||
endif()
|
||||
if(WORKDIR_DIRTY)
|
||||
set(C4REVISION "${C4REVISION}+")
|
||||
endif()
|
||||
set(${VAR} "${C4REVISION}" PARENT_SCOPE)
|
||||
endfunction()
|
|
@ -1,12 +1,18 @@
|
|||
/* Activate DebugRecs */
|
||||
#cmakedefine DEBUGREC 1
|
||||
|
||||
/* Generate minidumps on crash */
|
||||
#cmakedefine HAVE_DBGHELP 1
|
||||
|
||||
/* Define to 1 if you have the <direct.h> header file. */
|
||||
#cmakedefine HAVE_DIRECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <execinfo.h> header file. */
|
||||
/* The backtrace function is declared in execinfo.h and works */
|
||||
#cmakedefine HAVE_EXECINFO_H 1
|
||||
|
||||
/* Whether FMOD shall be used */
|
||||
#cmakedefine HAVE_FMOD 1
|
||||
|
||||
/* Define to 1 if you have FreeType2. */
|
||||
#cmakedefine HAVE_FREETYPE 1
|
||||
|
||||
|
@ -31,20 +37,14 @@
|
|||
/* Define to 1 if you have SDL_mixer. */
|
||||
#cmakedefine HAVE_LIBSDL_MIXER 1
|
||||
|
||||
/* Define to 1 if FMOD is available */
|
||||
#cmakedefine HAVE_FMOD 1
|
||||
|
||||
/* Use OpenAL for playing sounds */
|
||||
#cmakedefine USE_OPEN_AL 1
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#cmakedefine HAVE_LOCALE_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#cmakedefine HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <multimon.h> header file. */
|
||||
#cmakedefine HAVE_MULTIMON_H 1
|
||||
/* Define to 1 if you have support for nullptr. */
|
||||
#cmakedefine HAVE_NULLPTR 1
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#cmakedefine HAVE_POLL_H 1
|
||||
|
@ -64,6 +64,9 @@
|
|||
/* Define to 1 if you have the <readline/readline.h> header file. */
|
||||
#cmakedefine HAVE_READLINE_READLINE_H 1
|
||||
|
||||
/* C++ Compiler has rvalue references, a C++0x feature. */
|
||||
#cmakedefine HAVE_RVALUE_REF 1
|
||||
|
||||
/* Define to 1 if you have SDL. */
|
||||
#cmakedefine HAVE_SDL 1
|
||||
|
||||
|
@ -73,6 +76,9 @@
|
|||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#cmakedefine HAVE_SIGNAL_H 1
|
||||
|
||||
/* Define to 1 if your compiler supports static_assert */
|
||||
#cmakedefine HAVE_STATIC_ASSERT 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
|
||||
|
@ -85,15 +91,15 @@
|
|||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#cmakedefine HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/inotify.h> header file. */
|
||||
#cmakedefine HAVE_SYS_INOTIFY_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/eventfd.h> header file. */
|
||||
#cmakedefine HAVE_SYS_EVENTFD_H
|
||||
#cmakedefine HAVE_SYS_EVENTFD_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/file.h> header file. */
|
||||
#cmakedefine HAVE_SYS_FILE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/inotify.h> header file. */
|
||||
#cmakedefine HAVE_SYS_INOTIFY_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#cmakedefine HAVE_SYS_SOCKET_H 1
|
||||
|
||||
|
@ -114,18 +120,12 @@
|
|||
|
||||
#cmakedefine HAVE_VFW32
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/xf86vmode.h> header file. */
|
||||
#cmakedefine HAVE_X11_EXTENSIONS_XF86VMODE_H 1
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
|
||||
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H 1
|
||||
|
||||
/* Define to 1 if you have the <X11/keysym.h> header file. */
|
||||
#cmakedefine HAVE_X11_KEYSYM_H 1
|
||||
|
||||
/* Define to 1 if you have the <X11/xpm.h> header file. */
|
||||
#cmakedefine HAVE_X11_XPM_H 1
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#cmakedefine ICONV_CONST
|
||||
|
||||
|
@ -169,44 +169,32 @@
|
|||
/* MP3 music */
|
||||
#cmakedefine USE_MP3 1
|
||||
|
||||
/* OpenAL sound */
|
||||
#cmakedefine USE_OPEN_AL 1
|
||||
|
||||
/* Define to 1 if SDL is used for the main loop */
|
||||
#cmakedefine USE_SDL_MAINLOOP 1
|
||||
|
||||
/* Define to 1 if the X Window System is used */
|
||||
#cmakedefine USE_X11 1
|
||||
|
||||
/* Enable automatic update system */
|
||||
#cmakedefine WITH_AUTOMATIC_UPDATE 1
|
||||
|
||||
/* Developer mode */
|
||||
#cmakedefine WITH_DEVELOPER_MODE 1
|
||||
|
||||
/* Glib */
|
||||
#cmakedefine WITH_GLIB 1
|
||||
|
||||
/* Use GTK+3 for the developer mode */
|
||||
#cmakedefine WITH_GTK3 1
|
||||
|
||||
/* Enable the automatic update system */
|
||||
#cmakedefine WITH_AUTOMATIC_UPDATE 1
|
||||
|
||||
/* Define to 1 if the X Window System is missing or not being used. */
|
||||
#cmakedefine X_DISPLAY_MISSING 1
|
||||
|
||||
/* compile with debug options */
|
||||
#cmakedefine _DEBUG
|
||||
|
||||
/* Define to 1 if rvalue references are supported */
|
||||
#cmakedefine HAVE_RVALUE_REF 1
|
||||
#cmakedefine _DEBUG 1
|
||||
|
||||
/* Define to 1 if you have support for precompiled headers */
|
||||
#cmakedefine HAVE_PRECOMPILED_HEADERS 1
|
||||
|
||||
/* Define to 1 if you have support for nullptr. */
|
||||
#cmakedefine HAVE_NULLPTR 1
|
||||
|
||||
/* Use Apple Cocoa for the UI */
|
||||
#cmakedefine USE_COCOA 1
|
||||
|
||||
/* Define to 1 if your compiler supports static_assert */
|
||||
#cmakedefine HAVE_STATIC_ASSERT 1
|
||||
|
||||
/* Generate minidumps on crash */
|
||||
#cmakedefine HAVE_DBGHELP 1
|
||||
|
|
24
config.h.in
|
@ -6,6 +6,12 @@
|
|||
/* define if the Boost library is available */
|
||||
#undef HAVE_BOOST
|
||||
|
||||
/* Generate minidumps on crash */
|
||||
#undef HAVE_DBGHELP
|
||||
|
||||
/* Define to 1 if you have the <dbghelp.h> header file. */
|
||||
#undef HAVE_DBGHELP_H
|
||||
|
||||
/* Define to 1 if you have the <direct.h> header file. */
|
||||
#undef HAVE_DIRECT_H
|
||||
|
||||
|
@ -42,12 +48,12 @@
|
|||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <multimon.h> header file. */
|
||||
#undef HAVE_MULTIMON_H
|
||||
|
||||
/* Define to 1 if you have the <natupnp.h> header file. */
|
||||
#undef HAVE_NATUPNP_H
|
||||
|
||||
/* Define to 1 if you have support for nullptr. */
|
||||
#undef HAVE_NULLPTR
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#undef HAVE_POLL_H
|
||||
|
||||
|
@ -81,6 +87,9 @@
|
|||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#undef HAVE_SIGNAL_H
|
||||
|
||||
/* Define to 1 if your compiler supports static_assert */
|
||||
#undef HAVE_STATIC_ASSERT
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
|
@ -123,18 +132,12 @@
|
|||
/* */
|
||||
#undef HAVE_VFW32
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/xf86vmode.h> header file. */
|
||||
#undef HAVE_X11_EXTENSIONS_XF86VMODE_H
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
|
||||
#undef HAVE_X11_EXTENSIONS_XRANDR_H
|
||||
|
||||
/* Define to 1 if you have the <X11/keysym.h> header file. */
|
||||
#undef HAVE_X11_KEYSYM_H
|
||||
|
||||
/* Define to 1 if you have the <X11/xpm.h> header file. */
|
||||
#undef HAVE_X11_XPM_H
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#undef ICONV_CONST
|
||||
|
||||
|
@ -175,9 +178,6 @@
|
|||
/* DirectX graphics */
|
||||
#undef USE_DIRECTX
|
||||
|
||||
/* Whether FMOD shall be used */
|
||||
#undef USE_FMOD
|
||||
|
||||
/* OpenGL graphics */
|
||||
#undef USE_GL
|
||||
|
||||
|
|
69
configure.ac
|
@ -20,7 +20,9 @@ dnl Process this file with autoconf to produce a configure script.
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
AC_PREREQ([2.67])
|
||||
AC_INIT([clonk], [5])
|
||||
AC_INIT([clonk], [m4_esyscmd([sed -n 's/SET(C4XVER1\s\+\(.\+\))/\1/ p' Version.txt | tr -d '\n' | tr -d '\r'
|
||||
]).m4_esyscmd([sed -n 's/SET(C4XVER2\s\+\(.\+\))/\1/ p' Version.txt | tr -d '\n' | tr -d '\r'
|
||||
]).m4_esyscmd([sed -n 's/SET(C4XVER3\s\+\(.\+\))/\1/ p' Version.txt | tr -d '\n' | tr -d '\r'])])
|
||||
AC_COPYRIGHT([©2005-2011 Günther Brammer])
|
||||
AC_CONFIG_SRCDIR([/src/C4Include.h])
|
||||
AC_CONFIG_AUX_DIR([autotools])
|
||||
|
@ -36,20 +38,39 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
|||
AC_PROG_CXX
|
||||
AC_LANG([C++])
|
||||
AX_CHECK_COMPILE_FLAG([-std=gnu++0x], [CXX="${CXX} -std=gnu++0x"], [])
|
||||
AC_COMPILE_IFELSE([
|
||||
void f(struct D&&); int main() { return 0; }
|
||||
], [AC_DEFINE([HAVE_RVALUE_REF], [], [C++ Compiler has rvalue references, a C++0x feature.])], [AX_PROG_CXX_REFTOTEMP])
|
||||
|
||||
AC_MSG_CHECKING([for rvalue references])
|
||||
AC_COMPILE_IFELSE([void f(struct D&&); int main() { return 0; }], [
|
||||
AC_DEFINE([HAVE_RVALUE_REF], [], [C++ Compiler has rvalue references, a C++0x feature.])
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
AX_PROG_CXX_REFTOTEMP
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([for nullptr])
|
||||
AC_COMPILE_IFELSE([int main() { void *d = nullptr; }], [
|
||||
AC_DEFINE([HAVE_NULLPTR], [], [Define to 1 if you have support for nullptr.])
|
||||
AC_MSG_RESULT([yes])
|
||||
], [AC_MSG_RESULT([no])])
|
||||
|
||||
AC_MSG_CHECKING([for static_assert])
|
||||
AC_COMPILE_IFELSE([int main() { static_assert(true, \"\"); }], [
|
||||
AC_DEFINE([HAVE_STATIC_ASSERT], [], [Define to 1 if your compiler supports static_assert])
|
||||
AC_MSG_RESULT([yes])
|
||||
], [AC_MSG_RESULT([no])])
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_RANLIB
|
||||
# Automake 1.12 breaks if this isn't run unconditionally
|
||||
AC_PROG_OBJCXX
|
||||
|
||||
case $host in
|
||||
*-*-mingw32* | *-*-cygwin* | *-*-windows*)
|
||||
win32=true; osx=false;;
|
||||
*-*-darwin*)
|
||||
win32=false; osx=true;
|
||||
m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [AC_MSG_ERROR([this configure script was created with an autoconf version older than 2.65 and does not support macosx.])])
|
||||
;;
|
||||
win32=false; osx=true;;
|
||||
*)
|
||||
win32=false; osx=false;;
|
||||
esac
|
||||
|
@ -63,8 +84,7 @@ AM_CONDITIONAL(MACOSX, [test $osx = true])
|
|||
# various used headers
|
||||
dnl the whitespace is there to prevent AC_INCLUDES_DEFAULT
|
||||
AC_CHECK_HEADERS([stdint.h unistd.h poll.h sys/file.h sys/stat.h sys/types.h locale.h sys/socket.h signal.h langinfo.h sys/eventfd.h sys/timerfd.h sys/inotify.h], , , [[ ]])
|
||||
# Mingw does not ship with multimon.h
|
||||
AC_CHECK_HEADERS([multimon.h io.h direct.h share.h natupnp.h], [], [], [[#include <windows.h>]])
|
||||
AC_CHECK_HEADERS([io.h direct.h share.h natupnp.h dbghelp.h], [], [], [[#include <windows.h>]])
|
||||
# iconv
|
||||
AX_ICONV
|
||||
# vasprintf is a GNU extension
|
||||
|
@ -106,7 +126,7 @@ AC_ARG_ENABLE([console],
|
|||
|
||||
AC_ARG_ENABLE([sound],
|
||||
[AS_HELP_STRING([--enable-sound],[compile with sound support [default=yes]])],
|
||||
, [if test $enable_console = yes; then enable_sound=no; else if test $win32 = true; then enable_sound=no; else enable_sound=yes; fi; fi])
|
||||
, [if test $enable_console = yes; then enable_sound=no; else enable_sound=yes; fi])
|
||||
|
||||
# GTK+
|
||||
GTK2_REQUIRED="glib-2.0 >= 2.8 gtk+-2.0 >= 2.8"
|
||||
|
@ -146,7 +166,7 @@ AC_ARG_WITH([openal],
|
|||
[AS_HELP_STRING([--with-openal],[compile with openal support [default=no]])],
|
||||
, [with_openal=no])
|
||||
if test $with_openal = yes; then
|
||||
PKG_CHECK_MODULES(OPENAL, [vorbis vorbisfile openal])
|
||||
PKG_CHECK_MODULES(OPENAL, [vorbis vorbisfile openal freealut])
|
||||
AC_DEFINE([USE_OPEN_AL], 1, [OpenAL sound])
|
||||
if test $enable_sound = no; then
|
||||
AC_MSG_ERROR([--with-openal cannot be used with --disable-sound.])
|
||||
|
@ -207,6 +227,7 @@ else
|
|||
enable_sdlmainloop=no
|
||||
VL_LIB_READLINE
|
||||
fi
|
||||
AM_CONDITIONAL([CONSOLE], [test $enable_console = yes])
|
||||
|
||||
# Check for boost
|
||||
AX_BOOST_BASE([1.40.0], [], [
|
||||
|
@ -255,19 +276,15 @@ if test $enable_console = no; then
|
|||
AC_DEFINE(HAVE_FREETYPE, 1, [Define to 1 if you have FreeType2.])
|
||||
fi
|
||||
|
||||
# X11, Xpm, Xrandr
|
||||
# X11, Xrandr
|
||||
AC_PATH_XTRA
|
||||
if test $have_x = yes; then
|
||||
AC_DEFINE(USE_X11, 1, [Define to 1 if the X Window System is used])
|
||||
CLONK_LIBS="$X_LIBS $CLONK_LIBS"
|
||||
AC_CHECK_HEADERS([X11/keysym.h X11/extensions/xf86vmode.h X11/xpm.h X11/extensions/Xrandr.h], ,
|
||||
AC_CHECK_HEADERS([X11/keysym.h X11/extensions/Xrandr.h], ,
|
||||
[AC_MSG_ERROR([A required X11 header was not found.])], [[#include <X11/Xlib.h>]])
|
||||
AC_CHECK_LIB(X11, XOpenDisplay, [CLONK_LIBS="-lX11 $CLONK_LIBS"],
|
||||
[AC_MSG_ERROR([libX11 not found.])], [$X_LIBS])
|
||||
AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData, [CLONK_LIBS="-lXpm $CLONK_LIBS"],
|
||||
[AC_MSG_ERROR([libXpm not found.])], [$X_LIBS])
|
||||
AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryVersion, [CLONK_LIBS="-lXxf86vm $CLONK_LIBS"],
|
||||
[AC_MSG_ERROR([XF86VidMode not found.])], [$X_LIBS])
|
||||
AC_CHECK_LIB(Xrandr, XRRQueryExtension, [CLONK_LIBS="-lXrandr $CLONK_LIBS"],
|
||||
[AC_MSG_ERROR([libXrandr not found.])], [$X_LIBS])
|
||||
fi
|
||||
|
@ -279,8 +296,7 @@ AC_ARG_WITH([gl],
|
|||
if test $with_gl = yes; then
|
||||
if test $osx = true; then
|
||||
CLONK_LIBS="-framework OpenGL $CLONK_LIBS"
|
||||
AC_CHECK_LIB(GLEW, glewInit, [CLONK_LIBS="-lGLEW $CLONK_LIBS"],
|
||||
[AC_MSG_ERROR([glew not found.])])
|
||||
PKG_CHECK_MODULES(GLEW, [glew], [CLONK_LIBS="$GLEW_LIBS $CLONK_LIBS"], [AC_MSG_ERROR([glew not found.])])
|
||||
elif test $win32 = true; then
|
||||
AC_CHECK_LIB(opengl32, main, [CLONK_LIBS="-lopengl32 $CLONK_LIBS"],
|
||||
[AC_MSG_ERROR([opengl32 not found.])])
|
||||
|
@ -337,9 +353,6 @@ if test $win32 = false; then
|
|||
AX_PTHREAD( , [AC_MSG_ERROR([No pthread support.])])
|
||||
AC_SUBST(PTHREAD_LIBS)
|
||||
AC_SUBST(PTHREAD_CFLAGS)
|
||||
|
||||
# FMod is used for windows only
|
||||
AM_CONDITIONAL(USE_FMOD, false)
|
||||
else
|
||||
# Windows
|
||||
for WIN32LIB in gdi32 comdlg32 ws2_32
|
||||
|
@ -354,17 +367,19 @@ else
|
|||
AC_DEFINE([HAVE_VFW32], 1, [ ])
|
||||
], [])
|
||||
|
||||
# FMod (Library comes with standard)
|
||||
if test "$enable_sound" = yes; then
|
||||
AC_DEFINE([USE_FMOD], 1, [Whether FMOD shall be used])
|
||||
fi
|
||||
AM_CONDITIONAL(USE_FMOD, test "$enable_sound" = yes)
|
||||
AC_CHECK_LIB([dbghelp], main, [AS_IF([test "x$ac_cv_header_dbghelp_h" = xyes], [
|
||||
CLONK_LIBS="-ldbghelp $CLONK_LIBS"
|
||||
AC_DEFINE([HAVE_DBGHELP], 1, [Generate minidumps on crash])
|
||||
])], [])
|
||||
|
||||
# windres
|
||||
AC_CHECK_TOOL(WINDRES, windres, no)
|
||||
if test $WINDRES = no; then
|
||||
AC_MSG_ERROR([windres not found.])
|
||||
fi
|
||||
|
||||
# ASLR/DEP
|
||||
LDADD="-Wl,--nxcompat -Wl,--dynamicbase $LDADD"
|
||||
fi
|
||||
|
||||
AC_SUBST(LDADD)
|
||||
|
|
|
@ -53,7 +53,7 @@ chm: $(sdk-de-dirs) $(chm-dirs) chm/en/Developer.chm chm/de/Entwickler.chm
|
|||
|
||||
install: all
|
||||
$(MKDIR_P) $(prefix)
|
||||
$(CP_R) $(PWD)/online/* $(prefix)
|
||||
$(CP_R) online/* $(prefix)
|
||||
|
||||
check:
|
||||
xmllint --noblanks --noout --valid $(xmlfiles)
|
||||
|
|
|
@ -514,7 +514,7 @@
|
|||
<xsl:template name="color2">
|
||||
<xsl:param name="s" select="." />
|
||||
<!-- the list of keywords -->
|
||||
<xsl:param name="t" select="'#include|#appendto|public|private|protected|global|static|var|local|const|int|proplist|object|array|string|bool|any|return|if|else|break|continue|while|for|func|true|false|nil|'" />
|
||||
<xsl:param name="t" select="'#include|#appendto|public|private|protected|global|static|var|local|const|any|int|bool|def|effect|object|proplist|string|array|func|return|if|else|break|continue|while|for|true|false|nil|'" />
|
||||
<xsl:param name="w" select="substring-before($t, '|')" />
|
||||
<!-- text before the keyword -->
|
||||
<xsl:variable name="l" select="substring-before($s, $w)" />
|
||||
|
|
19956
docs/de.po
|
@ -74,6 +74,7 @@ color:#222222;
|
|||
}
|
||||
|
||||
h1 {
|
||||
font-family: Endeavour, Verdana, Sans-serif;
|
||||
font-size: 2em;
|
||||
font-weight: normal;
|
||||
margin-top: 1.32em;
|
||||
|
|
|
@ -3,6 +3,7 @@ Unfortunately, xml documents can only have one root, so there needs to be a dumm
|
|||
header is an appropiate html element, so it's arbitrarily chosen.
|
||||
clonk.xsl also uses it to match the processing for it. -->
|
||||
<header>
|
||||
<style type="text/css">@import url("http://www.openclonk.org/header/header.css");</style>
|
||||
<div id="nav_header">
|
||||
<div id="nav_logo">
|
||||
<a href="http://www.openclonk.org/" target="_top"><img src="http://www.openclonk.org/header/logo.png" alt="OpenClonk"/></a>
|
||||
|
@ -14,10 +15,10 @@ clonk.xsl also uses it to match the processing for it. -->
|
|||
search <input id="searchInput" name="s" type="text" value="" /> in the
|
||||
<select name="p">
|
||||
<option value="blog">blog</option>
|
||||
<option value="functions">c4script function list</option>
|
||||
<option selected="selected" value="functions">c4script function list</option>
|
||||
<option value="docs">c4script reference</option>
|
||||
<option value="functionsDE">c4script function list (DE)</option>
|
||||
<option value="docsDE">c4script reference (DE)</option>
|
||||
<option value="docsDE">c4script reference (DE)</option>
|
||||
<option value="bugtrack">bugtracker</option>
|
||||
<option value="forum">forum</option>
|
||||
<option value="hg">hg changelog</option>
|
||||
|
@ -58,7 +59,7 @@ clonk.xsl also uses it to match the processing for it. -->
|
|||
<li><a href="http://hg.openclonk.org/openclonk-resources/" target="_top">Resource Repository</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><!--[if lt IE 9]><span><![endif]--><a href="http://wiki.openclonk.org/w/C4Script_Documentation" target="_top">Documentation</a><!--[if lt IE 9]></span><![endif]--> <ul>
|
||||
<li><!--[if lt IE 9]><span><![endif]--><a class="current" href="http://wiki.openclonk.org/w/C4Script_Documentation" target="_top">Documentation</a><!--[if lt IE 9]></span><![endif]--> <ul>
|
||||
<li><a href="http://docs.openclonk.org/en/sdk/" target="_top">C4Script Reference</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -8,12 +8,11 @@
|
|||
<part>
|
||||
<text>The engine allows to define control commands completely arbitrarily. Own keyboard commands can be added and modified. All supported input devices such as mouse, keyboard and gamepads can be mapped freely and commands can consist of any key combinations or sequences.</text>
|
||||
<h id="ControlFiles">PlayerControls.txt</h>
|
||||
<text>All control commands which a player can send to the game are defined in the file PlayerControls.txt. The standard keys as well as their standard mapping for various input devices are contained in the global definition file in the Systems.ocg folder. Object definitions and scenarios can add more keys or overload the parameters of existing commands in their local Systems.ocg folder**.</text>
|
||||
<text>Additional PlayerControls.txt files can be put in language packages to adapt the standard key mappings of different loaded languages to the keyboard of their respective country**.</text>
|
||||
<text>All control commands which a player can send to the game are defined in the file PlayerControls.txt. The standard keys as well as their standard mapping for various input devices are contained in the global definition file in the Systems.ocg folder. Object definitions and scenarios can add more keys or overload the parameters of existing commands in their local Systems.ocg folder.</text>
|
||||
<part>
|
||||
<h id="ControlDefs">Section [ControlDefs]</h>
|
||||
<text>
|
||||
Definition of possible player commands. Not valid in language packages. Subordinated to this section:
|
||||
Definition of possible player commands. Subordinated to this section:
|
||||
<text>
|
||||
<table>
|
||||
<caption id="ControlDef">Any number of sections [ControlDef]</caption>
|
||||
|
@ -35,7 +34,7 @@
|
|||
<row>
|
||||
<literal_col>GUIDesc</literal_col>
|
||||
<col>String</col>
|
||||
<col>Informative description which is displayed to the player in the control configuration dialog. Lokalisierte Zeichenketten koennen aus dem zugehoerigen StringTable refeenziert werden ($Name$).</col>
|
||||
<col>Informative description which is displayed to the player in the control configuration dialog. Localized strings from the corresponding string table can be used ($Desc$).</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>Global</literal_col>
|
||||
|
@ -91,6 +90,14 @@
|
|||
<literal_col>Script</literal_col>
|
||||
<col>Execution of the script function <em>PlayerControl</em>. See <emlink href="playercontrols.xml#Script">Script callbacks</emlink>. (Default value)</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>ZoomIn</literal_col>
|
||||
<col>Zoom in one unit</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>ZoomOut</literal_col>
|
||||
<col>Zoom out one unit</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>Menu</literal_col>
|
||||
<col>Open the player menu (asynchronous command).</col>
|
||||
|
@ -107,6 +114,18 @@
|
|||
<literal_col>MenuLeft / MenuUp / MenuRight / MenuDown</literal_col>
|
||||
<col>Navigation in the player menu (asynchronous command).</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>ObjectMenuOK / ObjectMenuSelect / ObjectMenuOKAll</literal_col>
|
||||
<col>Confirmation of the selected item in a menu (synchronous command).</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>ObjectMenuCancel</literal_col>
|
||||
<col>Close a menu (synchronous command).</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>ObjectMenuLeft / ObjectMenuUp / ObjectMenuRight / ObjectMenuDown</literal_col>
|
||||
<col>Navigation in a menu (synchronous command).</col>
|
||||
</row>
|
||||
</table>
|
||||
</text>
|
||||
|
||||
|
@ -130,7 +149,27 @@
|
|||
<row>
|
||||
<literal_col>Name</literal_col>
|
||||
<col>String</col>
|
||||
<col>Internal name for identification of otherwise equal control mappings. The names of the standard mappings are <em>Keyboard1</em>, <em>Keyboard1Classic</em>, <em>Keyboard2</em>, <em>Keyboard2Classic</em>, <em>Gamepad</em>. By using placeholders (*) keys can directly be defined in multiple mappings**.</col>
|
||||
<col>Internal name for identification of otherwise equal control mappings. By using placeholders (*) keys can directly be defined in multiple mappings.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>GUIName</literal_col>
|
||||
<col>String</col>
|
||||
<col>Name for the control assignment set which is shown to the player in the control configuration dialog.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>Keyboard</literal_col>
|
||||
<col>Boolean</col>
|
||||
<col>Whether this control assignment set uses the keyboard. Default 1.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>Mouse</literal_col>
|
||||
<col>Boolean</col>
|
||||
<col>Whether this control assignment set uses the mouse. Default 1.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>Gamepad</literal_col>
|
||||
<col>Boolean</col>
|
||||
<col>Whether this control assignment set uses the gamepad. Default 0.</col>
|
||||
</row>
|
||||
</table>
|
||||
<text>
|
||||
|
@ -156,6 +195,26 @@
|
|||
<col>String</col>
|
||||
<col>Command that is combined with this mapping. The name should be equivalent to the <em>Identifier</em> of a command defined in a <emlink href="playercontrols.xml#ControlDef">[ControlDef]</emlink>.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>GUIName</literal_col>
|
||||
<col>String</col>
|
||||
<col>Name which is shown to the player in the control configuration dialog and in control tooltips. Localized strings from the corresponding string table can be used ($Name$). If unset, GUIName of the control def is used. If set to "None", the control is not displayed in the user customization dialog even if the control def has a name set.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>GUIDesc</literal_col>
|
||||
<col>String</col>
|
||||
<col>Informative description which is displayed to the player in the control configuration dialog. Lokalisierte Zeichenketten koennen aus dem zugehoerigen StringTable refeenziert werden ($Name$). If unset, GUIDesc of the control def is used.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>GUIGroup</literal_col>
|
||||
<col>Integer</col>
|
||||
<col>Control assignments in the same group are displayed grouped together in the control assignment dialog. The group with the lowest number is displayed at the top. Default 0.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>GUIDisabled</literal_col>
|
||||
<col>Boolean</col>
|
||||
<col>Whether this control assignment can not be changed in the control assignment dialog. Default 0.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>Priority</literal_col>
|
||||
<col>Integer</col>
|
||||
|
@ -188,10 +247,6 @@
|
|||
<literal_col>AlwaysUnhandled</literal_col>
|
||||
<col>The key press is always passed to the mapping with the next lowest priority, independent of whether the previous command was executed successfully or not.</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>ToggleUnhandled</literal_col>
|
||||
<col>The keypress is passed to the mapping with the next lower priority only if the previous command was executed successfully. This can be used to define macros. **</col>
|
||||
</row>
|
||||
<row>
|
||||
<literal_col>OverrideAssignments</literal_col>
|
||||
<col>The assignment overwrites all other assignments for the same control with the same press/release trigger mode.</col>
|
||||
|
@ -357,6 +412,5 @@ global func UpdateControlDir(int player)
|
|||
<h id="Priority">Priorities</h>
|
||||
<text>...</text>
|
||||
</part>
|
||||
<text><em>** - not yet implemented</em></text>
|
||||
<author>Sven2</author><date>2009-06</date>
|
||||
</doc>
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
<category>Script</category>
|
||||
<subcat>Function call</subcat>
|
||||
<version>5.1 OC</version>
|
||||
<extversion>5.4 OC</extversion>
|
||||
<syntax>
|
||||
<rtype>any</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>string</type>
|
||||
<type>string or function</type>
|
||||
<name>function</name>
|
||||
<desc>Function to be called.</desc>
|
||||
</param>
|
||||
|
@ -23,11 +24,12 @@
|
|||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Calls the local function function. If "~" is prepended to the function name then the call does not fail if the function does not exist.</desc>
|
||||
<desc>Calls the specified function. If given a string, the function is looked up in the context object (<code>this</code>). For example, <code>obj->Call("Foo")</code> is the same as <code>obj->Foo()</code>. Using Call like this is primarily useful when the name of the function can vary. If "~" is prepended to the function name then the call does not fail if the function does not exist.</desc>
|
||||
<related>
|
||||
<funclink>GameCall</funclink>
|
||||
<funclink>eval</funclink>
|
||||
</related>
|
||||
</func>
|
||||
<author>jwk</author><date>2002-04</date>
|
||||
<author>Günther</author><date>2012</date>
|
||||
</funcs>
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
<?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>CreateParticleAtBone</title>
|
||||
<category>Particle</category>
|
||||
<version>5.4 OC</version>
|
||||
<syntax>
|
||||
<rtype>bool</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>string</type>
|
||||
<name>szName</name>
|
||||
<desc>Name of the particle</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>string</type>
|
||||
<name>szBoneName</name>
|
||||
<desc>Name of the bone at which to create the particle</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>array</type>
|
||||
<name>pos</name>
|
||||
<desc>Vector of three elements with the X,Y and Z coordinates of the particle relative to the bone position and orientation.</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>array</type>
|
||||
<name>dir</name>
|
||||
<desc>Vector of three elements with the X,Y and Z components of the velocity of theparticle relative to the bone orientation.</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>int</type>
|
||||
<name>a</name>
|
||||
<desc>Extra parameter. This is usually the size of the particle in 1/5 pixels.</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>int</type>
|
||||
<name>b</name>
|
||||
<desc>Extra parameter. This is usually the color modulation of the particle.</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>object</type>
|
||||
<name>target</name>
|
||||
<desc>Target object for object local particles. Object local particles are drawn directly on top of the object and are removed when the object is deleted.</desc>
|
||||
<optional />
|
||||
</param>
|
||||
<param>
|
||||
<type>bool</type>
|
||||
<name>behind_target</name>
|
||||
<desc>If specified and not <code>false</code>, the particle is drawn directly behind the target object.</desc>
|
||||
<optional />
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Creates a particle relative to a bone of the calling object's skeleton. The named particle definition must be loaded. For more information see the particle documentation.</desc>
|
||||
<remark>This function returns <code>false</code> if the particle definition was not found, or the function is called for an object which does not have a mesh graphics, or the skeleton of the mesh does not have a bone called <code>szBoneName</code>. Otherwise, <code>true</code> is returned. There is no return value indicating whether the particle has actually been created. This must be so to prevent synchronization problems in network games, as particles may be handled differently on each computer in the network.</remark>
|
||||
<examples>
|
||||
<example>
|
||||
<code>func InitializePlayer(int plr)
|
||||
{
|
||||
AddEffect("IntColorize", 0, 1, 1);
|
||||
}
|
||||
|
||||
global func FxIntColorizeTimer()
|
||||
{
|
||||
FindObject(Find_ID(Clonk))->CreateParticleAtBone("PSpark", "skeleton_body", [0, 0, 0], [0, 0, 0], 8, RGB(255,0,0));
|
||||
FindObject(Find_ID(Clonk))->CreateParticleAtBone("PSpark", "pos_hand1", [0, 0, 0], [0, 0, 0], 8, RGB(0,255,0));
|
||||
FindObject(Find_ID(Clonk))->CreateParticleAtBone("PSpark", "pos_hand2", [0, 0, 0], [0, 0, 0], 8, RGB(0,0,255));
|
||||
return(0);
|
||||
}</code>
|
||||
<text>Scenario script. Creates an effect which traces a Clonk's body, left hand and right hand with differently colored sparks.</text>
|
||||
</example>
|
||||
</examples>
|
||||
<related>
|
||||
<funclink>CreateParticle</funclink>
|
||||
</related>
|
||||
</func>
|
||||
<author>Clonk-Karl</author><date>2012-12</date>
|
||||
</funcs>
|
|
@ -8,11 +8,11 @@
|
|||
<category>Global</category>
|
||||
<version>5.1 OC</version>
|
||||
<syntax><rtype>int</rtype></syntax>
|
||||
<desc>Returns the current gravity in percent.</desc>
|
||||
<desc>Returns the current gravity in 1/100 pixel/tick².</desc>
|
||||
<examples>
|
||||
<example>
|
||||
<code><funclink>for</funclink> (var obj in <funclink>FindObjects</funclink>(<funclink>Find_Distance</funclink>(100)))
|
||||
obj-><funclink>SetYDir</funclink>(obj-><funclink>GetYDir</funclink>(500) - GetGravity(), 500);</code>
|
||||
obj-><funclink>SetYDir</funclink>(obj-><funclink>GetYDir</funclink>(100) - GetGravity(), 100);</code>
|
||||
<text>Makes the gravitation within a radius of 100 pixels vanish if called every frame.</text>
|
||||
</example>
|
||||
</examples>
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<?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>GetIndexOf</title>
|
||||
<category>Script</category>
|
||||
<subcat>Arrays</subcat>
|
||||
<version>5.1 OC</version>
|
||||
<syntax>
|
||||
<rtype>int</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>array</type>
|
||||
<name>array2search</name>
|
||||
<desc>Array in which the element should be searched. The array can be zero, in which case the element is never found and -1 is returned.</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>any</type>
|
||||
<name>needle</name>
|
||||
<desc>The value to which every element of the array is to be compared.</desc>
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Finds the first occurrence of a value in an array and returns its zero-based index. If the element is not found, -1 is returned. The usual rules for comparison using the <emlink href="script/operatoren.html#equality">==-operator</emlink> apply.</desc>
|
||||
</func>
|
||||
<author>Sven2</author><date>2012-12</date>
|
||||
</funcs>
|
|
@ -45,7 +45,6 @@
|
|||
<desc>Inserts a material pixel at the given position and given speed.</desc>
|
||||
<related>
|
||||
<funclink>Material</funclink>
|
||||
<funclink>InsertMaterialAmount</funclink>
|
||||
</related>
|
||||
</func>
|
||||
<author>Sven2</author><date>2001-11</date>
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
<param>
|
||||
<type>int</type>
|
||||
<name>gravity</name>
|
||||
<desc>New gravity: value -300 til 300 (in percent)</desc>
|
||||
<desc>New gravity in 1/100 pixel/tick²</desc>
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Sets the gravity. Normal gravity is 100% and results in an acceleration of 0.2 pixels per Tick. (increasing YDir by 2 per Tick with precision=10).</desc>
|
||||
<desc>Sets the gravity. It is usually a good idea to set this to a multiple or a fraction of the previous value.</desc>
|
||||
<related><funclink>GetGravity</funclink></related>
|
||||
</func>
|
||||
<author>jwk</author><date>2002-08</date>
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<?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>SortArray</title>
|
||||
<category>Script</category>
|
||||
<subcat>Arrays</subcat>
|
||||
<version>5.4 OC</version>
|
||||
<syntax>
|
||||
<rtype>bool</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>array</type>
|
||||
<name>array2sort</name>
|
||||
<desc>Array that is to be sorted</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>bool</type>
|
||||
<name>descending</name>
|
||||
<desc>If true, elements are sorted in descending (highest to lowest) order. Otherwise ascending order.</desc>
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Sorts an array by its elements. Elements should be either all strings or all integers.</desc>
|
||||
<related>
|
||||
<funclink>SortArrayByProperty</funclink>
|
||||
<funclink>SortArrayByArrayElement</funclink>
|
||||
</related>
|
||||
</func>
|
||||
<author>Sven2</author><date>2012-12</date>
|
||||
</funcs>
|
|
@ -0,0 +1,38 @@
|
|||
<?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>SortArrayByArrayElement</title>
|
||||
<category>Script</category>
|
||||
<subcat>Arrays</subcat>
|
||||
<version>5.4 OC</version>
|
||||
<syntax>
|
||||
<rtype>bool</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>array</type>
|
||||
<name>array2sort</name>
|
||||
<desc>Array that is to be sorted</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>int</type>
|
||||
<name>element_index</name>
|
||||
<desc>Index of element in sub-array by which sorting should happen</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>bool</type>
|
||||
<name>descending</name>
|
||||
<desc>If true, elements are sorted in descending (highest to lowest) order. Otherwise ascending order.</desc>
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Sorts an array of arrays by a subarray element. All elements must be arrays of at least element_index+1 size. Subarray elements should be either all strings or all integer.</desc>
|
||||
<related>
|
||||
<funclink>SortArray</funclink>
|
||||
<funclink>SortArrayByProperty</funclink>
|
||||
</related>
|
||||
</func>
|
||||
<author>Sven2</author><date>2012-12</date>
|
||||
</funcs>
|
|
@ -0,0 +1,38 @@
|
|||
<?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>SortArrayByProperty</title>
|
||||
<category>Script</category>
|
||||
<subcat>Arrays</subcat>
|
||||
<version>5.4 OC</version>
|
||||
<syntax>
|
||||
<rtype>bool</rtype>
|
||||
<params>
|
||||
<param>
|
||||
<type>array</type>
|
||||
<name>array2sort</name>
|
||||
<desc>Array that is to be sorted</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>string</type>
|
||||
<name>property_name</name>
|
||||
<desc>Name of property by which the array is to be sorted</desc>
|
||||
</param>
|
||||
<param>
|
||||
<type>bool</type>
|
||||
<name>descending</name>
|
||||
<desc>If true, elements are sorted in descending (highest to lowest) order. Otherwise ascending order.</desc>
|
||||
</param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Sorts an array of proplists by a property. All elements must be proplists. Properties should be either all strings or all integer. If a property is not assigned, it is assumed to be integer zero.</desc>
|
||||
<related>
|
||||
<funclink>SortArray</funclink>
|
||||
<funclink>SortArrayByArrayElement</funclink>
|
||||
</related>
|
||||
</func>
|
||||
<author>Sven2</author><date>2012-12</date>
|
||||
</funcs>
|
|
@ -173,6 +173,20 @@
|
|||
<col>postfix</col>
|
||||
<col>bool, any/any</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>9l</col>
|
||||
<col>===</col>
|
||||
<col>Returns whether a and b refer to the same thing.</col>
|
||||
<col>postfix</col>
|
||||
<col>bool, any/any</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>9l</col>
|
||||
<col>!==</col>
|
||||
<col>Returns whether a and b do not refer to the same thing.</col>
|
||||
<col>postfix</col>
|
||||
<col>bool, any/any</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>8l</col>
|
||||
<col>&</col>
|
||||
|
@ -310,6 +324,10 @@ while(<strong>++somevar</strong> < 10)
|
|||
<part>
|
||||
<text>The <code>??</code> operator is called the nil-coalescing operator. It can be used to specify a default value for an expression or function call that may evaluate to <code>nil</code>.</text>
|
||||
</part>
|
||||
<h id="equality">The equality operators <code>==</code>, <code>!=</code>, <code>===</code> and <code>!==</code></h>
|
||||
<part>
|
||||
<text>The shorter operators basically consider more things equal. For example, two arrays with the same contents are equal, but === only returns true when both sides of the operator contain the same array. This matters mostly when arrays or proplists are modified. Modification can change the return value of the <code>==</code>/<code>!=</code> operators, but not of the <code>===</code>/<code>!==</code> operators.</text>
|
||||
</part>
|
||||
<h id="prio">Priority and Associating</h>
|
||||
<part>
|
||||
<text>This subject shows how operator priority is evaluated in detail.</text>
|
||||
|
|
|
@ -140,6 +140,17 @@ if ($link && $db) {
|
|||
$version = $row['new_version'];
|
||||
if ($version) {
|
||||
$message .= 'Version=' . $version . PHP_EOL;
|
||||
// strip build version from client request
|
||||
$n = 0;
|
||||
for($i=0;$i<strlen($client_version);$i++){
|
||||
if($client_version[$i]=='.'){
|
||||
$n++;
|
||||
if($n>=3){
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$client_version = substr($client_version,0,$i);
|
||||
if (version_compare($client_version, $version) < 0) { //We need to update
|
||||
$result = mysql_query('SELECT `file` FROM `' . $prefix . 'update` WHERE `old_version` = \'' . $client_version . '\' AND `platform` = \'' . $platform . '\'');
|
||||
$row = mysql_fetch_assoc($result);
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
* -crlf
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[Head]
|
||||
Index=4
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 130 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
@ -3,7 +3,7 @@ Icon=13
|
|||
Title=FrozenFortress
|
||||
Version=5,2,0,1
|
||||
MinPlayer=2
|
||||
MaxPlayer=8
|
||||
Difficulty=80
|
||||
|
||||
[Definitions]
|
||||
Definition1=Objects.ocd
|
|
@ -14,14 +14,14 @@ protected func Initialize()
|
|||
var time=CreateObject(Environment_Time);
|
||||
time->SetTime();
|
||||
time->SetCycleSpeed();
|
||||
FindObject(Find_ID(Moon))->SetPhase(3);
|
||||
FindObject(Find_ID(Moon))->SetMoonPhase(3);
|
||||
FindObject(Find_ID(Moon))->SetCon(150);
|
||||
FindObject(Find_ID(Moon))->SetPosition(LandscapeWidth()/2,150);
|
||||
|
||||
// Goal: Capture the flag, with bases in both hideouts.
|
||||
var goal = CreateObject(Goal_CaptureTheFlag, 0, 0, NO_OWNER);
|
||||
goal->SetFlagBase(1, 135, 264);
|
||||
goal->SetFlagBase(2, LandscapeWidth() - 135, 264);
|
||||
goal->SetFlagBase(1, 135, 266);
|
||||
goal->SetFlagBase(2, LandscapeWidth() - 135, 266);
|
||||
CreateObject(Rule_KillLogs);
|
||||
|
||||
var gate = CreateObject(StoneDoor, 345, 272, NO_OWNER);
|
||||
|
@ -34,16 +34,21 @@ protected func Initialize()
|
|||
// Chests with weapons.
|
||||
var chest;
|
||||
chest = CreateObject(Chest, 60, 220, NO_OWNER);
|
||||
chest->MakeInvincible();
|
||||
AddEffect("FillBaseChest", chest, 100, 7 * 36,nil,nil,false);
|
||||
chest = CreateObject(Chest, 150, 370, NO_OWNER);
|
||||
chest->MakeInvincible();
|
||||
AddEffect("FillBaseChest", chest, 100, 7 * 36,nil,nil,true);
|
||||
chest = CreateObject(Chest, LandscapeWidth() - 60, 220, NO_OWNER);
|
||||
chest->MakeInvincible();
|
||||
AddEffect("FillBaseChest", chest, 100, 7 * 36,nil,nil,false);
|
||||
chest = CreateObject(Chest, LandscapeWidth() - 150, 370, NO_OWNER);
|
||||
chest->MakeInvincible();
|
||||
AddEffect("FillBaseChest", chest, 100, 7 * 36,nil,nil,true);
|
||||
|
||||
|
||||
chest = CreateObject(Chest, LandscapeWidth()/2, 320, NO_OWNER);
|
||||
chest->MakeInvincible();
|
||||
AddEffect("FillOtherChest", chest, 100, 5 * 36);
|
||||
|
||||
AddEffect("SnowyWinter", nil, 100, 1);
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
@ -45,7 +45,9 @@ public func FxFrostboltTimer(pTarget, effect, iEffectTime)
|
|||
)
|
||||
{
|
||||
CreateObject(Dynamite,x,y,effect.owner)->BlueExplode();
|
||||
CreateObject(Star,x,y,-1)->Sound("GlassShatter");
|
||||
var dummy = CreateObject(Dummy,x,y,-1);
|
||||
dummy->Sound("GlassShatter");
|
||||
ScheduleCall(dummy, "RemoveObject", 36);
|
||||
for(var i=0; i<=60;i++)
|
||||
{
|
||||
var r=Random(10)+Random(18);
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
@ -2,8 +2,6 @@
|
|||
|
||||
#appendto StoneDoor
|
||||
|
||||
private func GetStrength() { return 300; }
|
||||
|
||||
protected func Damage()
|
||||
{
|
||||
// Destroy if damage above strength.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |