author | nemo |
Thu, 30 Aug 2012 12:13:24 -0400 | |
changeset 7411 | efc75c2d3be9 |
parent 7409 | fd91aa100ce0 (diff) |
parent 7263 | 644eabbc9218 (current diff) |
child 7413 | dbf6e803d5bc |
--- a/CMakeLists.txt Mon Jul 23 19:15:59 2012 +0300 +++ b/CMakeLists.txt Thu Aug 30 12:13:24 2012 -0400 @@ -4,9 +4,9 @@ #initialise cmake environment cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) FOREACH(policy CMP0003 CMP0012) - IF(POLICY ${policy}) - CMAKE_POLICY(SET ${policy} NEW) - ENDIF() + IF(POLICY ${policy}) + CMAKE_POLICY(SET ${policy} NEW) + ENDIF() ENDFOREACH() set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules) @@ -15,26 +15,26 @@ set(version_suffix "-dev") #UNSET THIS VARIABLE AT RELEASE TIME set(HGCHANGED "") IF(version_suffix MATCHES "-dev") - set(HW_DEV true) - IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.hg) - FIND_PROGRAM(HGCOMMAND hg) - IF(HGCOMMAND) - exec_program(${HGCOMMAND} - ARGS identify -in ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE version_suffix - ) - STRING(REGEX REPLACE "[^+]" "" HGCHANGED ${version_suffix}) - STRING(REGEX REPLACE "([0-9a-zA-Z]+)(.*) ([0-9]+)(.*)" "\\3-\\1" version_suffix ${version_suffix}) - IF (HGCHANGED) - MESSAGE(STATUS "Building revision ${version_suffix} (SOURCE CODE MODIFIED)") - ELSE() - MESSAGE(STATUS "Building revision ${version_suffix}") - ENDIF() - set(version_suffix "-${version_suffix}") - ENDIF() - ENDIF() + set(HW_DEV true) + IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.hg) + FIND_PROGRAM(HGCOMMAND hg) + IF(HGCOMMAND) + exec_program(${HGCOMMAND} + ARGS identify -in ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE version_suffix + ) + STRING(REGEX REPLACE "[^+]" "" HGCHANGED ${version_suffix}) + STRING(REGEX REPLACE "([0-9a-zA-Z]+)(.*) ([0-9]+)(.*)" "\\3-\\1" version_suffix ${version_suffix}) + IF (HGCHANGED) + MESSAGE(STATUS "Building revision ${version_suffix} (SOURCE CODE MODIFIED)") + ELSE() + MESSAGE(STATUS "Building revision ${version_suffix}") + ENDIF() + set(version_suffix "-${version_suffix}") + ENDIF() + ENDIF() ELSE() - set(HW_DEV false) + set(HW_DEV false) ENDIF() @@ -47,108 +47,107 @@ #set some safe values -IF(NOT WITH_SERVER) - SET(WITH_SERVER 0) -ENDIF(NOT WITH_SERVER) IF(NOT BUILD_ENGINE_LIBRARY) - SET(BUILD_ENGINE_LIBRARY 0) + SET(BUILD_ENGINE_LIBRARY 0) ENDIF(NOT BUILD_ENGINE_LIBRARY) set(target_dir "bin") - #bundle .app setup -if(APPLE) - set(CMAKE_FIND_FRAMEWORK "FIRST") +if(APPLE OR CROSSAPPLE) + #paths for creating the bundle + set(bundle_name Hedgewars.app) + set(frameworks_dir ${bundle_name}/Contents/Frameworks/) + set(CMAKE_INSTALL_PREFIX ${bundle_name}/Contents/MacOS/) + set(DATA_INSTALL_DIR "../Resources/") + set(target_dir ".") + set(minimum_macosx_version "10.6") +endif() - #paths for creating the bundle - set(bundle_name Hedgewars.app) - set(frameworks_dir ${bundle_name}/Contents/Frameworks/) - set(CMAKE_INSTALL_PREFIX ${bundle_name}/Contents/MacOS/) - set(DATA_INSTALL_DIR "../Resources/") - set(target_dir ".") +if(APPLE) + set(CMAKE_FIND_FRAMEWORK "FIRST") - #what system are we building for - set(minimum_macosx_version $ENV{MACOSX_DEPLOYMENT_TARGET}) + #what system are we building for + set(minimum_macosx_version $ENV{MACOSX_DEPLOYMENT_TARGET}) - #detect on which system we are: if sw_vers cannot be found for any reason (re)use minimum_macosx_version - find_program(sw_vers sw_vers) - if(sw_vers) - exec_program(${sw_vers} ARGS "-productVersion" OUTPUT_VARIABLE current_macosx_version) - string(REGEX REPLACE "([0-9]+.[0-9]+).[0-9]+" "\\1" current_macosx_version ${current_macosx_version}) + #detect on which system we are: if sw_vers cannot be found for any reason (re)use minimum_macosx_version + find_program(sw_vers sw_vers) + if(sw_vers) + exec_program(${sw_vers} ARGS "-productVersion" OUTPUT_VARIABLE current_macosx_version) + string(REGEX REPLACE "([0-9]+.[0-9]+).[0-9]+" "\\1" current_macosx_version ${current_macosx_version}) + else() + if(NOT minimum_macosx_version) + message(FATAL_ERROR "sw_vers not found! Need explicit MACOSX_DEPLOYMENT_TARGET variable set") else() - if(NOT minimum_macosx_version) - message(FATAL_ERROR "sw_vers not found! Need explicit MACOSX_DEPLOYMENT_TARGET variable set") - else() - set(current_macosx_version ${minimum_macosx_version}) - endif() - endif() + set(current_macosx_version ${minimum_macosx_version}) + endif() + endif() - #if nothing is set, we deploy only for the current system - if(NOT minimum_macosx_version) - set(minimum_macosx_version ${current_macosx_version}) - endif() + #if nothing is set, we deploy only for the current system + if(NOT minimum_macosx_version) + set(minimum_macosx_version ${current_macosx_version}) + endif() - #lower systems don't have enough processing power anyways - if (minimum_macosx_version LESS "10.4") - message(FATAL_ERROR "Hedgewars is not supported on Mac OS X pre-10.4") - endif() + #lower systems don't have enough processing power anyways + if (minimum_macosx_version LESS "10.4") + message(FATAL_ERROR "Hedgewars is not supported on Mac OS X pre-10.4") + endif() - #workaround for http://playcontrol.net/ewing/jibberjabber/big_behind-the-scenes_chang.html#SDL_mixer (Update 2) - if(current_macosx_version MATCHES "10.4") - find_package(SDL_mixer REQUIRED) - set(DYLIB_SMPEG "-dylib_file @loader_path/Frameworks/smpeg.framework/Versions/A/smpeg:${SDLMIXER_LIBRARY}/Versions/A/Frameworks/smpeg.framework/Versions/A/smpeg") - set(DYLIB_MIKMOD "-dylib_file @loader_path/Frameworks/mikmod.framework/Versions/A/mikmod:${SDLMIXER_LIBRARY}/Versions/A/Frameworks/mikmod.framework/Versions/A/mikmod") - set(pascal_flags "-k${DYLIB_SMPEG}" "-k${DYLIB_MIKMOD}" ${pascal_flags}) - set(CMAKE_C_FLAGS "${DYLIB_SMPEG}" "${DYLIB_MIKMOD}" ${CMAKE_C_FLAGS}) - endif() + #workaround for http://playcontrol.net/ewing/jibberjabber/big_behind-the-scenes_chang.html#SDL_mixer (Update 2) + if(current_macosx_version MATCHES "10.4") + find_package(SDL_mixer REQUIRED) + set(DYLIB_SMPEG "-dylib_file @loader_path/Frameworks/smpeg.framework/Versions/A/smpeg:${SDLMIXER_LIBRARY}/Versions/A/Frameworks/smpeg.framework/Versions/A/smpeg") + set(DYLIB_MIKMOD "-dylib_file @loader_path/Frameworks/mikmod.framework/Versions/A/mikmod:${SDLMIXER_LIBRARY}/Versions/A/Frameworks/mikmod.framework/Versions/A/mikmod") + set(pascal_flags "-k${DYLIB_SMPEG}" "-k${DYLIB_MIKMOD}" ${pascal_flags}) + set(CMAKE_C_FLAGS "${DYLIB_SMPEG}" "${DYLIB_MIKMOD}" ${CMAKE_C_FLAGS}) + endif() - #CMAKE_OSX_ARCHITECTURES and CMAKE_OSX_SYSROOT need to be set for universal binary and correct linking - if(NOT CMAKE_OSX_ARCHITECTURES) - if(current_macosx_version LESS "10.6") - if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc*") - set(CMAKE_OSX_ARCHITECTURES "ppc7400") - else() - set(CMAKE_OSX_ARCHITECTURES "i386") - endif() - else() - set(CMAKE_OSX_ARCHITECTURES "x86_64") - endif() - endif() + #CMAKE_OSX_ARCHITECTURES and CMAKE_OSX_SYSROOT need to be set for universal binary and correct linking + if(NOT CMAKE_OSX_ARCHITECTURES) + if(current_macosx_version LESS "10.6") + if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc*") + set(CMAKE_OSX_ARCHITECTURES "ppc7400") + else() + set(CMAKE_OSX_ARCHITECTURES "i386") + endif() + else() + set(CMAKE_OSX_ARCHITECTURES "x86_64") + endif() + endif() - #CMAKE_OSX_SYSROOT is set at the system version we are supposed to build on - #we need to provide the correct one when host and target differ - if(NOT ${minimum_macosx_version} MATCHES ${current_macosx_version}) - if(minimum_macosx_version MATCHES "10.4") - set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.4u.sdk/") - set(CMAKE_C_COMPILER "gcc-4.0") - set(CMAKE_CXX_COMPILER "g++-4.0") - else() - string(REGEX REPLACE "([0-9]+.[0-9]+).[0-9]+" "\\1" sdk_version ${minimum_macosx_version}) - set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX${sdk_version}.sdk/") - endif() - endif() + #CMAKE_OSX_SYSROOT is set at the system version we are supposed to build on + #we need to provide the correct one when host and target differ + if(NOT ${minimum_macosx_version} MATCHES ${current_macosx_version}) + if(minimum_macosx_version MATCHES "10.4") + set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.4u.sdk/") + set(CMAKE_C_COMPILER "gcc-4.0") + set(CMAKE_CXX_COMPILER "g++-4.0") + else() + string(REGEX REPLACE "([0-9]+.[0-9]+).[0-9]+" "\\1" sdk_version ${minimum_macosx_version}) + set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX${sdk_version}.sdk/") + endif() + endif() - #add user framework directory, other paths can be passed via FPFLAGS - set(pascal_flags "-Ff~/Library/Frameworks" ${pascal_flags}) - #set deployment target - set(pascal_flags "-k-macosx_version_min" "-k${minimum_macosx_version}" "-XR${CMAKE_OSX_SYSROOT}" ${pascal_flags}) + #add user framework directory, other paths can be passed via FPFLAGS + set(pascal_flags "-Ff~/Library/Frameworks" ${pascal_flags}) + #set deployment target + set(pascal_flags "-k-macosx_version_min" "-k${minimum_macosx_version}" "-XR${CMAKE_OSX_SYSROOT}" ${pascal_flags}) - message(STATUS "Build system: Mac OS X ${current_macosx_version} with GCC:${CMAKE_C_COMPILER}") - message(STATUS "Target system: Mac OS X ${minimum_macosx_version} for architecture(s):${CMAKE_OSX_ARCHITECTURES}") + message(STATUS "Build system: Mac OS X ${current_macosx_version} with GCC:${CMAKE_C_COMPILER}") + message(STATUS "Target system: Mac OS X ${minimum_macosx_version} for architecture(s):${CMAKE_OSX_ARCHITECTURES}") endif(APPLE) #build Debug only when explicitally set if (NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE RELEASE CACHE STRING "Choose the type of build, options are: Debug Release." FORCE) + set (CMAKE_BUILD_TYPE RELEASE CACHE STRING "Choose the type of build, options are: Debug Release." FORCE) endif (NOT CMAKE_BUILD_TYPE) if(CMAKE_BUILD_TYPE MATCHES DEBUG OR CMAKE_BUILD_TYPE MATCHES "Debug" OR CMAKE_BUILD_TYPE MATCHES "debug") - message(STATUS "Building Debug") - set(Optz false) + message(STATUS "Building Debug") + set(Optz false) else() - message(STATUS "Building Release") - set(Optz true) + message(STATUS "Building Release") + set(Optz true) endif() @@ -160,67 +159,86 @@ set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) -separate_arguments(fpflags_full UNIX_COMMAND ${FPFLAGS}) -set(pascal_flags ${fpflags_full} "-B" "-FE../bin" "-Cs2000000" "-vewn" ${pascal_flags}) -separate_arguments(ghflags_full UNIX_COMMAND ${GHFLAGS}) -set(haskell_flags "-O2" ${haskell_flags} ${ghflags_full}) +#parse additional parameters +if(FPFLAGS OR GHFLAGS) + math(EXPR cmake_version "${CMAKE_MAJOR_VERSION}*10000 + ${CMAKE_MINOR_VERSION}*100 + ${CMAKE_PATCH_VERSION}") + if(cmake_version LESS "020800") + message(STATUS "FPFLAGS and GHFLAGS are available only from Cmake 2.8, ignoring...") + else() + separate_arguments(fpflags_full UNIX_COMMAND ${FPFLAGS}) + separate_arguments(ghflags_full UNIX_COMMAND ${GHFLAGS}) + endif() +endif() + +set(pascal_flags ${fpflags_full} "-B" "-FE../bin" "-Cs2000000" "-vewn" "-dDEBUGFILE" ${pascal_flags}) +set(haskell_flags "-O2" ${ghflags_full} ${haskell_flags}) if(Optz) -# set(pascal_flags "-O3" "-OpPENTIUM4" "-CfSSE3" "-Xs" "-Si" ${pascal_flags}) - set(pascal_flags "-Os" "-Ooregvar" "-Xs" "-Si" ${pascal_flags}) - set(haskell_flags "-w" "-fno-warn-unused-do-bind" ${haskell_flags}) +# set(pascal_flags "-O3" "-OpPENTIUM4" "-CfSSE3" "-Xs" "-Si" ${pascal_flags}) + set(pascal_flags "-Os" "-Ooregvar" "-Xs" "-Si" ${pascal_flags}) + set(haskell_flags "-w" "-fno-warn-unused-do-bind" ${haskell_flags}) else(Optz) - set(pascal_flags "-O-" "-g" "-gl" "-gv" "-Ct" "-dDEBUGFILE" ${pascal_flags}) - set(haskell_flags "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind" ${haskell_flags}) + set(pascal_flags "-O-" "-g" "-gl" "-gv" "-Ct" ${pascal_flags}) + set(haskell_flags "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind" ${haskell_flags}) endif(Optz) if(DEFINED DATA_INSTALL_DIR) - set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/) + set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/) else() - set(SHAREPATH share/hedgewars/) + set(SHAREPATH share/hedgewars/) endif() set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -if(WITH_SERVER) - if(GHC) - set(ghc_executable ${GHC}) - else() - find_program(ghc_executable ghc) - endif() +if(NOT NOSERVER) + if(GHC) + set(ghc_executable ${GHC}) + else() + find_program(ghc_executable ghc) + endif() - if(ghc_executable) - set(HAVE_NETSERVER true) - add_subdirectory(gameServer) - else() - message(STATUS "No GHC executable found, server will *not* be built") - set(HAVE_NETSERVER false) - endif() -else(WITH_SERVER) - set(HAVE_NETSERVER false) -endif(WITH_SERVER) + if(ghc_executable) + set(HAVE_NETSERVER true) + add_subdirectory(gameServer) + else() + message(STATUS "No GHC executable found, server will not be built") + set(HAVE_NETSERVER false) + endif() +else() + message(STATUS "Server will not be built per user request") + set(HAVE_NETSERVER false) +endif() find_package(Lua) -if(NOT ${LUA_FOUND}) - message(STATUS "Lua library not found, building bundled dependency") - add_subdirectory(misc/liblua) - #link with liblua.a (which requires system readline) - set(pascal_flags "-k${CMAKE_BINARY_DIR}/bin/liblua.a" "-k-lreadline" ${pascal_flags}) +if(LUA_FOUND) + message(STATUS "Lua library is present on your system (${LUA_DEFAULT})") +else() + message(STATUS "Lua library not found, building bundled dependency") + add_subdirectory(misc/liblua) + #linking with liblua.a requires system readline -- this works everywhere, right? + if(WIN32) + set(pascal_flags "-k${CMAKE_BINARY_DIR}/bin/liblua.dll.a" "-k-lreadline" ${pascal_flags}) + else() + set(pascal_flags "-k${CMAKE_BINARY_DIR}/bin/liblua.a" "-k-lreadline" ${pascal_flags}) + endif() endif() + add_subdirectory(hedgewars) + #run cmake -DANDROID=1 to enable this if(ANDROID) - add_subdirectory(project_files/Android-build) + add_subdirectory(project_files/Android-build) endif() + if(NOT (BUILD_ENGINE_LIBRARY OR ANDROID)) - add_subdirectory(bin) - add_subdirectory(misc/quazip) - add_subdirectory(QTfrontend) - add_subdirectory(share) - add_subdirectory(tools) + add_subdirectory(bin) + add_subdirectory(misc/quazip) + add_subdirectory(QTfrontend) + add_subdirectory(share) + add_subdirectory(tools) endif() @@ -235,74 +253,74 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "Hedgewars ${HEDGEWARS_VERSION}") if(WIN32 AND NOT UNIX) - set(CPACK_NSIS_DISPLAY_NAME "Hedgewars") - set(CPACK_NSIS_HELP_LINK "http://www.hedgewars.org/") - set(CPACK_NSIS_URL_INFO_ABOUT "http://www.hedgewars.org/") - set(CPACK_NSIS_CONTACT "unC0Rr@gmail.com") - set(CPACK_NSIS_MODIFY_PATH OFF) - set(CPACK_GENERATOR "ZIP;NSIS") - set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "hedgewars") + set(CPACK_NSIS_DISPLAY_NAME "Hedgewars") + set(CPACK_NSIS_HELP_LINK "http://www.hedgewars.org/") + set(CPACK_NSIS_URL_INFO_ABOUT "http://www.hedgewars.org/") + set(CPACK_NSIS_CONTACT "unC0Rr@gmail.com") + set(CPACK_NSIS_MODIFY_PATH OFF) + set(CPACK_GENERATOR "ZIP;NSIS") + set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "hedgewars") else(WIN32 AND NOT UNIX) - set(CPACK_STRIP_FILES "bin/hedgewars;bin/hwengine") + set(CPACK_STRIP_FILES "bin/hedgewars;bin/hwengine") endif(WIN32 AND NOT UNIX) set(CPACK_SOURCE_IGNORE_FILES - "~" - "\\\\.hg" - "\\\\.svn" - "\\\\.exe$" - "\\\\.a$" - "\\\\.dll$" - "\\\\.xcf$" - "\\\\.cxx$" - "\\\\.db$" - "\\\\.dof$" - "\\\\.layout$" - "\\\\.zip$" - "\\\\.gz$" - "\\\\.bz2$" - "\\\\.tmp$" - "\\\\.core$" - "\\\\.sh$" - "\\\\.sifz$" - "\\\\.svg$" - "\\\\.svgz$" - "\\\\.ppu$" - "\\\\.psd$" - "\\\\.o$" - "Makefile" - "Doxyfile" - "CMakeFiles" - "debug" - "release$" - "Debug$" - "Release$" - "proto\\\\.inc$" - "hwconsts\\\\.cpp$" - "playlist\\\\.inc$" - "CPack" - "cmake_install\\\\.cmake$" - "config\\\\.inc$" - "hwengine\\\\.desktop$" - "CMakeCache\\\\.txt$" -# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libopenalbridge" -# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libfreetype" - "^${CMAKE_CURRENT_SOURCE_DIR}/misc/liblua" -# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libtremor" - "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/HedgewarsMobile/" - "^${CMAKE_CURRENT_SOURCE_DIR}/bin/[a-z]" - "^${CMAKE_CURRENT_SOURCE_DIR}/tools/templates" - "^${CMAKE_CURRENT_SOURCE_DIR}/doc" - "^${CMAKE_CURRENT_SOURCE_DIR}/templates" - "^${CMAKE_CURRENT_SOURCE_DIR}/Graphics" - "^${CMAKE_CURRENT_SOURCE_DIR}/realtest" - "^${CMAKE_CURRENT_SOURCE_DIR}/tmp" - "^${CMAKE_CURRENT_SOURCE_DIR}/utils" - "^${CMAKE_CURRENT_SOURCE_DIR}/share/hedgewars/Data/Maps/test" - "^${CMAKE_CURRENT_SOURCE_DIR}/share/hedgewars/Data/Themes/ethereal" - "^${CMAKE_CURRENT_SOURCE_DIR}/install_manifest.txt" - "^${CMAKE_CURRENT_SOURCE_DIR}/CMakeCache.txt" - "^${CMAKE_CURRENT_SOURCE_DIR}/hedgewars\\\\." + "~" + "\\\\.hg" + "\\\\.svn" + "\\\\.exe$" + "\\\\.a$" + "\\\\.dll$" + "\\\\.xcf$" + "\\\\.cxx$" + "\\\\.db$" + "\\\\.dof$" + "\\\\.layout$" + "\\\\.zip$" + "\\\\.gz$" + "\\\\.bz2$" + "\\\\.tmp$" + "\\\\.core$" + "\\\\.sh$" + "\\\\.sifz$" + "\\\\.svg$" + "\\\\.svgz$" + "\\\\.ppu$" + "\\\\.psd$" + "\\\\.o$" + "Makefile" + "Doxyfile" + "CMakeFiles" + "debug" + "release$" + "Debug$" + "Release$" + "proto\\\\.inc$" + "hwconsts\\\\.cpp$" + "playlist\\\\.inc$" + "CPack" + "cmake_install\\\\.cmake$" + "config\\\\.inc$" + "hwengine\\\\.desktop$" + "CMakeCache\\\\.txt$" +# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libopenalbridge" +# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libfreetype" + "^${CMAKE_CURRENT_SOURCE_DIR}/misc/liblua" +# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libtremor" + "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/HedgewarsMobile/" + "^${CMAKE_CURRENT_SOURCE_DIR}/bin/[a-z]" + "^${CMAKE_CURRENT_SOURCE_DIR}/tools/templates" + "^${CMAKE_CURRENT_SOURCE_DIR}/doc" + "^${CMAKE_CURRENT_SOURCE_DIR}/templates" + "^${CMAKE_CURRENT_SOURCE_DIR}/Graphics" + "^${CMAKE_CURRENT_SOURCE_DIR}/realtest" + "^${CMAKE_CURRENT_SOURCE_DIR}/tmp" + "^${CMAKE_CURRENT_SOURCE_DIR}/utils" + "^${CMAKE_CURRENT_SOURCE_DIR}/share/hedgewars/Data/Maps/test" + "^${CMAKE_CURRENT_SOURCE_DIR}/share/hedgewars/Data/Themes/ethereal" + "^${CMAKE_CURRENT_SOURCE_DIR}/install_manifest.txt" + "^${CMAKE_CURRENT_SOURCE_DIR}/CMakeCache.txt" + "^${CMAKE_CURRENT_SOURCE_DIR}/hedgewars\\\\." ) include(CPack)
--- a/QTfrontend/CMakeLists.txt Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/CMakeLists.txt Thu Aug 30 12:13:24 2012 -0400 @@ -11,7 +11,9 @@ set(QT_USE_QTMAIN TRUE) find_package(Qt4 REQUIRED) -include(${QT_USE_FILE}) +if (NOT CROSSAPPLE) + include(${QT_USE_FILE}) +endif() # Check if we need zlib check_library_exists("${QT_QTCORE_LIBRARY}" inflateInit2_ ${QT_LIBRARY_DIR} QT_PROVIDES_ZLIB_FUNCTIONS) @@ -142,7 +144,7 @@ qt4_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs}) -if(APPLE) +if(APPLE OR CROSSAPPLE) set(hwfr_src ${hwfr_src} InstallController.cpp CocoaInitializer.mm M3Panel.mm M3InstallController.m NSWorkspace_RBAdditions.m) set(HW_LINK_LIBS IOKit ${HW_LINK_LIBS}) @@ -188,7 +190,11 @@ endif() -target_link_libraries(hedgewars ${HW_LINK_LIBS}) +if (CROSSAPPLE) + add_dependencies(hedgewars quazip) +else() + target_link_libraries(hedgewars ${HW_LINK_LIBS}) +endif() install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir})
--- a/QTfrontend/binds.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/binds.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -62,6 +62,7 @@ {"confirm", "y", QT_TRANSLATE_NOOP("binds", "confirmation"), NULL, NULL}, {"+voldown", "9", QT_TRANSLATE_NOOP("binds", "volume down"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Modify the game's volume while playing:")}, {"+volup", "0", QT_TRANSLATE_NOOP("binds", "volume up"), NULL, NULL}, + {"mute", "8", QT_TRANSLATE_NOOP("binds", "mute audio"), NULL, NULL}, {"fullscr", "f12", QT_TRANSLATE_NOOP("binds", "change mode"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle fullscreen mode:")}, {"capture", "c", QT_TRANSLATE_NOOP("binds", "capture"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Take a screenshot:")}, {"rotmask", "delete", QT_TRANSLATE_NOOP("binds", "hedgehogs\ninfo"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle labels above hedgehogs:")}
--- a/QTfrontend/binds.h Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/binds.h Thu Aug 30 12:13:24 2012 -0400 @@ -21,7 +21,7 @@ #include <QString> -#define BINDS_NUMBER 44 +#define BINDS_NUMBER 45 struct BindAction {
--- a/QTfrontend/drawmapscene.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/drawmapscene.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -136,7 +136,6 @@ void DrawMapScene::showCursor() { - qDebug() << "show cursor"; if(!m_isCursorShown) addItem(m_cursor); @@ -145,7 +144,6 @@ void DrawMapScene::hideCursor() { - qDebug() << "hide cursor"; if(m_isCursorShown) removeItem(m_cursor); @@ -224,8 +222,11 @@ qint16 px = qToBigEndian((qint16)point.x()); qint16 py = qToBigEndian((qint16)point.y()); quint8 flags = 0; - if(!cnt) flags = 0x80 + params.width; - if(params.erasing) flags |= 0x40; + if(!cnt) + { + flags = 0x80 + params.width; + if(params.erasing) flags |= 0x40; + } b.append((const char *)&px, 2); b.append((const char *)&py, 2); b.append((const char *)&flags, 1);
--- a/QTfrontend/game.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/game.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -21,7 +21,6 @@ #include <QUuid> #include <QColor> #include <QStringListModel> -#include <QMessageBox> #include "game.h" #include "hwconsts.h" @@ -30,11 +29,10 @@ #include "teamselect.h" #include "KB.h" #include "proto.h" -#include "campaign.h" #include <QTextStream> -QString training, campaign, campaignScript, campaignTeam; // TODO: Cleaner solution? +QString training, campaign; // TODO: Cleaner solution? HWGame::HWGame(GameUIConfig * config, GameCFGWidget * gamecfg, QString ammo, TeamSelWidget* pTeamSelWidget) : TCPBase(true), @@ -167,7 +165,7 @@ HWProto::addStringToBuffer(campaigncfg, "TL"); HWProto::addStringToBuffer(campaigncfg, "eseed " + QUuid::createUuid().toString()); - HWProto::addStringToBuffer(campaigncfg, "escript " + campaignScript); + HWProto::addStringToBuffer(campaigncfg, "escript " + campaign); RawSendIPC(campaigncfg); } @@ -279,14 +277,6 @@ emit SendTeamMessage(msgbody); break; } - case 'V': - { - if (msg.at(2) == '?') - sendCampaignVar(msg.right(msg.size() - 3)); - else if (msg.at(2) == '!') - writeCampaignVar(msg.right(msg.size() - 3)); - break; - } default: { if (gameType == gtNet && !netSuspend) @@ -401,12 +391,10 @@ SetGameState(gsStarted); } -void HWGame::StartCampaign(const QString & camp, const QString & campScript, const QString & campTeam) +void HWGame::StartCampaign(const QString & file) { gameType = gtCampaign; - campaign = camp; - campaignScript = "Missions/Campaign/" + camp + "/" + campScript; - campaignTeam = campTeam; + campaign = "Missions/Campaign/" + file + ".lua"; demo.clear(); Start(); SetGameState(gsStarted); @@ -416,10 +404,6 @@ { gameState = state; emit GameStateChanged(state); - if (gameType == gtCampaign) - { - emit CampStateChanged(1); - } } void HWGame::abort() @@ -428,37 +412,3 @@ HWProto::addStringToBuffer(buf, QString("efinish")); RawSendIPC(buf); } - -void HWGame::sendCampaignVar(QByteArray varToSend) -{ - QString varToFind(varToSend); - QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + campaignTeam + ".hwt", QSettings::IniFormat, 0); - teamfile.setIniCodec("UTF-8"); - QString varValue = teamfile.value("Campaign " + campaign + "/" + varToFind, "").toString(); - QByteArray command; - HWProto::addStringToBuffer(command, "V." + varValue); - RawSendIPC(command); -} - -void HWGame::writeCampaignVar(QByteArray varVal) -{ - QString varToWrite(""); - QString varValue(""); - unsigned int i = 0; - while (i < varVal.size() && varVal.at(i) != ' ') - { - varToWrite.append(varVal.at(i)); - i++; - } - i++; - while (i < varVal.size() && varVal.at(i) != '\0') - { - varValue.append(varVal.at(i)); - i++; - } - - QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + campaignTeam + ".hwt", QSettings::IniFormat, 0); - teamfile.setIniCodec("UTF-8"); - teamfile.setValue("Campaign " + campaign + "/" + varToWrite, varValue); -} -
--- a/QTfrontend/gameuiconfig.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/gameuiconfig.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -333,7 +333,7 @@ QByteArray GameUIConfig::netPasswordHash() { - return QCryptographicHash::hash(Form->ui.pageOptions->editNetPassword->text().toLatin1(), QCryptographicHash::Md5).toHex(); + return QCryptographicHash::hash(Form->ui.pageOptions->editNetPassword->text().toUtf8(), QCryptographicHash::Md5).toHex(); } int GameUIConfig::netPasswordLength()
--- a/QTfrontend/hwconsts.cpp.in Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/hwconsts.cpp.in Thu Aug 30 12:13:24 2012 -0400 @@ -72,19 +72,3 @@ int season = SEASON_NONE; int years_since_foundation = 0; - -QStandardItemModel * colorsModel; - -void hwConstsInit() -{ - colorsModel = new QStandardItemModel(); - - int i = 0; - while(colors[i]) - { - QStandardItem * item = new QStandardItem(); - item->setData(QColor(colors[i])); - colorsModel->appendRow(item); - ++i; - } -}
--- a/QTfrontend/hwconsts.h Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/hwconsts.h Thu Aug 30 12:13:24 2012 -0400 @@ -44,8 +44,7 @@ extern int cAmmoNumber; extern QList< QPair<QString, QString> > cDefaultAmmos; -//extern unsigned int colors[]; -extern QStandardItemModel * colorsModel; +extern unsigned int colors[]; extern QString * netHost; extern quint16 netPort; @@ -60,8 +59,6 @@ //Could be used to implement a text/graphic like "This is the xxth birthday of hedgewars" or similar extern int years_since_foundation; -void hwConstsInit(); - #endif #define HEDGEHOGS_PER_TEAM 8
--- a/QTfrontend/hwform.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/hwform.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -129,7 +129,7 @@ #endif gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat); frontendEffects = gameSettings->value("frontend/effects", true).toBool(); - playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toLatin1(), QCryptographicHash::Md5).toHex()); + playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toUtf8(), QCryptographicHash::Md5).toHex()); this->setStyleSheet(styleSheet); ui.setupUi(this); @@ -971,7 +971,7 @@ } QString password = hpd->lePassword->text(); - hash = QCryptographicHash::hash(password.toLatin1(), QCryptographicHash::Md5).toHex(); + hash = QCryptographicHash::hash(password.toUtf8(), QCryptographicHash::Md5).toHex(); bool save = hpd->cbSave->isChecked(); config->setValue("net/savepassword", save);
--- a/QTfrontend/main.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/main.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -104,8 +104,6 @@ { HWApplication app(argc, argv); - hwConstsInit(); - app.setAttribute(Qt::AA_DontShowIconsInMenus,false); QStringList arguments = app.arguments();
--- a/QTfrontend/model/GameStyleModel.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/model/GameStyleModel.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -21,6 +21,8 @@ * @brief GameStyleModel class implementation */ +#include <QTextStream> + #include "GameStyleModel.h"
--- a/QTfrontend/model/roomslistmodel.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/model/roomslistmodel.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -21,12 +21,13 @@ * @brief RoomsListModel class implementation */ -#include "roomslistmodel.h" - #include <QBrush> #include <QColor> #include <QIcon> +#include "roomslistmodel.h" +#include "MapModel.h" + RoomsListModel::RoomsListModel(QObject *parent) : QAbstractTableModel(parent), c_nColumns(8)
--- a/QTfrontend/team.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/team.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -26,6 +26,7 @@ #include "team.h" #include "hwform.h" +#include "DataManager.h" HWTeam::HWTeam(const QString & teamname) : QObject(0) @@ -150,9 +151,9 @@ m_fort = other.m_fort; m_flag = other.m_flag; m_voicepack = other.m_voicepack; -// m_hedgehogs = other.m_hedgehogs; + m_hedgehogs = other.m_hedgehogs; m_difficulty = other.m_difficulty; -// m_binds = other.m_binds; + m_binds = other.m_binds; m_numHedgehogs = other.m_numHedgehogs; m_color = other.m_color; m_isNetTeam = other.m_isNetTeam; @@ -258,7 +259,7 @@ QStringList sl; if (m_isNetTeam) { - sl.push_back(QString("eaddteam %3 %1 %2").arg(qcolor().rgb() & 0xffffff).arg(m_name).arg(QString(QCryptographicHash::hash(m_owner.toLatin1(), QCryptographicHash::Md5).toHex()))); + sl.push_back(QString("eaddteam %3 %1 %2").arg(qcolor().rgb() & 0xffffff).arg(m_name).arg(QString(QCryptographicHash::hash(m_owner.toUtf8(), QCryptographicHash::Md5).toHex()))); sl.push_back("erdriven"); } else sl.push_back(QString("eaddteam %3 %1 %2").arg(qcolor().rgb() & 0xffffff).arg(m_name).arg(playerHash)); @@ -351,12 +352,12 @@ QColor HWTeam::qcolor() const { - return colorsModel->item(m_color)->data().value<QColor>(); + return DataManager::instance().colorsModel()->item(m_color)->data().value<QColor>(); } void HWTeam::setColor(int color) { - m_color = color % colorsModel->rowCount(); + m_color = color % DataManager::instance().colorsModel()->rowCount(); }
--- a/QTfrontend/ui/page/pageeditteam.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/ui/page/pageeditteam.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -26,12 +26,13 @@ #include <QGroupBox> #include <QToolBox> #include <QMessageBox> - -#include "sdlkeys.h" +#include <QStandardItemModel> +#include <QDebug> #include "SquareLabel.h" #include "HWApplication.h" #include "DataManager.h" +#include "HatModel.h" #include "pageeditteam.h" @@ -196,9 +197,9 @@ l->setText(HWApplication::translate("binds", cbinds[i].name)); l->setAlignment(Qt::AlignRight); pagelayout->addWidget(l, num, 0); + CBBind[i] = new QComboBox(curW); - for(int j = 0; sdlkeys[j][1][0] != '\0'; j++) - CBBind[i]->addItem(HWApplication::translate("binds (keys)", sdlkeys[j][1]).contains(": ") ? HWApplication::translate("binds (keys)", sdlkeys[j][1]) : HWApplication::translate("binds (keys)", "Keyboard") + QString(": ") + HWApplication::translate("binds (keys)", sdlkeys[j][1]), sdlkeys[j][0]); + CBBind[i]->setModel(DataManager::instance().bindsModel()); pagelayout->addWidget(CBBind[i++], num++, 1); } @@ -422,9 +423,15 @@ CBFort->setCurrentIndex(CBFort->findText(team.fort())); CBVoicepack->setCurrentIndex(CBVoicepack->findText(team.voicepack())); + QStandardItemModel * binds = DataManager::instance().bindsModel(); for(int i = 0; i < BINDS_NUMBER; i++) { - CBBind[i]->setCurrentIndex(CBBind[i]->findData(team.keyBind(i))); + QModelIndexList mdl = binds->match(binds->index(0, 0), Qt::UserRole + 1, team.keyBind(i), 1, Qt::MatchExactly); + + if(mdl.size() == 1) + CBBind[i]->setCurrentIndex(mdl[0].row()); + else + qDebug() << "Binds: cannot find" << team.keyBind(i); } } @@ -450,9 +457,10 @@ team.setVoicepack(CBVoicepack->currentText()); team.setFlag(CBFlag->itemData(CBFlag->currentIndex()).toString()); + QStandardItemModel * binds = DataManager::instance().bindsModel(); for(int i = 0; i < BINDS_NUMBER; i++) { - team.bindKey(i,CBBind[i]->itemData(CBBind[i]->currentIndex()).toString()); + team.bindKey(i, binds->index(CBBind[i]->currentIndex(), 0).data(Qt::UserRole + 1).toString()); } return team;
--- a/QTfrontend/ui/page/pageplayrecord.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/ui/page/pageplayrecord.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -169,7 +169,11 @@ if(!ok) QMessageBox::critical(this, tr("Error"), tr("Cannot delete file")); else - FillFromDir(recType); + { + int i = DemosList->row(curritem); + delete curritem; + DemosList->setCurrentRow(i < DemosList->count() ? i : DemosList->count() - 1); + } } bool PagePlayDemo::isSave()
--- a/QTfrontend/ui/widget/about.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/ui/widget/about.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -128,7 +128,7 @@ "Greek: <<a href=\"mailto:talos_kriti@yahoo.gr\">talos_kriti@yahoo.gr</a>><br>" "Italian: Luca Bonora <<a href=\"mailto:bonora.luca@gmail.com\">bonora.luca@gmail.com</a>>, Marco Bresciani<br>" "Japanese: ADAM Etienne <<a href=\"mailto:etienne.adam@gmail.com\">etienne.adam@gmail.com</a>><br>" - "Korean: Anthony Bellew <<a href=\"mailto:webmaster@anthonybellew.com\">webmaster@anthonybellew.com</a>><br>" + "Korean: Anthony Bellew <<a href=\"mailto:anthonyreflected@gmail.com\">anthonyreflected@gmail.com</a>><br>" "Lithuanian: Lukas Urbonas <<a href=\"mailto:lukasu08@gmail.com\">lukasu08@gmail.com</a>><br>" "Polish: Maciej Mroziński <<a href=\"mailto:mynick2@o2.pl\">mynick2@o2.pl</a>>, Wojciech Latkowski <<a href=\"mailto:magik17l@gmail.com\">magik17l@gmail.com</a>>, Piotr Mitana, Maciej Górny<br>" "Portuguese: Fábio Canário <<a href=\"mailto:inufabie@gmail.com\">inufabie@gmail.com</a>><br>"
--- a/QTfrontend/ui/widget/frameTeam.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/ui/widget/frameTeam.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -25,6 +25,7 @@ #include "frameTeam.h" #include "teamselhelper.h" #include "hwconsts.h" +#include "DataManager.h" FrameTeams::FrameTeams(QWidget* parent) : QFrame(parent), maxHedgehogsPerGame(48), overallHedgehogs(0), mainLayout(this), nonInteractive(false) @@ -54,12 +55,12 @@ void FrameTeams::resetColors() { - currentColor = colorsModel->rowCount() - 1; // ensure next color is the first one + currentColor = DataManager::instance().colorsModel()->rowCount() - 1; // ensure next color is the first one } int FrameTeams::getNextColor() { - currentColor = (currentColor + 1) % colorsModel->rowCount(); + currentColor = (currentColor + 1) % DataManager::instance().colorsModel()->rowCount(); return currentColor; }
--- a/QTfrontend/ui/widget/gamecfgwidget.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/ui/widget/gamecfgwidget.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -32,6 +32,7 @@ #include "hwconsts.h" #include "ammoSchemeModel.h" #include "proto.h" +#include "GameStyleModel.h" GameCFGWidget::GameCFGWidget(QWidget* parent) : QGroupBox(parent)
--- a/QTfrontend/ui/widget/mapContainer.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/ui/widget/mapContainer.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -36,6 +36,7 @@ #include "mapContainer.h" #include "igbox.h" #include "HWApplication.h" +#include "ThemeModel.h" HWMapContainer::HWMapContainer(QWidget * parent) : QWidget(parent),
--- a/QTfrontend/ui/widget/mapContainer.h Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/ui/widget/mapContainer.h Thu Aug 30 12:13:24 2012 -0400 @@ -31,6 +31,7 @@ #include "hwmap.h" #include "drawmapscene.h" +#include "MapModel.h" class QPushButton; class IconedGroupBox;
--- a/QTfrontend/ui/widget/teamselhelper.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/ui/widget/teamselhelper.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -28,6 +28,7 @@ #include "hwconsts.h" #include "frameTeam.h" #include "colorwidget.h" +#include "DataManager.h" void TeamLabel::teamButtonClicked() { @@ -69,7 +70,7 @@ if(m_isPlaying) { // team color - colorWidget = new ColorWidget(colorsModel, this); + colorWidget = new ColorWidget(DataManager::instance().colorsModel(), this); colorWidget->setMinimumWidth(26); colorWidget->setMaximumWidth(26); colorWidget->setMinimumHeight(26);
--- a/QTfrontend/util/DataManager.cpp Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/util/DataManager.cpp Thu Aug 30 12:13:24 2012 -0400 @@ -23,13 +23,19 @@ #include <QMap> #include <QStringList> - +#include <QStandardItemModel> #include <QFileInfo> #include "hwconsts.h" +#include "HWApplication.h" +#include "sdlkeys.h" #include "DataManager.h" +#include "GameStyleModel.h" +#include "HatModel.h" +#include "MapModel.h" +#include "ThemeModel.h" DataManager::DataManager() { @@ -42,6 +48,8 @@ m_hatModel = NULL; m_mapModel = NULL; m_themeModel = NULL; + m_colorsModel = NULL; + m_bindsModel = NULL; } @@ -154,6 +162,43 @@ return m_themeModel; } +QStandardItemModel * DataManager::colorsModel() +{ + if(m_colorsModel == NULL) + { + m_colorsModel = new QStandardItemModel(); + + int i = 0; + while(colors[i]) + { + QStandardItem * item = new QStandardItem(); + item->setData(QColor(colors[i])); + m_colorsModel->appendRow(item); + ++i; + } + } + + return m_colorsModel; +} + +QStandardItemModel * DataManager::bindsModel() +{ + if(m_bindsModel == NULL) + { + m_bindsModel = new QStandardItemModel(); + + for(int j = 0; sdlkeys[j][1][0] != '\0'; j++) + { + QStandardItem * item = new QStandardItem(); + item->setData(HWApplication::translate("binds (keys)", sdlkeys[j][1]).contains(": ") ? HWApplication::translate("binds (keys)", sdlkeys[j][1]) : HWApplication::translate("binds (keys)", "Keyboard") + QString(": ") + HWApplication::translate("binds (keys)", sdlkeys[j][1]), Qt::DisplayRole); + item->setData(sdlkeys[j][0], Qt::UserRole + 1); + m_bindsModel->appendRow(item); + } + } + + return m_bindsModel; +} + void DataManager::reload() { m_gameStyleModel->loadGameStyles();
--- a/QTfrontend/util/DataManager.h Mon Jul 23 19:15:59 2012 +0300 +++ b/QTfrontend/util/DataManager.h Thu Aug 30 12:13:24 2012 -0400 @@ -26,21 +26,13 @@ #include <QDir> #include <QFile> - #include <QStringList> -#include "GameStyleModel.h" -#include "HatModel.h" -#include "MapModel.h" -#include "ThemeModel.h" - -class QDir; -class QFile; -class QStringList; class GameStyleModel; class HatModel; class MapModel; class ThemeModel; +class QStandardItemModel; /** * @brief Offers access to the data files of hedgewars. @@ -135,6 +127,9 @@ */ ThemeModel * themeModel(); + QStandardItemModel * colorsModel(); + QStandardItemModel * bindsModel(); + public slots: /// Reloads data from storage. void reload(); @@ -163,6 +158,8 @@ HatModel * m_hatModel; ///< hat model instance MapModel * m_mapModel; ///< map model instance ThemeModel * m_themeModel; ///< theme model instance + QStandardItemModel * m_colorsModel; + QStandardItemModel * m_bindsModel; }; #endif // HEDGEWARS_DATAMANAGER_H
--- a/cmake_modules/FindLua.cmake Mon Jul 23 19:15:59 2012 +0300 +++ b/cmake_modules/FindLua.cmake Thu Aug 30 12:13:24 2012 -0400 @@ -20,8 +20,8 @@ FIND_LIBRARY(LUA_DEFAULT NAMES lua51 lua5.1 lua-5.1 lua PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib) IF(${LUA_DEFAULT} MATCHES "LUA_DEFAULT-NOTFOUND") set(LUA_DEFAULT lua) + ELSE() set(LUA_FOUND true) - ELSE() message(STATUS "LibLua 5.1 found at ${LUA_DEFAULT}") #remove the path (fpc doesn't like it - why?) GET_FILENAME_COMPONENT(LUA_DEFAULT ${LUA_DEFAULT} NAME)
--- a/gameServer/Actions.hs Mon Jul 23 19:15:59 2012 +0300 +++ b/gameServer/Actions.hs Thu Aug 30 12:13:24 2012 -0400 @@ -160,7 +160,7 @@ s <- get put $! s{removedClients = ci `Set.delete` removedClients s} - + sp <- gets (shutdownPending . serverInfo) cls <- allClientsS io $ when (sp && null cls) $ throwIO ShutdownException @@ -210,7 +210,6 @@ ri <- clientRoomA rnc <- gets roomsClients (gameProgress, playersNum) <- io $ room'sM rnc ((isJust . gameInfo) &&& playersIn) ri - ready <- client's isReady master <- client's isMaster -- client <- client's id clNick <- client's nick @@ -218,13 +217,14 @@ if master then if gameProgress && playersNum > 1 then - mapM_ processAction [ChangeMaster, AnswerClients chans ["LEFT", clNick, msg], NoticeMessage AdminLeft, RemoveClientTeams ci] + mapM_ processAction [ChangeMaster, NoticeMessage AdminLeft, RemoveClientTeams ci, AnswerClients chans ["LEFT", clNick, msg]] else processAction RemoveRoom else - mapM_ processAction [AnswerClients chans ["LEFT", clNick, msg], RemoveClientTeams ci] + mapM_ processAction [RemoveClientTeams ci, AnswerClients chans ["LEFT", clNick, msg]] -- when not removing room + ready <- client's isReady when (not master || (gameProgress && playersNum > 1)) . io $ do modifyRoom rnc (\r -> r{ playersIn = playersIn r - 1, @@ -251,7 +251,7 @@ chans <- liftM (map sendChan) $! sameProtoClientsS proto processAction $ AnswerClients chans ("ROOM" : "UPD" : oldRoomName : roomInfo (nick newMaster) newRoom) - + processAction (AddRoom roomName roomPassword) = do Just clId <- gets clientIndex rnc <- gets roomsClients @@ -306,16 +306,16 @@ where notReadyMessage p nicks = if p < 38 then "NOT_READY" : nicks else "CLIENT_FLAGS" : "-r" : nicks - + processAction FinishGame = do rnc <- gets roomsClients ri <- clientRoomA thisRoomChans <- liftM (map sendChan) $ roomClientsS ri clNick <- client's nick - answerRemovedTeams <- io $ + answerRemovedTeams <- io $ room'sM rnc (map (\t -> AnswerClients thisRoomChans ["REMOVE_TEAM", t]) . leftTeams . fromJust . gameInfo) ri - - mapM_ processAction $ + + mapM_ processAction $ SaveReplay : ModifyRoom (\r -> r{ @@ -326,7 +326,7 @@ : UnreadyRoomClients : answerRemovedTeams - + processAction (SendTeamRemovalMessage teamName) = do chans <- othersChans mapM_ processAction [ @@ -338,22 +338,22 @@ }) $ gameInfo r }) ] - + rnc <- gets roomsClients ri <- clientRoomA gi <- io $ room'sM rnc gameInfo ri when (isJust gi && 0 == teamsInGameNumber (fromJust gi)) $ - processAction FinishGame + processAction FinishGame where rmTeamMsg = toEngineMsg $ 'F' `B.cons` teamName - - + + processAction (RemoveTeam teamName) = do rnc <- gets roomsClients ri <- clientRoomA inGame <- io $ room'sM rnc (isJust . gameInfo) ri chans <- othersChans - mapM_ processAction $ + mapM_ processAction $ ModifyRoom (\r -> r{ teams = Prelude.filter (\t -> teamName /= teamname t) $ teams r , gameInfo = liftM (\g -> g{leftTeams = teamName : leftTeams g}) $ gameInfo r @@ -456,7 +456,7 @@ bans <- gets (bans . serverInfo) processAction $ AnswerClients [ch] ["BANLIST", B.pack $ show bans] - + processAction (KickRoomClient kickId) = do @@ -536,7 +536,7 @@ where st irnc = (length $ allRooms irnc, length $ allClients irnc) -processAction RestartServer = do +processAction RestartServer = do sp <- gets (shutdownPending . serverInfo) when (not sp) $ do sock <- gets (fromJust . serverSocket . serverInfo)
--- a/gameServer/ClientIO.hs Mon Jul 23 19:15:59 2012 +0300 +++ b/gameServer/ClientIO.hs Thu Aug 30 12:13:24 2012 -0400 @@ -43,15 +43,18 @@ clientRecvLoop :: Socket -> Chan CoreMessage -> Chan [B.ByteString] -> ClientIndex -> (forall a. IO a -> IO a) -> IO () clientRecvLoop s chan clChan ci restore = - myThreadId >>= + (myThreadId >>= \t -> (restore $ forkIO (clientSendLoop s t clChan ci) >> listenLoop s chan ci >> return "Connection closed") + `Exception.catch` (\(e :: ShutdownThreadException) -> return . B.pack . show $ e) `Exception.catch` (\(e :: Exception.IOException) -> return . B.pack . show $ e) - `Exception.catch` (\(e :: ShutdownThreadException) -> return . B.pack . show $ e) - >>= clientOff >> remove + `Exception.catch` (\(e :: Exception.SomeException) -> return . B.pack . show $ e) + >>= clientOff) `Exception.finally` remove where clientOff msg = writeChan chan $ ClientMessage (ci, ["QUIT", msg]) - remove = writeChan chan $ Remove ci + remove = do + clientOff "Client is in some weird state" + writeChan chan $ Remove ci @@ -63,12 +66,11 @@ killReciever . B.unpack $ quitMessage answer Exception.handle - (\(e :: Exception.IOException) -> unless (isQuit answer) . killReciever $ show e) $ + (\(e :: Exception.SomeException) -> unless (isQuit answer) . killReciever $ show e) $ sendAll s $ B.unlines answer `B.snoc` '\n' if isQuit answer then - do - Exception.handle (\(_ :: Exception.IOException) -> putStrLn "error on sClose") $ sClose s + sClose s else clientSendLoop s tId chan ci
--- a/gameServer/CoreTypes.hs Mon Jul 23 19:15:59 2012 +0300 +++ b/gameServer/CoreTypes.hs Thu Aug 30 12:13:24 2012 -0400 @@ -62,7 +62,7 @@ hedgehogs :: [HedgehogInfo] } deriving (Show, Read) - + data GameInfo = GameInfo { @@ -74,9 +74,9 @@ giMapParams :: Map.Map B.ByteString B.ByteString, giParams :: Map.Map B.ByteString [B.ByteString] } deriving (Show, Read) - ---newGameInfo :: -> GameInfo -newGameInfo = + +--newGameInfo :: -> GameInfo +newGameInfo = GameInfo Data.Sequence.empty []
--- a/gameServer/HWProtoInRoomState.hs Mon Jul 23 19:15:59 2012 +0300 +++ b/gameServer/HWProtoInRoomState.hs Thu Aug 30 12:13:24 2012 -0400 @@ -79,10 +79,10 @@ hhsList [_] = error "Hedgehogs list with odd elements number" hhsList (n:h:hhs) = HedgehogInfo n h : hhsList hhs newTeamHHNum r = min 4 (canAddNumber r) - maxTeams r + maxTeams r | roomProto r < 38 = 6 | otherwise = 8 - + handleCmd_inRoom ["REMOVE_TEAM", tName] = do (ci, _) <- ask @@ -158,8 +158,8 @@ cl <- thisClient chans <- roomClientsChans return [ + ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)}), ModifyClient (\c -> c{isReady = not $ isReady cl}), - ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)}), AnswerClients chans $ if clientProto cl < 38 then [if isReady cl then "NOT_READY" else "READY", nick cl] else @@ -171,7 +171,7 @@ cl <- thisClient rm <- thisRoom chans <- roomClientsChans - + let allPlayersRegistered = all ((<) 0 . B.length . webPassword . client rnc . teamownerId) $ teams rm if isMaster cl && playersIn rm == readyPlayers rm && not (isJust $ gameInfo rm) then @@ -247,7 +247,7 @@ rs <- allRoomInfos rm <- thisRoom chans <- sameProtoChans - + return $ if not $ isMaster cl then [ProtocolError "Not room master"]
--- a/gameServer/HWProtoLobbyState.hs Mon Jul 23 19:15:59 2012 +0300 +++ b/gameServer/HWProtoLobbyState.hs Thu Aug 30 12:13:24 2012 -0400 @@ -71,7 +71,7 @@ let nicks = map nick jRoomClients let chans = map sendChan (cl : jRoomClients) return $ - if isNothing maybeRI || not sameProto then + if isNothing maybeRI || not sameProto then [Warning "No such room"] else if isRestrictedJoins jRoom then [Warning "Joining restricted"] @@ -147,12 +147,12 @@ cl <- thisClient banId <- clientByNick banNick return [BanClient 60 reason (fromJust banId) | isAdministrator cl && isJust banId && fromJust banId /= ci] - + handleCmd_lobby ["BANIP", ip, reason, duration] = do (ci, _) <- ask cl <- thisClient return [BanIP ip (readInt_ duration) reason | isAdministrator cl] - + handleCmd_lobby ["BANLIST"] = do (ci, _) <- ask cl <- thisClient @@ -172,7 +172,7 @@ return [ModifyServerInfo (\si -> si{latestReleaseVersion = readNum}) | isAdministrator cl && readNum > 0] where readNum = readInt_ protoNum - + handleCmd_lobby ["GET_SERVER_VAR"] = do cl <- thisClient return [SendServerVars | isAdministrator cl]
--- a/gameServer/OfficialServer/DBInteraction.hs Mon Jul 23 19:15:59 2012 +0300 +++ b/gameServer/OfficialServer/DBInteraction.hs Thu Aug 30 12:13:24 2012 -0400 @@ -60,7 +60,7 @@ CheckAccount clId clUid clNick _ -> do let cacheEntry = clNick `Map.lookup` accountsCache currentTime <- getCurrentTime - if (isNothing cacheEntry) || (currentTime `diffUTCTime` (fst . fromJust) cacheEntry > 2 * 24 * 60 * 60) then + if (isNothing cacheEntry) || (currentTime `diffUTCTime` (fst . fromJust) cacheEntry > 10 * 60) then do SIO.hPutStrLn hIn $ show q hFlush hIn
--- a/hedgewars/CMakeLists.txt Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/CMakeLists.txt Thu Aug 30 12:13:24 2012 -0400 @@ -32,6 +32,7 @@ uFloat.pas uGame.pas uGears.pas + uGearsHandlers.pas uGearsRender.pas uIO.pas uInputHandler.pas @@ -171,13 +172,15 @@ if(${PNG_FOUND}) message(STATUS "PNG screenshots enabled (library found at ${PNG_LIBRARY})") set(pascal_flags "-dPNG_SCREENSHOTS" ${pascal_flags}) - if(APPLE) # need to explictly link with the static lib + if(APPLE) # need to explictly link with the static lib -- maybe windows too? string(REGEX REPLACE "(.*)libpng.*" "\\1" PNG_LIBDIR "${PNG_LIBRARY}") set(pascal_flags "-k${PNG_LIBDIR}/libpng.a" ${pascal_flags}) endif() else() message(STATUS "PNG library not found, switching to screenshots in BMP format") endif() +else() + message(STATUS "PNG screenshots disabled per user request, using BMP format") endif() set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project}) @@ -215,7 +218,7 @@ add_custom_target(${engine_output_name} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}") #when system Lua is not found we need to compile it before engine -if(NOT ${LUA_FOUND}) +if(NOT LUA_FOUND) add_dependencies(${engine_output_name} lua) endif()
--- a/hedgewars/GSHandlers.inc Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/GSHandlers.inc Thu Aug 30 12:13:24 2012 -0400 @@ -116,12 +116,12 @@ if lastGearByUID = HH^.Gear then lastGearByUID := nil; - - RemoveGearFromList(HH^.Gear); + + HH^.Gear^.Message:= HH^.Gear^.Message or gmRemoveFromList; with HH^.Gear^ do begin Z := cHHZ; - Active := false; + HH^.Gear^.Active:= false; State:= State and (not (gstHHDriven or gstAttacking or gstAttacked)); Message := Message and (not gmAttack); end; @@ -733,7 +733,14 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepGrave(Gear: PGear); begin + if (Gear^.Message and gmDestroy) <> 0 then + begin + DeleteGear(Gear); + exit + end; + AllInactive := false; + if Gear^.dY.isNegative then if TestCollisionY(Gear, -1) then Gear^.dY := _0; @@ -1025,7 +1032,9 @@ else AmmoShove(Gear, Gear^.Timer, 20); CheckGearDrowning(Gear); - dec(i) until (i = 0) or (Gear^.Damage > Gear^.Health) or ((Gear^.State and gstDrowning) <> 0); + dec(i) + until (i = 0) or (Gear^.Damage > Gear^.Health) or ((Gear^.State and gstDrowning) <> 0); + if Gear^.Damage > 0 then begin DrawTunnel(oX, oY, Gear^.dX, Gear^.dY, 82 - i, 1); @@ -2078,6 +2087,7 @@ dX, dY: HWFloat; hog: PHedgehog; sparkles: PVisualGear; + gi: PGear; begin k := Gear^.Kind; exBoom := false; @@ -2112,19 +2122,53 @@ end else begin - if Gear^.Timer = 0 then - begin + if (Gear^.Pos <> posCaseHealth) and (GameTicks and $3FF = 0) then // stir it up every second or so + begin + gi := GearsList; + while gi <> nil do + begin + if gi^.Kind = gtGenericFaller then + begin + gi^.Active:= true; + gi^.X:= int2hwFloat(GetRandom(rightX-leftX)+leftX); + gi^.Y:= int2hwFloat(GetRandom(LAND_HEIGHT-topY)+topY); + gi^.dX:= _90-(GetRandomf*_360); + gi^.dY:= _90-(GetRandomf*_360) + end; + gi := gi^.NextGear + end + end; + + if Gear^.Timer = 500 then + begin (* Can't make sparkles team coloured without working out what the next team is going to be. This should be solved, really, since it also screws up voices. Reinforcements voices is heard for active team, not team-to-be. Either that or change crate spawn from end of turn to start, although that has its own complexities. *) - sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtDust, 1); - if sparkles <> nil then + // Abuse a couple of gear values to track origin + Gear^.Angle:= hwRound(Gear^.Y); + Gear^.Tag:= random(2); + inc(Gear^.Timer) + end; + if Gear^.Timer < 1833 then inc(Gear^.Timer); + if Gear^.Timer = 1000 then begin - sparkles^.Tint:= $FAB22CFF + sparkles:= AddVisualGear(hwRound(Gear^.X), Gear^.Angle, vgtDust, 1); + if sparkles <> nil then + begin + sparkles^.dX:= 0; + sparkles^.dY:= 0; + sparkles^.Angle:= 270; + if Gear^.Tag = 1 then + sparkles^.Tint:= $3744D7FF + else sparkles^.Tint:= $FAB22CFF + end; + end; + if Gear^.Timer < 1000 then + begin + AllInactive:= false; + exit end end; - if (GameTicks and $1 = 0) and (Gear^.Timer < 255) then inc(Gear^.Timer) - end; if (Gear^.Damage > 0) or exBoom then begin @@ -2731,16 +2775,17 @@ procedure doStepSwitcherWork(Gear: PGear); var HHGear: PGear; + hedgehog: PHedgehog; State: Longword; begin AllInactive := false; if ((Gear^.Message and (not gmSwitch)) <> 0) or (TurnTimeLeft = 0) then begin - HHGear := Gear^.Hedgehog^.Gear; + hedgehog := Gear^.Hedgehog; //Msg := Gear^.Message and (not gmSwitch); DeleteGear(Gear); - ApplyAmmoChanges(HHGear^.Hedgehog^); + ApplyAmmoChanges(hedgehog^); HHGear := CurrentHedgehog^.Gear; ApplyAmmoChanges(HHGear^.Hedgehog^); @@ -2755,10 +2800,9 @@ Gear^.Message := Gear^.Message and (not gmSwitch); State := HHGear^.State; HHGear^.State := 0; + HHGear^.Z := cHHZ; HHGear^.Active := false; - HHGear^.Z := cHHZ; - RemoveGearFromList(HHGear); - InsertGearToList(HHGear); + HHGear^.Message:= HHGear^.Message or gmRemoveFromList or gmAddToList; PlaySound(sndSwitchHog); @@ -2766,7 +2810,7 @@ CurrentTeam^.CurrHedgehog := Succ(CurrentTeam^.CurrHedgehog) mod (CurrentTeam^.HedgehogsNumber); until (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil) and (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear^.Damage = 0); - CurrentHedgehog := @CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog]; + SwitchCurrentHedgehog(@CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog]); AmmoMenuInvalidated:= true; HHGear := CurrentHedgehog^.Gear; @@ -2774,8 +2818,7 @@ HHGear^.Active := true; FollowGear := HHGear; HHGear^.Z := cCurrHHZ; - RemoveGearFromList(HHGear); - InsertGearToList(HHGear); + HHGear^.Message:= HHGear^.Message or gmRemoveFromList or gmAddToList; Gear^.X := HHGear^.X; Gear^.Y := HHGear^.Y end; @@ -2920,7 +2963,7 @@ end end; AfterAttack; - DeleteGear(HHGear); + HHGear^.Message:= HHGear^.Message or gmDestroy; DeleteGear(Gear); end else @@ -3034,20 +3077,10 @@ end; -procedure PrevAngle(Gear: PGear; dA: LongInt); -begin - Gear^.Angle := (LongInt(Gear^.Angle) + 4 - dA) mod 4 -end; - -procedure NextAngle(Gear: PGear; dA: LongInt); -begin - Gear^.Angle := (LongInt(Gear^.Angle) + 4 + dA) mod 4 -end; - procedure doStepCakeWork(Gear: PGear); const dirs: array[0..3] of TPoint = ((X: 0; Y: -1), (X: 1; Y: 0),(X: 0; Y: 1),(X: -1; Y: 0)); -var +var xx, yy, xxn, yyn: LongInt; dA: LongInt; tdx, tdy: hwFloat; @@ -3058,39 +3091,7 @@ if Gear^.Tag < 7 then exit; - dA := hwSign(Gear^.dX); - xx := dirs[Gear^.Angle].x; - yy := dirs[Gear^.Angle].y; - xxn := dirs[(LongInt(Gear^.Angle) + 4 + dA) mod 4].x; - yyn := dirs[(LongInt(Gear^.Angle) + 4 + dA) mod 4].y; - - if (xx = 0) then - if TestCollisionYwithGear(Gear, yy) <> 0 then - PrevAngle(Gear, dA) - else - begin - Gear^.Tag := 0; - Gear^.Y := Gear^.Y + int2hwFloat(yy); - if not TestCollisionXwithGear(Gear, xxn) then - begin - Gear^.X := Gear^.X + int2hwFloat(xxn); - NextAngle(Gear, dA) - end; - end; - - if (yy = 0) then - if TestCollisionXwithGear(Gear, xx) then - PrevAngle(Gear, dA) - else - begin - Gear^.Tag := 0; - Gear^.X := Gear^.X + int2hwFloat(xx); - if not TestCollisionY(Gear, yyn) then - begin - Gear^.Y := Gear^.Y + int2hwFloat(yyn); - NextAngle(Gear, dA) - end; - end; + cakeStep(Gear); if Gear^.Tag = 0 then begin @@ -3163,8 +3164,7 @@ HHGear := Gear^.Hedgehog^.Gear; HHGear^.Message := HHGear^.Message and (not gmAttack); - DeleteCI(HHGear); - Gear^.IntersectGear:= nil; + Gear^.CollisionMask:= $FF7F; FollowGear := Gear; @@ -3174,23 +3174,22 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepSeductionWork(Gear: PGear); var i: LongInt; - hogs: TPGearArray; + hogs: PGearArrayS; begin AllInactive := false; hogs := GearsNear(Gear^.X, Gear^.Y, gtHedgehog, Gear^.Radius); - if Length(hogs) > 0 then - begin - for i:= 0 to Length(hogs) - 1 do - begin - if hogs[i] <> CurrentHedgehog^.Gear then + if hogs.size > 0 then + begin + for i:= 0 to hogs.size - 1 do + with hogs.ar^[i]^ do begin - //d:= Distance(Gear^.X - hogs[i]^.X, Gear^.Y - hogs[i]^.Y); - hogs[i]^.dX:= _50 * cGravity * (Gear^.X - hogs[i]^.X) / _25; - //if Gear^.X < hogs[i]^.X then hogs[i]^.dX.isNegative:= true; - hogs[i]^.dY:= -_450 * cGravity; - hogs[i]^.Active:= true; - end - end; + if hogs.ar^[i] <> CurrentHedgehog^.Gear then + begin + dX:= _50 * cGravity * (Gear^.X - X) / _25; + dY:= -_450 * cGravity; + Active:= true; + end + end; end ; AfterAttack; DeleteGear(Gear); @@ -3312,10 +3311,10 @@ if (Gear^.Timer mod 30) = 0 then AddVisualGear(hwRound(Gear^.X + _20 * Gear^.dX), hwRound(Gear^.Y + _20 * Gear^.dY), vgtDust); if (CheckGearDrowning(Gear)) then - begin + begin StopSoundChan(Gear^.SoundChannel); exit - end + end end; if GameTicks > Gear^.FlightTime then @@ -3406,8 +3405,9 @@ end else if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Tag <> 0) then begin - if Gear^.Timer > 0 then dec(Gear^.Timer); - if Gear^.Timer = 0 then + if Gear^.Timer > 0 then + dec(Gear^.Timer) + else begin doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, Gear^.Hedgehog, EXPLAutoSound); DeleteGear(Gear); @@ -3418,7 +3418,7 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepBallgunWork(Gear: PGear); var - HHGear: PGear; + HHGear, ball: PGear; rx, ry: hwFloat; gX, gY: LongInt; begin @@ -3433,7 +3433,8 @@ rx := rndSign(getRandomf * _0_1); ry := rndSign(getRandomf * _0_1); - AddGear(gx, gy, gtBall, 0, SignAs(AngleSin(HHGear^.Angle) * _0_8, HHGear^.dX) + rx, AngleCos(HHGear^.Angle) * ( - _0_8) + ry, 0); + ball:= AddGear(gx, gy, gtBall, 0, SignAs(AngleSin(HHGear^.Angle) * _0_8, HHGear^.dX) + rx, AngleCos(HHGear^.Angle) * ( - _0_8) + ry, 0); + ball^.CollisionMask:= $FF7F; PlaySound(sndGun); end; @@ -4024,12 +4025,12 @@ gear^.RenderTimer := true; // abort if there is no other portal connected to this one - if (Gear^.IntersectGear = nil) then + if (Gear^.LinkedGear = nil) then exit; - if ((Gear^.IntersectGear^.Tag and 1) = 0) then // or if it's still moving; + if ((Gear^.LinkedGear^.Tag and 1) = 0) then // or if it's still moving; exit; - conPortal := Gear^.IntersectGear; + conPortal := Gear^.LinkedGear; // check all gears for stuff to port through iterator := nil; @@ -4318,7 +4319,7 @@ and (CurAmmoGear^.Kind =gtRope) then CurAmmoGear^.PortalCounter:= 1; - if not isbullet + if not isbullet and (iterator^.State and gstInvisible = 0) and (iterator^.Kind <> gtFlake) then FollowGear := iterator; @@ -4396,7 +4397,8 @@ Gear^.State := Gear^.State or gstCollision; Gear^.State := Gear^.State and (not gstMoving); - if not CalcSlopeTangent(Gear, x, y, tx, ty, 255) + if (Land[y, x] and lfBouncy <> 0) + or not CalcSlopeTangent(Gear, x, y, tx, ty, 255) or (DistanceI(tx,ty) < _12) then // reject shots at too irregular terrain begin loadNewPortalBall(Gear, true); @@ -4412,8 +4414,8 @@ if not Gear^.dX.isNegative then Gear^.DirAngle := 180-Gear^.DirAngle; - if ((Gear^.IntersectGear = nil) - or (hwRound(Distance(Gear^.X - Gear^.IntersectGear^.X,Gear^.Y-Gear^.IntersectGear^.Y)) >=Gear^.Radius*2)) then + if ((Gear^.LinkedGear = nil) + or (hwRound(Distance(Gear^.X - Gear^.LinkedGear^.X,Gear^.Y-Gear^.LinkedGear^.Y)) >=Gear^.Radius*2)) then begin loadNewPortalBall(Gear, false); inc(Gear^.Tag); @@ -4455,7 +4457,7 @@ newPortal^.dX := newPortal^.dX * s; newPortal^.dY := newPortal^.dY * s; - newPortal^.IntersectGear := nil; + newPortal^.LinkedGear := nil; if CurrentHedgehog <> nil then with CurrentHedgehog^ do @@ -4484,8 +4486,8 @@ else begin // link portals with each other - newPortal^.IntersectGear := iterator; - iterator^.IntersectGear := newPortal; + newPortal^.LinkedGear := iterator; + iterator^.LinkedGear := newPortal; iterator^.Health := newPortal^.Health; end; end; @@ -4676,11 +4678,13 @@ // add some fire to the tunnel if getRandom(6) = 0 then - AddGear(x - Gear^.Radius + LongInt(getRandom(2 * Gear^.Radius)), y - - getRandom(Gear^.Radius + 1), gtFlame, gsttmpFlag, _0, _0, 0); + begin + tmp:= GetRandom(2 * Gear^.Radius); + AddGear(x - Gear^.Radius + tmp, y - GetRandom(Gear^.Radius + 1), gtFlame, gsttmpFlag, _0, _0, 0) + end end; - if getRandom(100) = 0 then + if random(100) = 0 then AddVisualGear(x, y, vgtSmokeTrace); end else dec(Gear^.Health, 5); // if underwater get additional damage @@ -4738,7 +4742,7 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepFlamethrowerWork(Gear: PGear); var - HHGear: PGear; + HHGear, flame: PGear; rx, ry, speed: hwFloat; i, gX, gY: LongInt; begin @@ -4776,14 +4780,18 @@ ry := rndSign(getRandomf * _0_1); speed := _0_5 * (_10 / Gear^.Tag); - AddGear(gx, gy, gtFlame, gstTmpFlag, + flame:= AddGear(gx, gy, gtFlame, gstTmpFlag, SignAs(AngleSin(HHGear^.Angle) * speed, HHGear^.dX) + rx, AngleCos(HHGear^.Angle) * ( - speed) + ry, 0); + flame^.CollisionMask:= $FF7F; if (Gear^.Health mod 30) = 0 then - AddGear(gx, gy, gtFlame, 0, + begin + flame:= AddGear(gx, gy, gtFlame, 0, SignAs(AngleSin(HHGear^.Angle) * speed, HHGear^.dX) + rx, AngleCos(HHGear^.Angle) * ( - speed) + ry, 0); + flame^.CollisionMask:= $FF7F; + end end; Gear^.Timer:= Gear^.Tag end; @@ -4819,7 +4827,7 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepLandGunWork(Gear: PGear); var - HHGear: PGear; + HHGear, land: PGear; rx, ry, speed: hwFloat; i, gX, gY: LongInt; begin @@ -4856,9 +4864,10 @@ ry := rndSign(getRandomf * _0_1); speed := (_3 / Gear^.Tag); - AddGear(gx, gy, gtFlake, gstTmpFlag, + land:= AddGear(gx, gy, gtFlake, gstTmpFlag, SignAs(AngleSin(HHGear^.Angle) * speed, HHGear^.dX) + rx, AngleCos(HHGear^.Angle) * ( - speed) + ry, 0); + land^.CollisionMask:= $FF7F; Gear^.Timer:= Gear^.Tag end; @@ -4938,7 +4947,7 @@ ApplyDamage(tmp, CurrentHedgehog, tmp^.Health div 3, dsUnknown); //DrawTunnel(tmp^.X, tmp^.Y - _1, _0, _0_5, cHHRadius * 6, cHHRadius * 3); tmp2:= AddGear(hwRound(tmp^.X), hwRound(tmp^.Y), gtHammerHit, 0, _0, _0, 0); - tmp2^.IntersectGear:= tmp; + tmp2^.LinkedGear:= tmp; SetAllToActive end else @@ -4957,7 +4966,7 @@ HitGear: PGear; begin AllInactive := false; - HitGear := Gear^.IntersectGear; + HitGear := Gear^.LinkedGear; dec(Gear^.Timer); if (HitGear = nil) or (Gear^.Timer = 0) or ((Gear^.Message and gmDestroy) <> 0) then begin @@ -5035,7 +5044,7 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepResurrectorWork(Gear: PGear); var - graves: TPGearArray; + graves: PGearArrayS; resgear: PGear; hh: PHedgehog; i: LongInt; @@ -5070,7 +5079,7 @@ graves := GearsNear(Gear^.X, Gear^.Y, gtGrave, Gear^.Radius); - if Length(graves) = 0 then + if graves.size = 0 then begin StopSoundChan(Gear^.SoundChannel); Gear^.Timer := 250; @@ -5080,12 +5089,13 @@ if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) and (TurnTimeLeft > 0) then begin - if Length(graves) <= Gear^.Tag then Gear^.Tag:= 0; + if graves.size <= Gear^.Tag then Gear^.Tag:= 0; dec(hh^.Gear^.Health); if (hh^.Gear^.Health = 0) and (hh^.Gear^.Damage = 0) then hh^.Gear^.Damage:= 1; RenderHealth(hh^); - inc(graves[Gear^.Tag]^.Health); + RecountTeamHealth(hh^.Team); + inc(graves.ar^[Gear^.Tag]^.Health); inc(Gear^.Tag) {-for i:= 0 to High(graves) do begin if hh^.Gear^.Health > 0 then begin @@ -5097,19 +5107,20 @@ else begin // now really resurrect the hogs with the hp saved in the graves - for i:= 0 to Length(graves) - 1 do - if graves[i]^.Health > 0 then + for i:= 0 to graves.size - 1 do + if graves.ar^[i]^.Health > 0 then begin - resgear := AddGear(hwRound(graves[i]^.X), hwRound(graves[i]^.Y), gtHedgehog, gstWait, _0, _0, 0); - resgear^.Hedgehog := graves[i]^.Hedgehog; - resgear^.Health := graves[i]^.Health; - PHedgehog(graves[i]^.Hedgehog)^.Gear := resgear; - DeleteGear(graves[i]); + resgear := AddGear(hwRound(graves.ar^[i]^.X), hwRound(graves.ar^[i]^.Y), gtHedgehog, gstWait, _0, _0, 0); + resgear^.Hedgehog := graves.ar^[i]^.Hedgehog; + resgear^.Health := graves.ar^[i]^.Health; + PHedgehog(graves.ar^[i]^.Hedgehog)^.Gear := resgear; + graves.ar^[i]^.Message:= graves.ar^[i]^.Message or gmDestroy; + graves.ar^[i]^.Active:= true; RenderHealth(resgear^.Hedgehog^); RecountTeamHealth(resgear^.Hedgehog^.Team); resgear^.Hedgehog^.Effects[heResurrected]:= 1; // only make hat-less hedgehogs look like zombies, preserve existing hats - + if resgear^.Hedgehog^.Hat = 'NoHat' then LoadHedgehogHat(resgear, 'Reserved/Zombie'); end; @@ -5126,18 +5137,18 @@ procedure doStepResurrector(Gear: PGear); var - graves: TPGearArray; + graves: PGearArrayS; i: LongInt; begin AllInactive := false; graves := GearsNear(Gear^.X, Gear^.Y, gtGrave, Gear^.Radius); - if Length(graves) > 0 then - begin - for i:= 0 to Length(graves) - 1 do + if graves.size > 0 then + begin + for i:= 0 to graves.size - 1 do begin - PHedgehog(graves[i]^.Hedgehog)^.Gear := nil; - graves[i]^.Health := 0; + PHedgehog(graves.ar^[i]^.Hedgehog)^.Gear := nil; + graves.ar^[i]^.Health := 0; end; Gear^.doStep := @doStepResurrectorWork; end @@ -5352,7 +5363,7 @@ end; Gear^.Pos:= 4; // This condition might need tweaking - Gear^.Timer:= GetRandom(cHedgehogTurnTime*TeamsCount)+cHedgehogTurnTime + Gear^.Timer:= GetRandom(cHedgehogTurnTime*TeamsCount*2)+cHedgehogTurnTime*2 end; if (Gear^.Pos = 4) then @@ -5456,7 +5467,7 @@ HHGear, iter: PGear; ndX, ndY: hwFloat; i, t, gX, gY: LongInt; - hogs: TPGearArray; + hogs: PGearArrayS; begin HHGear := Gear^.Hedgehog^.Gear; if (Gear^.Health = 0) or (HHGear = nil) or (HHGear^.Damage <> 0) then @@ -5520,9 +5531,9 @@ // freeze nearby hogs if GameTicks mod 10 = 0 then dec(Gear^.Health); hogs := GearsNear(Gear^.X, Gear^.Y, gtHedgehog, Gear^.Radius); - if Length(hogs) > 0 then - for i:= 0 to Length(hogs) - 1 do - if hogs[i] <> HHGear then + if hogs.size > 0 then + for i:= 0 to hogs.size - 1 do + if hogs.ar^[i] <> HHGear then begin //if Gear^.Hedgehog^.Effects[heFrozen]:= 0; end; @@ -5548,3 +5559,41 @@ end end; end; + +procedure doStepAddAmmo(Gear: PGear); +var a: TAmmoType; + gi: PGear; +begin +if Gear^.Timer > 0 then dec(Gear^.Timer) +else + begin + if Gear^.Pos = posCaseUtility then + a:= GetUtility(Gear^.Hedgehog) + else + a:= GetAmmo(Gear^.Hedgehog); + CheckSum:= CheckSum xor GameTicks; + gi := GearsList; + while gi <> nil do + begin + with gi^ do CheckSum:= CheckSum xor X.round xor X.frac xor dX.round xor dX.frac xor Y.round xor Y.frac xor dY.round xor dY.frac; + AddRandomness(CheckSum); + gi := gi^.NextGear + end; + AddPickup(Gear^.Hedgehog^, a, Gear^.Power, hwRound(Gear^.X), hwRound(Gear^.Y)); + DeleteGear(Gear) + end; +end; + +procedure doStepGenericFaller(Gear: PGear); +begin +if Gear^.Timer < $FFFFFFFF then + if Gear^.Timer > 0 then + dec(Gear^.Timer) + else + begin + DeleteGear(Gear); + exit + end; + +doStepFallingGear(Gear); +end;
--- a/hedgewars/SDLh.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/SDLh.pas Thu Aug 30 12:13:24 2012 -0400 @@ -981,9 +981,6 @@ function SDL_getenv(const text: PChar): PChar; cdecl; external SDLLibName; {$ENDIF} -{$IFDEF ANDROID} -function Android_JNI_getDensity(): Single; cdecl; external SDLLibName; -{$ENDIF} {* Compatibility between SDL-1.2 and SDL-1.3 *} procedure SDL_WarpMouse(x, y: Word); {$IFDEF SDL13}inline{$ELSE}cdecl; external SDLLibName{$ENDIF};
--- a/hedgewars/VGSHandlers.inc Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/VGSHandlers.inc Thu Aug 30 12:13:24 2012 -0400 @@ -27,6 +27,7 @@ procedure doStepFlake(Gear: PVisualGear; Steps: Longword); var sign: real; + moved: boolean; begin if vobCount = 0 then exit; @@ -84,16 +85,38 @@ end else begin + moved:= false; if round(X) < cLeftScreenBorder then - X:= X + cScreenSpace + begin + X:= X + cScreenSpace; + moved:= true + end else if round(X) > cRightScreenBorder then + begin X:= X - cScreenSpace; + moved:= true + end; // if round(Y) < (LAND_HEIGHT - 1024 - 75) then Y:= Y + 25.0; // For if flag is set for flakes rising upwards? - if (Gear^.Layer = 2) and (round(Y) - 225 > LAND_HEIGHT) then - Y:= Y - (1024 + 300) // TODO - configure in theme (jellies for example could use limited range) - else if (Gear^.Layer <> 2) and (round(Y) + 50 > LAND_HEIGHT) then - Y:= Y - (1024 + 25); + if (Gear^.Layer = 2) and (round(Y) - 225 > LAND_HEIGHT) then + begin + X:= cLeftScreenBorder + random(cScreenSpace); + Y:= Y - (1024 + 250 + random(50)); // TODO - configure in theme (jellies for example could use limited range) + moved:= true + end + else if (Gear^.Layer <> 2) and (round(Y) + 50 > LAND_HEIGHT) then + begin + X:= cLeftScreenBorder + random(cScreenSpace); + Y:= Y - (1024 + random(25)); + moved:= true + end; + if moved then + begin + Angle:= random(360); + dx:= 0.0000038654705 * random(10000); + dy:= 0.000003506096 * random(7000); + if random(2) = 0 then dx := -dx + end; Timer:= 0; tdX:= 0; tdY:= 0
--- a/hedgewars/options.inc Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/options.inc Thu Aug 30 12:13:24 2012 -0400 @@ -16,60 +16,53 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA *) -{$IFDEF FPC} - {$WRITEABLECONST OFF} - {$IMPLICITEXCEPTIONS OFF} - {$VARSTRINGCHECKS ON} - {$MODE OBJFPC} -{$ELSE} - {$ERROR Only Free Pascal supported!} +{$IFNDEF FPC} + {$ERROR Only FreePascal Compiler is supported!} {$ENDIF} {$MACRO ON} +{$MODE OBJFPC} {$DEFINE GLunit:=GL} +{$WRITEABLECONST OFF} +{$IMPLICITEXCEPTIONS OFF} +{$VARSTRINGCHECKS ON} + +{$DEFINE USE_LUA_SCRIPT} + {$IFDEF ANDROID} + {$DEFINE MOBILE} + {$DEFINE USE_SDLTHREADS} + {$DEFINE USE_CONTEXT_RESTORE} + {$DEFINE Java_Prefix:= 'Java_org_hedgewars_hedgeroid_EngineProtocol_PascalExports_'} +{$ENDIF} + +{$IFDEF IPHONEOS} + {$DEFINE MOBILE} +{$ENDIF} + +{$IFDEF MOBILE} {$DEFINE SDL13} {$DEFINE HWLIBRARY} {$DEFINE S3D_DISABLED} {$DEFINE GLunit:=gles11} - {$DEFINE MOBILE} - {$DEFINE Java_Prefix:= 'Java_org_hedgewars_hedgeroid_EngineProtocol_PascalExports_'} - {$DEFINE USE_SDLTHREADS} - {$DEFINE USE_CONTEXT_RESTORE} {$DEFINE USE_LANDSCAPE_AMMOMENU} {$DEFINE USE_TOUCH_INTERFACE} +{$ELSE} + {$DEFINE USE_AM_NUMCOLUMN} {$ENDIF} -{$IFDEF IPHONEOS} - {$DEFINE SDL13} - {$DEFINE HWLIBRARY} - {$DEFINE S3D_DISABLED} - {$DEFINE GLunit:=gles11} - {$DEFINE MOBILE} - {$DEFINE USE_LANDSCAPE_AMMOMENU} - {$DEFINE USE_TOUCH_INTERFACE} -{$ENDIF} {$IFDEF WIN32} {$DEFINE USE_CONTEXT_RESTORE} {$ENDIF} -{$IFNDEF IPHONEOS} - {$IFDEF DARWIN} +{$IFDEF DARWIN} + {$IFNDEF IPHONEOS} {$DEFINE USE_CONTEXT_RESTORE} {$ENDIF} - // not needed on ios because DEBUGFILE is switched from command line - {$DEFINE DEBUGFILE} - //{$DEFINE TRACEAIACTIONS} - //{$DEFINE COUNTTICKS} {$ENDIF} -{$IFNDEF MOBILE} - {$DEFINE USE_AM_NUMCOLUMN} -{$ENDIF} - -{$DEFINE USE_LUA_SCRIPT} {$IFDEF PAS2C} {$DEFINE NOCONSOLE} @@ -78,3 +71,7 @@ {$DEFINE _S:=} {$DEFINE _P:=} + +//{$DEFINE TRACEAIACTIONS} +//{$DEFINE COUNTTICKS} +
--- a/hedgewars/uAI.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uAI.pas Thu Aug 30 12:13:24 2012 -0400 @@ -178,6 +178,10 @@ begin AddAction(BestActions, aia_attack, aim_push, 350 + random(200), 0, 0); AddAction(BestActions, aia_attack, aim_release, 1, 0, 0); + + AddAction(BestActions, aia_Down, aim_push, 100 + random(150), 0, 0); + AddAction(BestActions, aia_Down, aim_release, 32, 0, 0); + AddAction(BestActions, aia_waitAngle, ap.Angle, 250, 0, 0); AddAction(BestActions, aia_attack, aim_push, 1, 0, 0); AddAction(BestActions, aia_attack, aim_release, 1, 0, 0); @@ -280,9 +284,15 @@ AddAction(MadeActions, aia_LookRight, 0, 200, 0, 0); end; if (BotLevel < 3) and (GoInfo.JumpType = jmpLJump) then // ljump support + begin + // push current position so we proceed from it after checking jump opportunities + if CanGo then Push(ticks, Actions, Me^, Me^.Message); + // first check where we go after jump if Push(ticks, Actions, AltMe, Me^.Message) then with Stack.States[Pred(Stack.Count)] do AddAction(MadeActions, aia_LJump, 0, 305 + random(50), 0, 0); + break + end; // 'not CanGO' means we can't go straight, possible jumps are checked above if not CanGo then @@ -326,7 +336,9 @@ switchesNum:= 0; switchImmediatelyAvailable:= (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtSwitcher); -switchCount:= HHHasAmmo(PGear(Me)^.Hedgehog^, amSwitch); +if PGear(Me)^.Hedgehog^.BotLevel <> 5 then + switchCount:= HHHasAmmo(PGear(Me)^.Hedgehog^, amSwitch) +else switchCount:= 0; if (PGear(Me)^.State and gstAttacked) = 0 then if Targets.Count > 0 then @@ -380,6 +392,11 @@ BackMe:= PGear(Me)^; while (not StopThinking) and (BestActions.Count = 0) do begin +(* + // Maybe this would get a bit of movement out of them? Hopefully not *toward* water. Need to check how often he'd choose that strategy + if SuddenDeathDmg and ((hwRound(BackMe.Y)+cWaterRise*2) > cWaterLine) then + AddBonus(hwRound(BackMe.X), hwRound(BackMe.Y), 250, -40); +*) FillBonuses(true); WalkMe:= BackMe; Actions.Count:= 0; @@ -431,6 +448,8 @@ AddFileLog('Thread started'); end; +//var scoreShown: boolean = false; + procedure ProcessBot; const cStopThinkTime = 40; begin @@ -447,13 +466,24 @@ StopMessages(Gear^.Message); TryDo((Gear^.Message and gmAllStoppable) = 0, 'Engine bug: AI may break demos playing', true); end; + if Gear^.Message <> 0 then exit; + + //scoreShown:= false; StartThink(Gear); StartTicks:= GameTicks - end else - ProcessAction(BestActions, Gear) + end else + begin + (* + if not scoreShown then + begin + if BestActions.Score > 0 then ParseCommand('/say Expected score = ' + inttostr(BestActions.Score div 1024), true); + scoreShown:= true + end;*) + ProcessAction(BestActions, Gear) + end else if ((GameTicks - StartTicks) > cMaxAIThinkTime) or (TurnTimeLeft <= cStopThinkTime) then StopThinking:= true
--- a/hedgewars/uAIAmmoTests.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uAIAmmoTests.pas Thu Aug 30 12:13:24 2012 -0400 @@ -50,6 +50,7 @@ function TestAirAttack(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; function TestTeleport(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; function TestHammer(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestCake(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; type TAmmoTestProc = function (Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; TAmmoTest = record @@ -84,7 +85,7 @@ (proc: nil; flags: 0), // amSwitch (proc: @TestMortar; flags: 0), // amMortar (proc: nil; flags: 0), // amKamikaze - (proc: nil; flags: 0), // amCake + (proc: @TestCake; flags: 0), // amCake (proc: nil; flags: 0), // amSeduction (proc: @TestWatermelon; flags: 0), // amWatermelon (proc: nil; flags: 0), // amHellishBomb @@ -161,7 +162,8 @@ dX:= dX + windSpeed; dY:= dY + cGravityf; dec(t) - until TestCollExcludingMe(Me, trunc(x), trunc(y), 5) or (t <= 0); + until (((Me = CurrentHedgehog^.Gear) and TestColl(trunc(x), trunc(y), 5)) or + ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, trunc(x), trunc(y), 5))) or (t <= 0); EX:= trunc(x); EY:= trunc(y); @@ -219,7 +221,8 @@ dX:= dX + windSpeed; dY:= dY + cGravityf; dec(t) - until TestCollExcludingMe(Me, trunc(x), trunc(y), 5) or (t <= 0); + until (((Me = CurrentHedgehog^.Gear) and TestColl(trunc(x), trunc(y), 5)) or + ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, trunc(x), trunc(y), 5))) or (t <= 0); EX:= trunc(x); EY:= trunc(y); @@ -269,7 +272,8 @@ y:= y + dY; dY:= dY + cGravityf; dec(t) - until TestCollExcludingMe(Me, trunc(x), trunc(y), 7) or (t = 0); + until (((Me = CurrentHedgehog^.Gear) and TestColl(trunc(x), trunc(y), 6)) or + ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, trunc(x), trunc(y), 6))) or (t = 0); EX:= trunc(x); EY:= trunc(y); if t < 50 then @@ -321,7 +325,8 @@ y:= y + dY; dY:= dY + cGravityf; dec(t) - until TestCollExcludingMe(Me, trunc(x), trunc(y), 5) or (t = 0); + until (((Me = CurrentHedgehog^.Gear) and TestColl(trunc(x), trunc(y), 5)) or + ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, trunc(x), trunc(y), 5))) or (t = 0); EX:= trunc(x); EY:= trunc(y); if t < 50 then @@ -380,7 +385,8 @@ y:= y + dY; dY:= dY + cGravityf; dec(t) - until TestCollExcludingMe(Me, trunc(x), trunc(y), 5) or (t = 0); + until (((Me = CurrentHedgehog^.Gear) and TestColl(trunc(x), trunc(y), 5)) or + ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, trunc(x), trunc(y), 5))) or (t = 0); EX:= trunc(x); EY:= trunc(y); if t < 50 then @@ -432,7 +438,8 @@ y:= y + dY; dY:= dY + cGravityf; dec(t) - until TestCollExcludingMe(Me, trunc(x), trunc(y), 7) or (t = 0); + until (((Me = CurrentHedgehog^.Gear) and TestColl(trunc(x), trunc(y), 6)) or + ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, trunc(x), trunc(y), 6))) or (t = 0); EX:= trunc(x); EY:= trunc(y); @@ -511,7 +518,8 @@ dY:= dY + cGravityf; EX:= trunc(x); EY:= trunc(y); - until TestCollExcludingMe(Me, EX, EY, 5) or (EY > cWaterLine); + until (((Me = CurrentHedgehog^.Gear) and TestColl(EX, EY, 4)) or + ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, EX, EY, 4))) or (EY > cWaterLine); if (EY < cWaterLine) and (dY >= 0) then begin @@ -564,7 +572,8 @@ y:= y + vY; rx:= trunc(x); ry:= trunc(y); - if TestCollExcludingMe(Me, rx, ry, 2) then + if ((Me = CurrentHedgehog^.Gear) and TestColl(rx, ry, 2)) or + ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, rx, ry, 2)) then begin x:= x + vX * 8; y:= y + vY * 8; @@ -591,6 +600,7 @@ d: Longword; fallDmg, valueResult: LongInt; begin +if Me^.Hedgehog^.BotLevel > 3 then exit(BadTurn); dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent; Level:= Level; // avoid compiler hint ap.ExplR:= 0; @@ -624,7 +634,7 @@ if Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 5 then begin - fallDmg:= TraceShoveFall(Me, Targ.X, Targ.Y, vX * 0.00125 * 20, vY * 0.00125 * 20); + fallDmg:= TraceShoveFall(Targ.X, Targ.Y, vX * 0.00125 * 20, vY * 0.00125 * 20); if fallDmg < 0 then valueResult:= 204800 else valueResult:= Max(0, (4 - d div 50) * trunc((7+fallDmg)*dmgMod) * 1024) @@ -640,6 +650,7 @@ d: Longword; fallDmg, valueResult: LongInt; begin +if Me^.Hedgehog^.BotLevel > 3 then exit(BadTurn); dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent; Level:= Level; // avoid compiler hint ap.ExplR:= 0; @@ -652,7 +663,7 @@ dmg:= sqrt(sqr(Targ.X - x)+sqr(Targ.Y-y)); t:= 1.5 / dmg; -dmg:= dmg * 0.33333333; +dmg:= dmg * 0.025; // div 40 Vx:= (Targ.X - x) * t; Vy:= (Targ.Y - y) * t; ap.Angle:= DxDy2AttackAnglef(Vx, -Vy); @@ -673,7 +684,7 @@ if Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 4 then begin - fallDmg:= TraceShoveFall(Me, Targ.X, Targ.Y, vX * 0.00166 * dmg, vY * 0.00166 * dmg); + fallDmg:= TraceShoveFall(Targ.X, Targ.Y, vX * 0.00166 * dmg, vY * 0.00166 * dmg); if fallDmg < 0 then TestSniperRifle:= BadTurn else @@ -685,134 +696,162 @@ function TestBaseballBat(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -var valueResult: LongInt; - x, y: real; +var valueResult, a, v1, v2: LongInt; + x, y, trackFall: LongInt; + dx, dy: real; begin -Level:= Level; // avoid compiler hint -TestBaseballBat:= BadTurn; -ap.ExplR:= 0; -x:= hwFloat2Float(Me^.X); -y:= hwFloat2Float(Me^.Y); -if (Level > 2) then - exit(BadTurn); + if Me^.Hedgehog^.BotLevel < 3 then trackFall:= afTrackFall + else trackFall:= 0; + Level:= Level; // avoid compiler hint + ap.ExplR:= 0; + ap.Time:= 0; + ap.Power:= 1; + x:= hwRound(Me^.X); + y:= hwRound(Me^.Y); + + a:= 0; + valueResult:= 0; + + while a <= cMaxAngle div 2 do + begin + dx:= sin(a / cMaxAngle * pi) * 0.5; + dy:= cos(a / cMaxAngle * pi) * 0.5; -ap.Time:= 0; -ap.Power:= 1; -if (Targ.X) - trunc(x) >= 0 then - ap.Angle:= cMaxAngle div 4 -else - ap.Angle:= - cMaxAngle div 4; + v1:= RateShove(Me, x - 10, y + , 33, 30, 115 + , -dx, -dy, trackFall); + v2:= RateShove(Me, x + 10, y + , 33, 30, 115 + , dx, -dy, trackFall); + if (v1 > valueResult) or (v2 > valueResult) then + if (v2 > v1) + or {don't encourage turning for no gain}((v2 = v1) and (not Me^.dX.isNegative)) then + begin + ap.Angle:= a; + valueResult:= v2 + end + else + begin + ap.Angle:= -a; + valueResult:= v1 + end; -valueResult:= RateShove(Me, trunc(x) + LongWord(10*hwSignf(Targ.X - x)), trunc(y), 15, 30, 115, hwSign(Me^.dX)*0.353, -0.353, afTrackFall); -if valueResult <= 0 then - valueResult:= BadTurn -else - inc(valueResult); -TestBaseballBat:= valueResult; + a:= a + 15 + random(cMaxAngle div 16) + end; + + if valueResult <= 0 then + valueResult:= BadTurn; + + TestBaseballBat:= valueResult; end; function TestFirePunch(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -var val1, val2, i, t: LongInt; - x, y: real; +var valueResult, v1, v2, i: LongInt; + x, y, trackFall: LongInt; begin -Level:= Level; // avoid compiler hint -TestFirePunch:= BadTurn; -ap.ExplR:= 0; -ap.Time:= 0; -ap.Power:= 1; -ap.Angle:= hwSign(Me^.dX); -x:= hwFloat2Float(Me^.X); -y:= hwFloat2Float(Me^.Y); -{ -// this block is for digging with firepunch when blocked close to walls (notice TestColl check) -if (Abs(trunc(x) - Targ.X) > 25) - or (Abs(trunc(y) + 50 - Targ.Y) > 50) then - begin - if TestColl(trunc(x), trunc(y) - 16, 6) and - (RateShove(Me, trunc(x) + LongWord(10 * hwSign(Me^.dX)), - trunc(y) - 40, 30, 30, 40, hwSign(Me^.dX)*0.45, -0.9, 1) >= 0) then - val1:= Succ(BadTurn) - else - val1:= BadTurn; - exit(val1); - end; - } -// and this is actual try to attack -val1:= 0; -for i:= 0 to 4 do - begin - t:= RateShove(Me, trunc(x) + 10 * hwSignf(Targ.X - x), trunc(y) - 20 * i - 5, 10, 30, 40, hwSign(Me^.dX)*0.45, -0.9, afTrackFall); - if (val1 < 0) or (t < 0) then val1:= BadTurn - else if t > 0 then val1:= t; - end; + if Me^.Hedgehog^.BotLevel = 1 then trackFall:= afTrackFall + else trackFall:= 0; + Level:= Level; // avoid compiler hint + ap.ExplR:= 0; + ap.Time:= 0; + ap.Power:= 1; + x:= hwRound(Me^.X); + y:= hwRound(Me^.Y); + + v1:= 0; + for i:= 0 to 8 do + begin + v1:= v1 + RateShove(Me, x - 10, y - 10 * i + , 18, 30, 40 + , -0.45, -0.9, trackFall or afSetSkip); + end; + v1:= v1 + RateShove(Me, x - 10, y - 90 + , 18, 30, 40 + , -0.45, -0.9, trackFall); + -val2:= 0; -for i:= 0 to 4 do - begin - t:= RateShove(Me, trunc(x) + 10 * hwSignf(Targ.X - x), trunc(y) - 20 * i - 5, 10, 30, 40, -hwSign(Me^.dX)*0.45, -0.9, afTrackFall); - if (val2 < 0) or (t < 0) then val2:= BadTurn - else if t > 0 then val2:= t; - end; -if (val1 > val2) and (val1 > 0) then - TestFirePunch:= val1 -else if (val2 > val1) and (val2 > 0) then - begin - ap.Angle:= -hwSign(Me^.dX); - TestFirePunch:= val2 - end -else TestFirePunch:= BadTurn; + // now try opposite direction + v2:= 0; + for i:= 0 to 8 do + begin + v2:= v2 + RateShove(Me, x + 10, y - 10 * i + , 18, 30, 40 + , 0.45, -0.9, trackFall or afSetSkip); + end; + v2:= v2 + RateShove(Me, x + 10, y - 90 + , 18, 30, 40 + , 0.45, -0.9, trackFall); + + if (v2 > v1) + or {don't encourage turning for no gain}((v2 = v1) and (not Me^.dX.isNegative)) then + begin + ap.Angle:= 1; + valueResult:= v2 + end + else + begin + ap.Angle:= -1; + valueResult:= v1 + end; + + if valueResult <= 0 then + valueResult:= BadTurn; + + TestFirePunch:= valueResult; end; function TestWhip(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; var valueResult, v1, v2: LongInt; - x, y: real; + x, y, trackFall: LongInt; begin -Level:= Level; // avoid compiler hint -ap.ExplR:= 0; -ap.Time:= 0; -ap.Power:= 1; -x:= hwFloat2Float(Me^.X); -y:= hwFloat2Float(Me^.Y); + if Me^.Hedgehog^.BotLevel = 1 then trackFall:= afTrackFall + else trackFall:= 0; + Level:= Level; // avoid compiler hint + ap.ExplR:= 0; + ap.Time:= 0; + ap.Power:= 1; + x:= hwRound(Me^.X); + y:= hwRound(Me^.Y); -// check left direction -{first RateShove checks fartherest of two whip's AmmoShove attacks -to encourage distant attacks (damaged hog is excluded from view of second -RateShove call)} -v1:= RateShove(Me, trunc(x) - 15, trunc(y) - , 30, 30, 40 - , -1, -0.8, afTrackFall or afSetSkip); -v1:= v1 + - RateShove(Me, trunc(x), trunc(y) - , 30, 30, 40 - , -1, -0.8, afTrackFall); -// now try opposite direction -v2:= RateShove(Me, trunc(x) + 15, trunc(y) - , 30, 30, 40 - , 1, -0.8, afTrackFall or afSetSkip); -v2:= v2 + - RateShove(Me, trunc(x), trunc(y) - , 30, 30, 40 - , 1, -0.8, afTrackFall); + // check left direction + {first RateShove checks farthermost of two whip's AmmoShove attacks + to encourage distant attacks (damaged hog is excluded from view of second + RateShove call)} + v1:= RateShove(Me, x - 15, y + , 30, 30, 25 + , -1, -0.8, trackFall or afSetSkip); + v1:= v1 + + RateShove(Me, x, y + , 30, 30, 25 + , -1, -0.8, trackFall); + // now try opposite direction + v2:= RateShove(Me, x + 15, y + , 30, 30, 25 + , 1, -0.8, trackFall or afSetSkip); + v2:= v2 + + RateShove(Me, x, y + , 30, 30, 25 + , 1, -0.8, trackFall); -if (v2 > v1) - or {don't encourage turning for no gain}((v2 = v1) and (not Me^.dX.isNegative)) then - begin - ap.Angle:= 1; - valueResult:= v2 - end -else - begin - ap.Angle:= -1; - valueResult:= v1 - end; - -if valueResult <= 0 then - valueResult:= BadTurn -else - inc(valueResult); + if (v2 > v1) + or {don't encourage turning for no gain}((v2 = v1) and (not Me^.dX.isNegative)) then + begin + ap.Angle:= 1; + valueResult:= v2 + end + else + begin + ap.Angle:= -1; + valueResult:= v1 + end; + + if valueResult <= 0 then + valueResult:= BadTurn + else + inc(valueResult); -TestWhip:= valueResult; + TestWhip:= valueResult; end; function TestHammer(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; @@ -943,4 +982,53 @@ end; end; + +function checkCakeWalk(Gear: PGear): LongInt; +begin +checkCakeWalk:= BadTurn +end; + +function TestCake(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +var valueResult, v1, v2: LongInt; + x, y, trackFall: LongInt; + cake: TGear; +begin + Level:= Level; // avoid compiler hint + ap.ExplR:= 0; + ap.Time:= 0; + ap.Power:= 1; + + cake.Radius:= 7; + + // check left direction + cake.Angle:= 3; + cake.dX.isNegative:= true; + cake.X:= Me^.X - _3; + cake.Y:= Me^.Y; + v1:= checkCakeWalk(@cake); + + // now try opposite direction + cake.Angle:= 1; + cake.dX.isNegative:= false; + cake.X:= Me^.X + _3; + cake.Y:= Me^.Y; + v2:= checkCakeWalk(@cake); + + if (v2 > v1) then + begin + ap.Angle:= 1; + valueResult:= v2 + end + else + begin + ap.Angle:= -1; + valueResult:= v1 + end; + + if valueResult <= 0 then + valueResult:= BadTurn; + + TestCake:= valueResult; +end; + end.
--- a/hedgewars/uAIMisc.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uAIMisc.pas Thu Aug 30 12:13:24 2012 -0400 @@ -54,13 +54,15 @@ procedure freeModule; procedure FillTargets; +procedure AddBonus(x, y: LongInt; r: Longword; s: LongInt); inline; procedure FillBonuses(isAfterAttack: boolean); procedure AwareOfExplosion(x, y, r: LongInt); inline; function RatePlace(Gear: PGear): LongInt; function TestColl(x, y, r: LongInt): boolean; inline; +function TestCollExcludingObjects(x, y, r: LongInt): boolean; inline; function TestCollExcludingMe(Me: PGear; x, y, r: LongInt): boolean; inline; -function TraceShoveFall(Me: PGear; x, y, dX, dY: Real): LongInt; +function TraceShoveFall(x, y, dX, dY: Real): LongInt; function RateExplosion(Me: PGear; x, y, r: LongInt): LongInt; inline; function RateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt; @@ -79,8 +81,13 @@ ar: array[0..Pred(MAXBONUS)] of TBonus; end; + walkbonuses: record + Count: Longword; + ar: array[0..Pred(MAXBONUS div 8)] of TBonus; // don't use too many + end; + implementation -uses uCollisions, uVariables, uUtils, uDebug; +uses uCollisions, uVariables, uUtils, uDebug, uLandTexture; const KillScore = 200; @@ -139,9 +146,22 @@ end; end; +procedure AddWalkBonus(x, y: LongInt; r: Longword; s: LongInt); inline; +begin +if(walkbonuses.Count < MAXBONUS div 8) then + begin + walkbonuses.ar[walkbonuses.Count].x:= x; + walkbonuses.ar[walkbonuses.Count].y:= y; + walkbonuses.ar[walkbonuses.Count].Radius:= r; + walkbonuses.ar[walkbonuses.Count].Score:= s; + inc(walkbonuses.Count); + end; +end; + procedure FillBonuses(isAfterAttack: boolean); var Gear: PGear; MyClan: PClan; + i: Longint; begin bonuses.Count:= 0; MyClan:= ThinkingHH^.Hedgehog^.Team^.Clan; @@ -177,7 +197,9 @@ if Gear^.Damage >= Gear^.Health then AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 60, -25) else - if isAfterAttack and (ThinkingHH^.Hedgehog <> Gear^.Hedgehog) then + if isAfterAttack + and (ThinkingHH^.Hedgehog <> Gear^.Hedgehog) + and ((hwAbs(Gear^.dX) + hwAbs(Gear^.dY)) < _0_1) then if (ClansCount > 2) or (MyClan = Gear^.Hedgehog^.Team^.Clan) then AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 150, -3) // hedgehog-friend else @@ -189,6 +211,13 @@ if isAfterAttack and (KnownExplosion.Radius > 0) then with KnownExplosion do AddBonus(X, Y, Radius + 10, -Radius); +if isAfterAttack then + begin + for i:= 0 to Pred(walkbonuses.Count) do + with walkbonuses.ar[i] do + AddBonus(X, Y, Radius, Score); + walkbonuses.Count:= 0 + end; end; procedure AwareOfExplosion(x, y, r: LongInt); inline; @@ -236,22 +265,44 @@ TestCollExcludingMe:= TestColl(x, y, r) end; -function TestColl(x, y, r: LongInt): boolean; inline; +function TestCollExcludingObjects(x, y, r: LongInt): boolean; inline; var b: boolean; begin - b:= (((x-r) and LAND_WIDTH_MASK) = 0) and (((y-r) and LAND_HEIGHT_MASK) = 0) and (Land[y-r, x-r] <> 0); + b:= (((x-r) and LAND_WIDTH_MASK) = 0) and (((y-r) and LAND_HEIGHT_MASK) = 0) and (Land[y-r, x-r] and $FF00 <> 0); + if b then + exit(true); + + b:= (((x-r) and LAND_WIDTH_MASK) = 0) and (((y+r) and LAND_HEIGHT_MASK) = 0) and (Land[y+r, x-r] and $FF00 <> 0); + if b then + exit(true); + + b:= (((x+r) and LAND_WIDTH_MASK) = 0) and (((y-r) and LAND_HEIGHT_MASK) = 0) and (Land[y-r, x+r] and $FF00 <> 0); + if b then + exit(true); + + b:= (((x+r) and LAND_WIDTH_MASK) = 0) and (((y+r) and LAND_HEIGHT_MASK) = 0) and (Land[y+r, x+r] and $FF00 <> 0); if b then exit(true); - b:= (((x-r) and LAND_WIDTH_MASK) = 0) and (((y+r) and LAND_HEIGHT_MASK) = 0) and (Land[y+r, x-r] <> 0); + TestCollExcludingObjects:= false; +end; + +function TestColl(x, y, r: LongInt): boolean; inline; +var b: boolean; +begin + b:= (((x-r) and LAND_WIDTH_MASK) = 0) and (((y-r) and LAND_HEIGHT_MASK) = 0) and (Land[y-r, x-r] and $FF7F <> 0); if b then exit(true); - b:= (((x+r) and LAND_WIDTH_MASK) = 0) and (((y-r) and LAND_HEIGHT_MASK) = 0) and (Land[y-r, x+r] <> 0); + b:= (((x-r) and LAND_WIDTH_MASK) = 0) and (((y+r) and LAND_HEIGHT_MASK) = 0) and (Land[y+r, x-r] and $FF7F <> 0); if b then exit(true); - b:= (((x+r) and LAND_WIDTH_MASK) = 0) and (((y+r) and LAND_HEIGHT_MASK) = 0) and (Land[y+r, x+r] <> 0); + b:= (((x+r) and LAND_WIDTH_MASK) = 0) and (((y-r) and LAND_HEIGHT_MASK) = 0) and (Land[y-r, x+r] and $FF7F <> 0); + if b then + exit(true); + + b:= (((x+r) and LAND_WIDTH_MASK) = 0) and (((y+r) and LAND_HEIGHT_MASK) = 0) and (Land[y+r, x+r] and $FF7F <> 0); if b then exit(true); @@ -311,16 +362,25 @@ end; end; -function TraceShoveFall(Me: PGear; x, y, dX, dY: Real): LongInt; -var dmg: LongInt; +function TraceShoveFall(x, y, dX, dY: Real): LongInt; +var dmg, v: LongInt; begin +v:= random($FFFFFFFF); while true do begin x:= x + dX; y:= y + dY; dY:= dY + cGravityf; +(* + if ((trunc(y) and LAND_HEIGHT_MASK) = 0) and ((trunc(x) and LAND_WIDTH_MASK) = 0) then + begin + LandPixels[trunc(y), trunc(x)]:= v; + UpdateLandTexture(trunc(X), 1, trunc(Y), 1, true); + end; +*) + // consider adding dX/dY calc here for fall damage - if TestCollExcludingMe(Me, trunc(x), trunc(y), cHHRadius) then + if TestCollExcludingObjects(trunc(x), trunc(y), cHHRadius) then begin if 0.4 < dY then begin @@ -372,7 +432,10 @@ begin dX:= 0.005 * dmg + 0.01; dY:= dX; - fallDmg:= trunc(TraceFall(x, y, Point.x, Point.y, dX, dY, erasure) * dmgMod); + if (x and LAND_WIDTH_MASK = 0) and ((y+cHHRadius+2) and LAND_HEIGHT_MASK = 0) and + (Land[y+cHHRadius+2, x] and lfIndestructible <> 0) then + fallDmg:= trunc(TraceFall(x, y, Point.x, Point.y, dX, dY, 0) * dmgMod) + else fallDmg:= trunc(TraceFall(x, y, Point.x, Point.y, dX, dY, erasure) * dmgMod) end; if fallDmg < 0 then // drowning. score healthier hogs higher, since their death is more likely to benefit the AI if Score > 0 then @@ -398,8 +461,8 @@ dX, dY, dmgMod: real; begin fallDmg:= 0; -dX:= gdX * 0.005 * kick; -dY:= gdY * 0.005 * kick; +dX:= gdX * 0.01 * kick; +dY:= gdY * 0.01 * kick; dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent; rate:= 0; for i:= 0 to Pred(Targets.Count) do @@ -410,15 +473,13 @@ begin dmg:= 0; if abs(Point.x - x) + abs(Point.y - y) < r then - begin dmg:= r - trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y))); - dmg:= trunc(dmg * dmgMod); - end; + if dmg > 0 then begin if (Flags and afSetSkip <> 0) then skip:= true; - if (Flags and afTrackFall <> 0) then - fallDmg:= trunc(TraceShoveFall(Me, Point.x, Point.y - 2, dX, dY) * dmgMod); + if (Flags and afTrackFall <> 0) and (Score > 0) then + fallDmg:= trunc(TraceShoveFall(Point.x, Point.y - 2, dX, dY) * dmgMod); if fallDmg < 0 then // drowning. score healthier hogs higher, since their death is more likely to benefit the AI if Score > 0 then inc(rate, KillScore + Score div 10) // Add a bit of a bonus for bigger hog drownings @@ -473,7 +534,10 @@ dY:= gdY * dmg; if dX < 0 then dX:= dX - 0.01 else dX:= dX + 0.01; - fallDmg:= trunc(TraceFall(x, y, Point.x, Point.y, dX, dY, erasure) * dmgMod); + if (x and LAND_WIDTH_MASK = 0) and ((y+cHHRadius+2) and LAND_HEIGHT_MASK = 0) and + (Land[y+cHHRadius+2, x] and lfIndestructible <> 0) then + fallDmg:= trunc(TraceFall(x, y, Point.x, Point.y, dX, dY, 0) * dmgMod) + else fallDmg:= trunc(TraceFall(x, y, Point.x, Point.y, dX, dY, erasure) * dmgMod); if fallDmg < 0 then // drowning. score healthier hogs higher, since their death is more likely to benefit the AI if Score > 0 then inc(rate, KillScore + Score div 10) // Add a bit of a bonus for bigger hog drownings @@ -504,17 +568,17 @@ for i:= 0 to Pred(Targets.Count) do with Targets.ar[i] do - begin // hammer hit radius is 8, shift is 10 if abs(Point.x - x) + abs(Point.y - y) < 18 then + begin r:= trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y))); - if r <= 18 then - if Score > 0 then - inc(rate, Score div 3) - else - inc(rate, Score div 3 * friendlyfactor div 100) - end; + if r <= 18 then + if Score > 0 then + inc(rate, Score div 3) + else + inc(rate, Score div 3 * friendlyfactor div 100) + end; RateHammer:= rate * 1024; end; @@ -606,7 +670,7 @@ end; function HHGo(Gear, AltGear: PGear; var GoInfo: TGoInfo): boolean; -var pX, pY: LongInt; +var pX, pY, tY: LongInt; begin HHGo:= false; AltGear^:= Gear^; @@ -614,12 +678,16 @@ GoInfo.Ticks:= 0; GoInfo.FallPix:= 0; GoInfo.JumpType:= jmpNone; - +tY:= hwRound(Gear^.Y); repeat pX:= hwRound(Gear^.X); pY:= hwRound(Gear^.Y); if pY + cHHRadius >= cWaterLine then - exit(false); + begin + if AltGear^.Hedgehog^.BotLevel < 4 then + AddWalkBonus(pX, tY, 250, -40); + exit(false) + end; // hog is falling if (Gear^.State and gstMoving) <> 0 then @@ -631,6 +699,8 @@ Goinfo.FallPix:= 0; // try ljump instead of fall with damage HHJump(AltGear, jmpLJump, GoInfo); + if AltGear^.Hedgehog^.BotLevel < 4 then + AddWalkBonus(pX, tY, 175, -20); exit(false) end; Gear^.Y:= Gear^.Y + Gear^.dY;
--- a/hedgewars/uAmmos.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uAmmos.pas Thu Aug 30 12:13:24 2012 -0400 @@ -32,6 +32,7 @@ procedure SetAmmoReinforcement(var s: shortstring); procedure AssignStores; procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType); +procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType; amt: LongWord); procedure SetAmmo(var Hedgehog: THedgehog; ammo: TAmmoType; cnt: LongWord); function HHHasAmmo(var Hedgehog: THedgehog; Ammo: TAmmoType): LongWord; procedure PackAmmo(Ammo: PHHAmmo; Slot: LongInt); @@ -188,7 +189,7 @@ end end; -procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType); +procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType; amt: LongWord); var cnt: LongWord; a: PAmmo; begin @@ -199,11 +200,16 @@ cnt:= 0; if (cnt <> AMMO_INFINITE) then begin - inc(cnt, Ammoz[ammo].NumberInCase); + inc(cnt, amt); SetAmmo(Hedgehog, ammo, cnt) end end; +procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType); +begin + AddAmmo(Hedgehog, ammo, Ammoz[ammo].NumberInCase); +end; + procedure SetAmmo(var Hedgehog: THedgehog; ammo: TAmmoType; cnt: LongWord); var ammos: TAmmoCounts; slot, ami: LongInt; @@ -297,22 +303,23 @@ procedure ApplyAngleBounds(var Hedgehog: THedgehog; AmmoType: TAmmoType); begin -with Hedgehog do - begin - CurMinAngle:= Ammoz[AmmoType].minAngle; - if Ammoz[AmmoType].maxAngle <> 0 then - CurMaxAngle:= Ammoz[AmmoType].maxAngle - else - CurMaxAngle:= cMaxAngle; +if Hedgehog.Gear <> nil then + with Hedgehog do + begin + CurMinAngle:= Ammoz[AmmoType].minAngle; + if Ammoz[AmmoType].maxAngle <> 0 then + CurMaxAngle:= Ammoz[AmmoType].maxAngle + else + CurMaxAngle:= cMaxAngle; - with Hedgehog.Gear^ do - begin - if Angle < CurMinAngle then - Angle:= CurMinAngle; - if Angle > CurMaxAngle then - Angle:= CurMaxAngle; + with Hedgehog.Gear^ do + begin + if Angle < CurMinAngle then + Angle:= CurMinAngle; + if Angle > CurMaxAngle then + Angle:= CurMaxAngle; + end end - end end; procedure SwitchToFirstLegalAmmo(var Hedgehog: THedgehog); @@ -374,12 +381,12 @@ AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo); if (Propz and ammoprop_NeedTarget) <> 0 then begin - Gear^.State:= Gear^.State or gstHHChooseTarget; + if Gear <> nil then Gear^.State:= Gear^.State or gstHHChooseTarget; isCursorVisible:= true end else begin - Gear^.State:= Gear^.State and not gstHHChooseTarget; + if Gear <> nil then Gear^.State:= Gear^.State and not gstHHChooseTarget; isCursorVisible:= false end; end
--- a/hedgewars/uCollisions.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uCollisions.pas Thu Aug 30 12:13:24 2012 -0400 @@ -82,7 +82,7 @@ X:= hwRound(Gear^.X); Y:= hwRound(Gear^.Y); Radius:= Gear^.Radius; - ChangeRoundInLand(X, Y, Radius - 1, true); + ChangeRoundInLand(X, Y, Radius - 1, true, Gear = CurrentHedgehog^.Gear); cGear:= Gear end; Gear^.CollisionIndex:= Count; @@ -103,7 +103,7 @@ if Gear^.CollisionIndex >= 0 then begin with cinfos[Gear^.CollisionIndex] do - ChangeRoundInLand(X, Y, Radius - 1, false); + ChangeRoundInLand(X, Y, Radius - 1, false, Gear = CurrentHedgehog^.Gear); cinfos[Gear^.CollisionIndex]:= cinfos[Pred(Count)]; cinfos[Gear^.CollisionIndex].cGear^.CollisionIndex:= Gear^.CollisionIndex; Gear^.CollisionIndex:= -1; @@ -136,19 +136,12 @@ function TestCollisionXwithGear(Gear: PGear; Dir: LongInt): boolean; var x, y, i: LongInt; - TestWord: LongWord; begin -if Gear^.IntersectGear <> nil then - with Gear^ do - if (hwRound(IntersectGear^.X) + IntersectGear^.Radius < hwRound(X) - Radius) - or (hwRound(IntersectGear^.X) - IntersectGear^.Radius > hwRound(X) + Radius) then - begin - IntersectGear:= nil; - TestWord:= 0 - end - else - TestWord:= 255 - else TestWord:= 0; +// Special case to emulate the old intersect gear clearing, but with a bit of slop for pixel overlap +if (Gear^.CollisionMask = $FF7F) and (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.Gear <> nil) and + ((hwRound(Gear^.Hedgehog^.Gear^.X) + Gear^.Hedgehog^.Gear^.Radius + 4 < hwRound(Gear^.X) - Gear^.Radius) or + (hwRound(Gear^.Hedgehog^.Gear^.X) - Gear^.Hedgehog^.Gear^.Radius - 4 > hwRound(Gear^.X) + Gear^.Radius)) then + Gear^.CollisionMask:= $FFFF; x:= hwRound(Gear^.X); if Dir < 0 then @@ -163,7 +156,7 @@ i:= y + Gear^.Radius * 2 - 2; repeat if (y and LAND_HEIGHT_MASK) = 0 then - if Land[y, x] > TestWord then + if Land[y, x] and Gear^.CollisionMask <> 0 then exit; inc(y) until (y > i); @@ -173,38 +166,31 @@ function TestCollisionYwithGear(Gear: PGear; Dir: LongInt): Word; var x, y, i: LongInt; - TestWord: LongWord; begin -if Gear^.IntersectGear <> nil then - with Gear^ do - if (hwRound(IntersectGear^.Y) + IntersectGear^.Radius < hwRound(Y) - Radius) or - (hwRound(IntersectGear^.Y) - IntersectGear^.Radius > hwRound(Y) + Radius) then - begin - IntersectGear:= nil; - TestWord:= 0 - end - else - TestWord:= 255 -else - TestWord:= 0; +// Special case to emulate the old intersect gear clearing, but with a bit of slop for pixel overlap +if (Gear^.CollisionMask = $FF7F) and (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.Gear <> nil) and + ((hwRound(Gear^.Hedgehog^.Gear^.Y) + Gear^.Hedgehog^.Gear^.Radius + 4 < hwRound(Gear^.Y) - Gear^.Radius) or + (hwRound(Gear^.Hedgehog^.Gear^.Y) - Gear^.Hedgehog^.Gear^.Radius - 4 > hwRound(Gear^.Y) + Gear^.Radius)) then + Gear^.CollisionMask:= $FFFF; y:= hwRound(Gear^.Y); if Dir < 0 then y:= y - Gear^.Radius else y:= y + Gear^.Radius; + if (y and LAND_HEIGHT_MASK) = 0 then begin x:= hwRound(Gear^.X) - Gear^.Radius + 1; i:= x + Gear^.Radius * 2 - 2; repeat if (x and LAND_WIDTH_MASK) = 0 then - if Land[y, x] > TestWord then - begin + if Land[y, x] and Gear^.CollisionMask <> 0 then + begin TestCollisionYwithGear:= Land[y, x]; exit; - end; - inc(x) + end; + inc(x) until (x > i); end; TestCollisionYwithGear:= 0
--- a/hedgewars/uCommandHandlers.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uCommandHandlers.pas Thu Aug 30 12:13:24 2012 -0400 @@ -412,18 +412,19 @@ end; procedure chNextTurn(var s: shortstring); -var checksum: Longword; +var i: Longword; gi: PGear; begin s:= s; // avoid compiler hint TryDo(AllInactive, '/nextturn called when not all gears are inactive', true); - checksum:= GameTicks; + CheckSum:= CheckSum xor GameTicks; gi := GearsList; while gi <> nil do begin - with gi^ do checksum:= checksum xor X.round xor X.frac xor dX.round xor dX.frac xor Y.round xor Y.frac xor dY.round xor dY.frac; + with gi^ do CheckSum:= CheckSum xor X.round xor X.frac xor dX.round xor dX.frac xor Y.round xor Y.frac xor dY.round xor dY.frac; + AddRandomness(CheckSum); gi := gi^.NextGear end; @@ -431,11 +432,11 @@ begin s[0]:= #5; s[1]:= 'N'; - SDLNet_Write32(checksum, @s[2]); + SDLNet_Write32(CheckSum, @s[2]); SendIPC(s) end else - TryDo(checksum = lastTurnChecksum, 'Desync detected', true); + TryDo(CheckSum = lastTurnChecksum, 'Desync detected', true); AddFileLog('Next turn: time '+inttostr(GameTicks)); end; @@ -763,7 +764,8 @@ procedure chGameFlags(var s: shortstring); begin -GameFlags:= StrToInt(s) +GameFlags:= StrToInt(s); +if GameFlags and gfSharedAmmo <> 0 then GameFlags:= GameFlags and not gfPerHogAmmo end; procedure chHedgehogTurnTime(var s: shortstring); @@ -789,23 +791,23 @@ procedure initModule; begin //////// Begin top sorted by freq analysis not including chatmsg - RegisterVariable('+right' , @chRight_p , false); - RegisterVariable('-right' , @chRight_m , false); - RegisterVariable('+up' , @chUp_p , false); - RegisterVariable('-up' , @chUp_m , false); - RegisterVariable('+left' , @chLeft_p , false); - RegisterVariable('-left' , @chLeft_m , false); - RegisterVariable('+attack' , @chAttack_p , false); - RegisterVariable('+down' , @chDown_p , false); - RegisterVariable('-down' , @chDown_m , false); - RegisterVariable('hjump' , @chHJump , false); - RegisterVariable('ljump' , @chLJump , false); - RegisterVariable('nextturn', @chNextTurn , false); - RegisterVariable('-attack' , @chAttack_m , false); - RegisterVariable('slot' , @chSlot , false); - RegisterVariable('setweap' , @chSetWeapon , false); + RegisterVariable('+right' , @chRight_p , false, true); + RegisterVariable('-right' , @chRight_m , false, true); + RegisterVariable('+up' , @chUp_p , false, true); + RegisterVariable('-up' , @chUp_m , false, true); + RegisterVariable('+left' , @chLeft_p , false, true); + RegisterVariable('-left' , @chLeft_m , false, true); + RegisterVariable('+attack' , @chAttack_p , false, false); // WTF? + RegisterVariable('+down' , @chDown_p , false, true); + RegisterVariable('-down' , @chDown_m , false, true); + RegisterVariable('hjump' , @chHJump , false, true); + RegisterVariable('ljump' , @chLJump , false, true); + RegisterVariable('nextturn', @chNextTurn , false, true); + RegisterVariable('-attack' , @chAttack_m , false, false); + RegisterVariable('slot' , @chSlot , false, true); + RegisterVariable('setweap' , @chSetWeapon , false, true); //////// End top by freq analysis - RegisterVariable('gencmd' , @chGenCmd , false); + RegisterVariable('gencmd' , @chGenCmd , false, true); RegisterVariable('flag' , @chFlag , false); RegisterVariable('script' , @chScript , false); RegisterVariable('proto' , @chCheckProto , true );
--- a/hedgewars/uCommands.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uCommands.pas Thu Aug 30 12:13:24 2012 -0400 @@ -27,26 +27,31 @@ procedure initModule; procedure freeModule; +procedure RegisterVariable(Name: shortstring; p: TCommandHandler; Trusted: boolean; Rand: boolean); procedure RegisterVariable(Name: shortstring; p: TCommandHandler; Trusted: boolean); procedure ParseCommand(CmdStr: shortstring; TrustedSource: boolean); procedure ParseTeamCommand(s: shortstring); procedure StopMessages(Message: Longword); implementation -uses uConsts, uVariables, uConsole, uUtils, uDebug; +uses uConsts, uVariables, uConsole, uUtils, uDebug, SDLh; type PVariable = ^TVariable; TVariable = record Next: PVariable; Name: string[15]; Handler: TCommandHandler; - Trusted: boolean; + Trusted, Rand: boolean; end; var Variables: PVariable; procedure RegisterVariable(Name: shortstring; p: TCommandHandler; Trusted: boolean); +begin +RegisterVariable(Name, p, Trusted, false); +end; +procedure RegisterVariable(Name: shortstring; p: TCommandHandler; Trusted: boolean; Rand: boolean); var value: PVariable; begin @@ -56,6 +61,7 @@ value^.Name:= Name; value^.Handler:= p; value^.Trusted:= Trusted; +value^.Rand:= Rand; if Variables = nil then Variables:= value @@ -81,11 +87,13 @@ s:= ''; SplitBySpace(CmdStr, s); AddFileLog('[Cmd] ' + CmdStr + ' (' + inttostr(length(s)) + ')'); + t:= Variables; while t <> nil do begin if t^.Name = CmdStr then begin + if t^.Rand then CheckSum:= CheckSum xor LongWord(SDLNet_Read32(@CmdStr)) xor LongWord(s[0]) xor GameTicks; if TrustedSource or t^.Trusted then t^.Handler(s); exit
--- a/hedgewars/uConsts.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uConsts.pas Thu Aug 30 12:13:24 2012 -0400 @@ -94,6 +94,7 @@ lfObject = $2000; lfDamaged = $1000; // lfIce = $0800; // blue + lfBouncy = $0400; // green cMaxPower = 1500; cMaxAngle = 2048; @@ -226,20 +227,23 @@ gstHHGone = $00100000; gstInvisible = $00200000; - gmLeft = $00000001; - gmRight = $00000002; - gmUp = $00000004; - gmDown = $00000008; - gmSwitch = $00000010; - gmAttack = $00000020; - gmLJump = $00000040; - gmHJump = $00000080; - gmDestroy= $00000100; - gmSlot = $00000200; // with param - gmWeapon = $00000400; // with param - gmTimer = $00000800; // with param - gmAnimate= $00001000; // with param - gmPrecise= $00002000; + gmLeft = $00000001; + gmRight = $00000002; + gmUp = $00000004; + gmDown = $00000008; + gmSwitch = $00000010; + gmAttack = $00000020; + gmLJump = $00000040; + gmHJump = $00000080; + gmDestroy = $00000100; + gmSlot = $00000200; // with param + gmWeapon = $00000400; // with param + gmTimer = $00000800; // with param + gmAnimate = $00001000; // with param + gmPrecise = $00002000; + + gmRemoveFromList = $00004000; + gmAddToList = $00008000; gmAllStoppable = gmLeft or gmRight or gmUp or gmDown or gmAttack or gmPrecise; cMaxSlotIndex = 9;
--- a/hedgewars/uGears.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uGears.pas Thu Aug 30 12:13:24 2012 -0400 @@ -37,7 +37,7 @@ procedure initModule; procedure freeModule; -function SpawnCustomCrateAt(x, y: LongInt; crate: TCrateType; content: Longword ): PGear; +function SpawnCustomCrateAt(x, y: LongInt; crate: TCrateType; content, cnt: Longword): PGear; function SpawnFakeCrateAt(x, y: LongInt; crate: TCrateType; explode: boolean; poison: boolean ): PGear; function GetAmmo(Hedgehog: PHedgehog): TAmmoType; function GetUtility(Hedgehog: PHedgehog): TAmmoType; @@ -59,13 +59,13 @@ uses uStore, uSound, uTeams, uRandom, uCollisions, uIO, uLandGraphics, uLocale, uAI, uAmmos, uStats, uVisualGears, uScript, GLunit, uMobile, uVariables, uCommands, uUtils, uTextures, uRenderUtils, uGearsRender, uCaptions, uDebug, uLandTexture, - uGearsHedgehog, uGearsUtils, uGearsList; + uGearsHedgehog, uGearsUtils, uGearsList, uGearsHandlers; var skipFlag: boolean; procedure AmmoShove(Ammo: PGear; Damage, Power: LongInt); forward; //procedure AmmoFlameWork(Ammo: PGear); forward; -function GearsNear(X, Y: hwFloat; Kind: TGearType; r: LongInt): TPGearArray; forward; +function GearsNear(X, Y: hwFloat; Kind: TGearType; r: LongInt): PGearArrayS; forward; procedure SpawnBoxOfSmth; forward; procedure ShotgunShot(Gear: PGear); forward; procedure doStepCase(Gear: PGear); forward; @@ -182,7 +182,7 @@ end; procedure ProcessGears; -var Gear, t: PGear; +var t: PGear; i, AliveCount: LongInt; s: shortstring; begin @@ -203,21 +203,29 @@ t:= GearsList; while t <> nil do begin - Gear:= t; - t:= Gear^.NextGear; + curHandledGear:= t; + t:= curHandledGear^.NextGear; - if Gear^.Active then + if curHandledGear^.Message and gmRemoveFromList <> 0 then begin - if Gear^.RenderTimer and (Gear^.Timer > 500) and ((Gear^.Timer mod 1000) = 0) then + RemoveGearFromList(curHandledGear); + // since I can't think of any good reason this would ever be separate from a remove from list, going to keep it inside this block + if curHandledGear^.Message and gmAddToList <> 0 then InsertGearToList(curHandledGear); + curHandledGear^.Message:= curHandledGear^.Message and not (gmRemoveFromList or gmAddToList) + end; + if curHandledGear^.Active then + begin + if curHandledGear^.RenderTimer and (curHandledGear^.Timer > 500) and ((curHandledGear^.Timer mod 1000) = 0) then begin - FreeTexture(Gear^.Tex); - Gear^.Tex:= RenderStringTex(inttostr(Gear^.Timer div 1000), cWhiteColor, fntSmall); + FreeTexture(curHandledGear^.Tex); + curHandledGear^.Tex:= RenderStringTex(inttostr(curHandledGear^.Timer div 1000), cWhiteColor, fntSmall); end; - Gear^.doStep(Gear); + curHandledGear^.doStep(curHandledGear); // might be useful later //ScriptCall('onGearStep', Gear^.uid); end end; +curHandledGear:= nil; if AllInactive then case step of @@ -453,7 +461,7 @@ if (not CurrentTeam^.ExtDriven) or CurrentTeam^.hasGone then inc(hiTicks) // we do not recieve a message for this end; - +AddRandomness(CheckSum); ScriptCall('onGameTick'); if GameTicks mod 20 = 0 then ScriptCall('onGameTick20'); inc(GameTicks) @@ -580,7 +588,8 @@ end; procedure AddMiscGears; -var i: Longword; +var i,rx, ry: Longword; + rdx, rdy: hwFloat; Gear: PGear; begin AddGear(0, 0, gtATStartGame, 0, _0, _0, 2000); @@ -626,6 +635,14 @@ if (GameFlags and gfArtillery) <> 0 then cArtillery:= true; +for i:= 0 to GetRandom(10)+30 do + begin rx:= GetRandom(rightX-leftX)+leftX; + ry:= GetRandom(LAND_HEIGHT-topY)+topY; + rdx:= _90-(GetRandomf*_360); + rdy:= _90-(GetRandomf*_360); + AddGear(rx, ry, gtGenericFaller, gstInvisible, rdx, rdy, $FFFFFFFF); + end; + if not hasBorder and ((Theme = 'Snow') or (Theme = 'Christmas')) then for i:= 0 to Pred(vobCount*2) do AddGear(GetRandom(LAND_WIDTH+1024)-512, LAND_HEIGHT - GetRandom(LAND_HEIGHT div 2), gtFlake, 0, _0, _0, 0); @@ -871,25 +888,30 @@ end end; -function GearsNear(X, Y: hwFloat; Kind: TGearType; r: LongInt): TPGearArray; +var GearsNearArray : TPGearArray; +function GearsNear(X, Y: hwFloat; Kind: TGearType; r: LongInt): PGearArrayS; var t: PGear; - l: Longword; + s: Longword; begin r:= r*r; - GearsNear := nil; + s:= 0; + SetLength(GearsNearArray, s); t := GearsList; while t <> nil do begin if (t^.Kind = Kind) and ((X - t^.X)*(X - t^.X) + (Y - t^.Y)*(Y-t^.Y) < int2hwFloat(r)) then begin - l:= Length(GearsNear); - SetLength(GearsNear, l + 1); - GearsNear[l] := t; + inc(s); + SetLength(GearsNearArray, s); + GearsNearArray[s - 1] := t; end; t := t^.NextGear; end; + + GearsNear.size:= s; + GearsNear.ar:= @GearsNearArray end; {procedure AmmoFlameWork(Ammo: PGear); @@ -928,7 +950,7 @@ CountGears:= count; end; -function SpawnCustomCrateAt(x, y: LongInt; crate: TCrateType; content: Longword): PGear; +function SpawnCustomCrateAt(x, y: LongInt; crate: TCrateType; content, cnt: Longword): PGear; begin FollowGear := AddGear(x, y, gtCase, 0, _0, _0, 0); cCaseFactor := 0; @@ -936,6 +958,8 @@ if (crate <> HealthCrate) and (content > ord(High(TAmmoType))) then content := ord(High(TAmmoType)); + FollowGear^.Power:= cnt; + case crate of HealthCrate: begin @@ -1306,7 +1330,9 @@ @doStepStructure, @doStepLandGun, @doStepTardis, - @doStepIceGun); + @doStepIceGun, + @doStepAddAmmo, + @doStepGenericFaller); begin doStepHandlers:= handlers; @@ -1315,6 +1341,8 @@ CurAmmoGear:= nil; GearsList:= nil; + curHandledGear:= nil; + KilledHHs:= 0; SuddenDeath:= false; SuddenDeathDmg:= false;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hedgewars/uGearsHandlers.pas Thu Aug 30 12:13:24 2012 -0400 @@ -0,0 +1,87 @@ +(* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + *) + +{$INCLUDE "options.inc"} + +unit uGearsHandlers; +interface + +uses uTypes; + +procedure cakeStep(Gear: PGear); + +implementation + +uses SDLh, uFloat, uCollisions; + + + +const dirs: array[0..3] of TPoint = ((X: 0; Y: -1), (X: 1; Y: 0),(X: 0; Y: 1),(X: -1; Y: 0)); + +procedure PrevAngle(Gear: PGear; dA: LongInt); inline; +begin + Gear^.Angle := (Gear^.Angle - dA) and 3 +end; + +procedure NextAngle(Gear: PGear; dA: LongInt); inline; +begin + Gear^.Angle := (Gear^.Angle + dA) and 3 +end; + +procedure cakeStep(Gear: PGear); +var + xx, yy, xxn, yyn: LongInt; + dA: LongInt; + tdx, tdy: hwFloat; +begin + dA := hwSign(Gear^.dX); + xx := dirs[Gear^.Angle].x; + yy := dirs[Gear^.Angle].y; + xxn := dirs[(LongInt(Gear^.Angle) + 4 + dA) mod 4].x; + yyn := dirs[(LongInt(Gear^.Angle) + 4 + dA) mod 4].y; + + if (xx = 0) then + if TestCollisionYwithGear(Gear, yy) <> 0 then + PrevAngle(Gear, dA) + else + begin + Gear^.Tag := 0; + Gear^.Y := Gear^.Y + int2hwFloat(yy); + if not TestCollisionXwithGear(Gear, xxn) then + begin + Gear^.X := Gear^.X + int2hwFloat(xxn); + NextAngle(Gear, dA) + end; + end; + + if (yy = 0) then + if TestCollisionXwithGear(Gear, xx) then + PrevAngle(Gear, dA) + else + begin + Gear^.Tag := 0; + Gear^.X := Gear^.X + int2hwFloat(xx); + if TestCollisionYwithGear(Gear, yyn) = 0 then + begin + Gear^.Y := Gear^.Y + int2hwFloat(yyn); + NextAngle(Gear, dA) + end; + end; +end; + +end.
--- a/hedgewars/uGearsHedgehog.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uGearsHedgehog.pas Thu Aug 30 12:13:24 2012 -0400 @@ -28,6 +28,7 @@ procedure doStepHedgehogMoving(Gear: PGear); procedure HedgehogChAngle(HHGear: PGear); procedure PickUp(HH, Gear: PGear); +procedure AddPickup(HH: THedgehog; ammo: TAmmoType; cnt, X, Y: LongWord); implementation uses uConsts, uVariables, uFloat, uAmmos, uSound, uCaptions, @@ -355,7 +356,6 @@ newGear:= AddGear(hwRound(lx), hwRound(ly), gtResurrector, 0, _0, _0, 0); newGear^.SoundChannel := LoopSound(sndResurrector); end; - //amMelonStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 4, _0, _0, 0); amStructure: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtStructure, gstWait, SignAs(_0_02, dX), _0, 3000); amTardis: newGear:= AddGear(hwRound(X), hwRound(Y), gtTardis, 0, _0, _0, 5000); amIceGun: newGear:= AddGear(hwRound(X), hwRound(Y), gtIceGun, 0, _0, _0, 0); @@ -395,6 +395,7 @@ newGear^.Target.X:= TargetPoint.X; newGear^.Target.Y:= TargetPoint.Y end; + if newGear <> nil then newGear^.CollisionMask:= $FF7F; // Clear FollowGear if using on a rope/parachute/saucer etc so focus stays with the hog's movement if altUse then @@ -565,15 +566,41 @@ end end; +procedure AddPickup(HH: THedgehog; ammo: TAmmoType; cnt, X, Y: LongWord); +var s: shortstring; + vga: PVisualGear; +begin + PlaySound(sndShotgunReload); + if cnt <> 0 then AddAmmo(HH, ammo, cnt) + else AddAmmo(HH, ammo); + + if (not (HH.Team^.ExtDriven + or (HH.BotLevel > 0))) + or (HH.Team^.Clan^.ClanIndex = LocalClan) + or (GameType = gmtDemo) then + begin + if cnt <> 0 then + s:= trammo[Ammoz[ammo].NameId] + ' (+' + IntToStr(cnt) + ')' + else + s:= trammo[Ammoz[ammo].NameId] + ' (+' + IntToStr(Ammoz[ammo].NumberInCase) + ')'; + AddCaption(s, HH.Team^.Clan^.Color, capgrpAmmoinfo); + + // show ammo icon + vga:= AddVisualGear(X, Y, vgtAmmo); + if vga <> nil then + vga^.Frame:= Longword(ammo); + end; +end; + //////////////////////////////////////////////////////////////////////////////// procedure PickUp(HH, Gear: PGear); var s: shortstring; a: TAmmoType; i: LongInt; vga: PVisualGear; + ag, gi: PGear; begin Gear^.Message:= gmDestroy; -PlaySound(sndShotgunReload); if (Gear^.Pos and posCaseExplode) <> 0 then if (Gear^.Pos and posCasePoison) <> 0 then doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 25, HH^.Hedgehog, EXPLAutoSound + EXPLPoisoned) @@ -585,35 +612,35 @@ case Gear^.Pos of posCaseUtility, posCaseAmmo: begin - if Gear^.AmmoType <> amNothing then a:= Gear^.AmmoType + if Gear^.AmmoType <> amNothing then + begin + AddPickup(HH^.Hedgehog^, Gear^.AmmoType, Gear^.Power, hwRound(Gear^.X), hwRound(Gear^.Y)); + end else begin - for i:= 0 to GameTicks and $7F do - GetRandom(2); // Burn some random numbers - if Gear^.Pos = posCaseUtility then - a:= GetUtility(HH^.Hedgehog) - else - a:= GetAmmo(HH^.Hedgehog) +// Add spawning here... + AddRandomness(GameTicks); + + gi := GearsList; + while gi <> nil do + begin + if gi^.Kind = gtGenericFaller then + begin + gi^.Active:= true; + gi^.X:= int2hwFloat(GetRandom(rightX-leftX)+leftX); + gi^.Y:= int2hwFloat(GetRandom(LAND_HEIGHT-topY)+topY); + gi^.dX:= _90-(GetRandomf*_360); + gi^.dY:= _90-(GetRandomf*_360) + end; + gi := gi^.NextGear + end; + ag:= AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtAddAmmo, gstInvisible, _0, _0, GetRandom(200)+100); + ag^.Pos:= Gear^.Pos; + ag^.Power:= Gear^.Power end; - AddAmmo(HH^.Hedgehog^, a); -// Possibly needs to check shared clan ammo game flag once added. -// On the other hand, no obvious reason that clan members shouldn't know what ammo another clan member picked up - if (not (HH^.Hedgehog^.Team^.ExtDriven - or (HH^.Hedgehog^.BotLevel > 0))) - or (HH^.Hedgehog^.Team^.Clan^.ClanIndex = LocalClan) - or (GameType = gmtDemo) then - begin - s:= trammo[Ammoz[a].NameId] + ' (+' + IntToStr(Ammoz[a].NumberInCase) + ')'; - AddCaption(s, HH^.Hedgehog^.Team^.Clan^.Color, capgrpAmmoinfo); - - // show ammo icon - vga:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtAmmo); - if vga <> nil then - vga^.Frame:= Longword(a); - end; - end; posCaseHealth: begin + PlaySound(sndShotgunReload); inc(HH^.Health, Gear^.Health); HH^.Hedgehog^.Effects[hePoisoned] := 0; str(Gear^.Health, s); @@ -952,11 +979,11 @@ SetLittle(Gear^.dX); if (not isFalling) -and (hwAbs(Gear^.dX) + hwAbs(Gear^.dY) < _0_03) then + and (hwAbs(Gear^.dX) + hwAbs(Gear^.dY) < _0_03) then begin Gear^.State:= Gear^.State and (not gstWinner); Gear^.State:= Gear^.State and (not gstMoving); - while TestCollisionYWithGear(Gear,1) = 0 do + while (TestCollisionYWithGear(Gear,1) = 0) and not CheckGearDrowning(Gear) do Gear^.Y:= Gear^.Y+_1; SetLittle(Gear^.dX); Gear^.dY:= _0 @@ -1220,6 +1247,7 @@ land: Word; *) var slope: hwFloat; begin +CheckSum:= CheckSum xor Gear^.Hedgehog^.BotLevel; if (Gear^.Message and gmDestroy) <> 0 then begin DeleteGear(Gear);
--- a/hedgewars/uGearsList.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uGearsList.pas Thu Aug 30 12:13:24 2012 -0400 @@ -27,11 +27,13 @@ procedure InsertGearToList(Gear: PGear); procedure RemoveGearFromList(Gear: PGear); +var curHandledGear: PGear; + implementation uses uRandom, uUtils, uConsts, uVariables, uAmmos, uTeams, uStats, uTextures, uScript, uRenderUtils, uAI, uCollisions, - uGearsRender, uGearsUtils; + uGearsRender, uGearsUtils, uDebug; var GCounter: LongWord = 0; // this does not get re-initialized, but should be harmless @@ -40,7 +42,7 @@ begin tmp:= GearsList; ptmp:= GearsList; - while (tmp <> nil) and (tmp^.Z <= Gear^.Z) do + while (tmp <> nil) and (tmp^.Z < Gear^.Z) do begin ptmp:= tmp; tmp:= tmp^.NextGear @@ -63,8 +65,11 @@ end; end; + procedure RemoveGearFromList(Gear: PGear); begin +TryDo((curHandledGear = nil) or (Gear = curHandledGear), 'You''re doing it wrong', true); + if Gear^.NextGear <> nil then Gear^.NextGear^.PrevGear:= Gear^.PrevGear; if Gear^.PrevGear <> nil then @@ -72,7 +77,8 @@ else GearsList:= Gear^.NextGear end; - + + function AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear; var gear: PGear; begin @@ -92,23 +98,20 @@ gear^.doStep:= doStepHandlers[Kind]; gear^.CollisionIndex:= -1; gear^.Timer:= Timer; -gear^.FlightTime:= 0; gear^.uid:= GCounter; gear^.SoundChannel:= -1; gear^.ImpactSound:= sndNone; -gear^.nImpactSounds:= 0; gear^.Density:= _1; // Define ammo association, if any. gear^.AmmoType:= GearKindAmmoTypeMap[Kind]; -if Ammoz[Gear^.AmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0 then +gear^.CollisionMask:= $FFFF; + +if CurrentHedgehog <> nil then gear^.Hedgehog:= CurrentHedgehog; + +if (Ammoz[Gear^.AmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0) then gear^.Z:= cHHZ+1 else gear^.Z:= cUsualZ; -if CurrentHedgehog <> nil then - begin - gear^.Hedgehog:= CurrentHedgehog; - gear^.IntersectGear:= CurrentHedgehog^.Gear - end; case Kind of gtGrenade, @@ -247,7 +250,7 @@ gear^.nImpactSounds:= 1; gear^.Radius:= 16; gear^.Elasticity:= _0_3; - gear^.Timer:= 0 + gear^.Timer:= 500 end; gtExplosives: begin gear^.ImpactSound:= sndGrenadeImpact; @@ -295,6 +298,7 @@ gear^.Radius:= 15; gear^.Tag:= Y end; + gtAirAttack: gear^.Z:= cHHZ+2; gtAirBomb: begin gear^.Radius:= 5; gear^.Density:= _2; @@ -459,6 +463,13 @@ gear^.Pos:= 1; end; gtIceGun: gear^.Health:= 1000; +gtGenericFaller:begin + gear^.AdvBounce:= 1; + gear^.Radius:= 1; + gear^.Elasticity:= _0_9; + gear^.Friction:= _0_995; + gear^.Density:= _1; + end; end; InsertGearToList(gear); @@ -483,9 +494,9 @@ // make sure that portals have their link removed before deletion if (Gear^.Kind = gtPortal) then begin - if (Gear^.IntersectGear <> nil) then - if (Gear^.IntersectGear^.IntersectGear = Gear) then - Gear^.IntersectGear^.IntersectGear:= nil; + if (Gear^.LinkedGear <> nil) then + if (Gear^.LinkedGear^.LinkedGear = Gear) then + Gear^.LinkedGear^.LinkedGear:= nil; end else if Gear^.Kind = gtHedgehog then (* @@ -556,8 +567,10 @@ end end; with Gear^ do + begin AddFileLog('Delete: #' + inttostr(uid) + ' (' + inttostr(hwRound(x)) + ',' + inttostr(hwRound(y)) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + EnumToStr(Kind)); - + AddRandomness(X.round xor X.frac xor dX.round xor dX.frac xor Y.round xor Y.frac xor dY.round xor dY.frac) + end; if CurAmmoGear = Gear then CurAmmoGear:= nil; if FollowGear = Gear then
--- a/hedgewars/uGearsRender.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uGearsRender.pas Thu Aug 30 12:13:24 2012 -0400 @@ -21,7 +21,7 @@ unit uGearsRender; interface -uses uTypes, uConsts, GLunit, uFloat, SDLh; +uses uTypes, uConsts, GLunit, uFloat, SDLh, uRandom; procedure RenderGear(Gear: PGear; x, y: LongInt); @@ -948,8 +948,8 @@ gtBall: DrawSpriteRotatedF(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle); gtPortal: if ((Gear^.Tag and 1) = 0) // still moving? - or (Gear^.IntersectGear = nil) or (Gear^.IntersectGear^.IntersectGear <> Gear) // not linked&backlinked? - or ((Gear^.IntersectGear^.Tag and 1) = 0) then // linked portal still moving? + or (Gear^.LinkedGear = nil) or (Gear^.LinkedGear^.LinkedGear <> Gear) // not linked&backlinked? + or ((Gear^.LinkedGear^.Tag and 1) = 0) then // linked portal still moving? DrawSpriteRotatedF(sprPortal, x, y, Gear^.Tag, hwSign(Gear^.dX), Gear^.DirAngle) else DrawSpriteRotatedF(sprPortal, x, y, 4 + Gear^.Tag div 2, hwSign(Gear^.dX), Gear^.DirAngle); @@ -990,30 +990,36 @@ else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle); gtCase: begin - if Gear^.Timer < 255 then Tint($FF, $FF, $FF, Gear^.Timer); - if ((Gear^.Pos and posCaseAmmo) <> 0) then - begin - i:= (GameTicks shr 6) mod 64; - if i > 18 then - i:= 0; - DrawSprite(sprCase, x - 24, y - 24, i); - end - else if ((Gear^.Pos and posCaseHealth) <> 0) then + if Gear^.Timer > 1000 then begin - i:= ((GameTicks shr 6) + 38) mod 64; - if i > 13 then - i:= 0; - DrawSprite(sprFAid, x - 24, y - 24, i); - end - else if ((Gear^.Pos and posCaseUtility) <> 0) then + if ((Gear^.Pos and posCaseAmmo) <> 0) then + begin + i:= (GameTicks shr 6) mod 64; + if i > 18 then + i:= 0; + DrawSprite(sprCase, x - 24, y - 24, i); + end + else if ((Gear^.Pos and posCaseHealth) <> 0) then + begin + i:= ((GameTicks shr 6) + 38) mod 64; + if i > 13 then + i:= 0; + DrawSprite(sprFAid, x - 24, y - 24, i); + end + else if ((Gear^.Pos and posCaseUtility) <> 0) then + begin + i:= (GameTicks shr 6) mod 70; + if i > 23 then + i:= 0; + i:= i mod 12; + DrawSprite(sprUtility, x - 24, y - 24, i); + end; + end; + if Gear^.Timer < 1833 then begin - i:= (GameTicks shr 6) mod 70; - if i > 23 then - i:= 0; - i:= i mod 12; - DrawSprite(sprUtility, x - 24, y - 24, i); - end; - if Gear^.Timer < 255 then Tint($FF, $FF, $FF, $FF); + DrawTextureRotatedF(SpritesData[sprPortal].texture, min(abs(1.25 - (Gear^.Timer mod 1333) / 400), 1.25), 0, 0, + x, Gear^.Angle+WorldDy-16, 4+Gear^.Tag, 1, 32, 32, 270); + end end; gtExplosives: begin if ((Gear^.State and gstDrowning) <> 0) then @@ -1207,9 +1213,8 @@ else DrawLine(hwRound(HHGear^.X), hwRound(HHGear^.Y), hwRound(Gear^.X), hwRound(Gear^.Y), 4.0, i, i, $FF, $40); end end - end - - + end; + gtGenericFaller: DrawCircle(x, y, 3, 3, $FF, $00, $00, $FF); // debug end; if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawTextureCentered(x + 8, y + 8, Gear^.Tex);
--- a/hedgewars/uGearsUtils.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uGearsUtils.pas Thu Aug 30 12:13:24 2012 -0400 @@ -107,7 +107,7 @@ tdX:= Gear^.X-fX; tdY:= Gear^.Y-fY; if hwRound(hwAbs(tdX)+hwAbs(tdY)) < dmgBase then - dmg:= dmgBase - max(hwRound(Distance(tdX, tdY)),Gear^.Radius); + dmg:= dmgBase - hwRound(Distance(tdX, tdY)); if dmg > 1 then begin dmg:= ModifyDamage(min(dmg div 2, Radius), Gear); @@ -343,6 +343,18 @@ Y:= hwRound(Gear^.Y); if cWaterLine < Y + Gear^.Radius then begin + if Gear^.State and gstInvisible <> 0 then + begin + if Gear^.Kind = gtGenericFaller then + begin + Gear^.X:= int2hwFloat(GetRandom(rightX-leftX)+leftX); + Gear^.Y:= int2hwFloat(GetRandom(LAND_HEIGHT-topY)+topY); + Gear^.dX:= _90-(GetRandomf*_360); + Gear^.dY:= _90-(GetRandomf*_360) + end + else DeleteGear(Gear); + exit + end; isSubmersible:= (Gear = CurrentHedgehog^.Gear) and (CurAmmoGear <> nil) and (CurAmmoGear^.AmmoType = amJetpack); skipSpeed := _0_25; skipAngle := _1_9; @@ -403,34 +415,41 @@ begin splash:= AddVisualGear(X, cWaterLine, vgtSplash); if splash <> nil then + with splash^ do begin - splash^.Scale:= hwFloat2Float(Gear^.Density / _3 * Gear^.dY); - if splash^.Scale > 1 then splash^.Scale:= power(splash^.Scale,0.3333) - else splash^.Scale:= splash^.Scale + ((1-splash^.Scale) / 2); + Scale:= hwFloat2Float(Gear^.Density / _3 * Gear^.dY); + if Scale > 1 then Scale:= power(Scale,0.3333) + else Scale:= Scale + ((1-Scale) / 2); + if Scale > 1 then Timer:= round(max(Scale,3)) + else Timer:= 1; + // Low Gravity + Timer:=round(0.0005/cGravityf); + FrameTicks:= FrameTicks*Timer; end; maxDrops := (hwRound(Gear^.Density) * 3) div 2 + round(vdX * hwRound(Gear^.Density) * 6) + round(vdY * hwRound(Gear^.Density) * 6); for i:= max(maxDrops div 3, min(32, Random(maxDrops))) downto 0 do begin - particle := AddVisualGear(X - 3 + Random(6), cWaterLine, vgtDroplet); + particle := AddVisualGear(X - 3 + Random(7), cWaterLine, vgtDroplet); if particle <> nil then - begin - particle^.dX := particle^.dX - vdX / 10; - particle^.dY := particle^.dY - vdY / 5; - if splash <> nil then + with particle^ do begin - if splash^.Scale > 1 then + dX := dX - vdX / 10; + dY := dY - vdY / 5; + if splash <> nil then begin - particle^.dX:= particle^.dX * power(splash^.Scale,0.3333); // tone down the droplet height further - particle^.dY:= particle^.dY * power(splash^.Scale, 0.3333) - end - else - begin - particle^.dX:= particle^.dX * splash^.Scale; - particle^.dY:= particle^.dY * splash^.Scale + if splash^.Scale > 1 then + begin + dX:= dX * power(splash^.Scale,0.3333); // tone down the droplet height further + dY:= dY * power(splash^.Scale, 0.3333) + end + else + begin + dX:= dX * splash^.Scale; + dY:= dY * splash^.Scale + end end end - end end end; if isSubmersible and (CurAmmoGear^.Pos = 0) then @@ -446,6 +465,10 @@ sparkles: PVisualGear; gX, gY: LongInt; begin + if (Gear^.LastDamage <> nil) then + uStats.HedgehogDamaged(Gear, Gear^.LastDamage, 0, true) + else + uStats.HedgehogDamaged(Gear, CurrentHedgehog, 0, true); AttackBar:= 0; gear^.dX := _0; gear^.dY := _0;
--- a/hedgewars/uInputHandler.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uInputHandler.pas Thu Aug 30 12:13:24 2012 -0400 @@ -84,12 +84,12 @@ procedure MaskModifier(Modifier: shortstring; var code: LongInt); var mod_ : shortstring; ModifierCount, i: LongInt; - c : char; begin if Modifier = '' then exit; ModifierCount:= 0; -for c in Modifier do - if(c = ':') then inc(ModifierCount); + +for i:= 1 to Length(Modifier) do + if(Modifier[i] = ':') then inc(ModifierCount); SplitByChar(Modifier, mod_, ':');//remove the first mod: part Modifier:= mod_; @@ -248,6 +248,7 @@ DefaultBinds[KeyNameToCode(_S'0')]:= '+volup'; DefaultBinds[KeyNameToCode(_S'9')]:= '+voldown'; +DefaultBinds[KeyNameToCode(_S'8')]:= 'mute'; DefaultBinds[KeyNameToCode(_S'c')]:= 'capture'; DefaultBinds[KeyNameToCode(_S'h')]:= 'findhh'; DefaultBinds[KeyNameToCode(_S'p')]:= 'pause';
--- a/hedgewars/uLand.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uLand.pas Thu Aug 30 12:13:24 2012 -0400 @@ -434,19 +434,22 @@ begin for x:= 0 to Pred(tmpsurf^.w) do begin - if ((AMask and p^[x]) = 0) then + // this an if instead of masking colours to avoid confusing map creators + if ((AMask and p^[x]) = 0) then Land[cpY + y, cpX + x]:= 0 - else if p^[x] = $FFFFFFFF then + else if p^[x] = $FFFFFFFF then // white Land[cpY + y, cpX + x]:= lfObject - else if p^[x] = (AMask or RMask) then - Land[cpY + y, cpX + x]:= lfIndestructible - else if p^[x] = AMask then + else if p^[x] = AMask then // black begin Land[cpY + y, cpX + x]:= lfBasic; disableLandBack:= false end - else if p^[x] = (AMask or BMask) then + else if p^[x] = (AMask or RMask) then // red + Land[cpY + y, cpX + x]:= lfIndestructible + else if p^[x] = (AMask or BMask) then // blue Land[cpY + y, cpX + x]:= lfObject or lfIce + else if p^[x] = (AMask or GMask) then // green + Land[cpY + y, cpX + x]:= lfObject or lfBouncy end; p:= @(p^[tmpsurf^.pitch div 4]); end;
--- a/hedgewars/uLandGraphics.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uLandGraphics.pas Thu Aug 30 12:13:24 2012 -0400 @@ -36,10 +36,11 @@ procedure DrawHLinesExplosions(ar: PRangeArray; Radius: LongInt; y, dY: LongInt; Count: Byte); procedure DrawTunnel(X, Y, dX, dY: hwFloat; ticks, HalfWidth: LongInt); procedure FillRoundInLand(X, Y, Radius: LongInt; Value: Longword); -procedure ChangeRoundInLand(X, Y, Radius: LongInt; doSet: boolean); +procedure ChangeRoundInLand(X, Y, Radius: LongInt; doSet, isCurrent: boolean); function LandBackPixel(x, y: LongInt): LongWord; procedure DrawLine(X1, Y1, X2, Y2: LongInt; Color: Longword); procedure DrawThickLine(X1, Y1, X2, Y2, radius: LongInt; color: Longword); +procedure DumpLandToLog(x, y, r: LongInt); function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace: boolean; indestructible: boolean): boolean; @@ -98,46 +99,62 @@ Land[y - dx, i]:= Value; end; -procedure ChangeCircleLines(x, y, dx, dy: LongInt; doSet: boolean); +procedure ChangeCircleLines(x, y, dx, dy: LongInt; doSet, isCurrent: boolean); var i: LongInt; begin if not doSet then begin if ((y + dy) and LAND_HEIGHT_MASK) = 0 then for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do - if (Land[y + dy, i] > 0) and (Land[y + dy, i] < 256) then - dec(Land[y + dy, i]); // check > 0 because explosion can erase collision data + if isCurrent then + Land[y + dy, i]:= Land[y + dy, i] and $FF7F + else if Land[y + dy, i] and $007F > 0 then + Land[y + dy, i]:= (Land[y + dy, i] and $FF80) or ((Land[y + dy, i] and $7F) - 1); if ((y - dy) and LAND_HEIGHT_MASK) = 0 then for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do - if (Land[y - dy, i] > 0) and (Land[y - dy, i] < 256) then - dec(Land[y - dy, i]); + if isCurrent then + Land[y - dy, i]:= Land[y - dy, i] and $FF7F + else if Land[y - dy, i] and $007F > 0 then + Land[y - dy, i]:= (Land[y - dy, i] and $FF80) or ((Land[y - dy, i] and $7F) - 1); if ((y + dx) and LAND_HEIGHT_MASK) = 0 then for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do - if (Land[y + dx, i] > 0) and (Land[y + dx, i] < 256) then - dec(Land[y + dx, i]); + if isCurrent then + Land[y + dx, i]:= Land[y + dx, i] and $FF7F + else if Land[y + dx, i] and $007F > 0 then + Land[y + dx, i]:= (Land[y + dx, i] and $FF80) or ((Land[y + dx, i] and $7F) - 1); if ((y - dx) and LAND_HEIGHT_MASK) = 0 then for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do - if (Land[y - dx, i] > 0) and (Land[y - dx, i] < 256) then - dec(Land[y - dx, i]); + if isCurrent then + Land[y - dx, i]:= Land[y - dx, i] and $FF7F + else if Land[y - dx, i] and $007F > 0 then + Land[y - dx, i]:= (Land[y - dx, i] and $FF80) or ((Land[y - dx, i] and $7F) - 1) end else begin if ((y + dy) and LAND_HEIGHT_MASK) = 0 then for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do - if (Land[y + dy, i] < 256) then - inc(Land[y + dy, i]); - if ((y - dy) and LAND_HEIGHT_MASK) = 0 then - for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do - if (Land[y - dy, i] < 256) then - inc(Land[y - dy, i]); - if ((y + dx) and LAND_HEIGHT_MASK) = 0 then - for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do - if (Land[y + dx, i] < 256) then - inc(Land[y + dx, i]); - if ((y - dx) and LAND_HEIGHT_MASK) = 0 then - for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do - if (Land[y - dx, i] < 256) then - inc(Land[y - dx, i]); + if isCurrent then + Land[y + dy, i]:= Land[y + dy, i] or $80 + else if Land[y + dy, i] and $007F < 127 then + Land[y + dy, i]:= (Land[y + dy, i] and $FF80) or ((Land[y + dy, i] and $7F) + 1); + if ((y - dy) and LAND_HEIGHT_MASK) = 0 then + for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do + if isCurrent then + Land[y - dy, i]:= Land[y - dy, i] or $80 + else if Land[y - dy, i] and $007F < 127 then + Land[y - dy, i]:= (Land[y - dy, i] and $FF80) or ((Land[y - dy, i] and $7F) + 1); + if ((y + dx) and LAND_HEIGHT_MASK) = 0 then + for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do + if isCurrent then + Land[y + dx, i]:= Land[y + dx, i] or $80 + else if Land[y + dx, i] and $007F < 127 then + Land[y + dx, i]:= (Land[y + dx, i] and $FF80) or ((Land[y + dx, i] and $7F) + 1); + if ((y - dx) and LAND_HEIGHT_MASK) = 0 then + for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do + if isCurrent then + Land[y - dx, i]:= Land[y - dx, i] or $80 + else if Land[y - dx, i] and $007F < 127 then + Land[y - dx, i]:= (Land[y - dx, i] and $FF80) or ((Land[y - dx, i] and $7F) + 1) end end; @@ -163,7 +180,7 @@ FillCircleLines(x, y, dx, dy, Value); end; -procedure ChangeRoundInLand(X, Y, Radius: LongInt; doSet: boolean); +procedure ChangeRoundInLand(X, Y, Radius: LongInt; doSet, isCurrent: boolean); var dx, dy, d: LongInt; begin dx:= 0; @@ -171,7 +188,7 @@ d:= 3 - 2 * Radius; while (dx < dy) do begin - ChangeCircleLines(x, y, dx, dy, doSet); + ChangeCircleLines(x, y, dx, dy, doSet, isCurrent); if (d < 0) then d:= d + 4 * dx + 6 else @@ -182,7 +199,7 @@ inc(dx) end; if (dx = dy) then - ChangeCircleLines(x, y, dx, dy, doSet) + ChangeCircleLines(x, y, dx, dy, doSet, isCurrent) end; procedure FillLandCircleLines0(x, y, dx, dy: LongInt); @@ -1157,4 +1174,28 @@ DrawLines(x1, y1, x2, y2, dx, dy, color); end; + +procedure DumpLandToLog(x, y, r: LongInt); +var xx, yy, dx: LongInt; + s: shortstring; +begin + s[0]:= char(r * 2 + 1); + for yy:= y - r to y + r do + begin + for dx:= 0 to r*2 do + begin + xx:= dx - r + x; + if (xx = x) and (yy = y) then + s[dx + 1]:= 'X' + else if Land[yy, xx] > 255 then + s[dx + 1]:= 'O' + else if Land[yy, xx] > 0 then + s[dx + 1]:= '*' + else + s[dx + 1]:= '.' + end; + AddFileLog('Land dump: ' + s); + end; +end; + end.
--- a/hedgewars/uLandPainted.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uLandPainted.pas Thu Aug 30 12:13:24 2012 -0400 @@ -27,7 +27,7 @@ procedure freeModule; implementation -uses uLandGraphics, uConsts, uUtils, SDLh, uCommands, uDebug; +uses uLandGraphics, uConsts, uVariables, uUtils, SDLh, uCommands, uDebug; type PointRec = packed record X, Y: SmallInt; @@ -57,6 +57,10 @@ rec:= prec^; rec.X:= SDLNet_Read16(@rec.X); rec.Y:= SDLNet_Read16(@rec.Y); + if rec.X < -318 then rec.X:= -318; + if rec.X > LAND_WIDTH+318 then rec.X:= LAND_WIDTH+318; + if rec.Y < -318 then rec.Y:= -318; + if rec.Y > LAND_HEIGHT+318 then rec.Y:= LAND_HEIGHT+318; new(pe); if pointsListLast = nil then
--- a/hedgewars/uMobile.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uMobile.pas Thu Aug 30 12:13:24 2012 -0400 @@ -28,6 +28,7 @@ interface function isPhone: Boolean; inline; +function getScreenDPI: Single; inline; procedure performRumble; inline; procedure GameLoading; inline; @@ -47,6 +48,10 @@ procedure AudioServicesPlaySystemSound(num: LongInt); cdecl; external; {$ENDIF} +{$IFDEF ANDROID} +function Android_JNI_getDensity(): Single; cdecl; external; +{$ENDIF} + // this function is just to determine whether we are running on a limited screen device function isPhone: Boolean; inline; begin @@ -61,6 +66,15 @@ {$ENDIF} end; +function getScreenDPI: Single; inline; +begin +{$IFDEF ANDROID} + getScreenDPI:= Android_JNI_getDensity(); +{$ELSE} + getScreenDPI:= 1; +{$ENDIF} +end; + // this function should make the device vibrate in some way procedure PerformRumble; inline; {$IFDEF IPHONEOS}const kSystemSoundID_Vibrate = $00000FFF;{$ENDIF}
--- a/hedgewars/uRandom.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uRandom.pas Thu Aug 30 12:13:24 2012 -0400 @@ -35,15 +35,23 @@ procedure SetRandomSeed(Seed: shortstring); // Sets the seed that should be used for generating pseudo-random values. function GetRandomf: hwFloat; overload; // Returns a pseudo-random hwFloat. -function GetRandom(m: LongWord): LongWord; overload; // Returns a positive pseudo-random integer smaller than m. +function GetRandom(m: LongWord): LongWord; overload; inline; // Returns a positive pseudo-random integer smaller than m. +procedure AddRandomness(r: LongWord); inline; function rndSign(num: hwFloat): hwFloat; // Returns num with a random chance of having a inverted sign. + implementation var cirbuf: array[0..63] of Longword; n: byte; -function GetNext: Longword; +procedure AddRandomness(r: LongWord); inline; +begin +n:= (n + 1) and $3F; +cirbuf[n]:= cirbuf[n] xor r +end; + +function GetNext: Longword; inline; begin n:= (n + 1) and $3F; cirbuf[n]:= @@ -79,7 +87,7 @@ GetRandomf.QWordValue:= GetNext end; -function GetRandom(m: LongWord): LongWord; +function GetRandom(m: LongWord): LongWord; inline; begin GetNext; GetRandom:= GetNext mod m
--- a/hedgewars/uScript.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uScript.pas Thu Aug 30 12:13:24 2012 -0400 @@ -185,10 +185,19 @@ end; function lc_parsecommand(L : Plua_State) : LongInt; Cdecl; +var t: PChar; + i,c: LongWord; + s: shortstring; begin if lua_gettop(L) = 1 then begin - ParseCommand(lua_tostring(L ,1), true); + t:= lua_tolstring(L,1,@c); + + for i:= 1 to c do s[i]:= t[i-1]; + s[0]:= char(c); + + ParseCommand(s, true); + end else LuaError('Lua: Wrong number of parameters passed to ParseCommand!'); @@ -314,7 +323,7 @@ health:= lua_tointeger(L, 3) else health:= cHealthCaseAmount; - gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), HealthCrate, health); + gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), HealthCrate, health, 0); if gear <> nil then lua_pushinteger(L, gear^.uid) else @@ -326,14 +335,16 @@ function lc_spawnammocrate(L: PLua_State): LongInt; Cdecl; var gear: PGear; begin - if lua_gettop(L) <> 3 then + if (lua_gettop(L) <> 3) and (lua_gettop(L) <> 4) then begin LuaError('Lua: Wrong number of parameters passed to SpawnAmmoCrate!'); lua_pushnil(L); end else begin - gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), AmmoCrate, lua_tointeger(L, 3)); + if (lua_gettop(L) = 3) then + gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), AmmoCrate, lua_tointeger(L, 3), 0) + else gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), AmmoCrate, lua_tointeger(L, 3), lua_tointeger(L, 4)); if gear <> nil then lua_pushinteger(L, gear^.uid) else @@ -345,15 +356,16 @@ function lc_spawnutilitycrate(L: PLua_State): LongInt; Cdecl; var gear: PGear; begin - if lua_gettop(L) <> 3 then + if (lua_gettop(L) <> 3) and (lua_gettop(L) <> 4) then begin LuaError('Lua: Wrong number of parameters passed to SpawnUtilityCrate!'); lua_pushnil(L); end else - begin - gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), - UtilityCrate, lua_tointeger(L, 3)); + begin + if (lua_gettop(L) = 3) then + gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), UtilityCrate, lua_tointeger(L, 3), 0) + else gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), UtilityCrate, lua_tointeger(L, 3), lua_tointeger(L, 4)); if gear <> nil then lua_pushinteger(L, gear^.uid) else @@ -972,18 +984,15 @@ prevgear^.Active := false; prevgear^.State:= prevgear^.State and not gstHHDriven; prevgear^.Z := cHHZ; - RemoveGearFromList(prevgear); - InsertGearToList(prevgear); - - CurrentHedgehog := gear^.Hedgehog; -// yes, this will muck up turn sequence - CurrentTeam := gear^.Hedgehog^.Team; + prevgear^.Message:= prevgear^.Message or gmRemoveFromList or gmAddToList; + + SwitchCurrentHedgehog(gear^.Hedgehog); + CurrentTeam:= CurrentHedgehog^.Team; gear^.State:= gear^.State or gstHHDriven; gear^.Active := true; gear^.Z := cCurrHHZ; - RemoveGearFromList(gear); - InsertGearToList(gear); + gear^.Message:= gear^.Message or gmRemoveFromList or gmAddToList; end end; lc_switchhog:= 0
--- a/hedgewars/uSound.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uSound.pas Thu Aug 30 12:13:24 2012 -0400 @@ -47,7 +47,7 @@ // Obvious music commands for music track procedure SetMusic(enabled: boolean); // Enable/disable music. -procedure SetMusicName(musicname: shortstring); // Enable/disable music and set name of musicfile to play. +procedure SetMusicName(musicname: shortstring); // Enable/disable music and set name of the file to play. procedure PlayMusic; // Play music from the start. procedure PauseMusic; // Pause music. procedure ResumeMusic; // Resume music from pause point. @@ -82,6 +82,16 @@ procedure PlayNextVoice; +// GLOBAL FUNCTIONS + +// Drastically lower the volume when we lose focus (and restore the previous value). +procedure DampenAudio; +procedure UndampenAudio; + +// Mute/Unmute audio +procedure MuteAudio; + + // MISC // Set the initial volume @@ -93,25 +103,22 @@ // Returns a pointer to the voicepack with the given name. function AskForVoicepack(name: shortstring): Pointer; -// Drastically lower the volume when we lose focus (and restore the previous value). -procedure DampenAudio; -procedure UndampenAudio; implementation uses uVariables, uConsole, uUtils, uCommands, uDebug; const chanTPU = 32; var Volume: LongInt; + cInitVolume: LongInt; + previousVolume: LongInt; // cached volume value lastChan: array [TSound] of LongInt; voicepacks: array[0..cMaxTeams] of TVoicepack; defVoicepack: PVoicepack; - Mus: PMixMusic = nil; + Mus: PMixMusic = nil; // music pointer MusicFN: shortstring; // music file name - previousVolume: LongInt; // cached volume value isMusicEnabled: boolean; isSoundEnabled: boolean; isSEBackup: boolean; - cInitVolume: LongInt; function AskForVoicepack(name: shortstring): Pointer; @@ -180,7 +187,7 @@ WriteLnToConsole(msgOK); Mix_AllocateChannels(Succ(chanTPU)); - ChangeVolume(cInitVolume); + ChangeVolume(cInitVolume); end; procedure ResetSound; @@ -446,7 +453,7 @@ function ChangeVolume(voldelta: LongInt): LongInt; begin ChangeVolume:= 0; - if not isSoundEnabled then + if (not isSoundEnabled) or (voldelta = 0) then exit; inc(Volume, voldelta); @@ -458,20 +465,52 @@ Volume:= Mix_Volume(-1, -1); if isMusicEnabled then Mix_VolumeMusic(Volume * 4 div 8); - ChangeVolume:= Volume * 100 div MIX_MAX_VOLUME + ChangeVolume:= Volume * 100 div MIX_MAX_VOLUME; + + if (isMusicEnabled) then + if (Volume = 0) then + PauseMusic + else + ResumeMusic; + + isAudioMuted:= (Volume = 0); end; procedure DampenAudio; begin + if (isAudioMuted) then + exit; previousVolume:= Volume; ChangeVolume(-Volume * 7 div 9); end; procedure UndampenAudio; begin + if (isAudioMuted) then + exit; ChangeVolume(previousVolume - Volume); end; +procedure MuteAudio; +begin + if (not isSoundEnabled) then + exit; + + if (isAudioMuted) then + begin + ResumeMusic; + ChangeVolume(previousVolume); + end + else + begin + PauseMusic; + previousVolume:= Volume; + ChangeVolume(-Volume); + end; + + // isAudioMuted is updated in ChangeVolume +end; + procedure SetMusic(enabled: boolean); begin isMusicEnabled:= enabled; @@ -534,15 +573,23 @@ CurrentTeam^.voicepack:= AskForVoicepack(s) end; +procedure chMute(var s: shortstring); +begin + s:= s; // avoid compiler hint + MuteAudio; +end; + procedure initModule; var t: LongInt; i: TSound; begin RegisterVariable('voicepack', @chVoicepack, false); + RegisterVariable('mute' , @chMute , true ); MusicFN:=''; isMusicEnabled:= true; isSoundEnabled:= true; + isAudioMuted:= false; isSEBackup:= isSoundEnabled; cInitVolume:= 100; Volume:= 0;
--- a/hedgewars/uTeams.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uTeams.pas Thu Aug 30 12:13:24 2012 -0400 @@ -35,6 +35,7 @@ procedure RestoreTeamsFromSave; function CheckForWin: boolean; procedure TeamGoneEffect(var Team: TTeam); +procedure SwitchCurrentHedgehog(newHog: PHedgehog); implementation uses uLocale, uAmmos, uChat, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug, uScript, @@ -184,7 +185,7 @@ end until (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil); -CurrentHedgehog:= @(CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog]); +SwitchCurrentHedgehog(@(CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog])); {$IFDEF USE_TOUCH_INTERFACE} if (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NoCrosshair) = 0 then begin @@ -488,7 +489,7 @@ with CurrentTeam^ do begin SplitBySpace(id, s); - CurrentHedgehog:= @Hedgehogs[HedgehogsNumber]; + SwitchCurrentHedgehog(@Hedgehogs[HedgehogsNumber]); val(id, CurrentHedgehog^.BotLevel, c); Gear:= AddGear(0, 0, gtHedgehog, 0, _0, _0, 0); SplitBySpace(s, id); @@ -618,6 +619,21 @@ RecountAllTeamsHealth(); end; +procedure SwitchCurrentHedgehog(newHog: PHedgehog); +var oldCI, newCI: boolean; + oldHH: PHedgehog; +begin + oldCI:= (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.CollisionIndex >= 0); + newCI:= (newHog^.Gear <> nil) and (newHog^.Gear^.CollisionIndex >= 0); + if oldCI then DeleteCI(CurrentHedgehog^.Gear); + if newCI then DeleteCI(newHog^.Gear); + oldHH:= CurrentHedgehog; + CurrentHedgehog:= newHog; + if oldCI then AddGearCI(oldHH^.Gear); + if newCI then AddGearCI(newHog^.Gear) +end; + + procedure initModule; begin RegisterVariable('addhh', @chAddHH, false);
--- a/hedgewars/uTouch.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uTouch.pas Thu Aug 30 12:13:24 2012 -0400 @@ -22,7 +22,7 @@ interface -uses SysUtils, uConsole, uVariables, SDLh, uFloat, uConsts, uCommands, uIO, GLUnit, uTypes, uCaptions, uAmmos, uWorld; +uses SysUtils, uConsole, uVariables, SDLh, uFloat, uConsts, uCommands, uIO, GLUnit, uTypes, uCaptions, uAmmos, uWorld, uMobile; procedure initModule; @@ -557,7 +557,7 @@ isOnCrosshair:= isOnRect((x-HalfRectSize), (y-HalfRectSize), RectSize, RectSize, finger); printFinger(finger); WriteLnToConsole(inttostr(finger.x) + ' ' + inttostr(x)); - WriteLnToConsole(inttostr(x) + ' ' + inttostr(y) + ' ' + inttostr(round(Android_JNI_getDensity() * 10))); + WriteLnToConsole(inttostr(x) + ' ' + inttostr(y) + ' ' + inttostr(round(uMobile.getScreenDPI * 10))); end; function isOnCurrentHog(finger: TTouch_Data): boolean; @@ -632,7 +632,6 @@ var index: Longword; //uRenderCoordScaleX, uRenderCoordScaleY: Longword; - density: Single; begin buttonsDown:= 0; @@ -640,13 +639,7 @@ for index := 0 to High(fingers) do fingers[index].id := nilFingerId; -{$IFDEF ANDROID} - density:= Android_JNI_getDensity(); -{$ELSE} - density:= 1.0; -{$ENDIF} - - rectSize:= round(baseRectSize * density); + rectSize:= round(baseRectSize * uMobile.getScreenDPI); halfRectSize:= rectSize shl 1; end;
--- a/hedgewars/uTypes.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uTypes.pas Thu Aug 30 12:13:24 2012 -0400 @@ -102,7 +102,7 @@ gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 44 gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 50 gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 55 - gtNapalmBomb, gtSnowball, gtFlake, gtStructure, gtLandGun, gtTardis, gtIceGun); // 62 + gtNapalmBomb, gtSnowball, gtFlake, gtStructure, gtLandGun, gtTardis, gtIceGun, gtAddAmmo, gtGenericFaller); // 62 // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.) TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire, @@ -249,7 +249,8 @@ Tag: LongInt; Tex: PTexture; Z: Longword; - IntersectGear: PGear; + CollisionMask: Word; + LinkedGear: PGear; FlightTime: Longword; uid: Longword; ImpactSound: TSound; // first sound, others have to be after it in the sounds def. @@ -259,6 +260,10 @@ LastDamage: PHedgehog; end; TPGearArray = array of PGear; + PGearArrayS = record + size: LongWord; + ar: ^TPGearArray; + end; PVisualGear = ^TVisualGear; TVGearStepProcedure = procedure (Gear: PVisualGear; Steps: Longword); @@ -335,6 +340,8 @@ HatTex: PTexture; Ammo: PHHAmmo; CurAmmoType: TAmmoType; + PickUpType: LongWord; + PickUpDelay: LongInt; AmmoStore: Longword; Team: PTeam; MultiShootAttacks: Longword; @@ -399,24 +406,27 @@ sidHellishBomb, sidDrill, sidBallgun, sidNapalm, sidRCPlane, sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime, sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack, - sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb, sidSineGun, sidFlamethrower, - sidSMine, sidHammer, sidResurrector, sidDrillStrike, sidSnowball, sidNothing, sidTardis, - sidStructure, sidLandGun, sidIceGun); + sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb, + sidSineGun, sidFlamethrower,sidSMine, sidHammer, sidResurrector, + sidDrillStrike, sidSnowball, sidNothing, sidTardis, + sidStructure, sidLandGun, sidIceGun); TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused, sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync, sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady, - sidBounce1, sidBounce2, sidBounce3, sidBounce4, sidBounce5, sidBounce); + sidBounce1, sidBounce2, sidBounce3, sidBounce4, sidBounce5, sidBounce, + sidMute); // Events that are important for the course of the game or at least interesting for other reasons TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw, - eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped, eidHurtSelf, - eidHomerun, eidGone); + eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped, + eidHurtSelf, eidHomerun, eidGone); TGoalStrId = (gidCaption, gidSubCaption, gidForts, gidLowGravity, gidInvulnerable, gidVampiric, gidKarma, gidKing, gidPlaceHog, gidArtillery, - gidSolidLand, gidSharedAmmo, gidMineTimer, gidNoMineTimer, gidRandomMineTimer, - gidDamageModifier, gidResetHealth, gidAISurvival, gidInfAttack, gidResetWeps, gidPerHogAmmo, gidTagTeam); + gidSolidLand, gidSharedAmmo, gidMineTimer, gidNoMineTimer, + gidRandomMineTimer, gidDamageModifier, gidResetHealth, gidAISurvival, + gidInfAttack, gidResetWeps, gidPerHogAmmo, gidTagTeam); TLandArray = packed array of array of LongWord; TCollisionArray = packed array of array of Word;
--- a/hedgewars/uVariables.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uVariables.pas Thu Aug 30 12:13:24 2012 -0400 @@ -64,6 +64,7 @@ fastUntilLag : boolean; autoCameraOn : boolean; + CheckSum : LongWord; CampaignVariable: shortstring; GameTicks : LongWord; GameState : TGameState; @@ -99,6 +100,7 @@ cWaterLine : Word; cGearScrEdgesDist: LongInt; + isAudioMuted : boolean; // originally typed consts ExplosionBorderColor: LongWord; @@ -212,7 +214,7 @@ '', // ptData 'Graphics', // ptGraphics 'Themes', // ptThemes - 'Themes/Bamboo', // ptCurrTheme + 'Themes/avematan', // ptCurrTheme 'Teams', // ptTeams 'Maps', // ptMaps '', // ptMapCurrent @@ -2371,6 +2373,8 @@ (* gtLandGun *) , amLandGun (* gtTardis *) , amTardis (* gtIceGun *) , amIceGun +(* gtAddAmmo *) , amNothing +(* gtGenericFaller *) , amNothing ); var @@ -2533,6 +2537,7 @@ CursorMovementX := 0; CursorMovementY := 0; GameTicks := 0; + CheckSum := 0; cWaterLine := LAND_HEIGHT; cGearScrEdgesDist := 240; @@ -2614,10 +2619,8 @@ ExplosionBorderColor:= $FF808080; WaterOpacity:= $80; SDWaterOpacity:= $80; - GrayScale:= false; LuaGoals:= ''; - hiddenHedgehogsNumber:=0; end; procedure freeModule; @@ -2642,6 +2645,7 @@ cScriptName := ''; cReadyDelay := 5000; cStereoMode := smNone; + GrayScale := false; end; end.
--- a/hedgewars/uVisualGears.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uVisualGears.pas Thu Aug 30 12:13:24 2012 -0400 @@ -298,10 +298,8 @@ end; vgtDroplet: begin - dx:= 0.001 * (random(75) + 15); - dy:= -0.001 * (random(80) + 120); - if random(2) = 0 then - dx := -dx; + dx:= 0.001 * (random(180) - 90); + dy:= -0.001 * (random(160) + 40); FrameTicks:= 250 + random(1751); Frame:= random(3) end; @@ -642,7 +640,7 @@ vgtSmoke: DrawTextureF(SpritesData[sprSmoke].Texture, Gear^.scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 7 - Gear^.Frame, 1, SpritesData[sprSmoke].Width, SpritesData[sprSmoke].Height); vgtSmokeWhite: DrawSprite(sprSmokeWhite, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame); vgtDust: if Gear^.State = 1 then - DrawSprite(sprSnowDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame) + DrawSpriteRotatedF(sprSnowDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame, 1, Gear^.Angle) else DrawSprite(sprDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame); vgtFire: if (Gear^.State and gstTmpFlag) = 0 then @@ -651,10 +649,10 @@ DrawTextureF(SpritesData[sprFlame].Texture, Gear^.FrameTicks / 900, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, (RealTicks shr 7 + Gear^.Frame) mod 8, 1, 16, 16); vgtSplash: if SuddenDeathDmg then //DrawSprite(sprSDSplash, round(Gear^.X) + WorldDx - 40, round(Gear^.Y) + WorldDy - 58, 19 - (Gear^.FrameTicks div 37)) - DrawTextureF(SpritesData[sprSDSplash].Texture, Gear^.scale, round(Gear^.X + WorldDx), round(Gear^.Y + WorldDy - ((SpritesData[sprSDSplash].Height+8)*Gear^.Scale)/2), 19 - (Gear^.FrameTicks div 37), 1, SpritesData[sprSDSplash].Width, SpritesData[sprSDSplash].Height) + DrawTextureF(SpritesData[sprSDSplash].Texture, Gear^.scale, round(Gear^.X + WorldDx), round(Gear^.Y + WorldDy - ((SpritesData[sprSDSplash].Height+8)*Gear^.Scale)/2), 19 - (Gear^.FrameTicks div Gear^.Timer div 37), 1, SpritesData[sprSDSplash].Width, SpritesData[sprSDSplash].Height) else //DrawSprite(sprSplash, round(Gear^.X) + WorldDx - 40, round(Gear^.Y) + WorldDy - 58, 19 - (Gear^.FrameTicks div 37)); - DrawTextureF(SpritesData[sprSplash].Texture, Gear^.scale, round(Gear^.X + WorldDx), round(Gear^.Y + WorldDy - ((SpritesData[sprSplash].Height+8)*Gear^.Scale)/2), 19 - (Gear^.FrameTicks div 37), 1, SpritesData[sprSplash].Width, SpritesData[sprSplash].Height); + DrawTextureF(SpritesData[sprSplash].Texture, Gear^.scale, round(Gear^.X + WorldDx), round(Gear^.Y + WorldDy - ((SpritesData[sprSplash].Height+8)*Gear^.Scale)/2), 19 - (Gear^.FrameTicks div Gear^.Timer div 37), 1, SpritesData[sprSplash].Width, SpritesData[sprSplash].Height); vgtDroplet: if SuddenDeathDmg then DrawSprite(sprSDDroplet, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame) else
--- a/hedgewars/uWorld.pas Mon Jul 23 19:15:59 2012 +0300 +++ b/hedgewars/uWorld.pas Thu Aug 30 12:13:24 2012 -0400 @@ -216,11 +216,7 @@ {$IFDEF USE_TOUCH_INTERFACE} //positioning of the buttons -{$IFDEF ANDROID} -buttonScale:= Android_JNI_getDensity()/cDefaultZoomLevel; -{$ELSE} -buttonScale:= 1.5/cDefaultZoomLevel; -{$ENDIF} +buttonScale:= uMobile.getScreenDPI/cDefaultZoomLevel; with JumpWidget do @@ -1369,6 +1365,19 @@ r.w:= TeamHealthBarWidth + 1; r.h:= HealthTex^.h - 4; DrawTextureFromRect(16, cScreenHeight + DrawHealthY + smallScreenOffset + 2, @r, HealthTex); + if not hasGone and (TeamHealth > 1) then + begin + Tint(Clan^.Color shl 8 or $FF); + for i:= 0 to cMaxHHIndex do + if Hedgehogs[i].Gear <> nil then + begin + inc(h,Hedgehogs[i].Gear^.Health); + if h < TeamHealth then DrawTexture(15 + h*TeamHealthBarWidth div TeamHealth, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture); + end; + if TeamsCount * 20 > Longword(cScreenHeight) div 5 then + Tint($FF,$FF,$FF,$80) + else Tint($FF, $FF, $FF, $FF); + end; end; end; if smallScreenOffset <> 0 then @@ -1517,14 +1526,16 @@ end; if SoundTimerTicks >= 50 then - begin - SoundTimerTicks:= 0; - if cVolumeDelta <> 0 then - begin - str(ChangeVolume(cVolumeDelta), s); - AddCaption(Format(trmsg[sidVolume], s), cWhiteColor, capgrpVolume) - end - end; +begin + SoundTimerTicks:= 0; + if cVolumeDelta <> 0 then + begin + str(ChangeVolume(cVolumeDelta), s); + AddCaption(Format(trmsg[sidVolume], s), cWhiteColor, capgrpVolume); + end; + if isAudioMuted then + AddCaption(trmsg[sidMute], cWhiteColor, capgrpVolume) +end; if GameState = gsConfirm then DrawTextureCentered(0, (cScreenHeight shr 1), ConfirmTexture); @@ -1593,9 +1604,10 @@ isFirstFrame:= false end; +var PrevSentPointTime: LongWord = 0; + procedure MoveCamera; var EdgesDist, wdy, shs,z: LongInt; - PrevSentPointTime: LongWord = 0; begin {$IFNDEF MOBILE} if (not (CurrentTeam^.ExtDriven and isCursorVisible and (not bShowAmmoMenu))) and cHasFocus and (GameState <> gsConfirm) then @@ -1605,7 +1617,7 @@ if not PlacingHogs and (FollowGear <> nil) and (not isCursorVisible) and (not bShowAmmoMenu) and (not fastUntilLag) then if (not autoCameraOn) then FollowGear:= nil - else + else if ((abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y)) > 4) then begin FollowGear:= nil; @@ -1818,6 +1830,7 @@ Frames:= 0; WorldDx:= -512; WorldDy:= -256; + PrevSentPointTime:= 0; FPS:= 0; CountTicks:= 0;
--- a/misc/liblua/CMakeLists.txt Mon Jul 23 19:15:59 2012 +0300 +++ b/misc/liblua/CMakeLists.txt Thu Aug 30 12:13:24 2012 -0400 @@ -7,6 +7,8 @@ add_definitions(-DLUA_BUILD_AS_DLL) add_library(lua SHARED ${lua_src}) + set(LUA_LIBRARY lua.dll) + set_target_properties(lua PROPERTIES PREFIX "") install(TARGETS lua RUNTIME DESTINATION ${target_dir}) else(WIN32)
--- a/misc/quazip/CMakeLists.txt Mon Jul 23 19:15:59 2012 +0300 +++ b/misc/quazip/CMakeLists.txt Thu Aug 30 12:13:24 2012 -0400 @@ -1,7 +1,9 @@ set(QT_USE_QTCORE TRUE) find_package(Qt4 REQUIRED) -include(${QT_USE_FILE}) +if(NOT CROSSAPPLE) + include(${QT_USE_FILE}) +endif() file(GLOB SRCS "*.c" "*.cpp")
--- a/project_files/HedgewarsMobile/Classes/DefinesAndMacros.h Mon Jul 23 19:15:59 2012 +0300 +++ b/project_files/HedgewarsMobile/Classes/DefinesAndMacros.h Thu Aug 30 12:13:24 2012 -0400 @@ -67,7 +67,7 @@ #define MISSIONS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Missions/Maps/"] #define TRAININGS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Missions/Training/"] #define LOCALE_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Locale/"] -#define SCRIPTS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Scripts/plist/"] +#define SCRIPTS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Scripts/Multiplayer/"] #define MSG_MEMCLEAN() DLog(@"has cleaned up some memory"); #define MSG_DIDUNLOAD() DLog(@"unloaded");
--- a/project_files/HedgewarsMobile/Classes/HWUtils.m Mon Jul 23 19:15:59 2012 +0300 +++ b/project_files/HedgewarsMobile/Classes/HWUtils.m Thu Aug 30 12:13:24 2012 -0400 @@ -22,7 +22,6 @@ #import <sys/sysctl.h> #import <netinet/in.h> #import <SystemConfiguration/SCNetworkReachability.h> -#import "SDL_uikitwindow.h" static NSString *cachedModel = nil;
--- a/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.h Mon Jul 23 19:15:59 2012 +0300 +++ b/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.h Thu Aug 30 12:13:24 2012 -0400 @@ -18,7 +18,7 @@ #import <UIKit/UIKit.h> -#import "SDL_uikitappdelegate.h" +#import "../src/video/uikit/SDL_uikitappdelegate.h" @class MainMenuViewController;
--- a/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m Mon Jul 23 19:15:59 2012 +0300 +++ b/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m Thu Aug 30 12:13:24 2012 -0400 @@ -85,7 +85,7 @@ // launch the preview here so that we're sure the tcp channel is open pthread_t thread_id; - pthread_create(&thread_id, NULL, (void *)GenLandPreview, (void *)port); + pthread_create(&thread_id, NULL, (void *(*)(void *))GenLandPreview, (void *)port); pthread_detach(thread_id); DLog(@"Waiting for a client on port %d", port);
--- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Mon Jul 23 19:15:59 2012 +0300 +++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Thu Aug 30 12:13:24 2012 -0400 @@ -72,7 +72,8 @@ -(NSArray *)listOfScripts { if (listOfScripts == nil) - self.listOfScripts = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCRIPTS_DIRECTORY() error:NULL]; + self.listOfScripts = [[[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCRIPTS_DIRECTORY() error:NULL] + filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF ENDSWITH '.lua'"]]; return listOfScripts; } @@ -202,11 +203,9 @@ self.lastIndexPath_we = indexPath; } } else { - cell.textLabel.text = [[self.listOfScripts objectAtIndex:row] stringByDeletingPathExtension]; - NSString *str = [NSString stringWithFormat:@"%@/%@",SCRIPTS_DIRECTORY(),[self.listOfScripts objectAtIndex:row]]; - NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:str]; - cell.detailTextLabel.text = [dict objectForKey:@"description"]; - [dict release]; + cell.textLabel.text = [[[self.listOfScripts objectAtIndex:row] stringByDeletingPathExtension] + stringByReplacingOccurrencesOfString:@"_" withString:@" "]; + //cell.detailTextLabel.text = ; if ([[self.listOfScripts objectAtIndex:row] isEqualToString:self.selectedScript]) { UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; cell.accessoryView = checkbox; @@ -223,11 +222,11 @@ return cell; } --(CGFloat) tableView:(UITableView *)aTableView heightForHeaderInSection:(NSInteger)section { +-(CGFloat) tableView:(UITableView *)aTableView heightForHeaderInSection:(NSInteger) section { return IS_IPAD() ? 0 : 50; } --(UIView *)tableView:(UITableView *)aTableView viewForHeaderInSection:(NSInteger)section { +-(UIView *)tableView:(UITableView *)aTableView viewForHeaderInSection:(NSInteger) section { if (IS_IPAD()) return nil; UIView *theView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 30)]; @@ -239,6 +238,32 @@ return [theView autorelease]; } +-(CGFloat) tableView:(UITableView *)aTableView heightForFooterInSection:(NSInteger) section { + return 40; +} + +-(UIView *)tableView:(UITableView *)aTableView viewForFooterInSection:(NSInteger) section { + NSInteger height = 40; + UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width, height)]; + footer.backgroundColor = [UIColor clearColor]; + footer.autoresizingMask = UIViewAutoresizingFlexibleWidth; + + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width*80/100, height)]; + label.center = CGPointMake(aTableView.frame.size.width/2, height/2); + label.textAlignment = UITextAlignmentCenter; + label.font = [UIFont italicSystemFontOfSize:12]; + label.textColor = [UIColor whiteColor]; + label.numberOfLines = 2; + label.backgroundColor = [UIColor clearColor]; + label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + + label.text = NSLocalizedString(@"Setting a Style might force a particular Scheme or Weapon configuration.",@""); + + [footer addSubview:label]; + [label release]; + return [footer autorelease]; +} + #pragma mark - #pragma mark Table view delegate -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { @@ -287,29 +312,30 @@ self.selectedScript = [self.listOfScripts objectAtIndex:newRow]; // some styles disable or force the choice of a particular scheme/weaponset - NSString *path = [[NSString alloc] initWithFormat:@"%@/%@",SCRIPTS_DIRECTORY(),self.selectedScript]; - NSDictionary *scriptDict = [[NSDictionary alloc] initWithContentsOfFile:path]; + NSString *path = [[NSString alloc] initWithFormat:@"%@/%@.cfg",SCRIPTS_DIRECTORY(),[self.selectedScript stringByDeletingPathExtension]]; + NSString *configFile = [[NSString alloc] initWithContentsOfFile:path]; [path release]; - self.scriptCommand = [scriptDict objectForKey:@"command"]; - NSString *scheme = [scriptDict objectForKey:@"scheme"]; - if ([scheme isEqualToString:@""]) { + NSArray *scriptOptions = [configFile componentsSeparatedByString:@"\n"]; + [configFile release]; + + self.scriptCommand = [NSString stringWithFormat:@"escript Scripts/Multiplayer/%@",self.selectedScript]; + NSString *scheme = [scriptOptions objectAtIndex:0]; + if ([scheme isEqualToString:@"locked"]) { self.selectedScheme = @"Default.plist"; [self.topControl setEnabled:NO forSegmentAtIndex:0]; } else { - self.selectedScheme = scheme; + self.selectedScheme = [NSString stringWithFormat:@"%@.plist",scheme]; [self.topControl setEnabled:YES forSegmentAtIndex:0]; } - NSString *weapon = [scriptDict objectForKey:@"weapon"]; - if ([weapon isEqualToString:@""]) { + NSString *weapon = [scriptOptions objectAtIndex:1]; + if ([weapon isEqualToString:@"locked"]) { self.selectedWeapon = @"Default.plist"; [self.topControl setEnabled:NO forSegmentAtIndex:1]; } else { - self.selectedWeapon = weapon; + self.selectedWeapon = [NSString stringWithFormat:@"%@.plist",weapon]; [self.topControl setEnabled:YES forSegmentAtIndex:1]; } - - [scriptDict release]; } [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Mon Jul 23 19:15:59 2012 +0300 +++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Thu Aug 30 12:13:24 2012 -0400 @@ -78,6 +78,7 @@ 615E76BE14E4421200FBA131 /* MGSplitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 615E76BB14E4421200FBA131 /* MGSplitViewController.m */; }; 615FEAE212A2A6640098EE92 /* localplayButton~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 615FEADF12A2A6640098EE92 /* localplayButton~ipad.png */; }; 615FEAE312A2A6640098EE92 /* localplayButton~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 615FEAE012A2A6640098EE92 /* localplayButton~iphone.png */; }; + 616065A8159A71FD00CFAEF4 /* hwclassic.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 616065A7159A71FD00CFAEF4 /* hwclassic.mp3 */; }; 616245D114E6160200CC97FB /* libFreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6162456714E6159C00CC97FB /* libFreetype.a */; }; 6163EE7E11CC2600001C0453 /* SingleWeaponViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6163EE7D11CC2600001C0453 /* SingleWeaponViewController.m */; }; 6165920D11CA9BA200D6E256 /* FlagsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591E111CA9BA200D6E256 /* FlagsViewController.m */; }; @@ -182,7 +183,7 @@ 619C5AF4124F7E3100D041AE /* LuaPas.pas in Sources */ = {isa = PBXBuildFile; fileRef = 619C5AF3124F7E3100D041AE /* LuaPas.pas */; }; 619C5BA2124FA59000D041AE /* MapPreviewButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 619C5BA1124FA59000D041AE /* MapPreviewButtonView.m */; }; 61A1188511683A8C00359010 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A117FE1168322700359010 /* CoreGraphics.framework */; settings = {ATTRIBUTES = (Required, ); }; }; - 61A19AFC14D20170004B1E6D /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A19AEA14D2010A004B1E6D /* libSDL.a */; }; + 61A19AFC14D20170004B1E6D /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A19AEA14D2010A004B1E6D /* libSDL2.a */; }; 61A19B7714D20B7A004B1E6D /* libSDL_image.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A19B6614D20B6C004B1E6D /* libSDL_image.a */; }; 61A19BC714D20CE7004B1E6D /* libSDL_ttf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A19BC614D20CDA004B1E6D /* libSDL_ttf.a */; }; 61A19BFA14D20D95004B1E6D /* libSDL_net.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A19BF914D20D83004B1E6D /* libSDL_net.a */; }; @@ -402,6 +403,7 @@ 615FEADE12A2A6640098EE92 /* localplayButton@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "localplayButton@2x~iphone.png"; path = "Resources/Frontend/localplayButton@2x~iphone.png"; sourceTree = "<group>"; }; 615FEADF12A2A6640098EE92 /* localplayButton~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "localplayButton~ipad.png"; path = "Resources/Frontend/localplayButton~ipad.png"; sourceTree = "<group>"; }; 615FEAE012A2A6640098EE92 /* localplayButton~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "localplayButton~iphone.png"; path = "Resources/Frontend/localplayButton~iphone.png"; sourceTree = "<group>"; }; + 616065A7159A71FD00CFAEF4 /* hwclassic.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = hwclassic.mp3; path = Resources/hwclassic.mp3; sourceTree = "<group>"; }; 6163EE7C11CC2600001C0453 /* SingleWeaponViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleWeaponViewController.h; sourceTree = "<group>"; }; 6163EE7D11CC2600001C0453 /* SingleWeaponViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SingleWeaponViewController.m; sourceTree = "<group>"; }; 61641FE31437CDAA006E049C /* DefinesAndMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DefinesAndMacros.h; path = Classes/DefinesAndMacros.h; sourceTree = "<group>"; }; @@ -641,7 +643,7 @@ 616245D114E6160200CC97FB /* libFreetype.a in Frameworks */, 619599451364C83D00B429B6 /* libLua.a in Frameworks */, 6195981F1364BCEF00B429B6 /* libTremor.a in Frameworks */, - 61A19AFC14D20170004B1E6D /* libSDL.a in Frameworks */, + 61A19AFC14D20170004B1E6D /* libSDL2.a in Frameworks */, 61A19B7714D20B7A004B1E6D /* libSDL_image.a in Frameworks */, 61A19C2414D20F5A004B1E6D /* libSDL_mixer.a in Frameworks */, 61A19BFA14D20D95004B1E6D /* libSDL_net.a in Frameworks */, @@ -808,6 +810,7 @@ 612CABCA1391D3D1005E9596 /* Sounds */ = { isa = PBXGroup; children = ( + 616065A7159A71FD00CFAEF4 /* hwclassic.mp3 */, 611EE973122A9C4100DF6938 /* clickSound.caf */, 611EE9D7122AA10A00DF6938 /* backSound.caf */, 611EE9D8122AA10A00DF6938 /* selSound.caf */, @@ -967,7 +970,7 @@ 61A19AE414D2010A004B1E6D /* Products */ = { isa = PBXGroup; children = ( - 61A19AEA14D2010A004B1E6D /* libSDL.a */, + 61A19AEA14D2010A004B1E6D /* libSDL2.a */, 61A19AEC14D2010A004B1E6D /* testsdl.app */, ); name = Products; @@ -1315,10 +1318,10 @@ remoteRef = 619599431364C82B00B429B6 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 61A19AEA14D2010A004B1E6D /* libSDL.a */ = { + 61A19AEA14D2010A004B1E6D /* libSDL2.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = libSDL.a; + path = libSDL2.a; remoteRef = 61A19AE914D2010A004B1E6D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1455,6 +1458,7 @@ 61156521147F48B6006729A9 /* About.strings in Resources */, 61156523147F48B7006729A9 /* Localizable.strings in Resources */, 61156525147F48B8006729A9 /* Scheme.strings in Resources */, + 616065A8159A71FD00CFAEF4 /* hwclassic.mp3 in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1472,7 +1476,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\n\n#create config.inc\necho \"Updating config file...\"\nPROTO=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep HEDGEWARS_PROTO_VER | cut -d ' ' -f 2 | cut -d ')' -f 1`\nMAJN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MAJOR | xargs | cut -d ' ' -f 2 |cut -d ')' -f 1`\nMINN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MINOR | xargs | cut -d ' ' -f 2 |cut -d ')' -f 1`\nPATN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_PATCH | xargs | cut -d ' ' -f 2 |cut -d '$' -f 1`\nREVN=-`/usr/local/bin/hg id -n ${PROJECT_DIR}/../../`\necho \"const cNetProtoVersion = $PROTO; const cVersionString = '${MAJN}.${MINN}.${PATN}${REVN}'; const cLuaLibrary = '';\" > ${PROJECT_DIR}/config.inc\n\necho \"Copying Data...\"\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\necho \"Fetching additional graphics from QTfrontend...\"\nmkdir ${PROJECT_DIR}/Data/Graphics/Icons\ncp ${PROJECT_DIR}/../../QTfrontend/res/{btn*,icon*,StatsMedal*,ammopic*}.png ${PROJECT_DIR}/Data/Graphics/Icons/\n\necho \"Removing text and dummy files...\"\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg* -delete\nfind ${PROJECT_DIR}/Data -name *.psd -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\nfind ${PROJECT_DIR}/Data -name *.orig -delete\nfind ${PROJECT_DIR}/Data -name *.ts -delete\n\n#delete dummy maps and hats, misc stuff\nrm -rf ${PROJECT_DIR}/Data/Maps/test*\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/{TeamCap,TeamHeadband,TeamHair}\nrm -rf ${PROJECT_DIR}/Data/misc/\n\n#delete forbidden maps and WIP themes (remember to check that no Map uses them)\nrm -rf ${PROJECT_DIR}/Data/Maps/{Cheese,FlightJoust}\nrm -rf ${PROJECT_DIR}/Data/Themes/{Beach,Digital}\n\n#delete all names, reserved hats and unused fonts\nrm -rf ${PROJECT_DIR}/Data/Names/\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/\nrm -rf ${PROJECT_DIR}/Data/Fonts/{wqy-zenhei.ttc,DroidSansFallback.ttf}\n\necho \"Handling audio files...\"\n#copy mono audio\ncp -R ${PROJECT_DIR}/../AudioMono/* ${PROJECT_DIR}/Data/\n#delete the Classic voice\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/Classic\n#delete the main theme file\nrm -rf ${PROJECT_DIR}/Data/Music/main_theme.ogg\n\n#remove unused voices\nfor i in {Amazing,Brilliant,Bugger,Bungee,Cutitout,Drat,Excellent,Fire,FlawlessPossibility,Gonnagetyou,Grenade,Hmm,Justyouwait,Leavemealone,Ohdear,Ouch,Perfect,Revenge,Runaway,Solong,Thisoneismine,VictoryPossibility,Watchthis,Whatthe,Whoopsee}; do find Data/Sounds/voices/ -name $i.ogg -delete; done\n\necho \"Tweaking Data contents...\"\n#move Lua maps in Missions\nmkdir ${PROJECT_DIR}/Data/Missions/Maps/\nfor i in `ls ${PROJECT_DIR}/Data/Maps/`;\ndo \n if [[ `ls -f ${PROJECT_DIR}/Data/Maps/$i/map.lua 2> /dev/null` != '' ]];\n then\n mv ${PROJECT_DIR}/Data/Maps/$i ${PROJECT_DIR}/Data/Missions/Maps/;\n fi;\ndone;\n\n#workaround for missing map in CTF_Blizzard\nln -s ../../../Maps/Blizzard/map.png ${PROJECT_DIR}/Data/Missions/Maps/CTF_Blizzard/map.png\n#remove cfg files since we have plists\nfind ${PROJECT_DIR}/Data/Scripts -name *.cfg -delete\nif ((`ls ${PROJECT_DIR}/Data/Scripts/Multiplayer/*.lua|wc -l` >= `ls ${PROJECT_DIR}/Data/Scripts/plist/*.plist|wc -l` ))\nthen\necho \"${PROJECT_DIR}/Data/Scripts/Multiplayer/Normal.plist:0: warning, missing plist implementation of a Multiplayer script file\"\nfi\n\n#reduce the number of flakes for City\nsed -i -e 's/1500/50/' ${PROJECT_DIR}/Data/Themes/City/theme.cfg\n\necho \"Done\""; + shellScript = "SOURCE_DIR=${PROJECT_DIR}/../../\n\n#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\n\n#create config.inc\necho \"Updating config file...\"\nPROTO=`cat ${SOURCE_DIR}/CMakeLists.txt | grep HEDGEWARS_PROTO_VER | cut -d ' ' -f 2 | cut -d ')' -f 1`\nMAJN=`cat ${SOURCE_DIR}/CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MAJOR | xargs | cut -d ' ' -f 2 |cut -d ')' -f 1`\nMINN=`cat ${SOURCE_DIR}/CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MINOR | xargs | cut -d ' ' -f 2 |cut -d ')' -f 1`\nPATN=`cat ${SOURCE_DIR}/CMakeLists.txt | grep CPACK_PACKAGE_VERSION_PATCH | xargs | cut -d ' ' -f 2 |cut -d '$' -f 1`\nREVN=-`/usr/local/bin/hg id -n ${SOURCE_DIR}`\necho \"const cNetProtoVersion = $PROTO; const cVersionString = '${MAJN}.${MINN}.${PATN}${REVN}'; const cLuaLibrary = '';\" > ${PROJECT_DIR}/config.inc\n\necho \"Copying Data...\"\ncp -R ${SOURCE_DIR}/share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some other files\necho \"Fetching additional graphics...\"\nmkdir -p ${PROJECT_DIR}/Data/Graphics/Icons\ncp ${SOURCE_DIR}/QTfrontend/res/{btn*,icon*,StatsMedal*,ammopic*}.png ${PROJECT_DIR}/Data/Graphics/Icons/\ncp -R ${SOURCE_DIR}/project_files/Android-build/SDL-android-project/assets/Data/Graphics/Buttons ${PROJECT_DIR}/Data/Graphics/\n\necho \"Removing text and dummy files...\"\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg* -delete\nfind ${PROJECT_DIR}/Data -name *.psd -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\nfind ${PROJECT_DIR}/Data -name *.orig -delete\nfind ${PROJECT_DIR}/Data -name *.ts -delete\n\n#delete dummy maps and hats, misc stuff\nrm -rf ${PROJECT_DIR}/Data/Maps/test*\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/{TeamCap,TeamHeadband,TeamHair}\nrm -rf ${PROJECT_DIR}/Data/misc/\n\n#delete forbidden maps and WIP themes (remember to check that no Map uses them)\nrm -rf ${PROJECT_DIR}/Data/Maps/{Cheese,FlightJoust}\nrm -rf ${PROJECT_DIR}/Data/Themes/{Beach,Digital}\n\n#delete all names, reserved hats and unused fonts\nrm -rf ${PROJECT_DIR}/Data/Names/\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/\nrm -rf ${PROJECT_DIR}/Data/Fonts/{wqy-zenhei.ttc,DroidSansFallback.ttf}\n\necho \"Handling audio files...\"\n#copy mono audio\ncp -R ${SOURCE_DIR}/project_files/AudioMono/* ${PROJECT_DIR}/Data/\n#delete the Classic voice\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/Classic\n#delete the main theme file\nrm -rf ${PROJECT_DIR}/Data/Music/main_theme.ogg\n\n#remove unused voices\nfor i in {Amazing,Brilliant,Bugger,Bungee,Cutitout,Drat,Excellent,Fire,FlawlessPossibility,Gonnagetyou,Grenade,Hmm,Justyouwait,Leavemealone,Ohdear,Ouch,Perfect,Revenge,Runaway,Solong,Thisoneismine,VictoryPossibility,Watchthis,Whatthe,Whoopsee}; do find Data/Sounds/voices/ -name $i.ogg -delete; done\n\necho \"Tweaking Data contents...\"\n#move Lua maps in Missions\nmkdir ${PROJECT_DIR}/Data/Missions/Maps/\nfor i in `ls ${PROJECT_DIR}/Data/Maps/`;\ndo \n if [[ `ls -f ${PROJECT_DIR}/Data/Maps/$i/map.lua 2> /dev/null` != '' ]];\n then\n mv ${PROJECT_DIR}/Data/Maps/$i ${PROJECT_DIR}/Data/Missions/Maps/;\n fi;\ndone;\n\n#workaround for missing map in CTF_Blizzard\nln -s ../../../Maps/Blizzard/map.png ${PROJECT_DIR}/Data/Missions/Maps/CTF_Blizzard/map.png\n\n#reduce the number of flakes for City\nsed -i -e 's/1500/50/' ${PROJECT_DIR}/Data/Themes/City/theme.cfg\n\necho \"Done\""; showEnvVarsInLog = 0; }; 9283011B0F10CB2D00CC5A3C /* Build libfpc.a */ = { @@ -1740,7 +1744,6 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; @@ -1749,18 +1752,14 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_PEDANTIC = YES; GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_STRICT_SELECTOR_MATCH = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; GCC_WARN_UNKNOWN_PRAGMAS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/../../../Library/SDL/src/video\"/**", "\"$(SRCROOT)/../../../Library/SDL/include/\"", "\"$(SRCROOT)/../../../Library/SDL_net/\"", "\"$(SRCROOT)/../../../Library/SDL_mixer/\"", @@ -1850,7 +1849,6 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; @@ -1859,18 +1857,14 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_PEDANTIC = YES; GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_STRICT_SELECTOR_MATCH = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; GCC_WARN_UNKNOWN_PRAGMAS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/../../../Library/SDL/src/video\"/**", "\"$(SRCROOT)/../../../Library/SDL/include/\"", "\"$(SRCROOT)/../../../Library/SDL_net/\"", "\"$(SRCROOT)/../../../Library/SDL_mixer/\"", @@ -2002,7 +1996,6 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; @@ -2011,18 +2004,14 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_PEDANTIC = YES; GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_STRICT_SELECTOR_MATCH = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; GCC_WARN_UNKNOWN_PRAGMAS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/../../../Library/SDL/src/video\"/**", "\"$(SRCROOT)/../../../Library/SDL/include/\"", "\"$(SRCROOT)/../../../Library/SDL_net/\"", "\"$(SRCROOT)/../../../Library/SDL_mixer/\"", @@ -2076,7 +2065,6 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; @@ -2085,18 +2073,14 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_PEDANTIC = YES; GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_STRICT_SELECTOR_MATCH = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; GCC_WARN_UNKNOWN_PRAGMAS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/../../../Library/SDL/src/video\"/**", "\"$(SRCROOT)/../../../Library/SDL/include/\"", "\"$(SRCROOT)/../../../Library/SDL_net/\"", "\"$(SRCROOT)/../../../Library/SDL_mixer/\"",
--- a/share/CMakeLists.txt Mon Jul 23 19:15:59 2012 +0300 +++ b/share/CMakeLists.txt Thu Aug 30 12:13:24 2012 -0400 @@ -1,6 +1,6 @@ add_subdirectory(hedgewars) -IF(APPLE) +IF(APPLE OR CROSSAPPLE) #needed for CFBundleVersion and CFBundleShortVersionString FIND_PROGRAM(HGCOMMAND hg) IF (HGCOMMAND AND (EXISTS ${hedgewars_SOURCE_DIR}/.hg)) @@ -24,4 +24,4 @@ DESTINATION ../Resources/) install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/dsa_pub.pem" DESTINATION ../Resources/) -ENDIF(APPLE) +ENDIF(APPLE OR CROSSAPPLE)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Graphics/hedgewars.svg Thu Aug 30 12:13:24 2012 -0400 @@ -0,0 +1,239 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="2001.415" + height="373.84308" + id="svg3761" + version="1.1" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="hedgewars.svg"> + <defs + id="defs3763"> + <linearGradient + id="linearGradient3830"> + <stop + style="stop-color:#fde003;stop-opacity:1;" + offset="0" + id="stop3832" /> + <stop + id="stop3834" + offset="0.65004325" + style="stop-color:#fde003;stop-opacity:0.82456142;" /> + <stop + style="stop-color:#fde003;stop-opacity:0;" + offset="0.81587774" + id="stop3836" /> + <stop + style="stop-color:#fde003;stop-opacity:0;" + offset="1" + id="stop3838" /> + </linearGradient> + <linearGradient + id="linearGradient4510"> + <stop + id="stop4512" + offset="0" + style="stop-color:#fde003;stop-opacity:1;" /> + <stop + style="stop-color:#fde003;stop-opacity:0.82456142;" + offset="0.60000002" + id="stop4514" /> + <stop + id="stop4518" + offset="0.80000001" + style="stop-color:#fde003;stop-opacity:0;" /> + <stop + id="stop4516" + offset="1" + style="stop-color:#fde003;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient4399"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop4401" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop4403" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4399" + id="radialGradient4405" + cx="395.95886" + cy="670.11121" + fx="395.95886" + fy="670.11121" + r="1000.7524" + gradientTransform="matrix(1,0,0,0.18705578,0,544.76303)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4192" + id="radialGradient4198" + cx="886.33868" + cy="1818.9486" + fx="886.33868" + fy="1818.9486" + r="965.06842" + gradientTransform="matrix(1.1017484,-0.00284152,8.1448464e-4,0.31579243,-39.372399,335.81069)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="linearGradient4192"> + <stop + style="stop-color:#fde003;stop-opacity:1;" + offset="0" + id="stop4194" /> + <stop + id="stop4202" + offset="0.7631796" + style="stop-color:#fde003;stop-opacity:0.7368421;" /> + <stop + style="stop-color:#fde003;stop-opacity:0;" + offset="1" + id="stop4196" /> + </linearGradient> + <radialGradient + r="965.06842" + fy="1818.9486" + fx="886.33868" + cy="1818.9486" + cx="886.33868" + gradientTransform="matrix(1.1017484,-0.00284152,8.1448464e-4,0.31579243,-581.77533,968.26906)" + gradientUnits="userSpaceOnUse" + id="radialGradient4423" + xlink:href="#linearGradient4192" + inkscape:collect="always" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4510" + id="radialGradient4508" + cx="301.59787" + cy="1603.1143" + fx="301.59787" + fy="1603.1143" + r="965.37823" + gradientTransform="matrix(1.3744339,0.00122796,-2.847412e-4,0.31870592,-111.92506,298.79849)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4510" + id="radialGradient4528" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.3744339,0.00122796,-2.847412e-4,0.31870592,-111.92506,298.79849)" + cx="301.59787" + cy="1603.1143" + fx="301.59787" + fy="1603.1143" + r="965.37823" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4510" + id="radialGradient3041" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.3744339,0.00122796,-2.847412e-4,0.31870592,-2055.4585,448.30107)" + cx="301.59787" + cy="1603.1143" + fx="301.59787" + fy="1603.1143" + r="965.37823" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3830" + id="radialGradient3824" + cx="396.08008" + cy="1707.7947" + fx="396.08008" + fy="1707.7947" + r="970.50092" + gradientTransform="matrix(1.5350005,-0.00416341,0.001041,0.38380416,-213.68086,198.07079)" + gradientUnits="userSpaceOnUse" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.4" + inkscape:cx="584.24342" + inkscape:cy="246.47842" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1896" + inkscape:window-height="1026" + inkscape:window-x="24" + inkscape:window-y="0" + inkscape:window-maximized="1" + showguides="true" + inkscape:guide-bbox="true"> + <sodipodi:guide + orientation="1,0" + position="1000.051,282.84271" + id="guide3828" /> + </sodipodi:namedview> + <metadata + id="metadata3766"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(603.97091,-479.69834)"> + <path + inkscape:connector-curvature="0" + id="path3855" + d="M -526.00534,852.17056 C -542.67082,849.40463 -557.25422,840.6511 -571.77866,824.6956 -586.81864,808.17377 -586.25533,809.35375 -589.41486,787.75241 -590.93931,777.32988 -592.62117,765.87736 -593.15232,762.30236 -594.7215,751.74067 -600.02194,704.16746 -601.67568,685.80236 -611.83628,572.96688 -588.11991,515.67793 -533.36375,520.78899 -519.70323,522.06409 -506.51659,528.94492 -495.14848,540.72984 -491.15748,544.86717 -490.36779,544.99251 -485.12939,542.32008 -481.5908,540.51483 -481.14202,539.82273 -480.10409,534.57008 -474.25647,504.9771 -469.61911,499.08506 -442.09465,486.27681 -425.06997,478.35453 -415.61338,477.84565 -387.98533,483.3651 -345.06294,491.93999 -316.12855,526.46216 -256.86911,639.80236 -241.56375,669.07553 -230.03939,693.35993 -229.04826,698.42704 -228.52377,701.10847 -227.64465,705.58669 -227.09465,708.37865 -221.2129,738.23614 -232.5079,769.55771 -258.54663,795.59644 -280.02203,817.07185 -331.19847,773.8821 -376.71712,695.86784 -381.04976,688.44215 -385.10108,682.16277 -385.72006,681.91366 -386.91415,681.43311 -415.04112,689.99475 -416.38654,691.24831 -416.82208,691.65412 -414.92428,698.59926 -412.16921,706.68197 -392.2035,765.25648 -410.86654,807.73811 -473.79646,846.96061 -483.32508,852.89954 -507.23612,855.28563 -526.00534,852.17056 z M -519.76126,810.23954 C -472.06262,798.19128 -456.71329,757.21383 -477.64456,697.80236 -479.19473,693.40236 -481.10058,688.79953 -481.87978,687.57384 -485.18034,682.38208 -468.68638,666.27399 -445.78887,652.32727 -436.98309,646.96373 -436.98309,646.96373 -422.28887,648.21574 -390.5073,650.92367 -383.33168,651.31496 -376.46907,650.71434 -368.06769,649.97904 -369.04944,648.89183 -364.48387,663.98692 -354.45356,697.14999 -326.11079,737.33898 -301.91525,752.70689 -298.2847,755.01285 -288.90783,746.33723 -281.43455,733.75783 -271.36461,716.80762 -271.46294,703.74609 -281.81062,683.80236 -285.54208,676.61047 -313.45502,630.72863 -325.61295,611.80236 -327.37951,609.05236 -333.69276,599.15236 -339.64241,589.80236 -350.49732,572.74363 -354.87266,565.98984 -377.86466,530.80236 -394.18536,505.82479 -393.14876,507.15799 -397.39054,505.68945 -403.56278,503.55257 -414.237,502.46547 -420.03985,503.38278 -430.21674,504.99153 -450.09465,516.66537 -450.09465,521.03327 -450.09465,524.11139 -444.42413,542.99583 -442.65711,545.80236 -441.96455,546.90236 -440.81888,549.60236 -440.11119,551.80236 -436.44073,563.21275 -418.82479,592.96174 -407.51976,606.84126 -400.93253,614.92861 -399.66235,614.60686 -441.34936,615.41062 -475.62065,616.0714 -483.78177,616.70683 -490.40975,619.23049 -491.95805,619.82002 -493.59947,620.30236 -494.05733,620.30236 -495.13309,620.30236 -501.29083,607.40738 -503.60794,600.30236 -504.59446,597.27736 -506.68255,592.27169 -508.24813,589.17866 -509.81372,586.08562 -511.09465,583.25837 -511.09465,582.89589 -511.09465,575.338 -527.13101,554.11618 -535.96652,549.98155 -575.77822,531.3514 -586.36837,580.89469 -569.48784,706.80236 -562.23117,760.92808 -562.33339,760.12618 -560.11827,780.30236 -557.75635,801.81554 -557.02721,803.70879 -549.25351,808.51319 -542.38794,812.75635 -532.10759,813.35812 -519.76126,810.23954 z M 1210.4054,832.30456 C 1116.1837,828.09124 1041.8426,795.58315 1020.807,749.39647 1012.8957,732.02633 1012.3721,726.02752 1018.1005,718.39323 1046.4965,680.54897 1069.314,660.67853 1093.968,652.32433 1099.9981,650.28096 1105.1865,648.35452 1105.4977,648.04336 1105.8088,647.73219 1103.4059,644.17567 1100.1577,640.13998 1086.0293,622.58636 1075.944,602.614 1077.2244,594.72394 1080.7321,573.10883 1136.1552,539.89827 1191.4054,526.30459 1241.6923,513.93209 1325.8193,513.24638 1341.8341,525.07846 1353.0461,533.36205 1380.6749,596.7986 1390.276,636.30236 1392.623,645.95901 1396.5945,664.23093 1397.3503,668.84936 1399.0439,679.19844 1377.5583,691.29555 1353.8805,693.32426 1325.0128,695.79764 1325.4649,692.81016 1348.3716,729.72643 1382.3014,784.40769 1381.3118,796.79421 1341.4054,816.91963 1312.5316,831.48115 1279.2914,835.38495 1210.4054,832.30456 z M 1298.1862,780.94315 C 1328.8474,773.00141 1337.6385,752.73826 1322.7984,724.21349 1316.4507,712.01252 1289.7252,686.30236 1283.39,686.30236 1283.0183,686.30236 1281.4681,685.41508 1279.9451,684.33062 1277.2108,682.38364 1264.1424,674.68648 1226.4054,652.7964 1196.3875,635.38389 1182.218,622.36287 1180.3111,610.43825 1178.7317,600.56092 1181.999,598.74424 1199.8163,599.59343 1210.4536,600.10042 1215.3018,600.87478 1229.4054,604.31941 1241.9422,607.38137 1312.733,631.88085 1317.175,634.69493 1321.5923,637.49346 1345.1958,645.41194 1346.1817,644.42609 1354.2253,636.38242 1347.5868,591.96339 1334.2567,564.63503 1327.1391,550.04304 1328.0119,550.48382 1299.9054,547.28729 1223.3574,538.58154 1182.4003,547.7028 1125.9054,586.03759 1113.8368,594.22678 1112.9054,595.3211 1112.9054,601.3116 1112.9054,614.76685 1126.5358,628.86461 1154.72,644.56001 1166.7357,651.25129 1178.1186,657.61866 1185.9054,662.00437 1187.8304,663.08858 1192.1054,665.47431 1195.4054,667.306 1256.7889,701.3773 1268.3903,723.87765 1219.4054,713.85335 1193.9568,708.64554 1189.4148,707.45219 1152.4054,696.24972 1087.537,676.61463 1101.5825,672.32526 1060.5481,724.30236 1043.7626,745.56393 1043.7001,745.72529 1051.6554,747.28966 1054.8178,747.91156 1061.6804,749.48054 1066.9054,750.77627 1080.2963,754.09707 1096.7066,757.88199 1108.4054,760.34799 1113.9054,761.50734 1123.5804,763.56319 1129.9054,764.91654 1173.061,774.15053 1201.9299,778.8943 1243.9054,783.64915 1256.1258,785.03345 1288.6553,783.41179 1298.1862,780.94315 z M 954.5461,755.05236 C 953.1872,753.81486 947.172,745.15236 941.1792,735.80236 922.6331,706.86715 922.8713,707.10761 920.8994,715.32701 917.832,728.11359 886.0111,738.59672 864.4054,733.93849 841.0732,728.90805 831.2058,711.68824 836.2816,684.85951 839.8449,666.02656 839.8468,666.0259 818.9736,690.6944 797.2581,716.35841 795.2594,717.39398 788.9857,706.23146 787.6666,703.88463 784.5621,699.00301 782.0866,695.38342 779.6112,691.76384 776.8175,687.67736 775.8785,686.30236 774.9396,684.92736 771.5818,679.86486 768.4168,675.05236 762.0329,665.34537 762.0741,665.36342 753.1638,668.37246 744.631,671.25403 744.6947,671.13074 740.8151,692.30236 737.4269,710.79331 737.2091,710.94965 718.3133,708.46703 704.8045,706.6922 649.10415,657.44987 648.94615,647.14241 648.89375,643.72507 678.4188,604.12452 717.784,554.81373 741.8382,524.68215 740.9777,525.06058 753.0558,539.30236 756.0877,542.87736 759.8817,547.67304 761.4869,549.95942 763.0921,552.2458 767.1054,557.50179 770.4054,561.63938 773.7054,565.77697 779.7804,573.7011 783.9054,579.24855 788.0304,584.79601 794.7804,593.81879 798.9054,599.29917 803.0304,604.77956 809.7804,613.95675 813.9054,619.69292 818.0304,625.4291 824.3304,634.1794 827.9054,639.13803 831.4804,644.09667 835.6778,650.04224 837.233,652.35042 841.0502,658.01575 841.1878,657.71283 845.3852,634.41114 849.0582,614.01991 849.0582,614.01991 845.9525,609.91114 837.6242,598.89303 837.403,598.39827 837.4412,590.87122 837.5939,560.74111 892.4053,550.57744 949.8343,570.03016 1003.6186,588.24836 1027.1084,645.26977 989.9281,667.35818 981.1611,672.56653 980.941,671.48049 993.4,684.48246 1010.0407,701.84846 1015.9833,714.44964 1011.5631,722.99734 1002.6408,740.25126 962.855,762.61883 954.5461,755.05236 z M 965.3061,718.82443 C 983.339,706.8549 986.7023,702.06845 981.3347,696.01309 973.6587,687.35346 957.1605,669.51508 949.1716,661.23729 939.8106,651.53783 939.1331,649.67248 944.6554,648.80159 958.2942,646.65066 961.8968,645.85955 965.8929,644.13795 982.1157,637.14902 981.9664,616.34233 965.5659,598.54988 935.1433,565.54526 835.0179,570.06868 860.1644,603.31167 861.947,605.66814 864.0061,608.40497 864.7403,609.39349 865.8756,610.92195 865.5226,614.15365 862.3809,630.99659 860.3491,641.88976 858.3004,654.62736 857.8283,659.30236 857.3562,663.97736 855.8329,673.65236 854.4432,680.80236 850.874,699.16432 850.9712,701.01407 855.6058,702.95053 861.8013,705.53916 872.1238,704.92098 882.4503,701.34289 895.2403,696.91126 894.4054,698.81959 894.4054,674.01647 894.4054,643.9149 896.72,640.77994 907.5791,656.17398 910.1508,659.81959 913.6387,664.44016 915.3301,666.44192 917.0215,668.44367 920.4304,672.87008 922.9054,676.27837 925.3803,679.68666 929.9745,685.92386 933.1145,690.13881 936.2546,694.35376 940.2602,699.82736 942.016,702.30236 958.5037,725.54443 956.8981,724.40539 965.3061,718.82443 z M 916.4054,638.6616 C 892.1047,637.2995 870.8151,617.90836 889.1554,613.84154 917.4074,607.57686 957.9054,612.87894 957.9054,622.84243 957.9054,629.59073 930.3691,642.0372 921.9054,639.11452 921.6303,639.01956 919.1554,638.81575 916.4054,638.6616 z M 716.9252,678.05236 C 716.9418,677.00532 717.7592,671.21419 719.3601,660.80236 719.5292,659.70236 720.2378,654.75236 720.9347,649.80236 722.5361,638.429 722.2475,638.72029 732.6535,637.97686 737.467,637.63296 746.9054,636.63617 753.6276,635.76178 769.0543,633.75517 767.0719,632.12842 779.7667,657.21147 792.4727,682.3166 790.6308,681.21589 799.1634,668.80236 815.8477,644.52976 815.3939,647.83467 804.0851,632.95729 801.6415,629.7425 798.0557,624.7925 796.1168,621.95729 792.4254,616.55979 786.4884,608.03931 781.4054,600.84433 777.9318,595.92754 768.66,583.29343 762.5977,575.21661 760.292,572.14445 756.9308,567.64445 755.1285,565.21661 740.8358,545.96274 741.3982,546.34614 736.6651,552.63021 721.4787,572.79294 687.1284,618.96833 681.9053,626.24126 678.3303,631.21929 673.5049,637.882 671.18195,641.04729 665.67565,648.55067 665.77215,649.08728 673.4749,653.80236 677.069,656.00236 681.7647,658.92736 683.9098,660.30236 686.0549,661.67736 691.094,664.7947 695.1077,667.22978 699.1215,669.66486 705.1016,673.37736 708.3971,675.47978 714.6619,679.47666 716.892,680.14938 716.9252,678.05236 z M 726.5004,620.45605 C 725.9055,619.49347 726.9775,613.02697 729.427,602.80236 730.3493,598.95236 731.4858,594.00236 731.9525,591.80236 735.6299,574.46849 734.5389,575.10494 743.5232,585.05236 759.8617,603.14217 763.8983,608.18874 762.6474,608.9618 761.1077,609.91331 728.413,621.30236 727.2209,621.30236 727.1122,621.30236 726.7881,620.92152 726.5004,620.45605 z M -193.86952,748.84812 C -224.39672,741.88974 -232.51811,712.5672 -208.59359,695.68634 -205.59465,693.57032 -205.59465,693.57032 -207.92918,685.18634 -209.21318,680.57515 -212.65493,667.80236 -215.57753,656.80236 -224.75901,622.24531 -224.38381,623.16594 -230.38607,620.46667 -251.2816,611.06975 -245.00496,585.95653 -219.23688,575.8581 -207.1941,571.13857 -201.64916,570.18118 -149.09465,563.74739 -112.45457,559.26186 -93.02802,562.23256 -76.17996,574.89748 -69.81685,579.68072 -69.81685,579.68072 -67.49107,576.74154 -60.86959,568.37372 -59.14452,566.68651 -53.10287,562.66908 -32.41343,548.91153 11.22468,543.36062 41.40535,550.64733 70.34809,557.63515 95.42737,573.93125 109.74354,595.05236 115.07087,602.91195 114.78454,602.9755 120.56316,592.65076 135.2687,566.37618 166.39985,541.97543 216.05791,517.80151 233.78796,509.17038 231.09178,508.72792 248.90535,523.19199 294.74505,560.41242 300.90535,566.31951 300.90535,573.05461 300.90535,586.62243 288.91328,594.27713 267.62397,594.29855 262.51501,594.3037 261.87945,596.4312 265.59118,601.10321 283.30767,623.40324 295.65191,643.96947 294.45345,649.18946 286.65235,683.16773 249.56664,699.87539 225.06893,680.44821 217.84528,674.7197 218.01261,674.74161 211.51731,678.67381 192.40469,690.24441 156.28172,681.60767 131.54891,659.55395 127.04836,655.5409 126.75149,655.7254 123.90818,664.30236 114.1686,693.68215 89.05454,710.76961 52.06871,713.18151 44.97253,713.64427 38.73602,714.28898 38.20978,714.61421 23.2553,723.85659 -24.03071,718.25714 -38.13814,705.57335 -43.35032,700.88715 -43.41923,700.9058 -44.52859,707.30236 -46.65378,719.55623 -62.28655,729.59481 -86.59465,734.31508 -89.89465,734.95589 -106.76965,738.63645 -124.09465,742.49409 -159.53516,750.38539 -179.24931,752.18065 -193.86952,748.84812 z M -173.59465,723.89248 C -155.46102,719.52718 -97.44353,707.36495 -82.32675,704.75995 -70.27585,702.68328 -70.60622,704.58186 -79.15851,686.55236 -82.75022,678.98052 -85.53734,674.30236 -86.45674,674.30236 -87.89042,674.30236 -117.20022,684.28937 -131.59032,689.68117 -142.48325,693.76262 -144.15294,692.08183 -147.19596,673.97182 -148.80064,664.42181 -150.49784,665.52178 -124.59311,659.32272 -104.85534,654.59943 -103.21416,651.40993 -112.93279,636.6618 -125.64713,617.36766 -128.6826,616.28479 -140.97897,626.65661 -153.92262,637.57441 -164.07573,644.72128 -165.13602,643.66099 -166.15475,642.64226 -171.09465,621.64248 -171.09465,618.33051 -171.09465,615.65375 -173.74602,616.40724 -136.09465,608.38393 -96.22882,599.88873 -94.46198,599.45962 -93.27967,597.98569 -82.39285,584.41357 -105.56445,576.35213 -142.59465,580.82892 -194.27062,587.07632 -197.84023,587.69406 -208.67226,592.26401 -222.91295,598.27204 -225.13111,604.15561 -214.36076,607.35255 -208.08953,609.21402 -207.45763,610.42892 -203.1657,628.87605 -200.99976,638.18552 -196.2727,658.4834 -192.66113,673.98246 -184.63987,708.40576 -184.58313,704.79827 -193.1765,706.75279 -204.69724,709.37312 -207.69337,712.92815 -205.07289,720.86828 -203.02747,727.06598 -191.41281,728.18183 -173.59465,723.89248 z M 5.90535,689.40338 C 11.68035,688.39351 18.20535,687.09446 20.40535,686.5166 27.55236,684.63933 39.2669,682.39673 45.40535,681.73067 74.98536,678.52105 89.06295,667.99129 94.2499,645.19591 98.06558,628.42689 97.32419,623.22664 88.63359,605.80236 71.01205,570.4719 46.91521,559.98814 -8.09465,563.71902 -44.15633,566.16479 -55.82079,573.93088 -57.7523,596.78062 -58.91454,610.52984 -56.38636,612.73562 -40.33577,611.97623 -21.08759,611.06555 -17.27381,616.21074 -16.83227,643.685 -16.59465,658.47065 -16.59465,658.47065 -23.88564,665.13651 -44.06367,683.58447 -29.35139,695.56867 5.90535,689.40338 z M 20.3979,664.2903 C 19.99048,663.63109 19.45063,661.45162 19.19822,659.44704 18.94582,657.44247 16.97008,643.90645 14.80768,629.36701 12.64529,614.82756 11.22015,602.62869 11.6407,602.2584 13.46513,600.65205 27.97983,599.60567 37.40574,600.40097 74.37647,603.52034 90.59622,651.00812 58.40535,661.88308 49.33085,664.9487 21.87935,666.68735 20.3979,664.2903 z M 54.45326,646.84679 C 61.28228,643.99344 58.96505,627.61037 51.46626,625.72829 45.85261,624.31936 45.38011,625.06396 45.68975,634.83126 46.14999,649.34909 46.69055,650.09025 54.45326,646.84679 z M -50.67747,674.05236 C -50.48255,673.36486 -49.80953,670.90964 -49.18188,668.59631 -48.5111,666.12399 -44.75424,660.01114 -40.06768,653.76642 -27.89312,637.54414 -28.87982,634.37443 -48.59465,626.37418 -52.99465,624.58866 -59.68054,621.31822 -63.45219,619.10653 -70.30974,615.08526 -70.30974,615.08526 -73.20548,617.22618 -80.38761,622.53615 -83.44545,624.20744 -88.21533,625.42993 -94.13524,626.94715 -94.60833,627.68098 -93.15238,633.08795 -92.21949,636.55245 -91.61676,637.16943 -88.61505,637.73255 -81.20966,639.12182 -78.27825,643.41713 -75.63242,656.75566 -73.98779,665.04683 -73.16932,666.26162 -69.21067,666.28705 -64.57966,666.31679 -59.17648,668.62271 -55.95873,671.9426 -52.46824,675.54387 -51.23952,676.03472 -50.67747,674.05236 z M 238.02726,661.31836 C 248.37897,656.91332 265.00082,641.31269 264.8728,636.12218 264.69799,629.03482 240.87485,591.77782 236.32858,591.48189 222.08965,590.55503 219.90535,592.34475 219.90535,604.93841 219.90535,619.80938 215.80124,626.74046 203.19519,633.15878 191.51369,639.10635 175.01289,628.79655 165.49267,609.60202 162.87029,604.31481 163.48162,602.9299 172.40242,593.94865 190.58397,575.6439 205.39494,570.51127 246.65001,568.21871 259.43457,567.50827 270.43559,566.59269 271.09671,566.18409 272.86924,565.08861 246.95261,541.84412 233.78274,532.71739 229.41947,529.69365 229.14377,529.74881 212.90535,536.89431 164.5838,558.15759 135.05389,588.24759 132.37555,618.95151 129.89194,647.42318 168.748,668.46091 197.01533,653.94925 221.33136,641.46608 221.90535,641.27328 221.90535,645.58885 221.90535,651.43591 227.86337,664.30236 230.57095,664.30236 230.81516,664.30236 234.17051,662.95956 238.02726,661.31836 z M 200.28489,618.32282 C 202.46935,616.13836 201.55531,608.82359 199.05364,608.46948 192.67635,607.56679 189.91681,611.95673 192.54926,618.81679 193.23195,620.59585 198.33791,620.2698 200.28489,618.32282 z M 384.40535,688.30227 C 348.29379,687.54501 345.81972,687.28015 331.90829,682.68238 300.34129,672.24937 294.2042,641.37678 320.77832,626.69312 327.29526,623.09215 326.82347,627.02397 325.08489,590.80236 323.16571,550.81797 323.49995,552.64353 316.93737,546.30236 310.87482,540.44435 309.90535,538.07657 309.90535,529.1277 309.90535,508.42146 328.90334,502.60252 383.90535,506.46206 434.29385,509.99786 457.23815,515.70428 471.07035,528.14065 475.68385,532.28858 476.18145,532.49672 478.70545,531.33444 521.65355,511.55678 535.35155,508.48736 545.11375,516.45376 568.19415,535.28825 569.14355,537.01449 567.71485,557.55089 566.42535,576.08707 566.42245,576.06954 571.37945,579.85044 576.15135,583.4901 577.01975,582.47742 578.03165,572.09316 578.47605,567.53322 579.53265,558.62736 580.37975,552.30236 581.22695,545.97736 582.32965,536.761 582.83035,531.82157 585.04635,509.95982 619.39755,515.19656 655.42675,542.88867 672.27695,555.83971 672.82175,557.24286 666.92535,572.50235 664.73635,578.16736 658.60785,594.27736 653.30645,608.30236 628.74495,673.28019 610.59835,694.59801 593.63185,678.4055 584.42645,669.62005 567.06715,654.74851 564.23195,653.21893 562.00025,652.01493 561.31685,652.42538 539.53785,668.04966 537.81495,669.28567 534.97945,671.31067 533.23665,672.54966 531.49395,673.78864 526.25135,677.57496 521.58665,680.96369 509.50615,689.73961 509.84445,689.60995 503.41005,687.92971 496.83865,686.21366 491.04935,682.95278 484.80565,677.45049 480.20595,673.39699 480.20595,673.39699 476.96645,676.73928 465.74475,688.31718 454.15545,689.76495 384.40535,688.30227 z M 501.96095,661.78274 C 504.32985,660.94695 507.86585,659.03445 509.81865,657.53274 511.77155,656.03103 515.02815,653.67736 517.05555,652.30236 519.08305,650.92736 525.98135,645.30236 532.38525,639.80236 558.46225,617.40593 556.39575,617.37399 578.18265,640.51016 591.05485,654.17951 595.92505,657.75435 598.29795,655.27517 599.85955,653.64376 611.90535,630.3644 611.90535,628.97811 611.90535,628.49769 612.55225,626.68661 613.34285,624.95349 616.42855,618.18955 624.32035,597.56653 629.85555,581.80236 630.82115,579.05236 633.70235,571.26868 636.25825,564.50529 641.92435,549.51172 642.10225,551.41358 634.65535,547.37219 631.21785,545.50669 627.28035,543.21643 625.90535,542.28274 612.81775,533.39558 598.61895,531.89039 597.79085,539.30236 597.45285,542.32736 596.68675,548.40236 596.08855,552.80236 594.07385,567.61881 592.68255,578.73486 591.26955,591.30236 588.09425,619.54556 589.23255,618.41377 576.21885,606.26688 559.84825,590.98667 556.60585,590.35043 544.65325,600.07285 529.80255,612.15268 524.14845,613.88852 525.23445,606.03461 525.94585,600.88947 528.61105,582.21127 529.90505,573.30236 531.21175,564.30592 533.89565,545.02023 534.84555,537.80236 536.57435,524.66559 526.67805,524.01732 499.17045,535.4654 487.93175,540.14273 486.67725,552.47243 495.01535,576.30236 501.61265,595.15695 501.48325,602.18473 494.03945,629.30236 488.52315,649.39839 488.73115,648.14605 489.94155,653.97656 491.77595,662.81307 494.33325,664.47394 501.96095,661.78274 z M 389.90535,659.87427 C 396.23035,659.91382 413.33035,660.13882 427.90535,660.37427 454.40535,660.80236 454.40535,660.80236 454.09585,657.30236 453.76375,653.54679 448.21195,631.27562 447.40725,630.47095 446.61605,629.67975 413.23415,633.28524 402.19275,635.35444 387.45385,638.11658 387.53775,638.20346 387.76045,620.39563 387.93195,606.68014 384.80955,608.68035 407.84765,607.52796 434.80965,606.1793 435.85475,605.104 428.26775,586.51694 420.45895,567.38664 416.50605,564.54803 406.07365,570.5794 399.46735,574.39874 378.43715,584.30236 376.93315,584.30236 376.27665,584.30236 375.90535,579.06379 375.90535,569.80236 375.90535,555.30236 375.90535,555.30236 414.47105,555.30236 461.47445,555.30236 459.18895,556.28729 455.36695,537.67895 453.61035,529.12654 364.07295,519.17421 340.29557,524.88846 328.90844,527.62504 327.60064,533.19298 337.09204,538.52744 342.15776,541.37454 341.76754,537.84243 342.86924,590.8193 343.99685,645.04228 344.91796,640.30236 333.25318,640.30236 320.42064,640.30236 316.09019,654.03658 327.40535,658.84897 330.38511,660.11627 355.89507,661.09724 367.90535,660.40636 373.68035,660.07416 383.58035,659.83472 389.90535,659.87427 z M 479.15335,627.05612 C 483.82675,618.05076 483.52905,602.55633 478.30305,582.80236 476.17035,574.74047 475.91275,574.59123 469.42985,577.66074 463.22725,580.59752 457.07885,582.24088 452.15535,582.27791 446.80585,582.31815 447.17945,591.29132 452.64215,593.97 459.32515,597.24702 460.90535,600.95754 460.90535,613.37269 460.90535,624.14726 460.90535,624.14726 464.65535,625.37355 466.71785,626.04801 469.97495,627.65971 471.89335,628.9551 476.13945,631.82226 476.76485,631.65868 479.15335,627.05612 z" + style="fill:#70778f" /> + <path + style="fill:#fe8902;fill-opacity:1" + d="M -544.27593,815.15562 C -554.52457,812.75752 -561.81921,805.22882 -562.72896,796.11042 -564.74585,775.89532 -568.08732,750.60342 -569.90236,741.81402 -571.36304,734.74072 -572.1632,729.20122 -574.74138,708.31402 -575.5221,701.98902 -576.62818,693.88903 -577.19933,690.31403 -578.45487,682.45537 -580.90982,656.9568 -582.25394,637.81403 -587.57342,562.05449 -568.11115,525.23519 -531.81168,542.38587 -523.32213,546.39699 -515.72072,554.89627 -509.8569,566.93393 -500.33927,586.4724 -496.4382,595.04125 -494.88784,599.81403 -491.75176,609.46851 -491.44175,609.62832 -478.24708,608.39237 -471.95553,607.80304 -455.47196,607.31933 -441.61692,607.31745 -412.61149,607.31351 -413.6706,607.77009 -420.30332,598.12929 -423.07135,594.1059 -426.88742,588.48758 -428.78348,585.64413 -432.90381,579.46504 -443.89098,557.05307 -444.878,552.81403 -445.26218,551.16403 -446.14151,549.13903 -446.83206,548.31403 -448.4472,546.38442 -455.3079,524.31516 -455.3079,521.04925 -455.3079,513.42223 -451.94871,509.05147 -442.3079,504.13446 -440.9329,503.43318 -438.18943,501.87463 -436.21131,500.67102 -421.5056,491.72315 -384.3079,495.25311 -384.3079,505.59651 -384.3079,506.09608 -381.8329,510.09776 -378.8079,514.48915 -375.7829,518.88054 -373.3079,522.81787 -373.3079,523.23877 -373.3079,523.65968 -372.4079,524.81854 -371.3079,525.81403 -370.2079,526.80952 -369.29789,528.11676 -369.28566,528.71902 -369.27343,529.32127 -368.34938,530.93903 -367.2322,532.31403 -364.26375,535.96756 -344.22512,565.96802 -340.84841,571.81403 -339.25999,574.56403 -336.23856,579.10492 -334.13413,581.9049 -332.02971,584.70488 -330.3079,587.46228 -330.3079,588.03245 -330.3079,588.60263 -329.58602,589.66825 -328.70372,590.40049 -327.82143,591.13273 -326.70421,592.65033 -326.22102,593.77293 -325.73783,594.89554 -324.3222,597.40293 -323.07519,599.34492 -321.82818,601.28691 -319.9079,604.37205 -318.8079,606.20079 -317.7079,608.02952 -312.96077,615.44062 -308.25872,622.6699 -303.55667,629.89917 -299.40159,636.48903 -299.0252,637.31403 -298.64882,638.13903 -296.87095,641.31195 -295.07438,644.36496 -293.27782,647.41796 -290.4579,652.29494 -288.8079,655.20267 -287.1579,658.11041 -284.1373,663.26249 -282.09545,666.65175 -278.41516,672.76064 -274.0651,681.24467 -270.80678,688.66831 -264.47527,703.09382 -267.29834,723.82762 -277.69062,739.22602 -291.59242,759.82452 -298.65666,761.88482 -312.84628,749.47902 -326.47639,737.56242 -349.3079,711.44932 -349.3079,707.77682 -349.3079,707.37862 -350.8829,704.86062 -352.8079,702.18112 -354.7329,699.50172 -356.3079,696.93122 -356.3079,696.46902 -356.3079,696.00682 -357.42723,693.64532 -358.7953,691.22131 -360.16337,688.79731 -361.78909,685.68903 -362.40801,684.31403 -363.02693,682.93903 -364.2218,680.51092 -365.06328,678.91822 -365.90476,677.32552 -367.86135,671.79867 -369.41126,666.63633 -370.96117,661.47398 -372.45948,656.87778 -372.74084,656.42254 -373.0222,655.96729 -380.57738,655.27647 -389.53015,654.88737 -398.48291,654.49827 -408.9579,653.7618 -412.8079,653.25076 -433.57242,650.49452 -444.12742,654.62428 -464.80261,673.59427 -474.04761,682.07678 -474.04071,682.05073 -470.33814,694.50308 -468.65193,700.17412 -466.60317,707.06402 -465.78535,709.81402 -458.36136,734.77782 -461.91135,768.95712 -473.78634,786.84752 -486.69937,806.30182 -521.8264,820.40852 -544.27593,815.15562 z M 1230.1923,785.86832 C 1213.6939,784.22972 1202.3195,782.71132 1192.1923,780.79562 1187.7923,779.96332 1177.6673,778.16712 1169.6923,776.80412 1161.7173,775.44122 1153.1673,773.87212 1150.6923,773.31742 1146.5168,772.38162 1142.1401,771.49332 1130.6923,769.25812 1128.2173,768.77492 1123.0423,767.64512 1119.1923,766.74752 1115.3423,765.84992 1110.3923,764.75472 1108.1923,764.31382 1095.0569,761.68122 1091.5391,760.88592 1085.5371,759.19212 1081.8767,758.15922 1077.8267,757.30732 1076.5371,757.29902 1075.2474,757.29072 1070.5923,756.16582 1066.1923,754.79912 1061.7923,753.43252 1057.0673,752.30942 1055.6923,752.30332 1052.5131,752.28942 1043.8344,749.67682 1042.0512,748.19702 1039.2771,745.89462 1040.4043,739.00882 1044.4423,733.58982 1050.3532,725.65742 1069.3376,701.54942 1076.0697,693.42655 1096.122,669.23164 1092.9534,670.37659 1119.2659,677.81842 1140.461,683.81293 1144.9834,685.2016 1172.6923,694.2236 1177.9173,695.92482 1183.1344,697.31612 1184.2857,697.31542 1185.4371,697.31462 1189.0371,698.23182 1192.2857,699.35362 1195.5344,700.47542 1202.2423,702.03182 1207.1923,702.81222 1212.1423,703.59272 1219.7923,704.90112 1224.1923,705.71972 1233.5022,707.45172 1240.6923,707.72592 1240.6923,706.34882 1240.6923,703.51522 1224.0016,689.46208 1213.493,683.44772 1211.6776,682.40873 1207.2673,679.86091 1203.6923,677.78589 1196.2415,673.46127 1190.7397,670.37081 1183.9529,666.69786 1181.3346,665.28087 1178.7423,663.77001 1178.1923,663.3404 1177.6423,662.9108 1173.8173,660.77116 1169.6923,658.58564 1162.1001,654.56315 1158.4499,652.53812 1141.9722,643.20747 1116.0958,628.55474 1104.4749,610.65116 1108.3298,591.37674 1109.1382,587.33443 1136.9327,567.0654 1146.3364,563.66055 1147.3572,563.29097 1149.318,562.2108 1150.6938,561.26019 1184.0861,538.18766 1248.0177,530.87937 1319.8739,541.9205 1343.9601,545.62149 1369.1953,627.77648 1352.4775,648.06403 1349.6145,651.5383 1330.313,646.53962 1311.1923,637.37206 1302.3833,633.14855 1237.4573,610.91209 1226.1923,608.26049 1171.7714,595.45072 1174.8897,611.20222 1233.7374,646.37357 1241.9648,651.29082 1248.8874,655.31403 1249.1209,655.31403 1249.3544,655.31403 1253.2116,657.56403 1257.6923,660.31403 1262.173,663.06403 1266.0232,665.31403 1266.2481,665.31403 1266.473,665.31403 1269.5979,667.11403 1273.1923,669.31403 1276.7867,671.51403 1280.0146,673.31403 1280.3655,673.31403 1280.7164,673.31403 1282.4785,674.43903 1284.2812,675.81403 1286.0839,677.18903 1287.8439,678.31403 1288.1923,678.31403 1288.5407,678.31403 1290.3007,679.43903 1292.1034,680.81403 1293.9061,682.18903 1295.68,683.31403 1296.0453,683.31403 1298.5268,683.31403 1316.9098,699.94392 1323.3812,708.04302 1335.3688,723.04562 1340.8099,754.24452 1333.0342,763.39282 1332.2961,764.26112 1331.6923,765.45342 1331.6923,766.04242 1331.6923,767.84032 1321.1635,776.85802 1315.774,779.67612 1302.7416,786.49062 1264.3945,789.26512 1230.1923,785.86832 z M -203.8555,728.90832 C -216.83027,723.25672 -212.70609,702.54302 -198.05897,699.79512 -196.03507,699.41542 -193.91188,698.54182 -193.34076,697.85362 -192.31039,696.61212 -201.86643,652.08895 -204.40276,646.31403 -205.00665,644.93903 -205.8674,641.78903 -206.31553,639.31403 -207.51491,632.68995 -211.16589,618.15086 -212.26849,615.60789 -212.7946,614.39452 -215.38119,612.43166 -218.01648,611.24599 -230.5486,605.60752 -229.49256,591.82062 -216.08375,586.01375 -209.07322,582.97774 -207.03388,582.28636 -199.05716,580.24141 -194.52007,579.07825 -183.3829,577.2725 -174.3079,576.22863 -165.2329,575.18475 -149.7079,573.3912 -139.8079,572.24296 -105.3501,568.24641 -92.489539,570.06739 -89.294359,579.3954 -88.461909,581.82565 -87.423279,584.37583 -86.986309,585.06247 -86.549329,585.74911 -85.939769,589.34911 -85.631729,593.06247 -84.822549,602.81693 -83.825419,602.22727 -111.24218,608.20752 -123.50139,610.88155 -126.83597,612.64142 -121.96155,613.86482 -116.25491,615.2971 -101.42765,636.75362 -100.59948,644.77786 -99.522759,655.21024 -103.41371,658.51901 -122.3079,663.23821 -142.44642,668.26819 -141.46594,667.6979 -140.10904,673.59228 -138.16508,682.03687 -136.18164,683.77438 -131.29433,681.31403 -130.20179,680.76403 -128.41401,679.86403 -127.32147,679.31403 -126.22893,678.76403 -124.45549,678.31403 -123.38049,678.31403 -122.30548,678.31403 -121.16922,677.89865 -120.85545,677.39097 -120.54168,676.88328 -118.8424,676.15106 -117.07926,675.76381 -115.31612,675.37656 -113.18378,674.71179 -112.34072,674.28654 -111.49767,673.86129 -108.1079,672.69914 -104.8079,671.70399 -101.5079,670.70883 -98.261876,669.49756 -97.594519,669.01227 -96.927169,668.52698 -92.837539,667.88704 -88.506459,667.59019 -79.624759,666.98142 -79.339059,667.18157 -74.625739,677.31403 -73.474449,679.78903 -70.906949,685.14737 -68.920189,689.22145 -62.099459,703.20812 -63.691449,706.19302 -79.307899,708.69772 -91.598589,710.66902 -150.12673,722.85282 -168.50347,727.26552 -182.67226,730.66782 -198.16342,731.38762 -203.8555,728.90832 z M -153.09536,626.82173 C -150.18726,624.35097 -146.1204,621.19533 -144.0579,619.80919 -140.17761,617.20138 -138.84137,613.76788 -142.0579,614.67015 -143.0204,614.94014 -147.6329,615.93467 -152.3079,616.88022 -162.42679,618.92683 -164.17358,620.11865 -162.48525,623.82414 -161.83771,625.24534 -161.3079,627.51196 -161.3079,628.86108 -161.3079,632.472 -159.10063,631.92389 -153.09536,626.82173 z M 950.4804,722.06402 C 948.5815,719.72652 944.2374,713.76402 940.8269,708.81402 932.7174,697.04412 927.5252,689.8465 923.1529,684.31403 917.4015,677.03646 910.0191,667.20096 906.0922,661.58423 900.9667,654.25327 900.6921,655.03477 900.6921,676.94997 900.6921,696.46792 900.6921,696.46792 897.9421,699.18882 889.4545,707.58692 858.6781,711.35442 850.3643,705.01312 845.5258,701.32272 845.5047,697.35432 850.1921,672.60469 852.1171,662.4406 853.6938,652.70466 853.6958,650.96927 853.6978,649.23389 855.0461,640.83903 856.6921,632.31403 860.5334,612.41864 860.5251,612.17712 855.8106,606.49344 841.0116,588.65251 850.7022,571.82397 877.2772,569.21497 940.2104,563.03649 984.71623,585.59328 984.68653,623.65312 984.67433,639.3802 978.65673,646.13696 961.25753,649.96016 951.521,652.09958 950.7987,650.56566 972.72633,674.31403 997.68303,701.34302 997.63913,700.87182 976.69213,716.96202 961.99843,728.24872 956.3913,729.34012 950.4804,722.06402 z M 939.8152,628.41506 C 960.1509,618.72912 936.8238,612.26816 899.1921,617.16359 893.1578,617.94858 890.8101,625.26781 895.9641,627.22735 907.3942,631.57306 931.7973,632.23402 939.8152,628.41506 z M -21.166519,694.62248 C -39.587869,693.17692 -43.689179,673.9346 -28.615989,659.67138 -20.050159,651.56583 -20.207209,652.13135 -21.712789,634.81403 -23.173279,618.01539 -24.512659,616.75902 -41.968569,615.81364 -62.305479,614.71224 -63.850509,613.1325 -62.995899,594.31403 -62.123449,575.10295 -51.546409,560.31403 -38.679089,560.31403 -37.439849,560.31403 -36.189489,559.93145 -35.900489,559.46385 -35.254829,558.41914 -22.263979,556.66951 -4.3078979,555.20889 19.729461,553.2536 45.089441,555.96283 58.343231,561.90198 60.076351,562.67861 61.768941,563.31403 62.104541,563.31403 67.294191,563.31403 87.599151,584.5405 91.758721,594.31403 92.343921,595.68903 94.410141,600.18903 96.350331,604.31403 104.58035,621.81169 105.09612,626.18407 101.06877,644.31403 95.288271,670.33624 79.633391,682.49015 47.692101,685.75385 40.778481,686.46027 29.422061,688.64006 21.192101,690.84035 10.171973,693.78659 -9.4696676,695.54032 -21.166519,694.62248 z M 52.963451,655.55665 C 53.639211,655.02488 55.466991,654.2848 57.025191,653.91201 67.030591,651.5183 73.104501,641.62936 69.801381,633.11108 63.508801,616.88343 59.783741,611.97808 50.240901,607.35284 40.548691,602.6552 18.663661,602.87906 18.714991,607.67532 18.756221,611.52695 25.519931,655.22643 26.260251,656.4243 27.137881,657.84433 51.043361,657.06758 52.963451,655.55665 z M 705.6921,678.81403 C 702.1171,676.34573 698.8504,674.32347 698.4328,674.32012 698.0152,674.31677 693.7402,671.77214 688.9328,668.66538 684.1254,665.55863 678.6171,662.02692 676.6921,660.81713 658.4915,649.37882 657.7522,647.62341 666.2529,636.03268 668.7614,632.61242 675.0404,623.96403 680.2062,616.81403 685.372,609.66403 691.3071,601.58313 693.3954,598.85648 695.4836,596.12983 698.8292,591.38929 700.83,588.32195 702.8309,585.25461 705.1934,582.14291 706.08,581.40705 706.9667,580.6712 707.6921,579.62263 707.6921,579.0769 707.6921,578.05966 723.6572,556.55627 732.388,545.81403 741.2034,534.96762 747.6019,537.36216 759.0675,555.7985 760.0989,557.45704 762.3489,560.42361 764.0675,562.39087 765.786,564.35813 768.9921,568.5782 771.1921,571.76881 773.3921,574.95942 777.3625,580.46398 780.0153,584.00117 782.668,587.53837 785.368,591.64329 786.0153,593.12323 786.6625,594.60317 788.8946,598.06403 790.9753,600.81403 799.4475,612.01094 804.6921,619.27273 804.6921,619.80644 804.6921,620.11715 806.9421,623.27057 809.6921,626.81403 812.4421,630.35749 814.6921,633.52462 814.6921,633.85208 814.6921,634.17955 815.8171,635.92242 817.1921,637.72514 821.106,642.85652 820.6208,647.72886 815.4421,655.29761 813.1046,658.71392 810.5171,662.5499 809.6921,663.82201 791.9239,691.21961 791.4365,691.18342 776.4523,661.35412 770.5233,649.55117 765.3074,639.52929 764.8613,639.08327 763.914,638.13592 729.7162,641.85869 728.6454,643.02574 728.2476,643.4593 726.9162,651.91403 725.6866,661.81403 722.6764,686.051 719.7624,688.5286 705.6921,678.81403 z M 744.9736,607.22308 C 753.9761,604.196 754.3962,603.63266 750.4745,599.84631 748.6692,598.10333 745.7549,594.97833 743.9983,592.90187 740.5889,588.87158 738.6921,588.87903 738.6921,592.92271 738.6921,594.29256 738.0703,596.6285 737.3103,598.11369 732.1193,608.25847 734.2747,610.82059 744.9736,607.22308 z M 223.79245,664.92085 C 222.5559,663.6046 220.89752,660.5671 220.10715,658.17085 219.31679,655.7746 218.39758,653.02653 218.06448,652.06403 217.2726,649.7759 213.5843,649.82908 210.57696,652.17198 165.71159,687.12476 102.5412,633.01912 135.72465,588.06075 136.84235,586.54644 138.76514,583.82164 139.99751,582.00564 149.50288,567.9987 164.53909,553.87515 179.1921,545.19009 183.5921,542.58215 189.05197,539.29217 191.32515,537.87904 193.59833,536.4659 197.19833,534.60629 199.32515,533.74655 201.45197,532.88682 205.4421,531.09179 208.1921,529.75759 217.76397,525.11368 226.36663,522.31403 231.06437,522.31403 236.18631,522.31403 234.21665,521.00086 257.01145,539.61297 289.36518,566.03003 288.33551,570.33254 249.1921,572.28645 235.4421,572.9728 223.43418,573.93479 222.50784,574.4242 221.5815,574.91361 219.07852,575.31403 216.94567,575.31403 214.81282,575.31403 211.20497,576.21403 208.92824,577.31403 206.6515,578.41403 203.93469,579.31403 202.89089,579.31403 201.84708,579.31403 199.01285,580.65584 196.59258,582.29583 194.17232,583.93582 191.6446,585.28582 190.97543,585.29583 190.30627,585.30584 188.22601,586.77653 186.35263,588.56403 184.47926,590.35153 181.08646,593.30429 178.81308,595.12572 170.43901,601.835 170.65047,606.30486 179.83559,616.73971 189.45667,627.66982 197.93943,629.28475 206.99148,621.90958 213.37306,616.71017 214.99862,612.46082 215.63523,599.31403 216.31191,585.33981 216.81608,584.9118 233.84515,583.85461 246.7189,583.05539 244.62359,580.96643 260.54481,610.47343 273.57242,634.61765 273.77944,635.57391 267.74666,643.74018 262.5447,650.78181 250.32194,661.34355 244.68637,663.66669 242.21452,664.68565 239.41071,665.92315 238.45567,666.41669 234.72234,668.34598 226.19275,667.47585 223.79245,664.92085 z M 489.0049,664.06403 C 484.1832,658.73496 483.1777,644.72828 486.7556,632.73244 487.8906,628.92731 489.7031,622.88903 490.7834,619.31403 495.9799,602.11792 496.1812,594.29312 491.7482,581.81403 483.5153,558.63809 483.17572,539.10922 489.41062,533.28665 512.75902,511.48238 558.3721,523.33874 540.7049,546.81403 540.291,547.36403 539.6992,550.73903 539.3897,554.31403 538.4259,565.4498 536.5998,577.62244 535.1893,582.31403 530.4703,598.0099 532.2027,600.84604 541.7475,593.05073 554.982,582.24212 561.6099,582.55398 575.8758,594.65655 585.1844,602.55367 586.2804,601.48886 587.0361,583.81403 587.2477,578.86403 587.9269,570.98903 588.5454,566.31403 590.784,549.39306 591.8333,540.70129 592.3485,534.81403 593.6301,520.1672 610.5463,522.16673 641.6921,540.64656 647.5216,544.10537 649.4374,552.4099 646.0218,559.41418 642.7967,566.02782 639.6886,573.73294 639.6603,575.18487 639.6428,576.08091 638.9678,577.68754 638.1603,578.75516 637.3528,579.82278 636.6891,581.62278 636.6855,582.75516 636.6819,583.88754 635.7849,586.16403 634.6921,587.81403 633.5993,589.46403 632.687,591.48903 632.6648,592.31403 632.6425,593.13903 631.7548,595.61403 630.6921,597.81403 629.6294,600.01403 628.7447,602.51153 628.726,603.36403 628.7074,604.21653 628.334,605.34153 627.8962,605.86403 627.4585,606.38653 626.5212,608.61403 625.8133,610.81403 624.2403,615.70277 622.1285,620.87468 620.1658,624.64507 619.3553,626.20214 618.6921,628.0306 618.6921,628.7083 618.6921,630.7133 605.799,655.57133 603.4772,658.04275 597.6871,664.20604 590.7525,660.44916 572.9122,641.48402 556.7415,624.29366 558.2667,624.5147 543.6357,637.24124 529.8768,649.20915 520.6618,656.80875 519.4188,657.21288 518.7441,657.43225 516.8455,658.73252 515.1996,660.10236 507.537,666.47988 493.1584,668.6545 489.0049,664.06403 z M 443.4486,664.73725 C 443.1314,664.42002 417.0689,664.06755 385.532,663.95398 315.54315,663.70196 316.6921,663.96607 316.6921,648.12951 316.6921,636.32632 319.58014,633.17893 331.1921,632.32737 338.1921,631.81403 338.1921,631.81403 338.50193,609.31403 339.05465,569.17548 337.12245,542.90278 333.53401,541.76386 320.87658,537.74654 321.85131,521.91914 335.01715,517.68116 358.10202,510.25031 457.8369,520.67401 461.7342,530.92489 469.577,551.55289 464.6582,558.30807 441.2729,559.02523 420.9325,559.64901 420.3396,559.78007 423.7788,562.89251 430.4451,568.92539 438.6921,588.19039 438.6921,597.72987 438.6921,607.67538 435.6266,609.25726 414.0701,610.43536 392.1109,611.63546 393.6702,611.08973 393.7918,617.53265 394.0075,628.96355 393.1346,628.57173 412.6921,626.01654 440.8729,622.33471 450.6529,621.82172 452.6617,623.92001 456.9794,628.43003 462.5275,661.07861 459.4921,664.11403 458.2823,665.32381 444.568,665.85655 443.4486,664.73725 z M 392.2432,568.99886 C 408.8629,560.25157 409.1158,559.16248 394.4421,559.53128 383.1921,559.81403 383.1921,559.81403 382.8944,566.06403 382.536,573.58725 383.1557,573.7818 392.2432,568.99886 z" + id="path3038" + inkscape:connector-curvature="0" + sodipodi:nodetypes="sssssssssssssssssssssssssssssssssssssssscssssssssssssssscscsccscccsssscscssssssssccsssssssssssssssscssscscssssssssssssssssssssssssssssscssssssssssssccsssssssssssssssssssscsssssssssssssssssssssscccssccscccssssssscssssssscsssssssssssssssssssssssssssssssscsssccssssscsscssscsccccsssscsscssssssssssssssscssss" /> + <path + inkscape:connector-curvature="0" + id="path3048" + d="M -544.27593,815.15562 C -554.52457,812.75752 -561.81921,805.22882 -562.72896,796.11042 -564.74585,775.89532 -568.08732,750.60342 -569.90236,741.81402 -571.36304,734.74072 -572.1632,729.20122 -574.74138,708.31402 -575.5221,701.98902 -576.62818,693.88903 -577.19933,690.31403 -578.45487,682.45537 -580.90982,656.9568 -582.25394,637.81403 -587.57342,562.05449 -568.11115,525.23519 -531.81168,542.38587 -523.32213,546.39699 -515.72072,554.89627 -509.8569,566.93393 -500.33927,586.4724 -496.4382,595.04125 -494.88784,599.81403 -491.75176,609.46851 -491.44175,609.62832 -478.24708,608.39237 -471.95553,607.80304 -455.47196,607.31933 -441.61692,607.31745 -412.61149,607.31351 -413.6706,607.77009 -420.30332,598.12929 -423.07135,594.1059 -426.88742,588.48758 -428.78348,585.64413 -432.90381,579.46504 -443.89098,557.05307 -444.878,552.81403 -445.26218,551.16403 -446.14151,549.13903 -446.83206,548.31403 -448.4472,546.38442 -455.3079,524.31516 -455.3079,521.04925 -455.3079,513.42223 -451.94871,509.05147 -442.3079,504.13446 -440.9329,503.43318 -438.18943,501.87463 -436.21131,500.67102 -421.5056,491.72315 -384.3079,495.25311 -384.3079,505.59651 -384.3079,506.09608 -381.8329,510.09776 -378.8079,514.48915 -375.7829,518.88054 -373.3079,522.81787 -373.3079,523.23877 -373.3079,523.65968 -372.4079,524.81854 -371.3079,525.81403 -370.2079,526.80952 -369.29789,528.11676 -369.28566,528.71902 -369.27343,529.32127 -368.34938,530.93903 -367.2322,532.31403 -364.26375,535.96756 -344.22512,565.96802 -340.84841,571.81403 -339.25999,574.56403 -336.23856,579.10492 -334.13413,581.9049 -332.02971,584.70488 -330.3079,587.46228 -330.3079,588.03245 -330.3079,588.60263 -329.58602,589.66825 -328.70372,590.40049 -327.82143,591.13273 -326.70421,592.65033 -326.22102,593.77293 -325.73783,594.89554 -324.3222,597.40293 -323.07519,599.34492 -321.82818,601.28691 -319.9079,604.37205 -318.8079,606.20079 -317.7079,608.02952 -312.96077,615.44062 -308.25872,622.6699 -303.55667,629.89917 -299.40159,636.48903 -299.0252,637.31403 -298.64882,638.13903 -296.87095,641.31195 -295.07438,644.36496 -293.27782,647.41796 -290.4579,652.29494 -288.8079,655.20267 -287.1579,658.11041 -284.1373,663.26249 -282.09545,666.65175 -278.41516,672.76064 -274.0651,681.24467 -270.80678,688.66831 -264.47527,703.09382 -267.29834,723.82762 -277.69062,739.22602 -291.59242,759.82452 -298.65666,761.88482 -312.84628,749.47902 -326.47639,737.56242 -349.3079,711.44932 -349.3079,707.77682 -349.3079,707.37862 -350.8829,704.86062 -352.8079,702.18112 -354.7329,699.50172 -356.3079,696.93122 -356.3079,696.46902 -356.3079,696.00682 -357.42723,693.64532 -358.7953,691.22131 -360.16337,688.79731 -361.78909,685.68903 -362.40801,684.31403 -363.02693,682.93903 -364.2218,680.51092 -365.06328,678.91822 -365.90476,677.32552 -367.86135,671.79867 -369.41126,666.63633 -370.96117,661.47398 -372.45948,656.87778 -372.74084,656.42254 -373.0222,655.96729 -380.57738,655.27647 -389.53015,654.88737 -398.48291,654.49827 -408.9579,653.7618 -412.8079,653.25076 -433.57242,650.49452 -444.12742,654.62428 -464.80261,673.59427 -474.04761,682.07678 -474.04071,682.05073 -470.33814,694.50308 -468.65193,700.17412 -466.60317,707.06402 -465.78535,709.81402 -458.36136,734.77782 -461.91135,768.95712 -473.78634,786.84752 -486.69937,806.30182 -521.8264,820.40852 -544.27593,815.15562 z M 1230.1923,785.86832 C 1213.6939,784.22972 1202.3195,782.71132 1192.1923,780.79562 1187.7923,779.96332 1177.6673,778.16712 1169.6923,776.80412 1161.7173,775.44122 1153.1673,773.87212 1150.6923,773.31742 1146.5168,772.38162 1142.1401,771.49332 1130.6923,769.25812 1128.2173,768.77492 1123.0423,767.64512 1119.1923,766.74752 1115.3423,765.84992 1110.3923,764.75472 1108.1923,764.31382 1095.0569,761.68122 1091.5391,760.88592 1085.5371,759.19212 1081.8767,758.15922 1077.8267,757.30732 1076.5371,757.29902 1075.2474,757.29072 1070.5923,756.16582 1066.1923,754.79912 1061.7923,753.43252 1057.0673,752.30942 1055.6923,752.30332 1052.5131,752.28942 1043.8344,749.67682 1042.0512,748.19702 1039.2771,745.89462 1040.4043,739.00882 1044.4423,733.58982 1050.3532,725.65742 1069.3376,701.54942 1076.0697,693.42655 1096.122,669.23164 1092.9534,670.37659 1119.2659,677.81842 1140.461,683.81293 1144.9834,685.2016 1172.6923,694.2236 1177.9173,695.92482 1183.1344,697.31612 1184.2857,697.31542 1185.4371,697.31462 1189.0371,698.23182 1192.2857,699.35362 1195.5344,700.47542 1202.2423,702.03182 1207.1923,702.81222 1212.1423,703.59272 1219.7923,704.90112 1224.1923,705.71972 1233.5022,707.45172 1240.6923,707.72592 1240.6923,706.34882 1240.6923,703.51522 1224.0016,689.46208 1213.493,683.44772 1211.6776,682.40873 1207.2673,679.86091 1203.6923,677.78589 1196.2415,673.46127 1190.7397,670.37081 1183.9529,666.69786 1181.3346,665.28087 1178.7423,663.77001 1178.1923,663.3404 1177.6423,662.9108 1173.8173,660.77116 1169.6923,658.58564 1162.1001,654.56315 1158.4499,652.53812 1141.9722,643.20747 1116.0958,628.55474 1104.4749,610.65116 1108.3298,591.37674 1109.1382,587.33443 1136.9327,567.0654 1146.3364,563.66055 1147.3572,563.29097 1149.318,562.2108 1150.6938,561.26019 1184.0861,538.18766 1248.0177,530.87937 1319.8739,541.9205 1343.9601,545.62149 1369.1953,627.77648 1352.4775,648.06403 1349.6145,651.5383 1330.313,646.53962 1311.1923,637.37206 1302.3833,633.14855 1237.4573,610.91209 1226.1923,608.26049 1171.7714,595.45072 1174.8897,611.20222 1233.7374,646.37357 1241.9648,651.29082 1248.8874,655.31403 1249.1209,655.31403 1249.3544,655.31403 1253.2116,657.56403 1257.6923,660.31403 1262.173,663.06403 1266.0232,665.31403 1266.2481,665.31403 1266.473,665.31403 1269.5979,667.11403 1273.1923,669.31403 1276.7867,671.51403 1280.0146,673.31403 1280.3655,673.31403 1280.7164,673.31403 1282.4785,674.43903 1284.2812,675.81403 1286.0839,677.18903 1287.8439,678.31403 1288.1923,678.31403 1288.5407,678.31403 1290.3007,679.43903 1292.1034,680.81403 1293.9061,682.18903 1295.68,683.31403 1296.0453,683.31403 1298.5268,683.31403 1316.9098,699.94392 1323.3812,708.04302 1335.3688,723.04562 1340.8099,754.24452 1333.0342,763.39282 1332.2961,764.26112 1331.6923,765.45342 1331.6923,766.04242 1331.6923,767.84032 1321.1635,776.85802 1315.774,779.67612 1302.7416,786.49062 1264.3945,789.26512 1230.1923,785.86832 z M -203.8555,728.90832 C -216.83027,723.25672 -212.70609,702.54302 -198.05897,699.79512 -196.03507,699.41542 -193.91188,698.54182 -193.34076,697.85362 -192.31039,696.61212 -201.86643,652.08895 -204.40276,646.31403 -205.00665,644.93903 -205.8674,641.78903 -206.31553,639.31403 -207.51491,632.68995 -211.16589,618.15086 -212.26849,615.60789 -212.7946,614.39452 -215.38119,612.43166 -218.01648,611.24599 -230.5486,605.60752 -229.49256,591.82062 -216.08375,586.01375 -209.07322,582.97774 -207.03388,582.28636 -199.05716,580.24141 -194.52007,579.07825 -183.3829,577.2725 -174.3079,576.22863 -165.2329,575.18475 -149.7079,573.3912 -139.8079,572.24296 -105.3501,568.24641 -92.489539,570.06739 -89.294359,579.3954 -88.461909,581.82565 -87.423279,584.37583 -86.986309,585.06247 -86.549329,585.74911 -85.939769,589.34911 -85.631729,593.06247 -84.822549,602.81693 -83.825419,602.22727 -111.24218,608.20752 -123.50139,610.88155 -126.83597,612.64142 -121.96155,613.86482 -116.25491,615.2971 -101.42765,636.75362 -100.59948,644.77786 -99.522759,655.21024 -103.41371,658.51901 -122.3079,663.23821 -142.44642,668.26819 -141.46594,667.6979 -140.10904,673.59228 -138.16508,682.03687 -136.18164,683.77438 -131.29433,681.31403 -130.20179,680.76403 -128.41401,679.86403 -127.32147,679.31403 -126.22893,678.76403 -124.45549,678.31403 -123.38049,678.31403 -122.30548,678.31403 -121.16922,677.89865 -120.85545,677.39097 -120.54168,676.88328 -118.8424,676.15106 -117.07926,675.76381 -115.31612,675.37656 -113.18378,674.71179 -112.34072,674.28654 -111.49767,673.86129 -108.1079,672.69914 -104.8079,671.70399 -101.5079,670.70883 -98.261876,669.49756 -97.594519,669.01227 -96.927169,668.52698 -92.837539,667.88704 -88.506459,667.59019 -79.624759,666.98142 -79.339059,667.18157 -74.625739,677.31403 -73.474449,679.78903 -70.906949,685.14737 -68.920189,689.22145 -62.099459,703.20812 -63.691449,706.19302 -79.307899,708.69772 -91.598589,710.66902 -150.12673,722.85282 -168.50347,727.26552 -182.67226,730.66782 -198.16342,731.38762 -203.8555,728.90832 z M -153.09536,626.82173 C -150.18726,624.35097 -146.1204,621.19533 -144.0579,619.80919 -140.17761,617.20138 -138.84137,613.76788 -142.0579,614.67015 -143.0204,614.94014 -147.6329,615.93467 -152.3079,616.88022 -162.42679,618.92683 -164.17358,620.11865 -162.48525,623.82414 -161.83771,625.24534 -161.3079,627.51196 -161.3079,628.86108 -161.3079,632.472 -159.10063,631.92389 -153.09536,626.82173 z M 950.4804,722.06402 C 948.5815,719.72652 944.2374,713.76402 940.8269,708.81402 932.7174,697.04412 927.5252,689.8465 923.1529,684.31403 917.4015,677.03646 910.0191,667.20096 906.0922,661.58423 900.9667,654.25327 900.6921,655.03477 900.6921,676.94997 900.6921,696.46792 900.6921,696.46792 897.9421,699.18882 889.4545,707.58692 858.6781,711.35442 850.3643,705.01312 845.5258,701.32272 845.5047,697.35432 850.1921,672.60469 852.1171,662.4406 853.6938,652.70466 853.6958,650.96927 853.6978,649.23389 855.0461,640.83903 856.6921,632.31403 860.5334,612.41864 860.5251,612.17712 855.8106,606.49344 841.0116,588.65251 850.7022,571.82397 877.2772,569.21497 940.2104,563.03649 984.71623,585.59328 984.68653,623.65312 984.67433,639.3802 978.65673,646.13696 961.25753,649.96016 951.521,652.09958 950.7987,650.56566 972.72633,674.31403 997.68303,701.34302 997.63913,700.87182 976.69213,716.96202 961.99843,728.24872 956.3913,729.34012 950.4804,722.06402 z M 939.8152,628.41506 C 960.1509,618.72912 936.8238,612.26816 899.1921,617.16359 893.1578,617.94858 890.8101,625.26781 895.9641,627.22735 907.3942,631.57306 931.7973,632.23402 939.8152,628.41506 z M -21.166519,694.62248 C -39.587869,693.17692 -43.689179,673.9346 -28.615989,659.67138 -20.050159,651.56583 -20.207209,652.13135 -21.712789,634.81403 -23.173279,618.01539 -24.512659,616.75902 -41.968569,615.81364 -62.305479,614.71224 -63.850509,613.1325 -62.995899,594.31403 -62.123449,575.10295 -51.546409,560.31403 -38.679089,560.31403 -37.439849,560.31403 -36.189489,559.93145 -35.900489,559.46385 -35.254829,558.41914 -22.263979,556.66951 -4.3078979,555.20889 19.729461,553.2536 45.089441,555.96283 58.343231,561.90198 60.076351,562.67861 61.768941,563.31403 62.104541,563.31403 67.294191,563.31403 87.599151,584.5405 91.758721,594.31403 92.343921,595.68903 94.410141,600.18903 96.350331,604.31403 104.58035,621.81169 105.09612,626.18407 101.06877,644.31403 95.288271,670.33624 79.633391,682.49015 47.692101,685.75385 40.778481,686.46027 29.422061,688.64006 21.192101,690.84035 10.171973,693.78659 -9.4696676,695.54032 -21.166519,694.62248 z M 52.963451,655.55665 C 53.639211,655.02488 55.466991,654.2848 57.025191,653.91201 67.030591,651.5183 73.104501,641.62936 69.801381,633.11108 63.508801,616.88343 59.783741,611.97808 50.240901,607.35284 40.548691,602.6552 18.663661,602.87906 18.714991,607.67532 18.756221,611.52695 25.519931,655.22643 26.260251,656.4243 27.137881,657.84433 51.043361,657.06758 52.963451,655.55665 z M 705.6921,678.81403 C 702.1171,676.34573 698.8504,674.32347 698.4328,674.32012 698.0152,674.31677 693.7402,671.77214 688.9328,668.66538 684.1254,665.55863 678.6171,662.02692 676.6921,660.81713 658.4915,649.37882 657.7522,647.62341 666.2529,636.03268 668.7614,632.61242 675.0404,623.96403 680.2062,616.81403 685.372,609.66403 691.3071,601.58313 693.3954,598.85648 695.4836,596.12983 698.8292,591.38929 700.83,588.32195 702.8309,585.25461 705.1934,582.14291 706.08,581.40705 706.9667,580.6712 707.6921,579.62263 707.6921,579.0769 707.6921,578.05966 723.6572,556.55627 732.388,545.81403 741.2034,534.96762 747.6019,537.36216 759.0675,555.7985 760.0989,557.45704 762.3489,560.42361 764.0675,562.39087 765.786,564.35813 768.9921,568.5782 771.1921,571.76881 773.3921,574.95942 777.3625,580.46398 780.0153,584.00117 782.668,587.53837 785.368,591.64329 786.0153,593.12323 786.6625,594.60317 788.8946,598.06403 790.9753,600.81403 799.4475,612.01094 804.6921,619.27273 804.6921,619.80644 804.6921,620.11715 806.9421,623.27057 809.6921,626.81403 812.4421,630.35749 814.6921,633.52462 814.6921,633.85208 814.6921,634.17955 815.8171,635.92242 817.1921,637.72514 821.106,642.85652 820.6208,647.72886 815.4421,655.29761 813.1046,658.71392 810.5171,662.5499 809.6921,663.82201 791.9239,691.21961 791.4365,691.18342 776.4523,661.35412 770.5233,649.55117 765.3074,639.52929 764.8613,639.08327 763.914,638.13592 729.7162,641.85869 728.6454,643.02574 728.2476,643.4593 726.9162,651.91403 725.6866,661.81403 722.6764,686.051 719.7624,688.5286 705.6921,678.81403 z M 744.9736,607.22308 C 753.9761,604.196 754.3962,603.63266 750.4745,599.84631 748.6692,598.10333 745.7549,594.97833 743.9983,592.90187 740.5889,588.87158 738.6921,588.87903 738.6921,592.92271 738.6921,594.29256 738.0703,596.6285 737.3103,598.11369 732.1193,608.25847 734.2747,610.82059 744.9736,607.22308 z M 223.79245,664.92085 C 222.5559,663.6046 220.89752,660.5671 220.10715,658.17085 219.31679,655.7746 218.39758,653.02653 218.06448,652.06403 217.2726,649.7759 213.5843,649.82908 210.57696,652.17198 165.71159,687.12476 102.5412,633.01912 135.72465,588.06075 136.84235,586.54644 138.76514,583.82164 139.99751,582.00564 149.50288,567.9987 164.53909,553.87515 179.1921,545.19009 183.5921,542.58215 189.05197,539.29217 191.32515,537.87904 193.59833,536.4659 197.19833,534.60629 199.32515,533.74655 201.45197,532.88682 205.4421,531.09179 208.1921,529.75759 217.76397,525.11368 226.36663,522.31403 231.06437,522.31403 236.18631,522.31403 234.21665,521.00086 257.01145,539.61297 289.36518,566.03003 288.33551,570.33254 249.1921,572.28645 235.4421,572.9728 223.43418,573.93479 222.50784,574.4242 221.5815,574.91361 219.07852,575.31403 216.94567,575.31403 214.81282,575.31403 211.20497,576.21403 208.92824,577.31403 206.6515,578.41403 203.93469,579.31403 202.89089,579.31403 201.84708,579.31403 199.01285,580.65584 196.59258,582.29583 194.17232,583.93582 191.6446,585.28582 190.97543,585.29583 190.30627,585.30584 188.22601,586.77653 186.35263,588.56403 184.47926,590.35153 181.08646,593.30429 178.81308,595.12572 170.43901,601.835 170.65047,606.30486 179.83559,616.73971 189.45667,627.66982 197.93943,629.28475 206.99148,621.90958 213.37306,616.71017 214.99862,612.46082 215.63523,599.31403 216.31191,585.33981 216.81608,584.9118 233.84515,583.85461 246.7189,583.05539 244.62359,580.96643 260.54481,610.47343 273.57242,634.61765 273.77944,635.57391 267.74666,643.74018 262.5447,650.78181 250.32194,661.34355 244.68637,663.66669 242.21452,664.68565 239.41071,665.92315 238.45567,666.41669 234.72234,668.34598 226.19275,667.47585 223.79245,664.92085 z M 489.0049,664.06403 C 484.1832,658.73496 483.1777,644.72828 486.7556,632.73244 487.8906,628.92731 489.7031,622.88903 490.7834,619.31403 495.9799,602.11792 496.1812,594.29312 491.7482,581.81403 483.5153,558.63809 475.72585,535.25801 488.2742,531.39261 518.80493,521.98791 558.3721,523.33874 540.7049,546.81403 540.291,547.36403 539.6992,550.73903 539.3897,554.31403 538.4259,565.4498 536.5998,577.62244 535.1893,582.31403 530.4703,598.0099 532.2027,600.84604 541.7475,593.05073 554.982,582.24212 561.6099,582.55398 575.8758,594.65655 585.1844,602.55367 586.2804,601.48886 587.0361,583.81403 587.2477,578.86403 587.9269,570.98903 588.5454,566.31403 590.784,549.39306 591.8333,540.70129 592.3485,534.81403 593.6301,520.1672 610.5463,522.16673 641.6921,540.64656 647.5216,544.10537 649.4374,552.4099 646.0218,559.41418 642.7967,566.02782 639.6886,573.73294 639.6603,575.18487 639.6428,576.08091 638.9678,577.68754 638.1603,578.75516 637.3528,579.82278 636.6891,581.62278 636.6855,582.75516 636.6819,583.88754 635.7849,586.16403 634.6921,587.81403 633.5993,589.46403 632.687,591.48903 632.6648,592.31403 632.6425,593.13903 631.7548,595.61403 630.6921,597.81403 629.6294,600.01403 628.7447,602.51153 628.726,603.36403 628.7074,604.21653 628.334,605.34153 627.8962,605.86403 627.4585,606.38653 626.5212,608.61403 625.8133,610.81403 624.2403,615.70277 622.1285,620.87468 620.1658,624.64507 619.3553,626.20214 618.6921,628.0306 618.6921,628.7083 618.6921,630.7133 605.799,655.57133 603.4772,658.04275 597.6871,664.20604 590.7525,660.44916 572.9122,641.48402 556.7415,624.29366 558.2667,624.5147 543.6357,637.24124 529.8768,649.20915 520.6618,656.80875 519.4188,657.21288 518.7441,657.43225 516.8455,658.73252 515.1996,660.10236 507.537,666.47988 493.1584,668.6545 489.0049,664.06403 z M 443.4486,664.73725 C 443.1314,664.42002 417.0689,664.06755 385.532,663.95398 315.54315,663.70196 316.6921,663.96607 316.6921,648.12951 316.6921,636.32632 319.58014,633.17893 331.1921,632.32737 338.1921,631.81403 338.1921,631.81403 338.50193,609.31403 339.05465,569.17548 337.12245,542.90278 333.53401,541.76386 320.87658,537.74654 321.85131,521.91914 335.01715,517.68116 358.10202,510.25031 457.8369,520.67401 461.7342,530.92489 469.577,551.55289 464.6582,558.30807 441.2729,559.02523 420.9325,559.64901 420.3396,559.78007 423.7788,562.89251 430.4451,568.92539 438.6921,588.19039 438.6921,597.72987 438.6921,607.67538 435.6266,609.25726 414.0701,610.43536 392.1109,611.63546 393.6702,611.08973 393.7918,617.53265 394.0075,628.96355 393.1346,628.57173 412.6921,626.01654 440.8729,622.33471 450.6529,621.82172 452.6617,623.92001 456.9794,628.43003 462.5275,661.07861 459.4921,664.11403 458.2823,665.32381 444.568,665.85655 443.4486,664.73725 z M 392.2432,568.99886 C 408.8629,560.25157 409.1158,559.16248 394.4421,559.53128 383.1921,559.81403 383.1921,559.81403 382.8944,566.06403 382.536,573.58725 383.1557,573.7818 392.2432,568.99886 z" + style="fill:url(#radialGradient3824);fill-opacity:1" + sodipodi:nodetypes="sssssssssssssssssssssssssssssssssssssssscssssssssssssssscscsccscccsssscscssssssssccsssssssssssssssscssscscssssssssssssssssssssssssssssscssssssssssssccsssssssssssssssssssscsssssssssssssssssssssscccssccscccssssssscssssssscsssssssssssssssssssssssssssssssscsssccssssscsscssscsccccsssscsscssssssssssssssscssss" /> + <path + inkscape:connector-curvature="0" + id="path3853" + d="M -522.09465,847.72778 C -540.13249,844.46729 -551.47942,838.2229 -565.35896,823.91877 -571.98148,817.09366 -582.08972,804.46587 -582.11446,802.98685 -582.12535,802.33538 -582.59784,798.65236 -583.16443,794.80236 -597.68191,696.15567 -602.28805,619.14684 -595.48593,588.80236 -581.1576,524.88309 -539.61579,506.04275 -498.97265,545.03097 -488.57063,555.00945 -476.86867,548.93012 -473.65584,531.87853 -469.65452,510.64221 -463.70371,502.03813 -447.75698,494.43221 -423.32451,482.77897 -427.68475,483.90332 -412.08358,485.23329 -363.12514,489.4069 -342.62575,505.19814 -301.82411,570.16922 -297.38911,577.23136 -280.09465,607.30051 -280.09465,607.94932 -280.09465,608.19474 -278.10803,611.86208 -275.67994,616.09895 -258.20601,646.58991 -234.34088,695.61953 -232.99039,703.80236 -227.12427,739.34598 -234.95011,763.74999 -260.80923,790.55236 -266.94764,796.91467 -266.38453,796.72437 -274.66099,795.23352 -301.40838,790.41548 -334.02679,756.88693 -368.96093,698.30236 -382.17312,676.14551 -382.43914,675.76873 -384.62063,676.12234 -385.70634,676.29832 -395.03215,679.13011 -405.34465,682.41519 -425.66594,688.8886 -425.80277,688.98911 -422.24188,694.82828 -391.75462,744.82145 -413.25847,803.35912 -476.61739,842.849 -483.63694,847.22409 -509.51979,850.00079 -522.09465,847.72778 z M -520.59465,811.18974 C -477.95684,800.25856 -458.20495,762.88429 -470.9762,717.30236 -474.98109,703.0085 -478.27688,692.98963 -480.29863,688.96312 -483.6049,682.37836 -469.77819,668.05202 -446.23079,653.66421 -436.86693,647.94276 -436.86693,647.94276 -421.73079,649.23032 -392.02524,651.75724 -385.48866,652.10216 -377.46834,651.566 -368.18353,650.94531 -369.80444,649.03438 -364.54437,666.80236 -355.8246,696.25687 -333.76864,727.79206 -305.96896,750.55236 -299.10903,756.16876 -297.681,755.72616 -289.0301,745.30236 -277.1274,730.96035 -273.92807,723.47581 -273.85534,709.80236 -273.78168,695.95558 -276.87666,688.53747 -294.65728,659.94377 -297.44172,655.46599 -304.59643,643.92736 -310.55663,634.30236 -330.34049,602.35382 -349.67892,572.11686 -375.74486,532.37611 -394.54121,503.71874 -392.61474,505.83237 -401.80096,503.78863 -438.74052,495.57036 -458.79671,517.4265 -442.47851,548.11681 -441.16739,550.58269 -440.09465,553.22245 -440.09465,553.98293 -440.09465,558.62546 -420.97953,591.14331 -410.39954,604.49901 -402.0581,615.02888 -400.18018,614.42553 -442.45284,614.79719 -468.82264,615.02902 -477.22933,615.43255 -483.59465,616.772 -487.99465,617.6979 -492.22079,618.5335 -492.98607,618.6289 -494.8029,618.85539 -498.6048,611.80858 -502.06434,601.80236 -503.5856,597.40236 -505.73868,592.00236 -506.84897,589.80236 -507.95927,587.60236 -510.37361,582.42736 -512.21417,578.30236 -522.49482,555.26178 -532.83427,546.29352 -549.09465,546.31285 -574.8728,546.3435 -583.54929,586.0402 -575.10213,665.30236 -571.5485,698.64713 -569.68479,713.90826 -567.10315,730.80236 -564.33447,748.92051 -560.0832,782.09593 -559.19332,792.52783 -558.37405,802.13216 -557.66347,803.4182 -550.41214,808.42036 -543.52873,813.16873 -532.35999,814.20605 -520.59465,811.18974 z M 1209.4054,827.32372 C 1187.5954,826.37302 1169.2119,824.11375 1144.4054,819.33545 1070.9866,805.1933 1001.6735,748.90315 1022.9042,720.66266 1054.5002,678.63454 1087.6297,653.4075 1111.3853,653.28705 1117.761,653.25472 1117.8437,651.82624 1111.8313,645.58687 1093.8636,626.94093 1079.6364,600.6839 1083.432,593.17491 1108.7757,543.03822 1258.9377,504.38951 1337.0889,527.88871 1350.4134,531.89525 1398.9343,663.12816 1390.7411,673.00031 1384.6349,680.35775 1368.371,686.94668 1352.9054,688.32843 1347.1303,688.84439 1339.0304,689.55915 1334.9054,689.91679 1321.2778,691.09832 1321.7907,697.66818 1337.3947,721.80236 1339.884,725.65236 1342.8206,730.37736 1343.9208,732.30236 1345.0207,734.22736 1348.4386,739.85236 1351.5158,744.80236 1362.7867,762.93297 1367.489,775.84853 1366.6062,786.25014 1365.771,796.09044 1367.1131,794.48004 1350.348,805.75739 1321.1464,825.40028 1286.5887,830.68813 1209.4054,827.32372 z M 1299.3247,781.41634 C 1328.7961,774.23007 1338.166,752.55253 1323.9627,724.41589 1317.8568,712.32042 1307.1273,700.90937 1292.9054,691.38635 1284.0646,685.46648 1279.6043,682.78656 1243.9054,661.94475 1232.0804,655.04106 1219.5523,647.68479 1216.0651,645.59747 1172.9329,619.77993 1167.9722,594.79083 1207.1695,600.78727 1228.5079,604.05164 1305.022,628.13435 1315.3205,634.82764 1318.5515,636.92754 1341.9636,645.30236 1344.603,645.30236 1350.116,645.30236 1351.4931,614.3341 1346.8042,595.80236 1343.8382,584.08024 1337.7802,567.91441 1333.6882,560.80236 1333.0552,559.70236 1331.9486,557.63763 1331.2289,556.21407 1329.0762,551.95622 1326.7411,550.52869 1319.9054,549.29154 1289.3955,543.76972 1242.5642,541.83144 1221.9054,545.23546 1207.4625,547.61526 1202.9911,548.58114 1193.706,551.32681 1171.0801,558.01751 1146.854,570.18714 1123.4054,586.64121 1112.7673,594.10607 1111.6089,595.84926 1112.3888,603.21908 1114.0192,618.62476 1124.8421,628.74858 1161.9054,649.53729 1173.1804,655.8614 1183.9804,661.9216 1185.9054,663.0044 1187.8304,664.0872 1191.4304,666.10243 1193.9054,667.48269 1196.3803,668.86295 1202.6804,672.38019 1207.9054,675.29879 1243.959,695.43771 1260.2863,717.31455 1237.9054,715.49551 1224.3604,714.39463 1212.1306,712.1433 1194.9054,707.57988 1189.6804,706.19564 1183.4503,704.67254 1181.0606,704.19522 1178.6711,703.7179 1168.3211,700.6558 1158.0606,697.39054 1129.9395,688.44128 1101.3673,680.30236 1098.0717,680.30236 1094.5271,680.30236 1093.4434,681.46532 1074.4054,705.69754 1066.7054,715.49835 1057.181,727.46105 1053.2399,732.28132 1042.776,745.08013 1043.2741,747.37558 1056.9345,749.30647 1060.1809,749.76535 1065.8899,751.03289 1069.6212,752.12324 1073.3525,753.21359 1078.8803,754.61158 1081.9054,755.22989 1084.9304,755.8482 1091.4554,757.25508 1096.4054,758.3563 1101.3554,759.45752 1107.2054,760.75613 1109.4054,761.24212 1111.6054,761.7281 1116.5554,762.8579 1120.4054,763.75279 1124.2553,764.64767 1129.8803,765.80701 1132.9054,766.32909 1135.9304,766.85116 1140.2054,767.68834 1142.4054,768.18948 1155.2662,771.11909 1165.4824,773.06573 1179.9054,775.33501 1182.9304,775.81095 1190.5804,777.07572 1196.9054,778.14561 1236.1913,784.79089 1279.7771,786.18279 1299.3247,781.41634 z M 957.7126,751.05236 C 956.8464,750.36486 953.3158,745.30236 949.8668,739.80236 941.4107,726.31729 926.5077,704.4545 923.4131,700.99447 920.2088,697.41178 919.522,697.92043 917.996,705.00672 914.9834,718.99606 915.7981,717.8318 905.618,722.69694 873.8803,737.86454 846.2982,729.9276 839.9563,703.80236 838.822,699.12974 839.239,696.09919 846.324,657.51696 855.359,608.31574 855.1629,611.78505 849.2827,605.16421 837.2948,591.66642 842.03306,579.97164 860.95686,571.03045 866.35566,568.47957 904.01064,567.26591 912.8104,567.27679 914.60555,567.24585 917.3247,568.16122 917.7809,567.87932 922.5261,564.94663 962.8536,578.90626 974.4111,587.48223 1009.9942,613.88565 1011.1266,656.03382 976.5826,668.30541 972.5093,669.75245 973.0754,670.668 986.972,685.10941 1007.7041,706.65424 1011.336,714.86101 1004.3501,724.37765 994.8296,737.34708 963.2224,755.42514 957.7126,751.05236 z M 966.3142,718.82627 C 983.5359,707.51498 988.0104,701.65591 983.285,696.60388 981.8438,695.06304 973.8563,686.37736 965.535,677.30236 957.2137,668.22736 948.441,658.89969 946.04,656.57421 940.5455,651.25239 941.0331,649.76409 948.576,648.83332 974.1559,645.67683 982.2837,637.08295 977.4817,618.26983 969.8354,588.31332 929.0102,570.92307 879.0869,576.35673 854.6992,579.01112 847.9975,590.50506 861.3422,606.79056 865.1331,611.41685 865.1331,611.41685 863.0244,623.6096 861.8647,630.31562 860.2137,640.30236 859.3557,645.80236 858.4976,651.30236 856.2339,665.02736 854.3253,676.30236 850.1692,700.85485 850.1713,700.77498 853.6099,703.02931 861.0586,707.91258 891.722,702.43452 894.2821,695.76317 894.6249,694.86976 894.9054,684.97568 894.9054,673.77634 894.9054,643.81337 896.5041,642.264 909.4054,659.7233 914.6316,666.79593 918.0138,671.3259 922.6451,677.45611 924.1632,679.46567 927.4304,683.88212 929.9054,687.27043 932.3803,690.65875 935.8884,695.26913 937.7009,697.51573 939.5134,699.76232 942.6463,704.12088 944.6629,707.2014 956.4054,725.13882 956.5692,725.22677 966.3142,718.82627 z M 909.9054,637.25171 C 887.8001,634.2105 888.435,634.57244 888.1142,624.8291 887.7187,612.82193 885.1946,613.93403 915.5793,612.72854 955.6063,611.14049 969.9243,623.09202 942.0568,634.82998 934.5872,637.97624 922.0407,638.92127 909.9054,637.25171 z M -184.46985,745.18023 C -217.74827,741.77679 -230.38292,708.86744 -202.48356,698.26012 -201.16966,697.76058 -200.09465,696.6282 -200.09465,695.74372 -200.09465,693.36602 -203.98691,678.13767 -205.21991,675.69128 -205.80511,674.53018 -208.46334,664.85518 -211.12707,654.19128 -220.10856,618.23513 -219.38998,619.99211 -226.4716,616.67257 -233.88994,613.19519 -236.49565,608.94596 -236.55604,600.2275 -236.66179,584.96013 -220.18326,577.39738 -174.59465,571.79058 -167.99465,570.97887 -158.99465,569.85393 -154.59465,569.29071 -109.36667,563.50137 -90.30719,567.11528 -73.97682,584.5768 -68.65032,590.27225 -66.09465,591.2777 -66.09465,587.6778 -66.09465,578.57769 -54.981937,564.52964 -42.631617,560.28051 22.653033,537.8193 87.28605,559.70931 113.85478,612.17134 116.38403,617.16554 117.15732,616.79709 118.82684,609.80236 125.48628,581.90139 162.57431,549.37335 219.025,521.92361 233.18193,515.03966 229.95957,514.46742 244.81483,526.50343 287.51487,561.09979 296.16374,569.26145 295.66173,574.48601 294.75706,583.90101 285.55778,589.16617 269.83685,589.26674 264.25774,589.30243 254.42966,591.645 253.49167,593.16269 253.21689,593.60729 257.81215,600.02019 263.70336,607.41357 290.07883,640.51439 292.27161,646.58302 283.35447,661.79897 278.72506,669.69847 254.29518,687.30236 247.96203,687.30236 245.14273,687.30236 227.97159,676.88039 223.1093,672.21809 216.99233,666.35269 217.21288,666.38271 213.00575,670.84308 197.08899,687.71789 156.19506,677.74218 130.25039,650.65564 122.25719,642.31065 122.41189,642.29867 121.47204,651.33563 119.07276,674.40554 102.14926,694.99692 78.90535,703.12792 67.10146,707.25706 65.06838,707.66943 54.90535,707.99588 49.13035,708.18138 42.38035,708.7967 39.90535,709.36326 -24.72491,724.15803 -65.05396,696.03075 -35.77343,656.58151 -21.34424,637.14127 -27.38775,623.8587 -52.42052,619.99412 -58.93713,618.98808 -64.63293,614.94311 -66.73692,609.82709 -68.96803,604.40194 -69.89594,604.2485 -72.85433,608.81548 -77.08376,615.34463 -86.30843,620.75361 -95.56097,622.12973 -99.13016,622.66057 -100.53425,623.30373 -100.38705,624.34037 -98.44803,637.99592 -96.42776,641.86021 -90.83543,642.6103 -84.76245,643.42486 -82.8169,646.38236 -80.64573,658.10005 -78.52287,669.55697 -77.55938,670.96345 -71.77388,671.05091 -62.50519,671.19103 -56.14497,676.51506 -54.12541,685.82414 -53.53141,688.56216 -52.10752,693.02462 -50.96121,695.74071 -43.79882,712.71139 -57.54019,723.55505 -96.059,731.32852 -104.05361,732.94191 -120.55829,736.49361 -132.73608,739.22118 -144.91386,741.94876 -158.86386,744.45933 -163.73608,744.80023 -168.60829,745.14113 -173.49465,745.54731 -174.59465,745.70285 -175.69465,745.85838 -180.13849,745.62321 -184.46985,745.18023 z M -169.82752,723.77211 C -149.86515,719.08261 -96.27279,707.93779 -83.09465,705.73554 -68.56769,703.30788 -68.95792,705.78153 -79.65722,683.94572 -85.54927,671.92085 -89.1161,671.95545 -119.59465,684.33306 -132.80015,689.69593 -140.52642,692.2544 -141.20817,691.49014 -142.27613,690.29291 -144.23599,684.07084 -146.14959,675.80236 -148.3401,666.33733 -148.2045,666.09124 -139.59465,663.9061 -136.29465,663.06857 -130.66965,661.64759 -127.09465,660.74836 -102.79643,654.63657 -101.52613,652.2221 -113.34465,634.61375 -124.65342,617.76487 -129.64801,615.73155 -139.14503,624.11026 -146.35627,630.47234 -164.15989,643.57046 -164.76874,642.96161 -166.55852,641.17183 -170.89159,616.30236 -169.41364,616.30236 -168.53707,616.30236 -117.49788,605.67217 -109.59465,603.84356 -89.96321,599.30133 -90.33022,599.68206 -94.15909,587.83042 -97.16776,578.51757 -97.83148,578.23215 -116.37942,578.27505 -128.89846,578.30401 -145.21522,579.95033 -184.59465,585.15778 -214.09672,589.05907 -232.58906,603.26424 -214.6897,608.27575 -208.40805,610.0345 -208.75526,609.25815 -202.55994,635.39721 -199.50889,648.27004 -195.94416,663.30236 -194.63831,668.80236 -185.62524,706.76375 -185.75407,704.74676 -192.27502,705.80215 -205.59461,707.95789 -210.27879,714.98692 -204.38755,723.9781 -201.44252,728.47277 -189.53536,728.4018 -169.82752,723.77211 z M 7.73613,689.89967 C 12.86806,689.06022 18.49306,687.93489 20.23613,687.39893 24.42085,686.11223 37.66029,683.53173 46.40535,682.29829 56.90327,680.81762 66.75082,678.66982 68.15637,677.55428 68.84331,677.00908 71.05492,676.03198 73.07106,675.38295 77.06457,674.09737 84.61515,667.92302 87.99038,663.18295 93.85869,654.94167 99.11291,631.57329 96.84485,623.80236 89.94265,600.15382 74.69877,579.36889 57.99252,570.82747 31.51002,557.28775 -33.20132,559.65921 -49.94144,574.78291 -57.98257,582.04759 -62.20578,604.51456 -56.52063,609.78338 -53.44245,612.63614 -54.16202,612.51852 -40.09465,612.46823 -23.42289,612.40863 -19.31956,616.46917 -17.52514,634.80236 -15.52692,655.21778 -15.88971,656.85644 -24.04672,664.25887 -45.66213,683.87469 -30.45118,696.14611 7.73613,689.89967 z M 24.90535,664.30236 C 20.40535,663.80236 20.40535,663.80236 16.71012,638.80236 11.79877,605.57477 11.4798,602.3342 13.10479,602.17474 13.8201,602.10454 15.53035,601.86728 16.90535,601.64748 38.09303,598.26053 55.26429,602.76686 64.11196,614.03612 68.06265,619.0681 69.72768,622.27856 73.9987,633.09941 77.04079,640.80673 71.83016,657.30236 66.35348,657.30236 65.6917,657.30236 64.59004,657.97736 63.90535,658.80236 63.22066,659.62736 61.92806,660.30513 61.03291,660.30852 60.13775,660.31191 58.21323,660.93668 56.75619,661.6969 52.44092,663.94843 34.74671,665.39584 24.90535,664.30236 z M 57.69666,651.03337 C 65.88901,647.23416 66.59908,638.7954 59.82648,625.72168 56.2864,618.88796 39.2109,618.1631 39.55757,624.86126 40.38986,640.94226 41.53281,651.69136 42.61091,653.57696 43.32712,654.82961 53.04328,653.19138 57.69666,651.03337 z M 235.45535,663.45274 C 235.97785,662.98545 238.37415,661.84157 240.78046,660.91078 246.22853,658.8034 258.90228,647.54061 262.98499,641.17826 266.42873,635.81165 266.49575,636.10826 258.60681,621.80236 256.78703,618.50236 252.89499,611.30236 249.95781,605.80236 241.22877,589.4568 242.33814,590.39908 232.36977,590.86325 219.27648,591.47293 219.68183,590.95769 219.43649,607.30236 219.24982,619.73834 210.60446,630.88682 198.52456,634.26898 189.64066,636.75632 176.90445,627.54835 167.73429,612.00835 158.13167,595.73549 196.10764,571.44554 233.90535,569.68444 238.58035,569.46662 246.00535,569.0421 250.40535,568.74106 254.80535,568.44003 260.88049,568.23743 263.90567,568.29086 277.13176,568.52443 274.12542,563.8706 246.72358,541.69294 230.81435,528.81681 226.81637,527.54317 219.60889,533.05498 218.94694,533.56119 215.70535,535.03525 212.40535,536.33066 155.42125,558.69974 116.7091,610.18067 136.1761,637.70329 145.52571,650.92184 170.38371,663.78525 179.57818,660.1628 180.58312,659.76687 182.94678,659.4113 184.83076,659.37265 188.56813,659.29596 201.71598,653.29877 206.23208,649.61076 207.78677,648.34114 209.81177,647.30068 210.73208,647.29862 211.65238,647.29657 213.92306,646.36961 215.77803,645.23871 220.0723,642.62069 221.87192,643.30394 221.76013,647.5099 221.712,649.32075 222.39721,652.15236 223.28283,653.80236 224.16844,655.45236 224.8958,657.48973 224.89919,658.32985 224.91746,662.85929 232.1787,666.38316 235.45535,663.45274 z M 200.40535,624.28359 C 205.50176,622.36809 208.41416,613.45009 206.47131,605.70915 205.86855,603.30755 189.40566,602.46871 187.14973,604.72464 184.11253,607.76185 187.65436,622.86317 191.90535,625.00121 194.26525,626.18812 195.64894,626.0713 200.40535,624.28359 z M 794.9054,706.42261 C 794.9054,705.13882 768.1724,665.2268 765.4455,662.43924 763.1337,660.07612 763.1337,660.07612 753.0246,663.2168 740.2535,667.18447 739.3698,668.61633 735.9035,690.95706 735.114,696.04617 733.0407,703.11318 731.9211,704.53252 726.1767,711.81416 706.4918,701.32308 685.5931,679.84202 673.5777,667.49169 662.89715,657.11715 661.85845,656.78748 660.27125,656.28372 653.90535,648.22827 653.90535,646.72356 653.90535,646.46036 656.06925,643.44542 658.71405,640.02369 665.72755,630.94981 715.7278,565.44198 728.3405,548.80236 736.1882,538.44929 740.85324,535.32254 744.0868,536.9545 748.07837,538.96903 782.17272,584.9077 786.8208,592.12341 788.13162,594.15833 791.7493,598.9481 794.8208,602.79289 797.8924,606.63769 800.9835,610.88161 801.69,612.22382 802.3965,613.56604 805.3731,617.6203 808.3049,621.23329 811.2366,624.84628 814.174,628.83753 814.8325,630.10273 815.4909,631.36794 818.3051,635.25803 821.0862,638.74739 829.3033,649.05707 836.8104,660.65261 836.0826,661.91084 835.7101,662.55481 830.4554,668.91104 824.4054,676.03582 818.3554,683.16059 810.0587,693.11024 805.9682,698.14615 799.4322,706.19293 794.9054,709.57959 794.9054,706.42261 z M 717.2471,679.55236 C 717.4999,679.13986 718.7515,670.53924 720.0282,660.43987 722.7263,639.09591 722.5524,639.45856 730.4054,638.80553 733.7054,638.53112 739.5554,637.90292 743.4054,637.40954 767.0438,634.38025 767.2308,634.41304 771.3142,642.30236 776.4646,652.25281 788.6498,676.91197 789.2269,678.55236 789.5656,679.51486 790.5459,680.30236 791.4054,680.30236 792.2649,680.30236 793.2703,679.51486 793.6394,678.55236 794.0088,677.58986 795.6822,674.85567 797.3582,672.47637 817.6415,643.68123 817.4247,650.17821 798.9732,624.07306 796.5354,620.62418 792.5309,614.87736 790.0742,611.30236 787.6176,607.72736 784.744,603.67736 783.6886,602.30236 782.6331,600.92736 779.3497,596.42736 776.3921,592.30236 768.6172,581.45824 758.1751,567.56248 747.6566,554.06261 740.6283,545.04207 738.1793,546.96016 714.9159,579.7057 714.0966,580.85886 710.2494,586.07736 706.3664,591.30236 688.7472,615.01089 675.6565,633.08526 674.9053,634.74052 674.6303,635.34647 672.49285,638.34917 670.15535,641.41318 665.17075,647.94699 664.98335,649.21594 668.66165,651.52371 673.8318,654.76738 675.4086,655.75972 677.8083,657.28002 683.5566,660.92166 686.7758,662.93089 689.8607,664.80236 691.6738,665.90236 694.4032,667.81486 695.9258,669.05236 697.4483,670.28986 699.2217,671.30236 699.8665,671.30236 700.5113,671.30236 702.5138,672.42736 704.3165,673.80236 706.1192,675.17736 708.0445,676.30236 708.5948,676.30236 709.1451,676.30236 710.4099,677.20236 711.4054,678.30236 713.2107,680.29724 716.3754,680.97441 717.2471,679.55236 z M 727.3412,615.55236 C 727.5205,613.48986 728.8547,607.57384 730.3061,602.40564 731.7577,597.23745 732.7508,592.81438 732.513,592.57661 732.2752,592.33883 732.6787,590.26735 733.4097,587.97332 734.1406,585.67929 735.0392,582.45236 735.4064,580.80236 736.0741,577.80236 736.0741,577.80236 738.0867,580.30236 740.2066,582.93577 750.0659,593.99087 758.2836,602.949 761.7037,606.67738 762.7499,608.42067 761.7836,608.78177 733.9537,619.18177 726.9052,620.56737 727.3412,615.55236 z M 360.90535,683.54921 C 323.40107,679.75149 303.74675,664.7983 310.43999,645.15471 312.53568,639.00421 319.31936,632.53272 326.07051,630.24351 332.2277,628.15571 332.00879,630.45492 330.06374,588.30236 328.17697,547.41273 328.1017,547.00662 321.80621,543.75109 315.60101,540.54226 313.02721,529.90414 316.70968,522.68591 322.90671,510.53873 338.15759,507.85603 381.90535,511.2177 444.45005,516.02376 464.45085,522.48852 475.70195,541.53513 477.84365,545.16078 478.36365,545.03429 479.74225,540.55236 481.94255,533.39905 500.93295,523.37298 519.06975,519.7893 523.10435,518.99209 528.34435,517.64947 530.71435,516.8057 535.89255,514.96207 534.71355,514.27795 550.45115,528.25721 564.49185,540.72916 563.82495,538.96212 562.35395,559.79477 560.92735,579.99942 560.33395,577.94257 569.60185,584.91782 580.86945,593.39806 581.17185,593.14167 582.82315,573.70724 583.24815,568.70493 583.91925,564.08883 584.31455,563.44924 584.70985,562.80966 585.42375,558.35246 585.90105,553.54436 589.06035,521.71658 588.49285,522.92535 599.83955,523.8563 619.81755,525.4954 657.80735,545.80026 665.13035,558.75307 666.25715,560.74609 640.74095,627.83297 632.80145,643.75205 623.73665,661.92722 613.94255,675.07871 606.59775,678.93802 603.39615,680.62031 605.52785,682.14307 583.01095,662.08907 571.96475,652.25115 564.10845,646.29937 562.17525,646.30434 561.14085,646.307 547.33675,655.95203 526.39785,671.30236 524.52225,672.67736 521.37555,674.92736 519.40535,676.30236 517.43515,677.67736 514.21135,680.03457 512.24145,681.54061 505.17845,686.94058 488.33805,677.74091 480.82905,664.38039 478.26665,659.82123 476.90535,659.9368 476.90535,664.71349 476.90535,671.70651 469.07195,678.62548 457.40535,681.93707 452.02655,683.46386 373.08617,684.78265 360.90535,683.54921 z M 454.90535,658.23244 C 454.90535,654.90369 449.31485,631.61877 448.20755,630.3353 446.93245,628.85744 418.54065,631.44007 402.12805,634.52686 388.28295,637.13079 388.85065,637.61623 388.25295,622.66321 387.63895,607.30502 386.02735,608.50002 408.35255,607.75972 437.12505,606.80562 438.47975,604.49546 425.57525,578.38902 419.30515,565.70424 415.33875,563.93654 405.90535,569.62278 380.02905,585.22048 375.91705,585.14035 376.63075,569.05236 377.19635,556.30236 377.19635,556.30236 415.55085,556.30236 461.11665,556.30236 458.34095,557.05119 457.27485,545.04597 456.27125,533.7436 453.69975,532.06446 432.40535,528.80634 426.90535,527.96482 419.70535,526.8316 416.40535,526.28808 395.33525,522.81777 354.01559,521.23246 342.59154,523.45606 331.04545,525.70342 325.78193,533.12335 332.93975,537.06209 340.8956,541.43996 340.50836,540.41975 341.45788,559.50374 344.32708,617.17054 342.66269,638.78758 335.33274,639.05669 323.47005,639.49222 320.90535,641.45851 320.90535,650.11784 320.90535,659.77338 325.28491,661.23894 353.90535,661.16089 418.64585,660.98432 440.74475,661.21106 446.40535,662.10994 453.77225,663.27976 454.90535,662.76286 454.90535,658.23244 z M 504.18745,661.80848 C 509.23325,659.466 519.64725,651.68964 532.31855,640.80236 558.35395,618.43261 555.71365,618.44605 577.27765,640.57352 595.81365,659.59379 598.49155,660.38495 603.43825,648.30236 604.45155,645.82736 605.80695,643.12736 606.45025,642.30236 608.05165,640.24849 612.90535,629.69637 612.90535,628.26858 612.90535,627.63188 613.56625,625.91651 614.37405,624.45665 616.21955,621.12134 620.08475,611.6356 622.79015,603.80236 623.92985,600.50236 625.52855,596.00236 626.34285,593.80236 627.15715,591.60236 628.99015,586.65236 630.41615,582.80236 631.84215,578.95236 634.09115,572.87736 635.41395,569.30236 636.73675,565.72736 638.73845,560.33371 639.86215,557.31648 642.52945,550.15489 642.87225,550.92591 635.15535,546.73061 631.44285,544.71231 627.21925,542.23979 625.76955,541.23612 621.84245,538.51737 611.38705,534.48026 604.69125,533.09726 598.00855,531.71698 596.93545,532.3681 596.93665,537.80236 596.93695,539.45236 596.27895,545.07736 595.47425,550.30236 592.57985,569.09702 590.67005,587.32286 590.77215,595.17581 590.80345,597.5812 590.22605,600.7312 589.48905,602.17581 588.75195,603.62041 588.34765,606.15236 588.59045,607.80236 589.72345,615.50074 586.72585,615.36236 578.75765,607.34843 570.35515,598.89771 560.79875,592.29552 557.00035,592.3171 553.80125,592.33528 552.04105,593.33124 542.75375,600.37809 538.71215,603.44474 533.98585,606.93224 532.25095,608.12809 526.20555,612.29516 523.55435,610.13622 526.29755,603.28009 527.18185,601.07008 527.91065,596.68349 527.91725,593.53212 527.92375,590.38075 528.57475,585.3763 529.36395,582.41111 530.15315,579.44592 530.55255,575.78839 530.25155,574.28328 529.95055,572.77816 530.21185,570.59817 530.83225,569.43886 532.03205,567.19704 534.89045,547.29717 535.62705,536.05871 536.43945,523.66123 518.79775,523.93 494.12055,536.69106 487.09715,540.32302 487.24225,556.40405 494.49285,577.96249 499.65275,593.30422 500.52135,598.30089 499.00665,603.92614 498.39895,606.18284 497.66755,610.38244 497.38125,613.2586 497.09495,616.13476 496.24715,619.68372 495.49715,621.14517 494.74725,622.60663 493.60145,626.50236 492.95095,629.80236 492.30055,633.10236 491.03765,637.37736 490.14455,639.30236 487.50825,644.98449 488.62495,657.60081 492.15815,662.05236 493.51565,663.76279 500.27295,663.62579 504.18745,661.80848 z M 480.76025,635.31292 C 488.66585,622.05891 489.93865,607.14461 484.81885,587.75424 483.08315,581.1807 481.20605,573.55236 480.64735,570.80236 479.23605,563.85468 478.59155,563.54948 474.33025,567.81079 468.58945,573.55158 460.96545,576.55982 451.40535,576.85635 446.33265,577.01369 443.44195,577.5066 443.50535,578.20342 443.56035,578.80784 443.67285,583.1093 443.75535,587.76222 443.90535,596.22208 443.90535,596.22208 448.04105,597.46116 454.55875,599.41392 456.00835,602.66288 455.77805,614.80236 455.53465,627.63462 455.95745,628.89517 460.76275,629.66356 465.88955,630.48338 470.97985,634.07361 473.40535,638.58062 476.00555,643.41224 475.90165,643.45839 480.76025,635.31292 z" + style="fill:#a05116" + sodipodi:nodetypes="sscsssssssssssssssssssssssssssssssssssssssssssssssssssscssssccsssssssssssssccssssssscssscssscsssssssssssccsssssssccsssscssssssssccsscssccsssscssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssscssssssssssscsccssssssscsccssssscsssccscsccccscsssccccsssccsccccccsssssssssssscsssssssssssssssssssscsssssssssssssssssssssscscsssscscscscccssssccssccsscsccccssscsscssssss" /> + <path + inkscape:connector-curvature="0" + id="path3851" + d="M -522.09465,847.72778 C -540.13249,844.46729 -551.47942,838.2229 -565.35896,823.91877 -571.98148,817.09366 -582.08972,804.46587 -582.11446,802.98685 -582.12535,802.33538 -582.59784,798.65236 -583.16443,794.80236 -597.68191,696.15567 -602.28805,619.14684 -595.48593,588.80236 -581.1576,524.88309 -539.61579,506.04275 -498.97265,545.03097 -488.57063,555.00945 -476.86867,548.93012 -473.65584,531.87853 -469.65452,510.64221 -463.70371,502.03813 -447.75698,494.43221 -423.32451,482.77897 -427.68475,483.90332 -412.08358,485.23329 -363.12514,489.4069 -342.62575,505.19814 -301.82411,570.16922 -297.38911,577.23136 -280.09465,607.30051 -280.09465,607.94932 -280.09465,608.19474 -278.10803,611.86208 -275.67994,616.09895 -258.20601,646.58991 -234.34088,695.61953 -232.99039,703.80236 -227.12427,739.34598 -234.95011,763.74999 -260.80923,790.55236 -266.94764,796.91467 -266.38453,796.72437 -274.66099,795.23352 -301.40838,790.41548 -334.02679,756.88693 -368.96093,698.30236 -382.17312,676.14551 -382.43914,675.76873 -384.62063,676.12234 -385.70634,676.29832 -395.03215,679.13011 -405.34465,682.41519 -425.66594,688.8886 -425.80277,688.98911 -422.24188,694.82828 -391.75462,744.82145 -413.25847,803.35912 -476.61739,842.849 -483.63694,847.22409 -509.51979,850.00079 -522.09465,847.72778 z M -519.8157,818.81739 C -473.75626,808.13549 -451.30346,770.13269 -462.05419,721.05236 -462.62644,718.43986 -463.52281,714.38986 -464.04611,712.05236 -464.56941,709.71486 -466.59441,703.10144 -468.54611,697.35588 -472.9311,684.44697 -472.95786,685.19415 -467.91458,679.72284 -456.53842,667.38115 -436.82412,654.86736 -430.09465,655.71636 -418.85522,657.13433 -390.81749,659.27897 -383.37376,659.29008 -375.15287,659.30236 -375.15287,659.30236 -371.99671,669.55236 -363.51647,697.09301 -346.4852,723.32074 -321.73205,746.95866 -302.04966,765.75428 -298.42932,766.59797 -287.37862,754.96446 -257.89003,723.92065 -257.8275,705.84141 -287.04149,657.49691 -314.57896,611.92679 -338.59025,573.8371 -377.88518,513.38938 -388.21358,497.50112 -391.66807,495.51852 -410.59465,494.61683 -431.20059,493.63514 -460.19599,509.69671 -460.0651,522.02024 -459.94546,533.28437 -442.42966,572.58419 -427.93684,594.10573 -418.59399,607.97967 -417.57796,607.17511 -444.28494,607.05134 -457.014,606.99236 -471.44372,607.51111 -477.8863,608.25933 -490.94904,609.77638 -490.59816,609.95308 -493.57628,600.35814 -494.52472,597.30246 -496.82935,591.55266 -498.69768,587.58081 -500.56601,583.60896 -502.09243,580.00896 -502.08972,579.58081 -502.02872,569.9441 -522.01718,545.49499 -533.61941,541.0149 -573.88559,525.46652 -593.76603,567.8967 -585.29402,651.30236 -583.03659,673.5264 -581.04187,690.50483 -579.06729,704.30236 -575.64032,728.24863 -568.31121,784.57798 -567.61746,792.30236 -565.61109,814.64186 -546.80085,825.07567 -519.8157,818.81739 z M 1209.4054,827.32372 C 1187.5954,826.37302 1169.2119,824.11375 1144.4054,819.33545 1070.9866,805.1933 1001.6735,748.90315 1022.9042,720.66266 1054.5002,678.63454 1087.6297,653.4075 1111.3853,653.28705 1117.761,653.25472 1117.8437,651.82624 1111.8313,645.58687 1093.8636,626.94093 1079.6364,600.6839 1083.432,593.17491 1108.7757,543.03822 1258.9377,504.38951 1337.0889,527.88871 1350.4134,531.89525 1398.9343,663.12816 1390.7411,673.00031 1384.6349,680.35775 1368.371,686.94668 1352.9054,688.32843 1347.1303,688.84439 1339.0304,689.55915 1334.9054,689.91679 1321.2778,691.09832 1321.7907,697.66818 1337.3947,721.80236 1339.884,725.65236 1342.8206,730.37736 1343.9208,732.30236 1345.0207,734.22736 1348.4386,739.85236 1351.5158,744.80236 1362.7867,762.93297 1367.489,775.84853 1366.6062,786.25014 1365.771,796.09044 1367.1131,794.48004 1350.348,805.75739 1321.1464,825.40028 1286.5887,830.68813 1209.4054,827.32372 z M 1301.3582,788.84548 C 1336.7813,779.4423 1347.8224,754.33125 1330.9641,721.51171 1319.7877,699.75354 1309.6466,691.69554 1248.9054,656.30823 1165.3836,607.64924 1169.4691,592.01126 1257.9054,621.8584 1293.1914,633.76736 1306.1339,638.41255 1311.3419,641.0372 1321.9131,646.3648 1346.1892,654.4717 1349.6354,653.82519 1367.3434,650.50314 1356.5133,572.5652 1334.9274,547.98018 1331.1346,543.66043 1328.7879,542.76208 1316.4054,540.88976 1227.6702,527.4724 1174.6555,538.80721 1112.7739,584.42715 1099.4558,594.24544 1100.7716,610.3989 1116.2406,626.98335 1126.557,638.04382 1131.1573,640.93346 1194.3747,676.06312 1218.3129,689.36546 1236.9054,702.67099 1236.9054,706.49971 1236.9054,708.24346 1224.8276,706.8829 1209.4054,703.40184 1207.2054,702.90526 1203.3803,702.05286 1200.9054,701.50763 1190.2227,699.15425 1172.2629,694.19548 1157.4054,689.49708 1087.8982,667.5168 1095.011,667.0811 1073.074,694.66284 1027.0079,752.58257 1027.8975,750.18497 1050.5309,755.423 1055.4119,756.55261 1063.6804,758.52823 1068.9054,759.81327 1078.8911,762.26918 1091.6711,765.18945 1103.4054,767.69668 1116.4927,770.49298 1134.3921,774.37623 1138.4054,775.28986 1162.3292,780.73612 1211.624,788.77102 1236.4054,791.26351 1254.9349,793.1272 1290.1697,791.8155 1301.3582,788.84548 z M 957.7126,751.05236 C 956.8464,750.36486 953.3158,745.30236 949.8668,739.80236 941.4107,726.31729 926.5077,704.4545 923.4131,700.99447 920.2088,697.41178 919.522,697.92043 917.996,705.00672 914.9834,718.99606 915.7981,717.8318 905.618,722.69694 873.8803,737.86454 846.2982,729.9276 839.9563,703.80236 838.822,699.12974 839.239,696.09919 846.324,657.51696 850.4938,634.81 853.9054,615.02607 853.9054,613.55268 853.9054,611.19207 854.0805,611.04897 855.3799,612.34825 856.6791,613.64753 856.3869,616.36526 852.92,635.22297 850.7561,646.99311 849.1825,656.94169 849.4229,657.33092 849.6636,657.72015 848.2986,666.53546 846.3898,676.92049 842.1868,699.78659 842.1052,702.19791 845.4017,706.11556 852.0602,714.02882 868.5164,715.22471 886.3176,709.08899 901.3195,703.91814 902.9054,701.26467 902.9054,681.33448 902.9054,661.96678 901.1497,660.85722 927.3811,696.80236 930.9935,701.75236 935.1767,707.43266 936.6772,709.42525 938.1777,711.41784 941.8541,716.47 944.8471,720.65227 955.2069,735.12884 963.1746,733.86269 985.1845,714.24223 998.8148,702.09164 998.5247,701.28498 969.3893,670.32146 954.7707,654.78583 955.3166,655.65655 959.6554,654.79335 984.8755,649.77581 993.6782,630.0449 981.3432,606.18054 956.6574,558.42109 831.4996,552.81071 848.021,600.20418 849.6456,604.86437 848.4399,605.06712 845.502,600.62775 830.3849,577.78425 873.1461,556.5963 912.8104,567.27679 915.0881,567.89009 917.3247,568.16122 917.7809,567.87932 922.5261,564.94663 962.8536,578.90626 974.4111,587.48223 1009.9942,613.88565 1011.1266,656.03382 976.5826,668.30541 972.5093,669.75245 973.0754,670.668 986.972,685.10941 1007.7041,706.65424 1011.336,714.86101 1004.3501,724.37765 994.8296,737.34708 963.2224,755.42514 957.7126,751.05236 z M -184.46985,745.18023 C -208.7742,742.69459 -226.90796,722.22981 -214.93195,710.80236 -214.20538,710.10907 -214.09696,710.81271 -214.57845,713.0965 -218.59016,732.12468 -202.23873,739.08826 -170.86327,731.71348 -148.51068,726.45951 -97.514,715.76246 -83.08711,713.30157 -60.23003,709.40269 -59.52283,707.90587 -70.05593,685.72042 -76.91922,671.26454 -76.79673,671.71922 -74.02345,670.99399 -66.00128,668.89615 -56.05483,676.36023 -54.05857,685.97617 -53.43616,688.9743 -52.01374,693.4917 -50.89764,696.01484 -43.60053,712.51115 -57.78817,723.60509 -96.059,731.32852 -104.05361,732.94191 -120.55829,736.49361 -132.73608,739.22118 -144.91386,741.94876 -158.86386,744.45933 -163.73608,744.80023 -168.60829,745.14113 -173.49465,745.54731 -174.59465,745.70285 -175.69465,745.85838 -180.13849,745.62321 -184.46985,745.18023 z M -10.84099,712.87673 C -42.64385,706.80949 -54.00064,681.19524 -35.80105,656.58151 -31.82413,651.20298 -27.96169,645.45236 -27.21786,643.80236 -25.86544,640.80236 -25.86544,640.80236 -24.89778,643.30236 -22.53763,649.39993 -24.38559,654.10674 -31.91934,661.18649 -39.56823,668.37443 -40.64952,670.86804 -40.44915,680.85729 -40.05822,700.34692 -18.31938,704.58505 25.90535,693.79355 29.48035,692.9212 38.03035,691.36228 44.90535,690.32929 86.15609,684.13124 99.95744,671.43987 104.92846,635.13356 107.29996,617.81309 90.39785,583.89597 73.2707,571.60661 66.08466,566.45036 65.65283,564.51048 72.53139,568.28549 88.5881,577.09752 104.82494,594.34121 113.85478,612.17134 116.38403,617.16554 117.15732,616.79709 118.82684,609.80236 121.37357,599.13236 143.20908,567.30236 147.98202,567.30236 149.58849,567.30236 149.01817,568.26601 144.55362,573.0952 97.15669,624.36331 145.406,693.46919 204.72131,659.27137 213.46203,654.23198 214.60862,654.39324 217.07298,661.00851 222.79846,676.37785 240.4052,674.48656 260.03137,656.39398 277.47721,640.31136 277.47406,640.63587 260.49225,609.00603 253.77596,596.49647 255.16495,596.48425 265.00595,608.96632 290.04079,640.71988 292.14943,646.7915 283.35447,661.79897 278.72506,669.69847 254.29518,687.30236 247.96203,687.30236 245.14273,687.30236 227.97159,676.88039 223.1093,672.21809 216.99233,666.35269 217.21288,666.38271 213.00575,670.84308 197.08899,687.71789 156.19506,677.74218 130.25039,650.65564 122.25719,642.31065 122.41189,642.29867 121.47204,651.33563 119.07276,674.40554 102.14926,694.99692 78.90535,703.12792 67.10146,707.25706 65.06838,707.66943 54.90535,707.99588 49.13035,708.18138 42.38035,708.7967 39.90535,709.36326 21.1445,713.65788 0.68035,715.07474 -10.84099,712.87673 z M 794.9054,706.42261 C 794.9054,705.13882 768.1724,665.2268 765.4455,662.43924 763.1337,660.07612 763.1337,660.07612 753.0246,663.2168 740.2535,667.18447 739.3698,668.61633 735.9035,690.95706 735.114,696.04617 733.0407,703.11318 731.9211,704.53252 726.4325,711.48992 706.4671,701.32908 687.7421,682.04878 676.9272,670.91325 668.47565,661.65706 668.96075,661.47947 669.44585,661.30188 676.0442,665.04867 683.624,669.80568 714.1447,688.96033 713.1097,688.39846 717.3054,688.08952 723.559,687.62907 724.5576,685.37236 727.3331,665.42963 730.2376,644.55912 728.3126,646.65258 746.341,644.75889 764.909,642.80853 761.9985,640.69859 773.9713,664.78919 789.6328,696.30187 790.564,696.40705 809.5043,668.80236 822.7594,649.48349 823.8616,646.40177 819.6978,640.30236 813.0131,630.51014 816.2599,631.98566 823.7997,642.16642 832.6021,654.05218 836.759,660.74222 836.0757,661.92316 835.7071,662.56035 830.4554,668.91104 824.4054,676.03582 818.3554,683.16059 810.0587,693.11024 805.9682,698.14615 799.4322,706.19293 794.9054,709.57959 794.9054,706.42261 z M -208.75374,702.49815 C -207.74123,701.36835 -205.37873,699.71599 -203.50374,698.82624 -201.62874,697.9365 -200.09465,696.51711 -200.09465,695.67206 -200.09465,693.34943 -204.00667,678.09845 -205.21991,675.69128 -205.80511,674.53018 -208.46334,664.85518 -211.12707,654.19128 -220.10856,618.23513 -219.38998,619.99211 -226.4716,616.67257 -233.88994,613.19519 -236.49565,608.94596 -236.55604,600.2275 -236.66179,584.96013 -220.18326,577.39738 -174.59465,571.79058 -167.99465,570.97887 -158.99465,569.85393 -154.59465,569.29071 -109.2645,563.4883 -88.07067,567.65674 -73.19282,585.30099 -70.87335,588.05174 -68.27553,590.30236 -67.4199,590.30236 -66.11446,590.30236 -65.97273,591.22732 -66.53884,596.05236 -67.4136,603.50811 -67.96934,605.29964 -69.41204,605.31474 -70.06247,605.32155 -71.6115,606.89688 -72.85433,608.81548 -77.08376,615.34463 -86.30843,620.75361 -95.56097,622.12973 -99.13016,622.66057 -100.53425,623.30373 -100.38705,624.34037 -98.44803,637.99592 -96.42776,641.86021 -90.83543,642.6103 -85.24041,643.36075 -82.75222,646.58975 -81.19813,655.11692 -80.52799,658.79391 -79.71469,662.88295 -79.39079,664.20366 -78.8237,666.51602 -78.9601,666.58375 -83.07326,666.03205 -85.42252,665.71695 -88.30089,665.84052 -89.46965,666.30665 -90.6384,666.77278 -96.76965,668.80983 -103.09465,670.83342 -109.41965,672.85702 -119.24732,676.3152 -124.93392,678.51826 -136.50084,682.99943 -137.04828,682.8934 -137.82282,676.0217 -138.36734,671.19067 -135.57532,669.7308 -119.04881,666.20532 -100.50507,662.24951 -93.6929,651.69569 -101.27499,638.66905 -104.81322,632.59009 -113.03211,621.11995 -116.39536,617.56734 -120.17963,613.57 -120.07402,613.46759 -109.88877,611.25764 -84.17433,605.67824 -80.95576,602.55878 -85.68831,587.80236 -92.21401,567.45479 -94.98993,567.08585 -172.59465,576.25211 -222.38888,582.13354 -247.63778,601.7809 -221.0722,613.97478 -214.5836,616.95311 -214.72077,616.72647 -212.09811,628.80236 -211.50085,631.55236 -207.60557,648.17171 -203.44191,665.73424 -195.21412,700.43955 -195.22211,700.29464 -201.53578,700.3061 -202.66816,700.30815 -205.16965,701.2644 -207.09465,702.43109 -210.5351,704.51626 -210.56333,704.5174 -208.75374,702.49815 z M 360.90535,683.54921 C 322.94212,679.70501 303.09593,664.22037 310.70973,644.38496 311.64232,641.95539 312.97142,639.7792 313.66329,639.54898 314.62585,639.22869 314.68455,639.7529 313.91329,641.78148 310.48517,650.79813 313.89895,660.76818 321.75894,664.69495 329.29969,668.46223 329.75051,668.48703 395.35575,668.74498 472.64235,669.04885 466.19905,671.53679 459.95195,643.80236 458.19325,635.99421 457.38665,630.43577 457.93245,629.88446 460.54795,627.24246 471.60635,633.75208 473.89695,639.28211 475.61005,643.41789 476.23785,643.1469 479.87545,636.70129 483.81475,629.72127 484.43375,630.21225 482.45445,638.74685 476.60805,663.95593 488.05535,676.84452 508.32855,667.87876 515.19195,664.84341 520.94235,660.61765 539.15015,645.22901 557.78445,629.4799 554.91865,629.31901 572.64855,647.10965 599.74045,674.29432 605.06315,671.35546 625.72775,617.80236 652.74535,547.78518 652.92255,547.00537 642.97825,541.86668 617.61905,528.76232 609.99135,523.69355 628.64825,532.34405 641.09435,538.11483 662.03075,553.27045 665.13035,558.75307 666.25715,560.74609 640.74095,627.83297 632.80145,643.75205 623.73665,661.92722 613.94255,675.07871 606.59775,678.93802 603.39615,680.62031 605.52785,682.14307 583.01095,662.08907 571.96475,652.25115 564.10845,646.29937 562.17525,646.30434 561.14085,646.307 547.33675,655.95203 526.39785,671.30236 524.52225,672.67736 521.37555,674.92736 519.40535,676.30236 517.43515,677.67736 514.21135,680.03457 512.24145,681.54061 505.17845,686.94058 488.33805,677.74091 480.82905,664.38039 478.26665,659.82123 476.90535,659.9368 476.90535,664.71349 476.90535,671.70651 469.07195,678.62548 457.40535,681.93707 452.02655,683.46386 373.08617,684.78265 360.90535,683.54921 z M 28.2249,656.18739 C 26.88601,654.57413 20.51734,611.75588 21.30931,609.69205 22.0704,607.70867 37.94625,607.82837 44.81882,609.8693 60.28415,614.46201 72.63071,640.03155 63.69684,648.96541 58.08286,654.57939 31.39914,660.01212 28.2249,656.18739 z M 57.69666,651.03337 C 65.88901,647.23416 66.59908,638.7954 59.82648,625.72168 56.2864,618.88796 39.2109,618.1631 39.55757,624.86126 40.38986,640.94226 41.53281,651.69136 42.61091,653.57696 43.32712,654.82961 53.04328,653.19138 57.69666,651.03337 z M 654.43165,648.14162 C 653.96485,646.98757 656.26895,643.17384 661.98365,635.64162 673.3264,620.69136 676.3743,617.86073 668.18485,629.88253 664.51625,635.26779 657.70175,645.57661 656.25435,647.93049 655.21225,649.62539 655.03985,649.64535 654.43165,648.14162 z M -30.95221,630.64712 C -32.79887,628.79259 -36.95669,626.04384 -40.1918,624.5388 -47.95109,620.92902 -47.63871,620.30236 -38.07995,620.30236 -28.92222,620.30236 -26.1062,622.71141 -26.09839,630.55236 -26.09392,635.0304 -26.57813,635.03985 -30.95221,630.64712 z M 321.36646,632.21003 C 322.44508,631.52619 325.14508,630.42875 327.36646,629.77127 332.05167,628.38457 331.9707,629.62939 330.06374,588.30236 328.17697,547.41273 328.1017,547.00662 321.80621,543.75109 315.60101,540.54226 313.02721,529.90414 316.70968,522.68591 322.90671,510.53873 338.15759,507.85603 381.90535,511.2177 444.45005,516.02376 464.45085,522.48852 475.70195,541.53513 477.86045,545.18927 478.36745,545.04104 479.77465,540.34434 481.71965,533.85253 483.20105,534.21039 482.24135,540.94021 480.39515,553.88635 481.36475,562.77282 486.20885,577.30236 491.66815,593.67734 491.97685,595.69463 490.53795,605.59439 489.17835,614.94819 487.52045,615.37794 487.80675,606.30236 487.95305,601.66426 487.10245,596.36501 484.83745,587.80236 483.09155,581.20236 481.20605,573.55236 480.64735,570.80236 479.23605,563.85468 478.59155,563.54948 474.33025,567.81079 468.58945,573.55158 460.96545,576.55982 451.40535,576.85635 446.33265,577.01369 443.44195,577.5066 443.50535,578.20342 443.56035,578.80784 443.67285,583.1093 443.75535,587.76222 443.90535,596.22208 443.90535,596.22208 448.04105,597.46116 454.22655,599.31439 455.89695,602.74054 455.90165,613.58374 455.90565,623.03902 455.06425,624.52816 450.95935,622.33126 449.33985,621.46455 443.63755,621.83106 426.13125,623.92705 394.27235,627.74143 396.40535,627.89389 396.40535,621.80236 396.40535,616.0703 397.82765,615.5692 414.60615,615.38997 443.08405,615.08575 447.65695,602.05701 430.35465,570.52045 426.25505,563.04813 425.18595,563.63807 444.19895,562.88064 466.14525,562.00635 469.42905,557.35162 463.79355,535.10598 459.18615,516.91881 339.9261,507.19251 325.27462,523.80901 319.58448,530.2623 319.98691,535.67885 326.55908,541.09705 328.67453,542.84106 331.13906,544.89692 332.03582,545.66564 338.35145,551.07948 335.28404,630.92716 328.73685,631.54123 325.80452,631.81626 322.50535,632.359 321.40535,632.74732 319.43579,633.44263 319.4352,633.43445 321.36646,632.21003 z M 812.0277,628.78886 C 810.331,626.85644 808.2406,623.81894 807.3824,622.03886 805.3609,617.84622 812.1297,624.97003 814.5214,629.55236 816.4418,633.23165 815.7398,633.01673 812.0277,628.78886 z M 903.4054,628.98602 C 895.6326,627.14596 893.2286,623.80533 897.884,621.31377 901.1992,619.5396 933.5477,618.95249 939.4042,620.5602 957.5189,625.53297 922.9739,633.6185 903.4054,628.98602 z M -160.68344,626.8046 C -161.68102,622.82995 -160.70824,621.84393 -154.50597,620.54299 -146.45222,618.8537 -145.79838,620.25887 -152.34002,625.19786 -158.66686,629.97467 -159.83151,630.19896 -160.68344,626.8046 z M 181.48393,617.98135 C 171.72081,607.63792 171.96309,604.74698 183.40535,595.05497 199.08126,581.7769 211.72886,578.16216 250.33523,575.9261 293.37424,573.43331 293.4005,570.06321 250.65236,535.22083 231.23109,519.3913 233.11045,519.85767 216.1821,526.66687 191.75563,536.49209 190.81143,536.32885 211.25481,525.81496 233.30362,514.47541 229.899,514.41705 244.6729,526.38783 287.53534,561.11781 296.16413,569.25741 295.66173,574.48601 294.74863,583.98874 285.66352,589.1144 269.40535,589.29938 266.10535,589.33693 260.93035,590.23775 257.90535,591.3012 252.77107,593.10617 252.33886,593.12222 251.40535,591.54258 247.06822,584.20342 244.40743,583.01292 233.62559,583.58745 213.66835,584.6509 212.46747,585.66574 211.52964,602.26017 210.87253,613.8874 209.25294,620.30236 206.9745,620.30236 206.49078,620.30236 206.33619,617.64251 206.63098,614.39157 207.63756,603.29076 207.28232,602.91145 196.63217,603.71543 191.59137,604.09596 187.34738,604.527 187.20108,604.67329 186.48641,605.38796 186.55344,617.1436 187.28592,619.55236 188.53943,623.67454 186.28034,623.06285 181.48393,617.98135 z M 799.4621,611.07985 C 797.5289,608.31995 797.434,606.66621 799.2973,608.21267 800.5609,609.26136 802.2053,613.30236 801.3685,613.30236 801.1762,613.30236 800.3183,612.30223 799.4621,611.07985 z M 737.9054,606.24783 C 737.9054,597.54679 741.3945,594.45491 745.3545,599.64675 749.2494,604.75326 748.5089,606.18473 741.1554,607.7635 738.2574,608.38569 737.9054,608.22151 737.9054,606.24783 z M 576.31415,594.27423 C 563.26695,583.34857 553.06615,582.46287 541.92325,591.28818 536.38095,595.67779 535.50615,595.3253 536.37435,589.05236 537.64755,579.85347 538.93955,570.98012 539.90535,564.80236 546.41855,523.13978 546.97095,525.79155 530.42715,519.30499 527.20295,518.04082 527.88725,517.17007 533.07235,515.93908 535.41275,515.38345 537.31115,516.69075 548.57235,526.613 564.66885,540.79554 563.87995,538.89923 562.37665,559.79477 560.92325,579.99649 560.33215,577.94125 569.60185,584.91782 578.74745,591.80094 580.11095,592.05591 580.95845,587.04132 582.29085,579.15762 583.16975,580.84569 582.91665,590.80236 582.71405,598.77112 582.08145,599.10377 576.31415,594.27423 z M 583.34485,568.84276 C 584.08975,562.46965 585.90535,560.39101 585.90535,565.91123 585.90535,568.11611 585.19875,570.79361 584.33525,571.86123 582.87165,573.67067 582.80445,573.46589 583.34485,568.84276 z M 384.31655,568.8046 C 383.15125,564.16161 384.26635,563.30236 391.45725,563.30236 399.54865,563.30236 399.65115,564.64241 391.85425,568.49416 385.08075,571.84034 385.07855,571.84043 384.31655,568.8046 z M 33.40535,556.20656 C 24.98097,554.75661 8.92673,554.30084 -1.59465,555.21293 -12.1692,556.12962 -17.74345,555.15166 -10.56538,553.63908 -3.87848,552.23 27.68548,552.63307 34.40535,554.21336 44.81453,556.66124 44.11764,558.05028 33.40535,556.20656 z M 738.9054,538.4248 C 738.9054,536.40224 741.8514,535.01271 743.4054,536.30236 745.7282,538.2302 745.1922,539.30236 741.9054,539.30236 740.2553,539.30236 738.9054,538.90746 738.9054,538.4248 z M 588.90535,528.60812 C 588.90535,524.74856 590.55935,523.29 594.85535,523.36117 598.04685,523.41404 598.20645,523.54027 596.43575,524.61117 595.35245,525.26632 593.21495,527.08745 591.68575,528.65812 588.90535,531.51387 588.90535,531.51387 588.90535,528.60812 z M 609.90535,526.5815 C 607.07905,526.07448 604.64575,524.25726 606.95535,524.37844 607.75285,524.42028 609.98035,525.06105 611.90535,525.80236 615.39305,527.14547 614.65395,527.43339 609.90535,526.5815 z" + style="fill:#211c19" /> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Locale/da.lua Thu Aug 30 12:13:24 2012 -0400 @@ -0,0 +1,220 @@ +locale = { + [":("] = ":(", + ["!!!"] = "!!!", + ["..."] = "...", + ["Accuracy Bonus!"] = "Præcisionsbonus", + ["Achievement Unlocked"] = "Bedrift Fuldført", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_That_Sinking_Feeling, Tumbler + ["a Hedgewars mini-game"] = "et Hedgewars-minispil", -- Space_Invasion, The_Specialists + ["Aiming Practice"] = "Sigtetræning", --Bazooka, Shotgun, SniperRifle + ["Ammo"] = "Ammunition", + ["Ammo Depleted!"] = "Ammunition Udtømt", + ["ammo extended!"] = "ammunition udstrakt", + ["Ammo is reset at the end of your turn."] = "Ammunition nulstilles i slutningen af turen", + ["Ammo Maniac!"] = "Ammunitionsgalskab", + ["Available points remaining: "] = "Tilgængeligt point tilbage: ", + ["[Backspace]"] = "[Tilbage]", + ["Bamboo Thicket"] = "Bambusbuskads", + ["Barrel Eater!"] = "Tøndeæder!", + ["Barrel Launcher"] = "Tøndekaster", + ["Bat balls at your enemies and|push them into the sea!"] = "Slå bolde på dine fjender og|skub dem i havet!", + ["Bat your opponents through the|baskets and out of the map!"] = "Slå dine modstandere gennem|kurvene og ud af banen!", + ["Bazooka Training"] = "Træning med Bazooka", + ["Best laps per team: "] = "Bedste omgang per hold: ", + ["Best Team Times: "] = "Bedste Holdtid: ", + ["Bloody Rookies"] = "Forbandede Begyndere", -- 01#Boot_Camp, User_Mission_-_Dangerous_Ducklings, User_Mission_-_Diver, User_Mission_-_Spooky_Tree + ["Boom!"] = "Bum!", + ["BOOM!"] = "BUM!", + ["Boss defeated!"] = "Boss besejret!", + ["Boss Slayer!"] = "Boss-morder!", + ["Build a track and race."] = "Byg en bane og ræs.", + ["CAPTURE THE FLAG"] = "EROBR FLAGET", + ["Careless"] = "Sløset", + ["Change Weapon"] = "Skift Våben", + ["Clumsy"] = "Kluntet", + ["Codename: Teamwork"] = "Kodeord: Samarbejde", + ["Complete the track as fast as you can!"] = "Gennemfør banen så hurtigt som muligt!", + ["Congratulations!"] = "Tillykke!", + ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "Tillykke! Du har elimineret alle målene|inden for den tilladte tidsramme.", --Bazooka, Shotgun, SniperRifle + ["Control pillars to score points."] = "Kontroller søjler for at score point.", + ["Cybernetic Empire"] = "Kybernetisk Imperium", + ["DAMMIT, ROOKIE!"] = "FOR HELVEDE, REKRUT!", + ["DAMMIT, ROOKIE! GET OFF MY HEAD!"] = "FOR HELVEDE, REKRUT! KOM NED DERFRA!", + ["Dangerous Ducklings"] = "Farlige Ællinger", + ["Deadweight"] = "Dødvægt", + ["Demolition is fun!"] = "Nedrivning er sjovt!", + ["Depleted Kamikaze!"] = "Udtømt Kamikaze!", + ["Destroy invaders to score points."] = "Tilintetgør indtrængere for at score point.", + ["Double Kill!"] = "Dobbeltdrab!", + ["Drone Hunter!"] = "Dronjæger!", + ["Drowner"] = "Drukner", + ["Each turn you get 1-3 random weapons"] = "Hver tur får du 1-3 tilfældige våben", + ["Each turn you get one random weapon"] = "Hver tur får du ét tilfældigt våben", + ["Eliminate all enemies"] = "Eliminer alle fjender", + ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Eliminer all mål før tiden løber ud.|Du har uendelig ammunition under denne mission.", --Bazooka, Shotgun, SniperRifle + ["Eliminate Poison before the time runs out"] = "Eliminer Giften før tiden løber ud", + ["Eliminate the Blue Team"] = "Eliminer det Blå Hold", + ["Eliminate the enemy before the time runs out"] = "Eliminer fjenden før tiden løber ud", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock + ["Eliminate the enemy hogs to win."] = "Eliminer fjendens pindsvin for at vinde.", + ["Eliminate the enemy specialists."] = "Eliminer fjendens specialister.", + ["- Eliminate Unit 3378 |- Feeble Resistance must survive"] = "- Eliminer Enhed 3378 |- Sølle Modstandere skal overleve", + ["Energetic Engineer"] = "Energisk Ingeniør", + ["Enjoy the swim..."] = "Nyd svømmeturen...", + ["[Enter]"] = "[Enter]", + ["Fastest lap: "] = "Hurtigste omgang: ", + ["Feeble Resistance"] = "Sølle Modstand", + ["Fire"] = "Skyd", + ["Flag captured!"] = "Flag erobred!", + ["Flag respawned!"] = "Flag gendannet!", + ["Flag returned!"] = "Flag returneret!", + ["Flags, and their home base will be placed where each team ends their first turn."] = "Flag og deres hjemmebase bliver placeret der hvor hvert hold afslutter sin første tur.", + ["Flamer"] = "Hetzer", + ["Friendly Fire!"] = "Egenbeskydning!", + ["fuel extended!"] = "brændstof udstrakt!", + ["GAME BEGUN!!!"] = "SPILLET ER STARTET!!!", + ["Game Modifiers: "] = "Spilmodifikatorere", + ["GAME OVER!"] = "SPILLET ER FÆRDIGT!", + ["Game Started!"] = "Spillet er Startet!", + ["Get on over there and take him out!"] = "Kom derover og tag ham ud!", + ["Goal"] = "Mål", + ["GO! GO! GO!"] = "GO! GO! GO!", + ["Good birdy......"] = "God pipfugl......", + ["Good luck out there!"] = "Held og lykke derude!", + ["Good so far!"] = "Godt indtil videre!", + ["Good to go!"] = "Klar!", + ["GOTCHA!"] = "FIK DIG!", + ["Grab Mines/Explosives"] = "Snup Miner/Sprængstof", + ["Hahahaha!"] = "Hahahaha!", + ["Haha, now THAT would be something!"] = "Haha, ja DET ville være noget!", + ["Hapless Hogs"] = "Uheldige Pindsvin", + [" Hapless Hogs left!"] = " Uheldige Pindsvin gik!", + ["Health crates extend your time."] = "Kasse med helbredelse forlænger din tid.", + ["Heavy"] = "Tung", + ["Hedgewars-Basketball"] = "Hedgewars-Basketball", + ["Hedgewars-Knockball"] = "Hedgewars-Knockball", + ["Heh, it's not that bad."] = "Heh, det er ikke så slemt.", + ["Hit Combo!"] = "Slagkombi!", + ["Hmmm..."] = "Hmmm...", + ["Hooray!"] = "Hurra!", + ["Hunter"] = "Jæger", --Bazooka, Shotgun, SniperRifle + ["Instructor"] = "Instruktør", -- 01#Boot_Camp, User_Mission_-_Dangerous_Ducklings + ["invaders destroyed"] = "indtrængere tilintetgjorte", + ["It's a good thing SUDDEN DEATH is 99 turns away..."] = "Det er heldigt at PLUDSELIG DØD er 99 ture væk...", + ["Jumping is disabled"] = "Hop er deaktiveret", + ["Kamikaze Expert!"] = "Kamikaze-ekspert!", + ["Keep it up!"] = "Hold gejsten!", + ["Killing spree!"] = "Drabsorgie!", + ["KILLS"] = "DRAB", + ["Last Target!"] = "Sidste Mål!", + ["[Left Shift]"] = "[Venstre Shift]", + ["Listen up, maggot!!"] = "Lyt efter, maddike!", + ["Lively Lifeguard"] = "Livlig Livredder", + ["Mine Deployer"] = "Mineudsætter", + ["Mine Eater!"] = "Mineæder", + ["|- Mines Time:"] = "|- Tid til Miner:", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["MISSION FAILED"] = "MISSION MISLYKKEDES", -- User_Mission_-_Dangerous_Ducklings, User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["MISSION SUCCESS"] = "MISSION LYKKEDES", + ["MISSION SUCCESSFUL"] = "MISSION VAR SUCCESFULD", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["Movement: [Up], [Down], [Left], [Right]"] = "Bevægelse: [Op], [Ned], [Venstre], [Højre]", + ["Multi-shot!"] = "Flerskud!", + ["Nameless Heroes"] = "Navnløse Helte", + ["New Barrels Per Turn"] = "Nye Tønder Per Tur", + ["NEW CLAN RECORD: "] = "NY KLANREKORD: ", + ["NEW fastest lap: "] = "NY hurtigste omgang: ", + ["New Mines Per Turn"] = "Nyt Antal Miner Per Tur", + ["NEW RACE RECORD: "] = "NY RÆSREKORD: ", + ["Newton's Hammock"] = "Newtons Hængekøje", + ["NOT ENOUGH WAYPOINTS"] = "IKKE NOK RUTEPUNKTER", + ["Not So Friendly Match"] = "Ikke Så Venlig Kamp", -- Basketball, Knockball + ["Oh no! Just try again!"] = "Åh nej! Bare prøv igen!", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["Oh no! Time's up! Just try again."] = "Åh nej! Tiden er løbet ud! Bare prøv igen.", --Bazooka, Shotgun, SniperRifle + ["Operation Diver"] = "Operation Dykker", + ["Opposing Team: "] = "Modstander: ", + ["Pathetic Hog #%d"] = "Patetisk Pindsvin #%d", + ["Pathetic Resistance"] = "Patetisk Modstand", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock + ["Per-Hog Ammo"] = "Ammunition Per Pindsvin", + ["Place more waypoints using [ENTER]"] = "Placer flere rutepunkter med [ENTER]", + ["Place more waypoints using the 'Air Attack' weapon."] = "Placer flere rutepunkter med 'Luftangreb'-våbnet", + ["points"] = "point", -- Control, CTF_Blizzard, Basic_Training_-_Bazooka, Basic_Training_-_Shotgun, Basic_Training_-_Sniper_Rifle + ["Poison"] = "Gift", + ["Power Remaining"] = "Kraft Tilbage", + ["Prepare yourself"] = "Gør dig klar", + ["Press [Precise] to skip intro"] = "Tryk på [Præcis] for at springe introen over", + ["Race complexity limit reached."] = "Kompleksitetsgrænsen for ræset er nået.", + ["RACER"] = "RACER", + [" - Return the enemy flag to your base to score | - First team to 3 captures wins | - You may only score when your flag is in your base | - Hogs will drop the flag if killed, or drowned | - Dropped flags may be returned or recaptured | - Hogs respawn when killed"] = " - Returner fjendens flag til din base for at score | - Første hold til at erobre 3 flag vinder | - Du kan kun score når dit flag er ved din base | Pindsvin taber flaget hvis de dør eller drukner | - Tabte flag kan returneres eller generobres | - Pindsvin genopliver når de bliver dræbt", + ["Round Limit:"] = "Rundebegrænsning: ", + ["Round Limit"] = "Rundebegrænsning", + ["Rounds Complete: "] = "Runder Færdiggjort: ", + ["Rounds Complete"] = "Runder Færdiggjort", + ["RULES OF THE GAME [Press ESC to view]"] = "SPILLETS REGLER [Tryk på ESC for at se]", + ["s|"] = "s|", + ["Save as many hapless hogs as possible!"] = "Red så mange uheldige pindsvin som muligt!", + ["SCORE"] = "SCORE", + ["sec"] = "sek.", -- CTF_Blizzard, TrophyRace, Basic_Training_-_Bazooka, Basic_Training_-_Shotgun, Basic_Training_-_Sniper_Rifle, User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork, Capture_the_Flag + ["See ya!"] = "Ses!", + ["selected!"] = "valgt", + ["s"] = "s", -- GaudyRacer, Space_Invasion + ["Shield boosted! +30 power"] = "Skjold forstærket! +30 kraft", + ["Shield Depleted"] = "Skjold Udtømt", + ["Shield is fully recharged!"] = "Skjold er fuldt genopladt!", + ["Shield Master!"] = "Skjoldmester!", + ["Shield Miser!"] = "Skjoldgnier!", + ["Shield OFF:"] = "Skjold SLÅET FRA:", + ["Shield ON:"] = "Skjold SLÅET TIL:", + ["Shield Seeker!"] = "Skjoldsøger!", + ["Shotgun Team"] = "Haglgeværdshold", + ["Shotgun Training"] = "Træning med Haglgevær", + ["shots remaining."] = "skud tilbage.", + ["Silly"] = "Fjollet", + ["Sinky"] = "Synkende", + ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s er ude og Hold %d|scored en straf!| |Score:", -- Basketball, Knockball + ["%s is out and Team %d|scored a point!| |Score:"] = "%s er ude og Hold %d|scored et point!| |Score:", -- Basketball, Knockball + ["Sniper Training"] = "Træning med Sniperriffel", + ["Sniperz"] = "Sniperz", + ["Sponge"] = "Svamp", + ["Spooky Tree"] = "Uhyggeligt Træ", + ["STATUS UPDATE"] = "STATUSOPDATERING", -- GaudyRacer, Space_Invasion + ["Switched to "] = "Skiftede til ", + ["Team %d: "] = "Hold %d: ", + ["Team Scores"] = "Holdscore", -- Control, Space_Invasion + ["That Sinking Feeling"] = "Følelsen af at Synke", + ["That was pointless."] = "Det var meningsløst.", + ["The enemy is hiding out on yonder ducky!"] = "Fjenden gemmer sig på rapanden derover!", + ["The flag will respawn next round."] = "Flaget gendannes næste runde.", + ["The Nameless One"] = "Den Navnløse Ene", + ["THE SPECIALISTS"] = "SPECIALISTERNE", + ["This one's tricky."] = "Den her er drilagtig.", + ["This rain is really something..."] = "Det her regnvejr er virkelig noget...", + ["TIME: "] = "TID: ", + ["Timed Kamikaze!"] = "Tidsindstillet Kamikaze!", + ["Time Extended!"] = "Tid Forlænget!", + ["Time Extension"] = "Tidsforlængelse", + ["Toggle Shield"] = "Slå Skjold Til/Fra", + ["Toxic Team"] = "Giftigt Hold", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["TRACK COMPLETED"] = "BANE FULDFØRT", + ["TRACK FAILED!"] = "BANE MISLYKKEDES!", + ["TrophyRace"] = "TrofæRæs", + ["T_T"] = "T_T", + ["Tumbling Time Extended!"] = "Tumlende Tid Forlænget", + ["Turn Time"] = "Tid til Tur", + ["Unit"] = "Enhed", + ["Unit 3378"] = "Enhed 3378", + ["Unit 835"] = "Enhed 835", + ["Unlimited Attacks"] = "Uendelige Angreb", + ["Unstoppable!"] = "Ustoppelig!", + ["User Challenge"] = "Brugerudfordring", + ["Use your rope to get from start to finish as fast as you can!"] = "Brug dit reb til at komme fra start til slut så hurtigt som muligt!", + ["Victory for the "] = "Sejr for ", -- CTF_Blizzard, Capture_the_Flag + ["Waypoint placed."] = "Rutepunkt placeret.", + ["Way-Points Remaining"] = "Rutepunkter Tilbage", + ["Weapons Reset"] = "Våben Nulstillede", + ["Well done."] = "Godt klaret.", + ["Will this ever end?"] = "Slutter det her nogensinde?", + ["WINNING TIME: "] = "VINDENDE TID: ", + ["You'd almost swear the water was rising!"] = "Man kunne næsten sværge på at vandet steg!", + ["You have SCORED!!"] = "Du har SCORET!!", + ["You saved"] = "Du reddede", + ["You've failed. Try again."] = "Det lykkedes dig ikke. Prøv igen.", + ["You've reached the goal!| |Time: "] = "Du har nået målet!| |Tid: ", + ["'Zooka Team"] = "'Zooka-hold", + }
--- a/share/hedgewars/Data/Locale/en.txt Mon Jul 23 19:15:59 2012 +0300 +++ b/share/hedgewars/Data/Locale/en.txt Thu Aug 30 12:13:24 2012 -0400 @@ -79,6 +79,7 @@ 01:18=High 01:19=Extreme 01:20=%1 Bounce +01:21=Audio Muted ; Event messages ; Hog (%1) died
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Locale/missions_da.txt Thu Aug 30 12:13:24 2012 -0400 @@ -0,0 +1,32 @@ +Basic_Training_-_Bazooka.name=Grundliggende Træning med Bazooka +Basic_Training_-_Bazooka.desc="Nøglen er et bruge vinden til din fordel!" + +Basic_Training_-_Grenade.name=Grundliggende Træning med Granater +Basic_Training_-_Grenade.desc="Husk, FØRST hiver du splitten ud OG SÅ kaster du!" + +Basic_Training_-_Shotgun.name=Grundliggende Træning med Haglgevær +Basic_Training_-_Shotgun.desc="Skyd først, spørg bagefter!" + +Basic_Training_-_Sniper_Rifle.name=Grundliggende Træning med Sniperriffel +Basic_Training_-_Sniper_Rifle.desc="Bum, Lige i Hovedet!" + +User_Mission_-_Dangerous_Ducklings.name=Mission: Farlige Ællinger +User_Mission_-_Dangerous_Ducklings.desc="Udmærket, rekrut! Nu skal vi se om du kan huske hvad du har lært!" + +User_Mission_-_Diver.name=Mission: Dykker +User_Mission_-_Diver.desc="Det der 'amfibieangreb' er sværere end det ser ud..." + +User_Mission_-_Teamwork.name=Mission: Samarbejde +User_Mission_-_Teamwork.desc="Kærlighed gør ondt en gang imellem." + +User_Mission_-_Spooky_Tree.name=Mission: Uhyggeligt Træ +User_Mission_-_Spooky_Tree.desc="Der er masser af kasser derude. Men jeg håber virkelig ikke den fugl er sulten." + +User_Mission_-_Bamboo_Thicket.name=Mission: Bambusbuskads +User_Mission_-_Bamboo_Thicket.desc="Døden kommer oppefra." + +User_Mission_-_That_Sinking_Feeling.name=Mission: Følelsen af at Synke +User_Mission_-_That_Sinking_Feeling.desc="Vandet stiger hurtigt og tiden er knap. Mange har prøvet, men få sejret. Kan du redde dem alle sammen?" + +User_Mission_-_Newton_and_the_Hammock.name=Mission: Newton og Hængekøjen +User_Mission_-_Newton_and_the_Hammock.desc="Husk, grislinger: Et legemes hastighed forbliver uændret med mindre legemet bliver påvirket af krafter udefra." \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Locale/missions_fr.txt Thu Aug 30 12:13:24 2012 -0400 @@ -0,0 +1,47 @@ +Basic_Training_-_Bazooka.name=Initiation au Bazooka +Basic_Training_-_Bazooka.desc="Pour gagner, utiliser le vent à votre avantage !" + +Basic_Training_-_Grenade.name=Entrainement au lancer de Grenade +Basic_Training_-_Grenade.desc="Souvenez vous, retirez la goupille et lancez !" + +Basic_Training_-_Cluster_Bomb.name=Entrainement au lancer de grenade à fragmentation +Basic_Training_-_Cluster_Bomb.desc="Quelqu'un à besoin d'une bonne douche !" + +Basic_Training_-_Shotgun.name=Initiation au Fusil +Basic_Training_-_Shotgun.desc="On tire d'abord, on pose les questions après !" + +Basic_Training_-_Sniper_Rifle.name=Initiation au Sniper +Basic_Training_-_Sniper_Rifle.desc="Pan ! En pleine tête !" + +Basic_Training_-_Rope.name=Initiation à la Corde Ninja +Basic_Training_-_Rope.desc="Bouge de là et Balance toi !" + +User_Mission_-_Dangerous_Ducklings.name=Mission: Canards dangereux +User_Mission_-_Dangerous_Ducklings.desc="Très bien le bleu, il est temps de mettre en pratique ce que tu as appris aux entraînements !" + +User_Mission_-_Diver.name=Mission: Diver +User_Mission_-_Diver.desc="Cet assault 'sous-marin' est plus dur que cela n'y paraît...." + +User_Mission_-_Teamwork.name=Mission: Travail en équipe +User_Mission_-_Teamwork.desc="Parfois, l'amour blesse." + +User_Mission_-_Spooky_Tree.name=Mission: L'arbre qui parle +User_Mission_-_Spooky_Tree.desc="Beaucoup de caisses par ici. J'espère vraiment que cet oiseau n'a pas faim." + +User_Mission_-_Bamboo_Thicket.name=Mission: Forêt de Bamboo +User_Mission_-_Bamboo_Thicket.desc="La mort vient d'en haut." + +User_Mission_-_That_Sinking_Feeling.name=Mission: Cette impression de naufrage +User_Mission_-_That_Sinking_Feeling.desc="L'eau monte rapidement et le temps est compté. Beaucoup ont essayé, sans succès.Pouvez vous tous les sauvez ?" + +User_Mission_-_Newton_and_the_Hammock.name=Mission: Newton et le Hammac +User_Mission_-_Newton_and_the_Hammock.desc="Souvenez vous petits hérissons : La vitesse d'un corps reste constante à moins que ce corps ne soit attiré par une force extérieure!" + +User_Mission_-_The_Great_Escape.name=Mission: La grande évasion +User_Mission_-_The_Great_Escape.desc="Tu pense que tu peux me capturer ?!" + +User_Mission_-_Rope_Knock_Challenge.name=Challenge: A coup de Corde Ninja +User_Mission_-_Rope_Knock_Challenge.desc="Regarde derrière toi !" + +User_Mission_-_RCPlane_Challenge.name=Challenge: Avion télécommandé +User_Mission_-_RCPlane_Challenge.desc="Plutôt confiant, hein, aviateur ?" \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Highlander.cfg Thu Aug 30 12:13:24 2012 -0400 @@ -0,0 +1,2 @@ +Default +Default
--- a/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua Mon Jul 23 19:15:59 2012 +0300 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua Thu Aug 30 12:13:24 2012 -0400 @@ -1608,7 +1608,7 @@ vType[i] = "generic" vCounter[i] = 0 - vCounterLim[i] = 3000 + vCounterLim[i] = 150 vCircScore[i] = 0 vCircHealth[i] = 1 @@ -1801,7 +1801,7 @@ vType[i] = "drone" vCircRadMin[i] = 50 *5 vCircRadMax[i] = 90 *5 - vCounterLim[i] = 3000 + vCounterLim[i] = 150 vCircScore[i] = 10 vCircHealth[i] = 1 --else @@ -1826,7 +1826,7 @@ vCircRadMin[i] = 100*5 vCircRadMax[i] = 180*5 vCircWidth[i] = 1 - vCounterLim[i] = 2000 + vCounterLim[i] = 100 vCircScore[i] = 30 vCircHealth[i] = 3 else @@ -1998,7 +1998,7 @@ end -- if player is hit by circle bazooka - elseif (GetGearType(gear) == gtShell) then --or (GetGearType(gear) == gtBall) then + elseif (GetGearType(gear) == gtShell) and (CurrentHedgehog ~= nil) then --or (GetGearType(gear) == gtBall) then dist = GetDistFromGearToGear(gear, CurrentHedgehog) @@ -2387,17 +2387,19 @@ --WriteLnToConsole("I just got the velocity of the shell. It is dx: " .. dx .. "; dy: " .. dy) --WriteLnToConsole("CurrentHedgehog is at X: " .. GetX(CurrentHedgehog) .. "; Y: " .. GetY(CurrentHedgehog) ) - if GetX(gear) > GetX(CurrentHedgehog) then - dx = dx - turningSpeed--0.1 - else - dx = dx + turningSpeed--0.1 - end - - if GetY(gear) > GetY(CurrentHedgehog) then - dy = dy - turningSpeed--0.1 - else - dy = dy + turningSpeed--0.1 - end + if CurrentHedgehog ~= nil then + if GetX(gear) > GetX(CurrentHedgehog) then + dx = dx - turningSpeed--0.1 + else + dx = dx + turningSpeed--0.1 + end + + if GetY(gear) > GetY(CurrentHedgehog) then + dy = dy - turningSpeed--0.1 + else + dy = dy + turningSpeed--0.1 + end + end if (GetGearType(gear) == gtShell) then
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Scripts/Multiplayer/The_Specialists.cfg Thu Aug 30 12:13:24 2012 -0400 @@ -0,0 +1,2 @@ +Default +Default
--- a/share/hedgewars/Data/Scripts/plist/Balanced Random Weapon.plist Mon Jul 23 19:15:59 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>command</key> - <string>escript Scripts/Multiplayer/Balanced_Random_Weapon.lua</string> - <key>description</key> - <string></string> - <key>scheme</key> - <string>Default.plist</string> - <key>weapon</key> - <string></string> -</dict> -</plist>
--- a/share/hedgewars/Data/Scripts/plist/Capture the Flag.plist Mon Jul 23 19:15:59 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>command</key> - <string>escript Scripts/Multiplayer/Capture_the_Flag.lua</string> - <key>description</key> - <string></string> - <key>scheme</key> - <string>Default.plist</string> - <key>weapon</key> - <string>Default.plist</string> -</dict> -</plist>
--- a/share/hedgewars/Data/Scripts/plist/Highlander.plist Mon Jul 23 19:15:59 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>command</key> - <string>escript Scripts/Multiplayer/Highlander.lua</string> - <key>description</key> - <string></string> - <key>scheme</key> - <string>Default.plist</string> - <key>weapon</key> - <string>Default.plist</string> -</dict> -</plist>
--- a/share/hedgewars/Data/Scripts/plist/No Jumping.plist Mon Jul 23 19:15:59 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>command</key> - <string>escript Scripts/Multiplayer/No_Jumping.lua</string> - <key>description</key> - <string></string> - <key>scheme</key> - <string>Default.plist</string> - <key>weapon</key> - <string>Default.plist</string> -</dict> -</plist>
--- a/share/hedgewars/Data/Scripts/plist/Normal.plist Mon Jul 23 19:15:59 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>command</key> - <string></string> - <key>description</key> - <string></string> - <key>scheme</key> - <string>Default.plist</string> - <key>weapon</key> - <string>Default.plist</string> -</dict> -</plist>
--- a/share/hedgewars/Data/Scripts/plist/Racer.plist Mon Jul 23 19:15:59 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>command</key> - <string>escript Scripts/Multiplayer/Racer.lua</string> - <key>description</key> - <string></string> - <key>scheme</key> - <string>Shoppa.plist</string> - <key>weapon</key> - <string>Shoppa.plist</string> -</dict> -</plist>
--- a/share/hedgewars/Data/Scripts/plist/Random Weapon.plist Mon Jul 23 19:15:59 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>command</key> - <string>escript Scripts/Multiplayer/Balanced_Random_Weapon.lua</string> - <key>description</key> - <string></string> - <key>scheme</key> - <string>Default.plist</string> - <key>weapon</key> - <string></string> -</dict> -</plist>
--- a/share/hedgewars/Data/Scripts/plist/Space Invasion.plist Mon Jul 23 19:15:59 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>command</key> - <string>escript Scripts/Multiplayer/Space_Invasion.lua</string> - <key>description</key> - <string></string> - <key>scheme</key> - <string>Default.plist</string> - <key>weapon</key> - <string>Default.plist</string> -</dict> -</plist>
--- a/share/hedgewars/Data/Scripts/plist/The Specialists.plist Mon Jul 23 19:15:59 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>command</key> - <string>escript Scripts/Multiplayer/The_Specialists.lua</string> - <key>description</key> - <string></string> - <key>scheme</key> - <string></string> - <key>weapon</key> - <string></string> -</dict> -</plist>
--- a/share/hedgewars/Data/Scripts/plist/Tumbler.plist Mon Jul 23 19:15:59 2012 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>command</key> - <string>escript Scripts/Multiplayer/Tumbler.lua</string> - <key>description</key> - <string></string> - <key>scheme</key> - <string>Default.plist</string> - <key>weapon</key> - <string>Default.plist</string> -</dict> -</plist>
--- a/share/hedgewars/Data/misc/hedgewars-mimeinfo.xml Mon Jul 23 19:15:59 2012 +0300 +++ b/share/hedgewars/Data/misc/hedgewars-mimeinfo.xml Thu Aug 30 12:13:24 2012 -0400 @@ -11,12 +11,13 @@ <comment xml:lang="es">Demo de Hedgewars</comment> <comment xml:lang="fr">Démonstration d'Hedgewars</comment> <comment xml:lang="it">Demo di Hedgewars</comment> - <comment xml:lang="ko">헤즈와스 데모</comment> + <comment xml:lang="ko">헤즈와스 데모</comment> <comment xml:lang="pl">Demo gry Hedgewars</comment> - <comment xml:lang="pt">Hedgewars Demo</comment> + <comment xml:lang="pt">Hedgewars Demo</comment> <comment xml:lang="sk">Demo hry Hedgewars</comment> <comment xml:lang="cs">Ukázka hry Hedgewars</comment> <comment xml:lang="sv">Demo för Hedgewars</comment> + <comment xml:lang="da">Hedgewars-demo</comment> <magic priority="50"> <match required="yes" type="byte" offset="0" value="2"/> <match required="yes" type="big16" offset="1" value="21572"/> @@ -30,13 +31,14 @@ <comment xml:lang="de">Hedgewars gespeichertes Spiel</comment> <comment xml:lang="es">Partida guardada de Hedgewars</comment> <comment xml:lang="fr">Parties enregistrées d'Hedgewars</comment> - <comment xml:lang="ko">헤즈와스 저장된 게임</comment> + <comment xml:lang="ko">헤즈와스 저장된 게임</comment> <comment xml:lang="it">Partita salvata di Hedgewars</comment> <comment xml:lang="pl">Zapis gry Hedgewars</comment> - <comment xml:lang="pt">Partida guardada de Hedgewars</comment> + <comment xml:lang="pt">Partida guardada de Hedgewars</comment> <comment xml:lang="sk">Uložená hra Hedgewars</comment> <comment xml:lang="cs">Uložená hra Hedgewars</comment> <comment xml:lang="sv">Sparfil för Hedgewars</comment> + <comment xml:lang="da">Gemt Hedgewars-spil</comment> <magic priority="50"> <match required="yes" type="byte" offset="0" value="2"/> <match required="yes" type="big16" offset="1" value="21587"/>
--- a/share/hedgewars/Data/misc/hwengine.desktop.in Mon Jul 23 19:15:59 2012 +0300 +++ b/share/hedgewars/Data/misc/hwengine.desktop.in Thu Aug 30 12:13:24 2012 -0400 @@ -15,6 +15,7 @@ GenericName[sk]=Engine hry Hedgewars, pre prehrávanie uložených hier a demo súborov GenericName[cs]=Engine hry Hedgewars pro přehrávání uložených her a ukázkových souborů GenericName[sv]=Hedgewarsmotorn, för att öppna demo- och sparfiler +GenericName[da]=Kæmpende Pindsvin Icon=hedgewars.png Exec=${CMAKE_INSTALL_PREFIX}/bin/hwengine ${HEDGEWARS_DATADIR}/hedgewars/Data %f Path=/tmp
--- a/tools/PascalBasics.hs Mon Jul 23 19:15:59 2012 +0300 +++ b/tools/PascalBasics.hs Thu Aug 30 12:13:24 2012 -0400 @@ -9,7 +9,7 @@ import Data.Char builtin = ["succ", "pred", "low", "high", "ord", "inc", "dec", "exit", "break", "continue", "length"] - + pascalLanguageDef = emptyDef { commentStart = "(*" @@ -27,8 +27,8 @@ , "downto", "div", "mod", "record", "set", "nil" , "cdecl", "external", "if", "then", "else" ] -- ++ builtin - , reservedOpNames= [] - , caseSensitive = False + , reservedOpNames= [] + , caseSensitive = False } preprocessorSwitch :: Stream s m Char => ParsecT s u m String @@ -36,11 +36,11 @@ try $ string "{$" s <- manyTill (noneOf "\n") $ char '}' return s - + caseInsensitiveString s = do mapM_ (\a -> satisfy (\b -> toUpper a == toUpper b)) s <?> s return s - + pas = patch $ makeTokenParser pascalLanguageDef where patch tp = tp {stringLiteral = stringL} @@ -50,7 +50,7 @@ , (try $ string "(*") >> manyTill anyChar (try $ string "*)") , (try $ string "//") >> manyTill anyChar (try newline) ] - + comments = do spaces skipMany $ do @@ -66,5 +66,5 @@ s' <- (many $ noneOf "'") (char '\'') return $ '\'' : s' - comments + comments return $ concat (s:ss)
--- a/tools/PascalParser.hs Mon Jul 23 19:15:59 2012 +0300 +++ b/tools/PascalParser.hs Thu Aug 30 12:13:24 2012 -0400 @@ -14,7 +14,7 @@ import PascalBasics import PascalUnitSyntaxTree - + knownTypes = ["shortstring", "ansistring", "char", "byte"] pascalUnit = do @@ -27,7 +27,7 @@ i <- liftM (flip Identifier BTUnknown) (identifier pas) comments return i - + unit = do string "unit" >> comments name <- iD @@ -38,7 +38,7 @@ comments return $ Unit name int impl Nothing Nothing - + reference = buildExpressionParser table term <?> "reference" where term = comments >> choice [ @@ -48,9 +48,9 @@ , liftM SimpleReference iD >>= postfixes ] <?> "simple reference" - table = [ + table = [ ] - + postfixes r = many postfix >>= return . foldl (flip ($)) r postfix = choice [ parens pas (option [] parameters) >>= return . FunCall @@ -64,21 +64,23 @@ e <- parens pas expression comments return $ TypeCast (Identifier t BTUnknown) e - - -varsDecl1 = varsParser sepEndBy1 + +varsDecl1 = varsParser sepEndBy1 varsDecl = varsParser sepEndBy varsParser m endsWithSemi = do vs <- m (aVarDecl endsWithSemi) (semi pas) return vs aVarDecl endsWithSemi = do - unless endsWithSemi $ - optional $ choice [ - try $ string "var" - , try $ string "const" - , try $ string "out" - ] + isVar <- liftM (== Just "var") $ + if not endsWithSemi then + optionMaybe $ choice [ + try $ string "var" + , try $ string "const" + , try $ string "out" + ] + else + return Nothing comments ids <- do i <- (commaSep1 pas) $ (try iD <?> "variable declaration") @@ -93,7 +95,7 @@ e <- initExpression comments return (Just e) - return $ VarDeclaration False (ids, t) init + return $ VarDeclaration isVar False (ids, t) init constsDecl = do @@ -114,8 +116,8 @@ comments e <- initExpression comments - return $ VarDeclaration (isNothing t) ([i], fromMaybe (DeriveType e) t) (Just e) - + return $ VarDeclaration False (isNothing t) ([i], fromMaybe (DeriveType e) t) (Just e) + typeDecl = choice [ char '^' >> typeDecl >>= return . PointerTo , try (string "shortstring") >> return (String 255) @@ -211,7 +213,6 @@ comments return $ TypeDeclaration i t - rangeDecl = choice [ try $ rangeft , iD >>= return . Range @@ -221,8 +222,8 @@ e1 <- initExpression string ".." e2 <- initExpression - return $ RangeFromTo e1 e2 - + return $ RangeFromTo e1 e2 + typeVarDeclaration isImpl = (liftM concat . many . choice) [ varSection, constSection, @@ -251,7 +252,7 @@ t <- typesDecl <?> "type declaration" comments return t - + operatorDecl = do try $ string "operator" comments @@ -276,7 +277,7 @@ return Nothing return $ [OperatorDeclaration i rid ret vs b] - + funcDecl = do fp <- try (string "function") <|> try (string "procedure") comments @@ -300,7 +301,7 @@ else return Nothing return $ [FunctionDeclaration i ret vs b] - + functionDecorator = choice [ try $ string "inline;" , try $ caseInsensitiveString "cdecl;" @@ -309,8 +310,8 @@ , try $ string "varargs;" , try (string "external") >> comments >> iD >> optional (string "name" >> comments >> stringLiteral pas)>> string ";" ] >> comments - - + + program = do string "program" comments @@ -396,15 +397,15 @@ ] ] strOrChar [a] = CharCode . show . ord $ a - strOrChar a = StringLiteral a - + strOrChar a = StringLiteral a + phrasesBlock = do try $ string "begin" comments p <- manyTill phrase (try $ string "end" >> notFollowedBy alphaNum) comments return $ Phrases p - + phrase = do o <- choice [ phrasesBlock @@ -459,7 +460,7 @@ comments o <- phrase return $ foldr WithBlock o rs - + repeatCycle = do try $ string "repeat" >> space comments @@ -488,7 +489,7 @@ p <- phrase comments return $ ForCycle i e1 e2 p - + switchCase = do try $ string "case" comments @@ -515,14 +516,14 @@ p <- phrase comments return (e, p) - + procCall = do r <- reference p <- option [] $ (parens pas) parameters return $ ProcCall r p parameters = (commaSep pas) expression <?> "parameters" - + functionBody = do tv <- typeVarDeclaration True comments @@ -559,7 +560,7 @@ , itypeCast , iD >>= return . InitReference ] - + recField = do i <- iD spaces @@ -569,7 +570,7 @@ spaces return (i ,e) - table = [ + table = [ [ Prefix (char '-' >> return (InitPrefixOp "-")) ] @@ -603,7 +604,7 @@ i <- parens pas initExpression comments return $ InitTypeCast (Identifier t BTUnknown) i - + builtInFunction e = do name <- choice $ map (\s -> try $ caseInsensitiveString s >>= \i -> notFollowedBy alphaNum >> return i) builtin spaces
--- a/tools/PascalPreprocessor.hs Mon Jul 23 19:15:59 2012 +0300 +++ b/tools/PascalPreprocessor.hs Thu Aug 30 12:13:24 2012 -0400 @@ -19,7 +19,7 @@ ("FPC", "") , ("PAS2C", "") ] - + preprocess :: String -> IO String preprocess fn = do r <- runParserT (preprocessFile fn) (initDefines, [True]) "" "" @@ -28,17 +28,17 @@ hPutStrLn stderr (show a) return "" (Right a) -> return a - + where preprocessFile fn = do f <- liftIO (readFile fn) setInput f preprocessor - + preprocessor, codeBlock, switch :: ParsecT String (Map.Map String String, [Bool]) IO String - + preprocessor = chainr codeBlock (return (++)) "" - + codeBlock = do s <- choice [ switch @@ -55,7 +55,7 @@ c <- letter <|> oneOf "_" s <- many (alphaNum <|> oneOf "_") return $ c:s - + switch = do try $ string "{$" s <- choice [ @@ -68,7 +68,7 @@ , unknown ] return s - + include = do try $ string "INCLUDE" spaces @@ -85,26 +85,26 @@ ifdef = do s <- try (string "IFDEF") <|> try (string "IFNDEF") let f = if s == "IFNDEF" then not else id - + spaces d <- identifier spaces char '}' - + updateState $ \(m, b) -> (m, (f $ d `Map.member` m) : b) - + return "" if' = do s <- try (string "IF" >> notFollowedBy alphaNum) - + manyTill anyChar (char '}') --char '}' - + updateState $ \(m, b) -> (m, False : b) - + return "" elseSwitch = do @@ -118,7 +118,7 @@ define = do try $ string "DEFINE" spaces - i <- identifier + i <- identifier d <- ((string ":=" >> return ())<|> spaces) >> many (noneOf "}") char '}' updateState $ \(m, b) -> (if (and b) && (head i /= '_') then Map.insert i d m else m, b) @@ -126,7 +126,7 @@ replace s = do (m, _) <- getState return $ Map.findWithDefault s s m - + unknown = do fn <- many1 $ noneOf "}\n" char '}'
--- a/tools/PascalUnitSyntaxTree.hs Mon Jul 23 19:15:59 2012 +0300 +++ b/tools/PascalUnitSyntaxTree.hs Thu Aug 30 12:13:24 2012 -0400 @@ -17,7 +17,7 @@ data TypesAndVars = TypesAndVars [TypeVarDeclaration] deriving Show data TypeVarDeclaration = TypeDeclaration Identifier TypeDecl - | VarDeclaration Bool ([Identifier], TypeDecl) (Maybe InitExpression) + | VarDeclaration Bool Bool ([Identifier], TypeDecl) (Maybe InitExpression) | FunctionDeclaration Identifier TypeDecl [TypeVarDeclaration] (Maybe (TypesAndVars, Phrase)) | OperatorDeclaration String Identifier TypeDecl [TypeVarDeclaration] (Maybe (TypesAndVars, Phrase)) deriving Show @@ -30,8 +30,9 @@ | String Integer | Set TypeDecl | FunctionType TypeDecl [TypeVarDeclaration] - | DeriveType InitExpression + | DeriveType InitExpression | VoidType + | VarParamType TypeDecl -- this is a hack deriving Show data Range = Range Identifier | RangeFromTo InitExpression InitExpression @@ -106,11 +107,12 @@ | BTFloat | BTRecord String [(String, BaseType)] | BTArray Range BaseType BaseType - | BTFunction Int BaseType + | BTFunction Bool Int BaseType | BTPointerTo BaseType | BTUnresolved String | BTSet BaseType | BTEnum [String] | BTVoid | BTUnit + | BTVarParam BaseType deriving Show
--- a/tools/pas2c.hs Mon Jul 23 19:15:59 2012 +0300 +++ b/tools/pas2c.hs Thu Aug 30 12:13:24 2012 -0400 @@ -21,7 +21,7 @@ import PascalUnitSyntaxTree -data InsertOption = +data InsertOption = IOInsert | IOLookup | IOLookupLast @@ -30,7 +30,7 @@ type Record = (String, BaseType) type Records = Map.Map String [Record] -data RenderState = RenderState +data RenderState = RenderState { currentScope :: Records, lastIdentifier :: String, @@ -42,7 +42,7 @@ currentFunctionResult :: String, namespaces :: Map.Map String Records } - + emptyState = RenderState Map.empty "" BTUnknown [] 0 Set.empty "" "" getUniq :: State RenderState Int @@ -50,7 +50,7 @@ i <- gets uniqCounter modify(\s -> s{uniqCounter = uniqCounter s + 1}) return i - + addStringConst :: String -> State RenderState Doc addStringConst str = do strs <- gets stringConsts @@ -65,7 +65,7 @@ let sn = "__str" ++ show i modify (\s -> s{lastType = BTString, stringConsts = (sn, str) : strs}) return $ text sn - + escapeStr :: String -> String escapeStr = foldr escapeChar [] @@ -77,9 +77,9 @@ strInit a = text "STRINIT" <> parens (doubleQuotes (text $ escapeStr a)) renderStringConsts :: State RenderState Doc -renderStringConsts = liftM (vcat . map (\(a, b) -> text "const string255" <+> (text a) <+> text "=" <+> strInit b <> semi)) +renderStringConsts = liftM (vcat . map (\(a, b) -> text "const string255" <+> (text a) <+> text "=" <+> strInit b <> semi)) $ gets stringConsts - + docToLower :: Doc -> Doc docToLower = text . map toLower . render @@ -89,16 +89,16 @@ s <- flip execStateT initState $ f fn renderCFiles s where - printLn = liftIO . hPutStrLn stderr - print = liftIO . hPutStr stderr + printLn = liftIO . hPutStrLn stdout + print = liftIO . hPutStr stdout initState = Map.empty f :: String -> StateT (Map.Map String PascalUnit) IO () f fileName = do processed <- gets $ Map.member fileName unless processed $ do print ("Preprocessing '" ++ fileName ++ ".pas'... ") - fc' <- liftIO - $ tryJust (guard . isDoesNotExistError) + fc' <- liftIO + $ tryJust (guard . isDoesNotExistError) $ preprocess (fileName ++ ".pas") case fc' of (Left a) -> do @@ -122,19 +122,19 @@ renderCFiles units = do let u = Map.toList units let nss = Map.map (toNamespace nss) units - hPutStrLn stderr $ "Units: " ++ (show . Map.keys . Map.filter (not . Map.null) $ nss) + --hPutStrLn stderr $ "Units: " ++ (show . Map.keys . Map.filter (not . Map.null) $ nss) --writeFile "pas2c.log" $ unlines . map (\t -> show (fst t) ++ "\n" ++ (unlines . map ((:) '\t' . show) . snd $ t)) . Map.toList $ nss mapM_ (toCFiles nss) u where toNamespace :: Map.Map String Records -> PascalUnit -> Records - toNamespace nss (System tvs) = + toNamespace nss (System tvs) = currentScope $ execState f (emptyState nss) where f = do checkDuplicateFunDecls tvs - mapM_ (tvar2C True) tvs + mapM_ (tvar2C True) tvs toNamespace _ (Program {}) = Map.empty - toNamespace nss (Unit (Identifier i _) interface _ _ _) = + toNamespace nss (Unit (Identifier i _) interface _ _ _) = currentScope $ execState (interface2C interface) (emptyState nss){currentUnit = map toLower i ++ "_"} @@ -166,7 +166,7 @@ toCFiles :: Map.Map String Records -> (String, PascalUnit) -> IO () toCFiles _ (_, System _) = return () toCFiles ns p@(fn, pu) = do - hPutStrLn stderr $ "Rendering '" ++ fn ++ "'..." + hPutStrLn stdout $ "Rendering '" ++ fn ++ "'..." toCFiles' p where toCFiles' (fn, p@(Program {})) = writeFile (fn ++ ".c") $ (render2C initialState . pascal2C) p @@ -188,22 +188,22 @@ pascal2C :: PascalUnit -> State RenderState Doc pascal2C (Unit _ interface implementation init fin) = liftM2 ($+$) (interface2C interface) (implementation2C implementation) - + pascal2C (Program _ implementation mainFunction) = do impl <- implementation2C implementation - [main] <- tvar2C True + [main] <- tvar2C True (FunctionDeclaration (Identifier "main" BTInt) (SimpleType $ Identifier "int" BTInt) [] (Just (TypesAndVars [], mainFunction))) return $ impl $+$ main - - + + interface2C :: Interface -> State RenderState Doc interface2C (Interface uses tvars) = do u <- uses2C uses tv <- typesAndVars2C True tvars r <- renderStringConsts return (u $+$ r $+$ tv) - + implementation2C :: Implementation -> State RenderState Doc implementation2C (Implementation uses tvars) = do u <- uses2C uses @@ -247,11 +247,12 @@ ns <- gets currentScope tom <- gets (Set.member n . toMangle) cu <- gets currentUnit - let i' = case (t, tom) of - (BTFunction p _, True) -> cu ++ i ++ ('_' : show p) - (BTFunction _ _, _) -> cu ++ i - _ -> i - modify (\s -> s{currentScope = Map.insertWith (++) n [(i', t)] (currentScope s), lastIdentifier = n}) + let (i', t') = case (t, tom) of + (BTFunction _ p _, True) -> (cu ++ i ++ ('_' : show p), t) + (BTFunction _ _ _, _) -> (cu ++ i, t) + (BTVarParam t', _) -> ('(' : '*' : i ++ ")" , t') + _ -> (i, t) + modify (\s -> s{currentScope = Map.insertWith (++) n [(i', t')] (currentScope s), lastIdentifier = n}) return $ text i' where n = map toLower i @@ -261,13 +262,13 @@ let i' = map toLower i v <- gets $ Map.lookup i' . currentScope lt <- gets lastType - if isNothing v then + if isNothing v then error $ "Not defined: '" ++ i' ++ "'\n" ++ show lt ++ "\nwith num of params = " ++ show params ++ "\n" ++ show v - else - let vv = fromMaybe (head $ fromJust v) . find checkParam $ fromJust v in + else + let vv = fromMaybe (head $ fromJust v) . find checkParam $ fromJust v in modify (\s -> s{lastType = snd vv, lastIdentifier = fst vv}) >> (return . text . fst $ vv) where - checkParam (_, BTFunction p _) = p == params + checkParam (_, BTFunction _ p _) = p == params checkParam _ = False id2C IODeferred (Identifier i t) = do let i' = map toLower i @@ -282,16 +283,16 @@ let i' = map toLower i v <- gets $ Map.lookup i' . currentScope lt <- gets lastType - if isNothing v then + if isNothing v then error $ "Not defined: '" ++ i' ++ "'\n" ++ show lt - else + else let vv = f $ fromJust v in modify (\s -> s{lastType = snd vv, lastIdentifier = fst vv}) >> (return . text . fst $ vv) - - + + id2CTyped :: TypeDecl -> Identifier -> State RenderState Doc id2CTyped t (Identifier i _) = do tb <- resolveType t - case (t, tb) of + case (t, tb) of (_, BTUnknown) -> do error $ "id2CTyped: type BTUnknown for " ++ show i ++ "\ntype: " ++ show t (SimpleType {}, BTRecord _ r) -> do @@ -301,7 +302,7 @@ ts <- type2C t id2C IOInsert (Identifier i (BTRecord i r)) _ -> id2C IOInsert (Identifier i tb) - + resolveType :: TypeDecl -> State RenderState BaseType @@ -324,12 +325,12 @@ return . BTRecord "" . concat $ tvs where f :: TypeVarDeclaration -> State RenderState [(String, BaseType)] - f (VarDeclaration _ (ids, td) _) = mapM (\(Identifier i _) -> liftM ((,) i) $ resolveType td) ids + f (VarDeclaration _ _ (ids, td) _) = mapM (\(Identifier i _) -> liftM ((,) i) $ resolveType td) ids resolveType (ArrayDecl (Just i) t) = do t' <- resolveType t - return $ BTArray i BTInt t' + return $ BTArray i BTInt t' resolveType (ArrayDecl Nothing t) = liftM (BTArray RangeInfinite BTInt) $ resolveType t -resolveType (FunctionType t a) = liftM (BTFunction (length a)) $ resolveType t +resolveType (FunctionType t a) = liftM (BTFunction False (length a)) $ resolveType t resolveType (DeriveType (InitHexNumber _)) = return BTInt resolveType (DeriveType (InitNumber _)) = return BTInt resolveType (DeriveType (InitFloat _)) = return BTFloat @@ -344,7 +345,8 @@ resolveType (Sequence ids) = return $ BTEnum $ map (\(Identifier i _) -> map toLower i) ids resolveType (RangeType _) = return $ BTVoid resolveType (Set t) = liftM BTSet $ resolveType t - +resolveType (VarParamType t) = liftM BTVarParam $ resolveType t + resolve :: String -> BaseType -> State RenderState BaseType resolve s (BTUnresolved t) = do @@ -360,46 +362,75 @@ fromPointer s t = do error $ "Dereferencing from non-pointer type " ++ show t ++ "\n" ++ s - + functionParams2C params = liftM (hcat . punctuate comma . concat) $ mapM (tvar2C False) params numberOfDeclarations :: [TypeVarDeclaration] -> Int numberOfDeclarations = sum . map cnt where - cnt (VarDeclaration _ (ids, _) _) = length ids + cnt (VarDeclaration _ _ (ids, _) _) = length ids cnt _ = 1 +hasPassByReference :: [TypeVarDeclaration] -> Bool +hasPassByReference = or . map isVar + where + isVar (VarDeclaration v _ (_, _) _) = v + isVar _ = error $ "hasPassByReference called not on function parameters" + +toIsVarList :: [TypeVarDeclaration] -> [Bool] +toIsVarList = concatMap isVar + where + isVar (VarDeclaration v _ (p, _) _) = replicate (length p) v + isVar _ = error $ "toIsVarList called not on function parameters" + + +funWithVarsToDefine :: String -> [TypeVarDeclaration] -> Doc +funWithVarsToDefine n params = text "#define" <+> text n <> parens abc <+> text (n ++ "__vars") <> parens cparams + where + abc = hcat . punctuate comma . map (char . fst) $ ps + cparams = hcat . punctuate comma . map (\(c, v) -> if v then char '&' <> parens (char c) else char c) $ ps + ps = zip ['a'..] (toIsVarList params) + fun2C :: Bool -> String -> TypeVarDeclaration -> State RenderState [Doc] fun2C _ _ (FunctionDeclaration name returnType params Nothing) = do - t <- type2C returnType + t <- type2C returnType t'<- gets lastType p <- withState' id $ functionParams2C params - n <- id2C IOInsert $ setBaseType (BTFunction (numberOfDeclarations params) t') name - return [t empty <+> n <> parens p] - -fun2C True rv (FunctionDeclaration name returnType params (Just (tvars, phrase))) = do + n <- liftM render . id2C IOInsert $ setBaseType (BTFunction hasVars (numberOfDeclarations params) t') name + if hasVars then + return [funWithVarsToDefine n params $+$ t empty <+> text (n ++ "__vars") <> parens p] + else + return [t empty <+> text n <> parens p] + where + hasVars = hasPassByReference params + + +fun2C True rv (FunctionDeclaration name@(Identifier i _) returnType params (Just (tvars, phrase))) = do let res = docToLower $ text rv <> text "_result" t <- type2C returnType t'<- gets lastType - n <- id2C IOInsert $ setBaseType (BTFunction (numberOfDeclarations params) t') name - + + notDeclared <- liftM isNothing . gets $ Map.lookup (map toLower i) . currentScope + + n <- liftM render . id2C IOInsert $ setBaseType (BTFunction hasVars (numberOfDeclarations params) t') name + let isVoid = case returnType of VoidType -> True _ -> False - + (p, ph) <- withState' (\st -> st{currentScope = Map.insertWith un (map toLower rv) [(render res, t')] $ currentScope st , currentFunctionResult = if isVoid then [] else render res}) $ do p <- functionParams2C params ph <- liftM2 ($+$) (typesAndVars2C False tvars) (phrase2C' phrase) return (p, ph) - + let phrasesBlock = if isVoid then ph else t empty <+> res <> semi $+$ ph $+$ text "return" <+> res <> semi - - return [ - t empty <+> n <> parens p + + return [(if notDeclared && hasVars then funWithVarsToDefine n params else empty) $+$ + t empty <+> text (if hasVars then n ++ "__vars" else n) <> parens p $+$ - text "{" - $+$ + text "{" + $+$ nest 4 phrasesBlock $+$ text "}"] @@ -407,7 +438,8 @@ phrase2C' (Phrases p) = liftM vcat $ mapM phrase2C p phrase2C' p = phrase2C p un [a] b = a : b - + hasVars = hasPassByReference params + fun2C False _ (FunctionDeclaration (Identifier name _) _ _ _) = error $ "nested functions not allowed: " ++ name fun2C _ tv _ = error $ "fun2C: I don't render " ++ show tv @@ -418,8 +450,12 @@ i <- id2CTyped t i' tp <- type2C t return [text "typedef" <+> tp i] - -tvar2C _ (VarDeclaration isConst (ids, t) mInitExpr) = do + +tvar2C _ (VarDeclaration True _ (ids, t) Nothing) = do + t' <- liftM ((empty <+>) . ) $ type2C t + liftM (map(\i -> t' i)) $ mapM (id2CTyped (VarParamType t)) ids + +tvar2C _ (VarDeclaration _ isConst (ids, t) mInitExpr) = do t' <- liftM (((if isConst then text "const" else empty) <+>) . ) $ type2C t ie <- initExpr mInitExpr lt <- gets lastType @@ -431,23 +467,23 @@ i' <- id2CTyped t i ie <- initExpr2C e return [text "#define" <+> i' <+> parens ie <> text "\n"] - (_, BTFunction{}, _, Nothing) -> liftM (map(\i -> t' $ text "*" <+> i)) $ mapM (id2CTyped t) ids + (_, BTFunction{}, _, Nothing) -> liftM (map(\i -> t' i)) $ mapM (id2CTyped t) ids _ -> liftM (map(\i -> t' i <+> ie)) $ mapM (id2CTyped t) ids where initExpr Nothing = return $ empty initExpr (Just e) = liftM (text "=" <+>) (initExpr2C e) - + tvar2C f (OperatorDeclaration op (Identifier i _) ret params body) = do r <- op2CTyped op (extractTypes params) fun2C f i (FunctionDeclaration r ret params body) - + op2CTyped :: String -> [TypeDecl] -> State RenderState Identifier op2CTyped op t = do t' <- liftM (render . hcat . punctuate (char '_') . map (\t -> t empty)) $ mapM type2C t bt <- gets lastType return $ Identifier (t' ++ "_op_" ++ opStr) bt - where + where opStr = case op of "+" -> "add" "-" -> "sub" @@ -458,18 +494,23 @@ ">" -> "gt" "<>" -> "neq" _ -> error $ "op2CTyped: unknown op '" ++ op ++ "'" - + extractTypes :: [TypeVarDeclaration] -> [TypeDecl] extractTypes = concatMap f where - f (VarDeclaration _ (ids, t) _) = replicate (length ids) t + f (VarDeclaration _ _ (ids, t) _) = replicate (length ids) t f a = error $ "extractTypes: can't extract from " ++ show a initExpr2C, initExpr2C' :: InitExpression -> State RenderState Doc initExpr2C (InitArray values) = liftM (braces . vcat . punctuate comma) $ mapM initExpr2C values initExpr2C a = initExpr2C' a initExpr2C' InitNull = return $ text "NULL" -initExpr2C' (InitAddress expr) = liftM ((<>) (text "&")) (initExpr2C' expr) +initExpr2C' (InitAddress expr) = do + ie <- initExpr2C' expr + lt <- gets lastType + case lt of + BTFunction True _ _ -> return $ text "&" <> ie <> text "__vars" + _ -> return $ text "&" <> ie initExpr2C' (InitPrefixOp op expr) = liftM (text (op2C op) <>) (initExpr2C' expr) initExpr2C' (InitBinOp op expr1 expr2) = do e1 <- initExpr2C' expr1 @@ -500,7 +541,7 @@ initExpr2C' (InitRange a) = error $ show a --return $ text "<<range>>" initExpr2C' (InitSet []) = return $ text "0" initExpr2C' (InitSet a) = return $ text "<<set>>" -initExpr2C' (BuiltInFunction "low" [InitReference e]) = return $ +initExpr2C' (BuiltInFunction "low" [InitReference e]) = return $ case e of (Identifier "LongInt" _) -> int (-2^31) (Identifier "SmallInt" _) -> int (-2^15) @@ -515,7 +556,7 @@ initExpr2C' (BuiltInFunction "pred" [BuiltInFunction "succ" [e]]) = initExpr2C' e initExpr2C' (BuiltInFunction "succ" [e]) = liftM (<> text " + 1") $ initExpr2C' e initExpr2C' (BuiltInFunction "pred" [e]) = liftM (<> text " - 1") $ initExpr2C' e -initExpr2C' b@(BuiltInFunction _ _) = error $ show b +initExpr2C' b@(BuiltInFunction _ _) = error $ show b initExpr2C' a = error $ "initExpr2C: don't know how to render " ++ show a @@ -582,7 +623,7 @@ type2C' (FunctionType returnType params) = do t <- type2C returnType p <- withState' id $ functionParams2C params - return (\i -> t empty <+> i <> parens p) + return (\i -> (t empty <> (parens $ text "*" <> i) <> parens p)) type2C' (DeriveType (InitBinOp _ _ i)) = type2C' (DeriveType i) type2C' (DeriveType (InitPrefixOp _ i)) = type2C' (DeriveType i) type2C' (DeriveType (InitNumber _)) = return (text "int" <+>) @@ -610,7 +651,7 @@ e <- expr2C expr p1 <- (phrase2C . wrapPhrase) phrase1 el <- elsePart - return $ + return $ text "if" <> parens e $+$ p1 $+$ el where elsePart | isNothing mphrase2 = return $ empty @@ -634,7 +675,7 @@ e <- expr2C expr return $ r <+> text "=" <+> e <> semi _ -> error $ "Assignment to string from " ++ show lt - (BTArray _ _ _, _) -> phrase2C $ + (BTArray _ _ _, _) -> phrase2C $ ProcCall (FunCall [ Reference $ Address ref @@ -654,22 +695,22 @@ e <- expr2C expr cs <- mapM case2C cases d <- dflt - return $ + return $ text "switch" <> parens e $+$ braces (nest 4 . vcat $ cs ++ d) where case2C :: ([InitExpression], Phrase) -> State RenderState Doc case2C (e, p) = do ies <- mapM range2C e ph <- phrase2C p - return $ + return $ vcat (map (\i -> text "case" <+> i <> colon) . concat $ ies) <> nest 4 (ph $+$ text "break;") dflt | isNothing mphrase = return [] | otherwise = do ph <- mapM phrase2C $ fromJust mphrase return [text "default:" <+> nest 4 (vcat ph)] - + phrase2C wb@(WithBlock ref p) = do - r <- ref2C ref + r <- ref2C ref t <- gets lastType case t of (BTRecord _ rs) -> withRecordNamespace (render r ++ ".") rs $ phrase2C $ wrapPhrase p @@ -680,7 +721,7 @@ e1 <- expr2C e1' e2 <- expr2C e2' ph <- phrase2C (wrapPhrase p) - return $ + return $ text "for" <> (parens . hsep . punctuate (char ';') $ [i <+> text "=" <+> e1, i <+> text "<=" <+> e2, text "++" <> i]) $$ ph @@ -716,13 +757,13 @@ e2 <- expr2C expr2 t2 <- gets lastType case (op2C op, t1, t2) of - ("+", BTString, BTString) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strconcat" (BTFunction 2 BTString)) - ("+", BTString, BTChar) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strappend" (BTFunction 2 BTString)) - ("+", BTChar, BTString) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strprepend" (BTFunction 2 BTString)) - ("+", BTChar, BTChar) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_chrconcat" (BTFunction 2 BTString)) - ("==", BTString, BTChar) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strcomparec" (BTFunction 2 BTBool)) - ("==", BTString, BTString) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strcompare" (BTFunction 2 BTBool)) - ("!=", BTString, _) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strncompare" (BTFunction 2 BTBool)) + ("+", BTString, BTString) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strconcat" (BTFunction False 2 BTString)) + ("+", BTString, BTChar) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strappend" (BTFunction False 2 BTString)) + ("+", BTChar, BTString) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strprepend" (BTFunction False 2 BTString)) + ("+", BTChar, BTChar) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_chrconcat" (BTFunction False 2 BTString)) + ("==", BTString, BTChar) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strcomparec" (BTFunction False 2 BTBool)) + ("==", BTString, BTString) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strcompare" (BTFunction False 2 BTBool)) + ("!=", BTString, _) -> expr2C $ BuiltInFunCall [expr1, expr2] (SimpleReference $ Identifier "_strncompare" (BTFunction False 2 BTBool)) ("&", BTBool, _) -> return $ parens e1 <+> text "&&" <+> parens e2 ("|", BTBool, _) -> return $ parens e1 <+> text "||" <+> parens e2 (_, BTRecord t1 _, BTRecord t2 _) -> do @@ -732,7 +773,7 @@ -- aw, "LongInt" here is hwengine-specific hack i <- op2CTyped op [SimpleType (Identifier t1 undefined), SimpleType (Identifier "LongInt" undefined)] ref2C $ FunCall [expr1, expr2] (SimpleReference i) - ("in", _, _) -> + ("in", _, _) -> case expr2 of SetExpression set -> do ids <- mapM (id2C IOLookup) set @@ -801,17 +842,18 @@ modify (\s -> s{lastType = BTInt}) case lt of BTString -> return $ text "Length" <> parens e' - BTArray {} -> return $ text "length_ar" <> parens e' + BTArray RangeInfinite _ _ -> error $ "length() called on variable size array " ++ show e' + BTArray (RangeFromTo _ n) _ _ -> initExpr2C (BuiltInFunction "succ" [n]) _ -> error $ "length() called on " ++ show lt expr2C (BuiltInFunCall params ref) = do - r <- ref2C ref + r <- ref2C ref t <- gets lastType ps <- mapM expr2C params case t of - BTFunction _ t' -> do + BTFunction _ _ t' -> do modify (\s -> s{lastType = t'}) _ -> error $ "BuiltInFunCall lastType: " ++ show t - return $ + return $ r <> parens (hsep . punctuate (char ',') $ ps) expr2C a = error $ "Don't know how to render " ++ show a @@ -820,7 +862,7 @@ i <- id2C IOLookup name t <- gets lastType case t of - BTFunction _ rt -> do + BTFunction _ _ rt -> do modify(\s -> s{lastType = rt}) return $ i <> parens empty _ -> return $ i @@ -828,7 +870,7 @@ i <- ref2C r t <- gets lastType case t of - BTFunction _ rt -> do + BTFunction _ _ rt -> do modify(\s -> s{lastType = rt}) return $ i <> parens empty _ -> return $ i @@ -844,7 +886,7 @@ -- conversion routines ref2C ae@(ArrayElement [expr] ref) = do e <- expr2C expr - r <- ref2C ref + r <- ref2C ref t <- gets lastType case t of (BTArray _ _ t') -> modify (\st -> st{lastType = t'}) @@ -862,13 +904,13 @@ _ -> return $ r <> brackets e ref2C (SimpleReference name) = id2C IOLookup name ref2C rf@(RecordField (Dereference ref1) ref2) = do - r1 <- ref2C ref1 + r1 <- ref2C ref1 t <- fromPointer (show ref1) =<< gets lastType r2 <- case t of BTRecord _ rs -> withRecordNamespace "" rs $ ref2C ref2 BTUnit -> error "What??" a -> error $ "dereferencing from " ++ show a ++ "\n" ++ show rf - return $ + return $ r1 <> text "->" <> r2 ref2C rf@(RecordField ref1 ref2) = do r1 <- ref2C ref1 @@ -888,7 +930,7 @@ r <- fref2C ref t <- gets lastType case t of - BTFunction _ t' -> do + BTFunction _ _ t' -> do ps <- liftM (parens . hsep . punctuate (char ',')) $ mapM expr2C params modify (\s -> s{lastType = t'}) return $ r <> ps @@ -898,10 +940,13 @@ where fref2C (SimpleReference name) = id2C (IOLookupFunction $ length params) name fref2C a = ref2C a - + ref2C (Address ref) = do r <- ref2C ref - return $ text "&" <> parens r + lt <- gets lastType + case lt of + BTFunction True _ _ -> return $ text "&" <> parens (r <> text "__vars") + _ -> return $ text "&" <> parens r ref2C (TypeCast t'@(Identifier i _) expr) = do lt <- expr2C expr >> gets lastType case (map toLower i, lt) of @@ -909,7 +954,7 @@ ("shortstring", BTPointerTo _) -> ref2C $ FunCall [expr] (SimpleReference (Identifier "pchar2str" $ BTString)) (a, _) -> do e <- expr2C expr - t <- id2C IOLookup t' + t <- id2C IOLookup t' return . parens $ parens t <> e ref2C (RefExpression expr) = expr2C expr